Page MenuHome

Last Nvidia drivers (372.70) and Blender (2.77a) turn off Windows Aero
Closed, ResolvedPublic

Description

System Information
Windows 7 Ult x64
780GTX Drivers 720.70

Blender Version
Broken: 2.77a with drivers 372.70 or 372.54 (Not tested with this one, but I read somewhere is broken too)
Worked: I used an older version but I read this work until 368.81 without problems

Short description of error
At open Blender with the last Nvidia drivers (372.70 ), Blender (2.77a) turn the Windows 7 Aero off.

Exact steps for others to reproduce the error
Install the last Nvidia drivers 372.70 restart or no then open Blender 2.77a, then the whole desktop turn Aero off.

Details

Commits
rBf0159d1d48a1: Fix T49215
Type
Bug

Event Timeline

LazyDodo (LazyDodo) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Sep 1 2016, 2:25 AM

Nvidia added a pixel format with 64 bit color in it (supports 64 bit color, but doesn't support PFD_SUPPORT_COMPOSITION) giving this format a huge advantage in weight_pixel_format. (and disables aero in the process)

This does the trick for me, Mike? Thoughts?

 intern/ghost/intern/GHOST_ContextWGL.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp
index abce3ea..e27065e 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -194,7 +194,7 @@ static int weight_pixel_format(PIXELFORMATDESCRIPTOR &pfd, PIXELFORMATDESCRIPTOR
 	/* give no weight to a 16-bit depth buffer, because those are crap */
 	weight += pfd.cDepthBits - 16;
 
-	weight += pfd.cColorBits -  8;
+	weight += min(pfd.cColorBits,33) -  8; // clip > 32 bit formats, so they don't get too much of an advantage
 
 	if (preferredPFD.cAlphaBits > 0 && pfd.cAlphaBits > 0)
 		weight++;

Also we don't really rate on PFD_SUPPORT_COMPOSITION unless WIN32_COMPOSITING is defined (which it is not) seems wonky as well.... given vista is now our lowest platform we should be able to enable this?

I need to freshen up knowledge of Windows pixel format options, but as a quick fix this looks fine. Minor change: why not this?

min(pfd.cColorBits, 32) - 8

Good & thorough article on "OpenGL and Windows Vista"
https://www.opengl.org/pipeline/article/vol003_7/

^-- based on this I'm not 100% sure we're doing everything necessary for PFD_SUPPORT_COMPOSITION (but we might be). Apply the above fix for 2.78 & we can do PFD_SUPPORT_COMPOSITION properly after.

Lots of magic going on in this pixel format weighting scheme.. I bet we can come up with something simpler for 2.8 or later.

TODO: Support deep display output for people with high-end monitors (10 bits per channel). Opt-in via System user prefs, not automatic.

LazyDodo (LazyDodo) added a comment.EditedSep 1 2016, 6:25 PM

I need to freshen up knowledge of Windows pixel format options, but as a quick fix this looks fine. Minor change: why not this?
min(pfd.cColorBits, 32) - 8

Cause i figured, higher color depth, sure, have a +1 on 32 bit color, but not +32, I'm not overly dedicated to this though, awarding no points would be fine with me as well. We could also just flat out reject the 64 bit color profiles, return 0 and be done with it?

Good & thorough article on "OpenGL and Windows Vista"
https://www.opengl.org/pipeline/article/vol003_7/

Yeah i read that yesterday while figuring out why it disabled aero :)

^-- based on this I'm not 100% sure we're doing everything necessary for PFD_SUPPORT_COMPOSITION (but we might be). Apply the above fix for 2.78 & we can do PFD_SUPPORT_COMPOSITION properly after.

I think we're pretty close to doing everything it says , but it's all disabled with that WIN32_COMPOSITING define not being there.
I almost suggested to just turn it on, but then i bumped into some dwm drawing code who's purpose isn't entirely clear to me. (enabled it, didn't seem to do anything)

Lots of magic going on in this pixel format weighting scheme.. I bet we can come up with something simpler for 2.8 or later.

I say make a quick hack for 2.78 by using the patch above (with either 32 or 33, meh, don't care) and see how we can do this better for 2.8?

TODO: Support deep display output for people with high-end monitors (10 bits per channel). Opt-in via System user prefs, not automatic.

I say make a quick hack for 2.78 by using the patch above (with either 32 or 33, meh, don't care) and see how we can do this better for 2.8?

I think any bit depth > 32 will disable Aero.

You're probably right, how about this is a less risky solution ?

 intern/ghost/intern/GHOST_ContextWGL.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp
index abce3ea..64ee692 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -183,6 +183,7 @@ static int weight_pixel_format(PIXELFORMATDESCRIPTOR &pfd, PIXELFORMATDESCRIPTOR
 	    !(pfd.dwFlags & PFD_DOUBLEBUFFER)    || /* Blender _needs_ this */
 	    !(pfd.iPixelType == PFD_TYPE_RGBA)   ||
 	     (pfd.cDepthBits < 16)               ||
+	     (pfd.cColorBits > 32)               || /* 64 bit formats disable aero */
 	     (pfd.dwFlags & PFD_GENERIC_FORMAT))    /* no software renderers */
 	{
 		return 0;

Yeah, that's better actually -- we don't want 64-bit format tying with a 32-bit one based on score. Better to reject them for now.

Commit!

This comment was removed by David (Hgdavidy).