After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610294 - Fade out not working with NVIDIA
Fade out not working with NVIDIA
Status: RESOLVED OBSOLETE
Product: gnome-screensaver
Classification: Deprecated
Component: daemon
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-17 18:48 UTC by Chris Coulson
Modified: 2014-08-19 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
13_nvidia_gamma_fade_fallback.patch (1.51 KB, patch)
2010-02-17 18:48 UTC, Chris Coulson
none Details | Review

Description Chris Coulson 2010-02-17 18:48:31 UTC
Created attachment 154065 [details] [review]
13_nvidia_gamma_fade_fallback.patch

Since http://git.gnome.org/browse/gnome-screensaver/commit/?id=f423a56d536b4ce19383ed74c1550ebd12f88541, the fade-out no longer works with the proprietary NVIDIA driver. It seems that the RANDR gamma fade is not supported on these drivers.

Running in xtrace, I see this:

000:<:002c: 12: RANDR-Request(152,0): QueryVersion major-version=1 minor-version=3
000:>:002c:32: Reply to QueryVersion: major-version=1 minor-version=3

This comes from calling gnome_rr_screen_new in check_randr_extension. Apparently version 1.3 of the RANDR extension exists. However, I also see this a few lines afterwards:

000:<:007c:  8: RANDR-Request(152,22): GetCrtcGammaSize crtc=0x00000147
000:>:007c:32: Reply to GetCrtcGammaSize: size=0x0000

This is called from crtc_initialize in gnome-desktop when populating ScreenInfo. Because it appears that RANDR 1.3 exists, fade_type is set to FADE_TYPE_XRANDR, but note that crtc->gamma_size is 0 for this CRTC.

When attempting to fade, I see the following lines in xtrace:

000:<:00c9:  8: RANDR-Request(152,23): GetCrtcGamma crtc=0x00000147
000:>:00c9:32: Reply to GetCrtcGamma: red=; green=; blue=;

This comes from calling gnome_rr_crtc_get_gamma in xrandr_fade_setup. xrandr_fade_setup returns TRUE, and then xrandr_fade_set_alpha_gamma is called repeatedly for the duration of the fade. However, xrandr_crtc_whack_gamma bails out early because gamma_info->size is 0, and we get no fade at all (instead, the screen just turns black at the end of the fade).

I've attached a patch which I uploaded to Ubuntu, which makes sure it correctly falls back to XF86VM gamma fade on a particular screen when crtc->gamma_size is 0 for any CRTC.
Comment 1 William Jon McCann 2010-06-21 21:20:40 UTC
Dave, thoughts on this?
Comment 2 Ritesh Khadgaray ( irc:ritz) 2010-11-02 11:17:49 UTC
This will lead g-s to crash on vnc based display atleast, more info at https://bugzilla.gnome.org/show_bug.cgi?id=618932 .
Comment 3 Pacho Ramos 2011-01-17 16:19:03 UTC
I can confirm this bug, fading disappeared sometime ago on my systems and all of them use nvidia driver, maybe this patch and the one fixing bug #618932 could be considered for inclussion if possible.

Thanks a lot
Comment 4 Tanyel A. Nimeu 2011-01-30 14:24:15 UTC
I can confirm this bug still occurring in gnome-screensaver-2.30.2 using latest stable nvidia-drivers-260.19.36.
I can also confirm Chris' patch is fixing this.

Thanks for that
Comment 5 Pacho Ramos 2011-03-06 11:38:28 UTC
Can this be solved at least for Gnome 3? Thanks
Comment 6 Bastien Nocera 2014-08-19 21:11:10 UTC
gnome-screensaver is obsolete, and this particular bug has been fixed in
gnome-shell itself, with the fade out being done through a black window's opacity changing until completely black, at which point the screen is turned off.