[PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA hosts
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
[PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA hosts
While not a new one, I believe that it is a major regression since v4.3.14, that should be fixed for v5.0 series.
https://www.virtualbox.org/ticket/13653
Running any kind of Windows 7 guest with Aero on any Linux host with NVIDIA GPU causes flicker.
UPDATE: [22.May] After 3 days of almost sleepless nights, I was able to find the bug !
Fix is related to multi-threading, and I don't understand it's implications fully. And my patch could kill 3D acceleration on any other hosts, so proceed with caution !
I call Oracle to review this patch, release v5.0.0-BETA5 early with a fix, so we could test 3D acceleration on all hosts. (Windows/Mac OS X/Linux) and all GPU vendors (Intel/AMD/NVIDIA).
But this bug is worth it !
--
-"Technologov"
https://www.virtualbox.org/ticket/13653
Running any kind of Windows 7 guest with Aero on any Linux host with NVIDIA GPU causes flicker.
UPDATE: [22.May] After 3 days of almost sleepless nights, I was able to find the bug !
Fix is related to multi-threading, and I don't understand it's implications fully. And my patch could kill 3D acceleration on any other hosts, so proceed with caution !
I call Oracle to review this patch, release v5.0.0-BETA5 early with a fix, so we could test 3D acceleration on all hosts. (Windows/Mac OS X/Linux) and all GPU vendors (Intel/AMD/NVIDIA).
But this bug is worth it !
--
-"Technologov"
- Attachments
-
- vbox-NVIDIA-fix-v2.patch.txt
- (683 Bytes) Downloaded 74 times
Last edited by Technologov on 23. May 2015, 00:40, edited 3 times in total.
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
So is this a patch or a hack?
A patch would fix the underlying issue where a hack to revert the code to a previous build and then make it work seems to not be the way to go. Perhaps if you gave a detailed description and what you are doing to actually make it work ( as in fixing the code ) with the existing code would help others. I mean if all that needs to be done is revert to older code anyone could do that by installing an older version of VirtualBox. Right?
A patch would fix the underlying issue where a hack to revert the code to a previous build and then make it work seems to not be the way to go. Perhaps if you gave a detailed description and what you are doing to actually make it work ( as in fixing the code ) with the existing code would help others. I mean if all that needs to be done is revert to older code anyone could do that by installing an older version of VirtualBox. Right?
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
This one partially reverts the code to a previous build, but keeps mostly v5.0 code. I think it is a patch.
Still it needs to be tested across all combinations.
Still it needs to be tested across all combinations.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
So I quickly looked at the code and your "patch" and it appears that you are removing a define, right? Do you know what that does to the rest of the code?
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
I don't understand it fully, but it renders 3D graphics in a different context / different memory area. And with a different CPU thread.
Last edited by Technologov on 22. May 2015, 23:36, edited 1 time in total.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
Hummm. Well I see a lot of code that is depending on that define. Not sure I would have gone down that road but oh well. This "patch" just isn't for me. Thank you for trying though.
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
Tested setups: (Works with Aero 3D )
Host1: Debian Linux 6 x64 + BETA4 + NVIDIA patch + Intel Core i7 + NVIDIA GeForce GTX 560 Ti SLI (x2) (NV 346.59 driver)
Host2: Debian Linux 6 x64 + BETA4 + NVIDIA patch + Intel Core 2 + AMD Radeon HD 3850 (catalyst-13.1 proprietary driver)
Host3: Debian Linux 8 x64 + BETA4 + NVIDIA patch + Intel Core i7 + Intel HD 4400 GPU (Intel Open-Source driver, part of Debian)
---
Guest: Windows 7 x64 + Aero 3D + GA BETA4
Tested: Aero (translucent windows) + Aero peek (mini-window preview on Taskbar) + Flip window (task switching).
Basically those tests shows, that Aero 3D works fine with all 3 GPU vendors with v5,0 codebase + my NVIDIA patch on Linux hosts.
Host1: Debian Linux 6 x64 + BETA4 + NVIDIA patch + Intel Core i7 + NVIDIA GeForce GTX 560 Ti SLI (x2) (NV 346.59 driver)
Host2: Debian Linux 6 x64 + BETA4 + NVIDIA patch + Intel Core 2 + AMD Radeon HD 3850 (catalyst-13.1 proprietary driver)
Host3: Debian Linux 8 x64 + BETA4 + NVIDIA patch + Intel Core i7 + Intel HD 4400 GPU (Intel Open-Source driver, part of Debian)
---
Guest: Windows 7 x64 + Aero 3D + GA BETA4
Tested: Aero (translucent windows) + Aero peek (mini-window preview on Taskbar) + Flip window (task switching).
Basically those tests shows, that Aero 3D works fine with all 3 GPU vendors with v5,0 codebase + my NVIDIA patch on Linux hosts.
- Attachments
-
- Windows 7-2015-05-24-18-53-01.log
- VBox.log from Host #3. (Intel GPU)
- (99.45 KiB) Downloaded 29 times
-
- Windows 7 64-bit-2015-05-24-16-52-17.log
- vbox.log from Host #2. (Radeon GPU) Works.
- (104.24 KiB) Downloaded 31 times
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
I may write a patch that will target only NVIDIA GPUs on X11 hosts only. Would that be better?
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
so... should I write it ?
upside:
Less potential regressions
downside:
uglier code.
upside:
Less potential regressions
downside:
uglier code.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
If you mean for me, then no. If I want to I can always edit the source myself. At this point I am still looking at the code to see what else it would break. I don't like hacks myself and even though it works for you in certain cases I have to be sure so my production machines don't get hosed. Of course I am speaking for just me. Others may have a different opinion though. But thanks for the offer.
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
Re: [PATCH] 3D acceleration: Aero flicker on Linux/NVIDIA ho
I think we can allow this patch for X11/Linux hosts. Why ?
Because I tested it on Linux with Intel GPU (HD 4400), AMD GPU (Radeon 3850) and NVIDIA GPU (GeForce GTX 560 Ti). Works on all 3 with Windows 7 Aero guest.
At the same time, minimizing potential regressions, and fixing an important bug.
Also, NVIDIA drivers share same source code across all X11 hosts, namely Linux, Solaris and FreeBSD.
Besides, this way we operated in VirtualBox 4.3.14, so risk should be very limited in my opinion.
Because I tested it on Linux with Intel GPU (HD 4400), AMD GPU (Radeon 3850) and NVIDIA GPU (GeForce GTX 560 Ti). Works on all 3 with Windows 7 Aero guest.
At the same time, minimizing potential regressions, and fixing an important bug.
Also, NVIDIA drivers share same source code across all X11 hosts, namely Linux, Solaris and FreeBSD.
Besides, this way we operated in VirtualBox 4.3.14, so risk should be very limited in my opinion.
- Attachments
-
- vbox-NVIDIA-fix-v2a.patch.txt
- (1.11 KiB) Downloaded 43 times
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel