Gamma values are not being set properly after a second fade out resulting in a black screen

Bug #555870 reported by Robert Hooker on 2010-04-05
This bug affects 21 people
Affects Status Importance Assigned to Milestone
GNOME Screensaver
NULL Project
xorg (Ubuntu)
Chris Coulson

Bug Description

Binary package hint: gnome-screensaver

When running the test-fade app in gnome-screensaver the gamma values are improperly being set after the second fade, resulting in a permenant black screen until manual adjustment of the gamma values.

Steps to reproduce:
get the gnome-screensaver source and build it
cd /path/to/gnome-screensaver/src/

it will attempt to fade twice, after the first fade and restore the second fade will not come back unless you manually fix the gamma values with a command such as
xrandr --output LVDS1 --gamma 1:1:1

Here is a script to reproduce and automatically adjust fix the gamma values afterwards so its usable with one machine, you have to manually move the cursor or hit a key after each fade.


sleep 10
xrandr --output LVDS1 --gamma 1:1:1

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-screensaver 2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic
Uname: Linux 2.6.32-19-generic i686
Architecture: i386
Date: Mon Apr 5 13:08:59 2010
GnomeSessionIdleInhibited: No
GnomeSessionInhibitors: None
 PATH=(custom, user)
SourcePackage: gnome-screensaver
WindowManager: metacity

Robert Hooker (sarvatt) wrote :
Robert Hooker (sarvatt) wrote :

Output while running test-fade

** Message: XFree86-VidModeExtension version 2.2
[gs_debug_init] gs-debug.c:106 (12:34:08): Debugging enabled
[gs_fade_init] gs-fade.c:906 (12:34:08): Fade type: 3
fading out...done.
fading in...[gs_fade_reset] gs-fade.c:851 (12:34:09): Resetting fade
fading out...done.
fading in...[gs_fade_reset] gs-fade.c:851 (12:34:12): Resetting fade
[gs_debug_shutdown] gs-debug.c:115 (12:34:14): Shutting down debugging
Resetting xrandr gamma values forcibly.

The second fading in... line doesn't actually do anything

Robert Hooker (sarvatt) wrote :

Here is a slightly clearer xtrace with the gnome-screensaver debug output mixed in so you can tell where each event happens.

Robert Hooker (sarvatt) on 2010-04-05
Changed in gnome-screensaver (Ubuntu):
assignee: nobody → Chris Coulson (chrisccoulson)
Changed in gnome-screensaver (Ubuntu):
importance: Undecided → High
status: New → In Progress
Changed in gnome-screensaver:
status: Unknown → New
Krzysztof Klimonda (kklimonda) wrote :

Attaching the latest xtrace output

Krzysztof Klimonda (kklimonda) wrote :

Another xtrace output. This time I got a barely visible desktop instead of the pitch black one.

Erik Meitner (e.meitner) wrote :

Folks, bug 561538 seems to be related to this one but I will wait for feedback from other reporters on that one before marking it as a duplicate.

Erik Meitner (e.meitner) wrote :

I disabled fading using the attached patch. Solves problem for me but it is not a fix, just a workaround with minimal functional impact.

cd /tmp
wget [url for patch]
apt-get source gnome-screensaver
cp 99_wsgc_fixes3.patch gnome-screensaver-2.30.0/debian/patches/
cd gnome-screensaver-2.30.0
fakeroot dpkg-buildpackage
[note you may have to install a fair amount of packages to get this to build, just read the warning for details]
cd ..
ls *.deb
sudo dpkg -i [name of .deb file above]
killall gnome-screensaver

Yeah I think my bug #570687 and also #561538 are duplicates.

Erik Meitner (e.meitner) wrote :

Also note bug 546578.

tags: added: patch
Chris Coulson (chrisccoulson) wrote :

Thanks, but we're not going to disable fading in a SRU, and your patch introduces a really annoying regression anyway (I get no window in which I can cancel the screensaver to avoid having to unlock the screen). I'm going to be investigating this this week, with the intention of fixing it correctly

Chris Coulson (chrisccoulson) wrote :

Incidentally, I think the issue here is that the VT switch occurs before the fade is finished, and the subsequent SetCrtcGamma commands on the inactive VT (including the command to reset the gamma) are silently ignored.

Stefan Pappalardo (sjuk) wrote :

Hello Chris Coulson, I think there is a relation to bug #577219. Please have a look at it in your investigation. Perhaps it could help. Thanks.

Stefan Pappalardo (sjuk) wrote :

Hello again, I think there is a relation to bug #546578 (and it's 4 duplicates) too. Hint: Bug #577219 has got 2 duplicates as well. I think the impact of this bug could increase quite fast! Perhaps as fast as the "fast-user-switch" (*jokingly*).

Chris Coulson (chrisccoulson) wrote :

Whether those bugs are related or not, this bug has got nothing to do with the indicator-applet, and I'm not sure why you added the task

affects: indicator-applet → null
Changed in null:
status: New → Invalid
Stefan Pappalardo (sjuk) wrote :

Hello Chris Coulson. Are you sure there is no relation to bug "black screen after a few user switches" (#546578)?
I thought there is a "fade" when at userswitch/logout.

See bug #546578:
[Workaround] 2
Blindfold: Unlock session by typing password, then press <Alt>-<F2> (call "Run ..." dialog), then type "xgamma -gamma 1.0" and hit <Enter>
[Workaround] 3
Update gnome-screensaver to 2.30.0-0ubuntu2 or higher (yet in proposed repo). Those versions are compiled with disabled "fade on lock".

For me it looks a bit like this bug (look above):
xrandr --output LVDS1 --gamma 1:1:1

Please review.


Changed in gnome-screensaver:
importance: Unknown → Medium
Maxim Levitsky (maximlevitsky) wrote :

This looks like fixed on latest xserver git + nouveau.
Could you recheck is bug is still present.

Raphael Camus (raphael-camus) wrote :

After upgrading to Ubuntu 10.10, I do not have such a problem anymore and mysql is working properly.

Raphael Camus (raphael-camus) wrote :

well, no link with mysql (wrong copy/paste), but I confirm I do not face the bug anymore, after Ubuntu 10.10 upgrade (and even before as far as I can remember, after some update)

Robert Hooker, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect 555870

affects: gnome-screensaver (Ubuntu) → xorg (Ubuntu)
Changed in xorg (Ubuntu):
status: In Progress → Incomplete
Changed in gnome-screensaver:
status: New → Expired
Changed in xorg (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.