You are not logged in.

#1 2008-10-14 20:55:09

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Kernel 2.6.27 update, laptop display brightness problem.

After the update to kernel 2.6.27 the display brightness resets to the highest level during the system startup. It resets to highest value somewhere during the udev processing. There is obviously some difference with display brightness handling because now I have in GNOME display of brightness level while changing (something like volume changing with multimedia keys). The brightness also resets to highest randomly while working in GNOME so I need to adjust it sveral times.

My laptop is HP nx7400. I have Arch64 installed. Also the problem appears on my brother's HP nx7300, almost same hardware.

Offline

#2 2008-10-15 03:56:13

schimpfj
Member
From: Frankfurt, Germany
Registered: 2007-08-15
Posts: 53

Re: Kernel 2.6.27 update, laptop display brightness problem.

Maybe your issue is related to the one I had earlier (as of 2.6.25). See http://bbs.archlinux.org/viewtopic.php?id=50731 However, my brightness got darker and did not change randomly.

I have not tested/used 2.6.27 yet, but will soon do (after backing up my data).

Last edited by schimpfj (2008-10-15 03:56:54)

Offline

#3 2008-10-15 04:35:19

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Kernel 2.6.27 update, laptop display brightness problem.

I can confirm SnapShot's problem.  My laptop monitor gets set to 100% at bootup, and when slim starts flickering (as it does) on startup, every flicker is accompanied by a brightness change.   It also happens when the monitor is woken from blanking.  This never happened with previous kernel versions, so I doubt it's an old problem resurfacing.

I haven't really looked into it yet.  My first thought was that it was related to laptop-mode, because I just fooled around with it's settings yesterday.  I'll start looking into it soon.

Offline

#4 2008-10-15 15:42:20

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: Kernel 2.6.27 update, laptop display brightness problem.

This is really annoying. It resets too often while working in GNOME. I always need to restore the brightness to lower setting. It also usually gets back to highest setting imediatley after changing it basck to lower setting. I need most of the time to set brightness twice to the diesired level to get it working for 5min, until it gets back to the highest level again.

The workaround mentioned in other threads for kernel 2.6.25, won't work because it resets many times and setting through rc.local on start up won't work for long.

Offline

#5 2008-10-15 17:16:16

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Kernel 2.6.27 update, laptop display brightness problem.

Reverting to kernel 2.6.26.6 and leaving all else the same solves the problem for me.  So I guess it's a kernel bug.

Offline

#6 2008-10-15 18:14:40

ashunter
Member
Registered: 2007-06-16
Posts: 47

Re: Kernel 2.6.27 update, laptop display brightness problem.

Same here.Laptop monitor brightness set to max every time i boot to arch and also there were 15 degrees of brightness (which can be changed with Fn+ <- or Fn +->)and now only 8 degrees.I found this problem when i tried opensuse 11.0,but arch works fine until recently upgrade.Using arch64 on a computer with AMD Turion TL50 and Ati mobility Radeon X1300.Have anybody reported this bug?Otherwise i should do this.

Offline

#7 2008-10-15 19:16:02

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: Kernel 2.6.27 update, laptop display brightness problem.

I have found that the problem is in video ACPI driver. If you remove the video module with rmmod you can't change the brightness, after that if you load the module with modprobe it resets the brightness to max. I suspect that this is upstream bug and related to this kernel commit http://git.kernel.org/?p=linux/kernel/g … 29c1ba8055

Anyone more exeprienced with kernel patching could revert this patch and compile the module to check if the bug remains. I am willing to test, but I am not really experienced with kernel patching and compiling. If someone could compile a module, I can test it.

Last edited by SnapShot (2008-10-15 19:16:23)

Offline

#8 2008-10-15 22:47:34

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Kernel 2.6.27 update, laptop display brightness problem.

SnapShot,

I reverted that patch and recompiled my kernel.  The constant brightness changes are gone.  However, it's not a perfect fix.  See comments here: http://bugzilla.kernel.org/show_bug.cgi?id=11769

Ciao

Offline

#9 2008-10-15 23:54:19

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: Kernel 2.6.27 update, laptop display brightness problem.

Hi peart,

I assume that link http://bugzilla.kernel.org/show_bug.cgi?id=11769 is your upstream bug report.

Does backlight control still work after reverting the patch? If it works, the situation is probably back to kernel version 2.6.26.x, when GNOME didn't show the display brightness level indicator while changing the brightness.

If brightness level changing works. Would you be so kind to upload the video.ko ACPI driver, if you have compiled it for x86_64? It would work better compared to unloading video module smile

Offline

#10 2008-10-16 01:30:33

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Kernel 2.6.27 update, laptop display brightness problem.

Hello SnapShot,

I uploaded the module to the 1st free upload place I found: here
I build my own kernel the ol' fashioned way, so I was afraid that somehow the modules in my kernel would be incompatible with your kernel.  So I rebuilt the whole thing the "Arch way", substituting the real kernel sources with mine.  Yes, I use x86_64.

With the reverted patch, the brightness does act as it did previous to 2.6.27.  My brightness up/down keys work, and there are no more sudden changes.

Ciao

Offline

#11 2008-10-16 02:35:31

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: Kernel 2.6.27 update, laptop display brightness problem.

Thanks peart. Now the brightness is not reseted and brightness control buttons are working. It is certainly better than random reset and unloading module.

There are still some differences from 2.6.26 because the brightness level indicator appears in GNOME but it always stays at zero. And display brightness applet is not working.

This quick hack should work until the problem is fixed for real smile

Offline

#12 2008-10-16 05:53:11

ashunter
Member
Registered: 2007-06-16
Posts: 47

Re: Kernel 2.6.27 update, laptop display brightness problem.

peart wrote:

Hello SnapShot,

I uploaded the module to the 1st free upload place I found: here
I build my own kernel the ol' fashioned way, so I was afraid that somehow the modules in my kernel would be incompatible with your kernel.  So I rebuilt the whole thing the "Arch way", substituting the real kernel sources with mine.  Yes, I use x86_64.

With the reverted patch, the brightness does act as it did previous to 2.6.27.  My brightness up/down keys work, and there are no more sudden changes.

Ciao

I wait 30secs and when i click "Download file Now","Firefox can't this page...".Can you upload it to another place,thanks.

Offline

#13 2008-10-16 06:31:13

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Kernel 2.6.27 update, laptop display brightness problem.

Try this: download
The first one still works for me, though.

Last edited by peart (2008-10-16 06:42:53)

Offline

#14 2008-10-16 11:21:47

ashunter
Member
Registered: 2007-06-16
Posts: 47

Re: Kernel 2.6.27 update, laptop display brightness problem.

peart wrote:

Try this: download
The first one still works for me, though.

This one works.Thanks a lot!:D

Offline

#15 2008-10-16 21:24:52

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: Kernel 2.6.27 update, laptop display brightness problem.

Hi peart.

I am not kernel programmer, but I have analyzed the code of the ACPI video driver and the problematic patch. I have removed the check which sets the brightness to max but I can't compile because of not enough space to compile the kernel :S. Would you be so kind to compile the modified file and upload a compiled moduel to test.

I have following explanation for my modification:
Here http://git.kernel.org/?p=linux/kernel/g … 29c1ba8055 we can see that there is added check if ACPI BQC object exists. If the object doesn't exist then the brightness is set to max, which obviously is the problem with our laptops because the BQC object is optional. If we revert the patch completly the BCQ check is moved to the outter if-structure and the execution skips whole part, where the backlight device is registered.

My modification is that I removed the check for BCQ object and removed the part where it sets the backlight to max. As far as I can see acpi_video_get_brightness(device->backlight) can be called without prior checking of BCQ object existance, because acpi_video_get_brightness then calls acpi_video_device_lcd_get_level_current which gets the current brightness level. acpi_video_device_lcd_get_level_current checks if BCQ object exists and handles it properly, as far as I can see.

Offline

#16 2008-10-16 21:27:40

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: Kernel 2.6.27 update, laptop display brightness problem.

Ooops I forgot the modified video.c file smile

http://pastebin.com/m13575bfd

Last edited by SnapShot (2008-10-16 21:28:10)

Offline

#17 2008-10-16 22:35:51

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Kernel 2.6.27 update, laptop display brightness problem.

Hey SnapShot,
I'll upload a new video.ko for 2.6.27 in a few hours.
ttyl

Offline

#18 2008-10-17 00:25:08

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Kernel 2.6.27 update, laptop display brightness problem.

download video.ko #2

SnapShot, your patch fixed one thing: /sys/class/backlight is populated once again.  However, the initial setting of the brightness is still not working.  When booting, the brightness immediately gets set to a very low value, and a few seconds later it goes up, possibly to 100%.  Both /sys/class/acpi_video0/brightness and /proc/acpi/video/VGA/LCD/brightness say that the current setting is 0.

This is completely irresponsible of me, but I think I'll spend some time trying to figure it out.  tongue

Offline

#19 2008-10-17 01:42:14

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: Kernel 2.6.27 update, laptop display brightness problem.

Thanks, peart. Sorry for bothering you with compiling.

It seems that my patch fixed the problem with registering of backlight device. Brightness still gets reseted to some high value during system startup, it doesn't reset during udev procesing and module loading, but sometime before GDM is loaded probably when starting the X. So it looks like the problem is fixed for module loading. I will try to make some more modifications tomorow. It would be certainly be easier for me if I manage to find free space and setup compile envronment, instead of posting the file here for you to compile.

Also cat /sys/class/backlight/acpi_video0/actual_brightness gives correct value for me and it changes if I change the brightness level. And now the GNOME brightness level indicator works properly.

Offline

Board footer

Powered by FluxBB