[hardy] sliders for gamma correction don't work in displayconfig

Bug #201468 reported by Sven Boden
2
Affects Status Importance Assigned to Milestone
kde-guidance (Ubuntu)
Fix Released
Undecided
Andreas Wenning

Bug Description

Binary package hint: kde-guidance

The sliders for gamma connection in the "Monitor&Display" module of system settings does not work (currently on kubuntu hardy alpha 6).

To test:
- open a konsole (terminal if not under kubuntu)
- sudo displayconfig
- go to the "Color & Gamma" tab
- Switch the radio button in the middle of the screen from All to RGB and you will get error message below.
- Also changing any of the sliders will result in the same error. The gamma display is not changed.
- What does work is the "Target gamma" dropdown on the bottom line.

Error:
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
Traceback (most recent call last):
  File "/usr/bin/displayconfig", line 836, in slotGammaRadioClicked
    self.currentgammascreen.setRedGamma(self.currentgammascreen.getRedGamma())
  File "/var/lib/python-support/python2.5/displayconfigabstraction.py", line 1878, in setRedGamma
    self.x_live_screen.setGamma( (self.redgamma,self.greengamma,self.bluegamma) )
  File "/var/lib/python-support/python2.5/xf86misc.py", line 64, in setGamma
    ixf86misc.SetGamma(self.display,self.screenid,gammatuple[0],gammatuple[1],gammatuple[2])
SystemError: error return without exception set
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 42, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
IndexError: list index out of range

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/displayconfig", line 836, in slotGammaRadioClicked
    self.currentgammascreen.setRedGamma(self.currentgammascreen.getRedGamma())
  File "/var/lib/python-support/python2.5/displayconfigabstraction.py", line 1878, in setRedGamma
    self.x_live_screen.setGamma( (self.redgamma,self.greengamma,self.bluegamma) )
  File "/var/lib/python-support/python2.5/xf86misc.py", line 64, in setGamma
    ixf86misc.SetGamma(self.display,self.screenid,gammatuple[0],gammatuple[1],gammatuple[2])
SystemError: error return without exception set

Related branches

Revision history for this message
Sven Boden (svenboden) wrote :
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 201468] Re: [hardy] sliders for gamma correction don't work in displayconfig

I'm unable to replicate this. I may be able to patch this not to crash, but
that's about it.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Sven
Which video-driver are you using? I remember hearing some problems regarding gamma (changing) problems with the nvidia driver.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

I've added kde-guidance 0.8.0svn20080103-0ubuntu11~ppa1 to my PPA. This should at least make displayconfig not crash. See: https://launchpad.net/~andreas-wenning/+archive

Please test, and report back if it works.

Changed in kde-guidance:
assignee: nobody → andreas-wenning
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kde-guidance - 0.8.0svn20080103-0ubuntu11

---------------
kde-guidance (0.8.0svn20080103-0ubuntu11) hardy; urgency=low

  [ Andreas Wenning ]
  * Added kubuntu_24_displayconfig_no_gamma.patch: As we cannot check if
    the video driver supports live gamma changes, we should catch any
    exceptions generated by lacking support. (LP: #201092, #201468).
  * Added kubuntu_25_kde-powermanager_allways_change_brightness.patch
    which disables the internal check for not setting the same bright-
    ness as last time. Some laptops can change brightness in hardware
    and other programs can change it through HAL, so we should allways
    try to change the brightness.

  [ Guillaume Martres ]
  * Added kubuntu_26_kde-powermanager_handle_hal_dbus_restarts.patch so
    the powermanager better handles dbus/hal restarts. (LP: #123812).

  [ Scott Kitterman ]
  * Added kubuntu_27_displayconfig-restore_try_getsize_again.patch to try to
    get size from screen 0 if the first attempt failed (LP: #206509)

 -- Scott Kitterman <email address hidden> Sat, 05 Apr 2008 20:06:50 -0400

Changed in kde-guidance:
status: In Progress → Fix Released
Revision history for this message
Sven Boden (svenboden) wrote :

I still get the error after the fix. I'm using an ATI card and the driver installed by EnvyNG.

Gamma setting does work, just not with the sliders. The sliders don't change the "calibration image' e.g. but if I select any entry from "Target gamma" drop down it does this without problems

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Sven
Can I have you provide a fresh output from trying to set the gamma while running displayconfig from the terminal?

Revision history for this message
Sven Boden (svenboden) wrote :

Fresh output ... what I did is move the Red gamma slider one to the right:

boden@bodenp1:/media/sdb6/userhome/boden/$ sudo displayconfig
awk: cmd. line:1: fatal: cannot open file `/var/log/Xorg.1.log' for reading (No such file or directory)
warning: failed to get module paths from '/var/log/Xorg.1.log' - falling back to default
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
awk: cmd. line:1: fatal: cannot open file `/var/log/Xorg.1.log' for reading (No such file or directory)
warning: failed to get module paths from '/var/log/Xorg.1.log' - falling back to default
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
Traceback (most recent call last):
  File "/usr/bin/displayconfig", line 843, in slotGammaRadioClicked
    self.currentgammascreen.setRedGamma(self.currentgammascreen.getRedGamma())
  File "/var/lib/python-support/python2.5/displayconfigabstraction.py", line 1879, in setRedGamma
    self.x_live_screen.setGamma( (self.redgamma,self.greengamma,self.bluegamma) )
  File "/var/lib/python-support/python2.5/xf86misc.py", line 68, in setGamma
    ixf86misc.SetGamma(self.display,self.screenid,gammatuple[0],gammatuple[1],gammatuple[2])
SystemError: error return without exception set
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
Traceback (most recent call last):
  File "/usr/bin/displayconfig", line 857, in slotRedChanged
    self.currentgammascreen.setRedGamma(value)
  File "/var/lib/python-support/python2.5/displayconfigabstraction.py", line 1879, in setRedGamma
    self.x_live_screen.setGamma( (self.redgamma,self.greengamma,self.bluegamma) )
  File "/var/lib/python-support/python2.5/xf86misc.py", line 68, in setGamma
    ixf86misc.SetGamma(self.display,self.screenid,gammatuple[0],gammatuple[1],gammatuple[2])
SystemError: error return without exception set

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Sven
I can see that you don't have the new version of displayconfig.py (by comparing the line numbers in the traceback with the linenumbers in the new file)

If you have touched the file previosly, it will not be overwritten when it is updated.

The file is located in /usr/share/python-support/kde-guidance/ . You can pretty safely delete all files in that folder and then reinstall kde-guidance to have the new version installed.

Revision history for this message
Sven Boden (svenboden) wrote :

Next try:

Now it comes back with "Live gamma change not supported"... which looks like a better handled exception. The slider still doesn't do anything and the "target gamma" dropdown does.

So is there a difference between setting gamma correction by the sliders in the top half or by the drop down... if 1 fails I would also expect the other to fail.

Preparing to replace kde-guidance 0.8.0svn20080103-0ubuntu10 (using .../kde-guidance_0.8.0svn20080103-0ubuntu11_i386.deb) ...
Unpacking replacement kde-guidance ...
Setting up kde-guidance (0.8.0svn20080103-0ubuntu11) ...
 Removing any system startup links for /etc/init.d/displayconfig-hwprobe.py ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

sboden@bebodenp1:/usr/share/python-support$ sudo displayconfig
awk: cmd. line:1: fatal: cannot open file `/var/log/Xorg.1.log' for reading (No such file or directory)
warning: failed to get module paths from '/var/log/Xorg.1.log' - falling back to default
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
awk: cmd. line:1: fatal: cannot open file `/var/log/Xorg.1.log' for reading (No such file or directory)
warning: failed to get module paths from '/var/log/Xorg.1.log' - falling back to default
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
Live gamma change not supported
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
Live gamma change not supported
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".
Live gamma change not supported
Xlib: extension "XFree86-VidModeExtension" missing on display ":1.0".

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

The gamma sliders and the target gamma is two different things. The real problem is that your video card / driver combination doesn't support the live gamma changes that is done using the sliders. The fix that has been made should prevent the displayconfig from crashing (and allowing you to exit, as you pointed out in another bug report).

Revision history for this message
Sven Boden (svenboden) wrote :

ok, got that. Would it be possible to somehow detect this problem before and disable e.g. the sliders. A bug report someone will probably raise one time or the other is "sliders in displayconfig don't do anything".

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

When changing the sliders (as an admin) and saving, this should IIRC get saved in the xorg.conf. So the sliders do have a point, even though they don't change the gamma Live.

If you have a good idea for an ideal solution, feel free to open it as a wish-list bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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