Bug 309494 - intel: Backlight settings get reset on vc/X changes
Summary: intel: Backlight settings get reset on vc/X changes
Status: RESOLVED FIXED
: 328083 337427 (view as bug list)
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: X.Org (show other bugs)
Version: Beta 3
Hardware: Other Other
: P2 - High : Minor with 5 votes (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-11 13:18 UTC by Petr Baudis
Modified: 2008-03-06 18:03 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
xorg.conf (4.96 KB, text/plain)
2007-09-11 13:37 UTC, Petr Baudis
Details
Xorg.0.log (57.63 KB, text/plain)
2007-09-11 13:37 UTC, Petr Baudis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Baudis 2007-09-11 13:18:16 UTC
When I switch from X to textmode or back, backlight is reset to max; if I hit pg+home/end on my thinkpad (x41), the backlight gets changed to previous_value+increment, so the old settings is kept somewhere and something evil just resets it to max temporarily. This switch and the bug also happens on suspend/resume.

I'm not sure if this is kernel's or X fault.
Comment 1 Stefan Dirsch 2007-09-11 13:26:23 UTC
Could you attach xorg.conf and Xorg.0.log?
Comment 2 Petr Baudis 2007-09-11 13:37:26 UTC
Created attachment 163214 [details]
xorg.conf
Comment 3 Petr Baudis 2007-09-11 13:37:52 UTC
Created attachment 163215 [details]
Xorg.0.log
Comment 4 Stefan Dirsch 2007-09-11 13:41:50 UTC
> This switch and the bug also happens on suspend/resume.
AFAIK suspend/resume switches to text console first.
Comment 5 Stefan Dirsch 2007-09-11 13:48:01 UTC
Looks like a driver problem. Did you already try to set the backlight with xbacklight? Does this help?
Comment 6 Petr Baudis 2007-09-11 14:38:16 UTC
comment #4: Yes, and switch to text console (or back to X) is what triggers the bug.

comment #5: Yes, when set xbacklight sets the brightness that persists over switch to text console and back, but if the xbacklight value is not 100.0, brightness keys behave weird (with 0.0 they don't work at all, with 50.0 they work in reverse).
Comment 7 Stefan Dirsch 2007-09-11 14:49:04 UTC
Whatever the brightness key do, obviously the driver does not handle the state of them correctly. Mixing the brightness keys and xbacklight does not seem to be a good idea when using the intel driver.
Comment 8 Petr Baudis 2007-09-11 14:55:39 UTC
I see, I mentioned the behaviour "just in case". I'll be happy if just the brightness keys work. ;-)
Comment 9 Stefan Dirsch 2007-09-11 15:01:51 UTC
> I'll be happy if just the brightness keys work. ;-)
I can't make any promises. Maybe Intel added the backlight feature to RANDR 1.2, because these brightness keys will never work on every laptop. Similar
situation to the Display Switch keys. Just wild guessing ...
Comment 10 Petr Baudis 2007-09-11 15:07:23 UTC
I'm getting a bit confused, perhaps I was a bit unclear - the keys _do_ work normally, the only problem is that backlight level gets one-time reset when switching to X and from X.
Comment 11 Stefan Dirsch 2007-09-11 15:38:32 UTC
Sure, but the previous state, which has been set by the keys, is not queried by the driver before restoring it after a VT switch. :-(
Comment 12 Petr Baudis 2007-09-11 15:46:58 UTC
BTW note that (I think) this worked fine on SLED10.
Comment 13 Stefan Dirsch 2007-09-11 15:54:30 UTC
Probably because the i810 driver didn't touch these settings/registers at all. It's a new feature of RANDR 1.2 AFAIK.
Comment 14 Stefan Dirsch 2007-09-11 21:13:46 UTC
IMHO this is a minor issue.
Comment 15 Stefan Dirsch 2007-09-25 09:17:33 UTC
*** Bug 328083 has been marked as a duplicate of this bug. ***
Comment 16 Tejun Heo 2007-09-26 06:50:16 UTC
Okay, I tested xbacklight on this machine (Fujitsu P7120) and the behavior is somewhat erratic.

* Some values (including 10% and 15%) makes backlight go to full brightness.

* Some values make the display go to the level set by hardware brightness keys (Fn-F6/7) but hardware brightness keys work in reverse.

* If brightness is set using xbacklight, the hardware brightness keys usually don't work but they sometimes work in the reverse direction.

* If brightness is set to 100% using xbacklight, Fn keys work correctly.
Comment 17 Tejun Heo 2007-09-29 21:13:29 UTC
This bug is getting more annoying.  Brightness is reset to full not only on VC switch but also whenever mplayer starts or a game starts even when the game isn't in full screen mode (xmoto and lbreakout).  Who do we have to bug to get this fixed?  Thanks.
Comment 18 Stefan Dirsch 2007-09-29 21:36:52 UTC
This one seems to be related: 

  https://bugs.freedesktop.org/show_bug.cgi?id=11527
Comment 19 Notyour Beer 2007-10-14 20:37:22 UTC
Also happens when the screensaver starts. Very annoying imo..

I've an Samsung X20, Intel 915gm graphics card and intel driver.
Comment 20 Stefan Dirsch 2007-10-23 06:31:13 UTC
This bug seems to be fixed in git now.
Comment 21 Mark Gordon 2007-10-29 21:00:05 UTC
*** Bug 337427 has been marked as a duplicate of this bug. ***
Comment 22 Stefan Dirsch 2007-10-31 17:42:09 UTC
Could you check again with xorg-x11-driver-video from our buildservice? Also update xorg-x11-server and xorg-x11-driver-input.

  http://download.opensuse.org/repositories/home:/sndirsch:/xorg74/

Make sure the RPM changelog exists:

* Mi Okt 31 2007 sndirsch@suse.de
- xf86-video-intel
  * updated to git commit ecd995d
Comment 23 Notyour Beer 2007-11-02 19:47:31 UTC
I've installed the updated packages and rebooted the system, but the problem persists..

The synaptics touchpad driver stopped to work, so I'll downgrade to the old driver.
Comment 24 Stefan Dirsch 2007-11-02 19:57:46 UTC
(In reply to comment #23 from Notyour Beer)
> The synaptics touchpad driver stopped to work, so I'll downgrade to the old
> driver.
You also need to update the xorg-x11-driver-input package as mentioned in comment #22.
Comment 25 Notyour Beer 2007-11-02 20:29:10 UTC
I had updated all 3 packages, later I even updated the xorg-x11 package.
Comment 26 Stefan Dirsch 2007-11-02 21:24:03 UTC
Ouch. This driver is in an extra package. x11-input-synaptics (same repo).
Comment 27 Notyour Beer 2007-11-03 12:24:53 UTC
I've updated now all updateable packages. The touchpad works, but the backlight is still changing its brightness.

Btw:
> Make sure the RPM changelog exists:
It exists..
Comment 28 Stefan Dirsch 2007-11-06 05:18:08 UTC
(In reply to comment #20 from Stefan Dirsch)
> This bug seems to be fixed in git now.
No, the upstream bugreport has been reported since the patch has never been committed. :-(

Comment 29 Stefan Dirsch 2007-11-06 05:19:32 UTC
s/reported/reopened
Comment 30 Stefan Dirsch 2007-11-12 20:51:42 UTC
Could you check again with xorg-x11-driver-video from our buildservice? Also
update xorg-x11-server and xorg-x11-driver-input.

  http://download.opensuse.org/repositories/home:/sndirsch:/xorg74/

Make sure the RPM changelog exists:

Mon Nov 12 21:43:01 CET 2007 - sndirsch@suse.de

- xf86-video-intel
  * updated to git commit 43fbc54, which fixes backlight support
    for several platforms

Some background:

commit 43fbc547786cf26514f95bce79fab58a66c291bf
Author: Jesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com>
Date:   Mon Nov 12 12:23:41 2007 -0800

    Improve backlight control
    
    This commit fixes backlight support for several platforms.
    
    Except on recent machines supporting the IGD OpRegion specification,
    backlight control is rather platform specific.  In some cases, we can
    program the native backlight control regsiters directly without any
    trouble.  On others, we need to use the legacy backlight control
    register.  On still others, we need a combination of the two.  And on
    some platforms, none of the above will work, so we go through the
    kernel backlight interface, which provides a platform specific driver
    for backlight control.
Comment 31 Zsolt Sági 2007-11-13 10:58:35 UTC
I tested the patches to some extent. I added the http://download.opensuse.org/repositories/home:/sndirsch:/xorg74/ repository to my sources and updated every x11 and compiz related package from it. After rebooting I regenerated my xorg.conf by SaX2 and added the AIGLX support manually. I tested the baclight control feature by MPLayer, Xmoto, suspend/resume to either memory and disk, and I found that backlight control WORKS NOW CORRECTLY UNDER ANY OF THESE CIRCUMSTANCES, but:

1. I was waiting  in vain for power management to turn of my display but I didn't happen as it did before.

2. I tried only the compiz window manager (no kwin), but I experienced that scrolling web pages in either Mozilla or Konqueror is jerky and generates unusually high CPU load. May I upgrade the Mesa packets too?

Comment 32 Zsolt Sági 2007-11-13 11:06:28 UTC
I upfraded he Mesa related packets from you repository and I sadly recognized that jerky scrolling and high CPU load remained.
Comment 33 Stefan Dirsch 2007-11-13 11:09:31 UTC
Nemeth, I don't think the remaining issues are related to the backlight patch at all. I suggest to open a bugreport for these if they still exist on openSUSE 11.0 Alpha1 (not released yet, don't know when this will happen).

I'm waiting for feedback by Petr/Tejun/Notyour.
Comment 34 Zsolt Sági 2007-11-13 11:24:23 UTC
Understood. I will not complain about these symptomps anymore. I only say that I tried some compiz features (Cube Roteting, Shift Switcher, MPlayer playback via video playback plugin (http://www.mail-archive.com/compiz%40lists.freedesktop.org/msg01267.html), etc.) And everithing works smoothly with virtually no CPU load except scrolling. Web browser scrolling, SuSE style KDE menu left-righ scrolling, kpdf scrolling and even text scrolling (less) in konsole are all unusually jerky.
Comment 35 Tejun Heo 2007-11-13 11:36:05 UTC
Oh well, my machine is dead now (broken LCD) so I can't really test it.
Comment 36 Stefan Dirsch 2007-11-13 11:41:59 UTC
Sorry, Tejun. Forgot about this. Still Petr/Notyour can test this.
Comment 37 Notyour Beer 2007-11-15 15:02:17 UTC
The bug is solved for me, thank you very much..
Comment 38 Stefan Dirsch 2007-11-15 15:10:19 UTC
Thanks for checking. Assuming that it is fixed now. The latest driver, which I submitted today includes some mor backlight fixes.

xorg-x11-driver-video:
-------------------------------------------------------------------
Thu Nov 15 09:19:41 CET 2007 - sndirsch@suse.de

- xf86-video-intel
  * updated to git commit e56c166, which also includes some more
    backlight fixes
[...]

Petr, please reopen if it's still not fixed for you.
Comment 39 Felipe Alvarez 2007-11-16 03:58:17 UTC
SOLVED. thank you so much for fixing this. Didn't take too long (it appears). Now I'm still wondering what is best for Intel graphics and Compiz - AIGLX or XGL? I guess I'll do some more research.


THANKS
Comment 40 Notyour Beer 2008-03-06 17:45:51 UTC
Hi,
I needed to reinstall Suse because I got a new harddisk but now the repository is no longer online. Where can I get these fixes?

Thanks in advance..
Comment 41 Stefan Dirsch 2008-03-06 18:03:24 UTC
The new repo is X11:XOrg.