Bug 55161
Summary: | Backlight Software control is acting wrong | ||
---|---|---|---|
Product: | Drivers | Reporter: | pqwoerituytrueiwoq |
Component: | Video(DRI - Intel) | Assignee: | Jani Nikula (jani.nikula) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | daniel, intel-gfx-bugs |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.7 through 3.9.0-030900rc6 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
Bullet notes, cause I don't like reading paragraphs
DMESG output Requested DMESG output (fixed) requested file (hex data) |
Description
pqwoerituytrueiwoq
2013-03-13 19:07:25 UTC
Using the fn+brightness keys allows it to be set in acpi above 10 maxing at 15, but values over 10 do nothing more or less than 10 This may be useful info: ~$ uname -r 3.6.11-030611-generic ~$ xbacklight -set 0;acpi -c | grep LCD;xbacklight -get;acpi -c | grep LCD Cooling 0: LCD 10 of 10 0.000000 Cooling 0: LCD 10 of 10 ~$ xbacklight -set 100;acpi -c | grep LCD;xbacklight -get;acpi -c | grep LCD Cooling 0: LCD 0 of 10 100.000000 Cooling 0: LCD 0 of 10 ~$ xbacklight -set 50;acpi -c | grep LCD;xbacklight -get;acpi -c | grep LCD Cooling 0: LCD 5 of 10 50.000000 Cooling 0: LCD 0 of 10 ~$ ls /sys/class/backlight/* /sys/class/backlight/acpi_video0: actual_brightness brightness max_brightness subsystem uevent bl_power device power type /sys/class/backlight/intel_backlight: actual_brightness brightness max_brightness subsystem uevent bl_power device power type ~$ uname -r 3.9.0-030900rc2-generic ~$ xbacklight -set 0;acpi -c | grep LCD;xbacklight -get;acpi -c | grep LCD Cooling 0: LCD 0 of 100 100.000000 Cooling 0: LCD 10 of 100 ~$ xbacklight -set 100;acpi -c | grep LCD;xbacklight -get;acpi -c | grep LCD Cooling 0: LCD 10 of 100 90.000000 Cooling 0: LCD 9 of 100 ~$ xbacklight -set 50;acpi -c | grep LCD;xbacklight -get;acpi -c | grep LCD Cooling 0: LCD 5 of 100 95.000000 Cooling 0: LCD 10 of 100 ~$ ls /sys/class/backlight/* /sys/class/backlight/acpi_video0: actual_brightness brightness max_brightness subsystem uevent bl_power device power type /sys/class/backlight/intel_backlight: actual_brightness brightness max_brightness subsystem uevent bl_power device power type I am not sure if this is a ACPI issue for a issue with the way the driver interacts with the ACPI, so the Product field may be wrong Backlight still seems to be a horrible hit&miss issue :( So atm I can only throw a few patches at you, hoping that some of them stick. Obviously retesting with latest upstream (3.9-rc or drm-intel-nightly) would be good, ubuntu should have ppas for those. If that doesn't fix things, please try the following two patches (on top of -nightly): https://patchwork.kernel.org/patch/2254211/ https://patchwork.kernel.org/patch/2254221/ would the libdrm packages in this ppa be what i want? https://launchpad.net/~xorg-edgers/+archive/ppa?field.series_filter=raring i have tried 3.9 RC3 on quantal 12.10 will those patches be in 3.9 RC4 (ubuntu mainline) i have never had much luck with compiling as i said i can setup a ssh connection for you and you can try anything you think will work (email me directly if you want to take me up on that offer) in the mean time i am going to put my testing hdd in this system and try the nightly ppa on it with 3.9 rc3 and report back here raring with kernel 3.9 rc3 and xorg edgers ppa test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness 91 976 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD;xbacklight -get; 91 976 Cooling 0: LCD 9 of 100 91.000000 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD;xbacklight -get; 91 976 Cooling 0: LCD 10 of 100 90.000000 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD;xbacklight -get;cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD; 90 976 Cooling 0: LCD 9 of 100 91.000000 91 976 Cooling 0: LCD 10 of 100 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD;xbacklight -set 5;cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD; 91 976 Cooling 0: LCD 10 of 100 5 976 Cooling 0: LCD 1 of 100 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD;xbacklight -set 0;cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD; 5 976 Cooling 0: LCD 1 of 100 0 976 Cooling 0: LCD 0 of 100 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/max_brightness 100 4882 test@A54C-NB91:~$ uname -r 3.9.0-030900rc3-generic Oh I see what you meant, still reproducible, how to I apply the patches? http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/current/ test@A54C-NB91:~$ uname -r 3.9.0-994-generic test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/max_brightness;acpi -c | grep LCD 100 4882 Cooling 0: LCD 10 of 100 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness 91 976 test@A54C-NB91:~$ xbacklight -set 10 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness 10 976 test@A54C-NB91:~$ acpi -c | grep LCD Cooling 0: LCD 1 of 100 test@A54C-NB91:~$ xbacklight -get 99.000000 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD 99 976 Cooling 0: LCD 10 of 100 test@A54C-NB91:~$ echo "brightness keys to max" brightness keys to max test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD 99 976 Cooling 0: LCD 15 of 100 test@A54C-NB91:~$ echo "brightness keys to min" brightness keys to min test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD 99 976 Cooling 0: LCD 0 of 100 test@A54C-NB91:~$ xbacklight -set 100 test@A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/brightness;acpi -c | grep LCD 100 976 Cooling 0: LCD 10 of 100 test@A54C-NB91:~$ the patch had no effect :( Ok, i figure out how to compile it (and got a lot of dependences for compiling) here are the command i ran: wget https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.9-rc3.tar.xz tar -xvf ./linux-3.9-rc3.tar.xz cd linux-3.9-rc3 patch -p1 < ../kernel-patch1 patch -p1 < ../kernel-patch2 cp /boot/config-3.9.0-030900rc3-generic .config make oldconfig make clean make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom sudo dpkg -i ../linux-*.deb bug still present in http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2013-03-23-raring/ also present in 3.9.0 rc4 (In reply to comment #7) > the patch had no effect :( FWIW the patches shouldn't have much effect on how your backlight actually works. They should merely report more consistent results from the sysfs files. Note that you're cating the cached "brightness" value. You might get more interesting information by including the "actual_brightness" sysfs file too, which is supposed to be the value queried from the hardware. (Which it currently isn't in intel_backlight, but the second patch suggested by Daniel fixes that.) this helpful? chad@ASUS-A54C-NB91:~$ uname -r 3.9.0-030900rc4-generic chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/max_brightness;acpi -c |grep LCD 100 4882 Cooling 0: LCD 10 of 100 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c |grep LCD 90 100 976 976 Cooling 0: LCD 10 of 100 chad@ASUS-A54C-NB91:~$ xbacklight -set 10 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c |grep LCD 99 10 976 976 Cooling 0: LCD 1 of 100 chad@ASUS-A54C-NB91:~$ acpi -c | grep LCD Cooling 0: LCD 1 of 100 chad@ASUS-A54C-NB91:~$ echo "brightness keys to max" brightness keys to max chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c |grep LCD 85 10 976 976 Cooling 0: LCD 15 of 100 chad@ASUS-A54C-NB91:~$ echo "brightness keys to min" brightness keys to min chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c |grep LCD 100 10 976 976 Cooling 0: LCD 0 of 100 chad@ASUS-A54C-NB91:~$ xbacklight -set 100 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c |grep LCD 90 100 976 976 Cooling 0: LCD 10 of 100 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c |grep LCD;xbacklight -get;cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c |grep LCD 90 100 976 976 Cooling 0: LCD 10 of 100 90.000000 91 90 976 976 Cooling 0: LCD 9 of 100 (In reply to comment #10) > this helpful? Is this with or without the patches from comment #3? did those patches make it into the 3.9 rc 4 mainline kernel? *goes to compile mainline kernel from kernel.org with patches* (In reply to comment #12) > did those patches make it into the 3.9 rc 4 mainline kernel? No, they won't make it to 3.9. They're not in any of the intel drm trees either. Ran on patched copy of 3.9 rc4 from kernel.org chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 100 976 chad@ASUS-A54C-NB91:~$ xbacklight -set 0 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 100 976 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 100 976 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 85 4882 chad@ASUS-A54C-NB91:~$ clear chad@ASUS-A54C-NB91:~$ echo brightness to max via keys brightness to max via keys chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 85 4882 chad@ASUS-A54C-NB91:~$ echo brightness to min via keys brightness to min via keys chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 100 976 chad@ASUS-A54C-NB91:~$ xbacklight -set 0 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 100 976 chad@ASUS-A54C-NB91:~$ xbacklight -set 100 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 90 4882 chad@ASUS-A54C-NB91:~$ xbacklight -get 90.000000 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 91 3924 chad@ASUS-A54C-NB91:~$ xbacklight -get 91.000000 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 90 4882 chad@ASUS-A54C-NB91:~$ xbacklight -set 50 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 95 2201 chad@ASUS-A54C-NB91:~$ xbacklight -get 95.000000 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/*/actual_brightness 90 4882 ------------------------------------------------------------------- chad@ASUS-A54C-NB91:~$ uname -r 3.9.0-rc4-custom chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/max_brightness;acpi -c |grep LCD 100 4882 Cooling 0: LCD 10 of 100 chad@ASUS-A54C-NB91:~$ ls /sys/class/backlight/* /sys/class/backlight/acpi_video0: actual_brightness brightness max_brightness subsystem uevent bl_power device power type /sys/class/backlight/intel_backlight: actual_brightness brightness max_brightness subsystem uevent bl_power device power type chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c | grep LCD 90 100 4882 976 Cooling 0: LCD 10 of 100 chad@ASUS-A54C-NB91:~$ xbacklight -set 10 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c | grep LCD 99 10 1225 976 Cooling 0: LCD 1 of 100 chad@ASUS-A54C-NB91:~$ echo "brightness keys to max" brightness keys to max chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c | grep LCD 85 10 4882 976 Cooling 0: LCD 15 of 100 chad@ASUS-A54C-NB91:~$ echo "brightness keys to min" brightness keys to min chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c | grep LCD 100 10 976 976 Cooling 0: LCD 0 of 100 chad@ASUS-A54C-NB91:~$ xbacklight -set 100 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c | grep LCD 90 100 4882 976 Cooling 0: LCD 10 of 100 chad@ASUS-A54C-NB91:~$ xbacklight -get 90.000000 chad@ASUS-A54C-NB91:~$ cat /sys/class/backlight/{acpi_video0,intel_backlight}/{actual_,}brightness;acpi -c | grep LCD 91 90 3924 976 Cooling 0: LCD 9 of 100 Just a hunch, please try acpi_osi="!Windows 2012" on the kernel cmdline, or try reverting: commit a57f7f9175b8ccbc9df83ac13860488913115de4 Author: Bob Moore <robert.moore@intel.com> Date: Fri Aug 17 10:55:02 2012 +0800 ACPICA: Add Windows8/Server2012 string for _OSI method. and report back. Also, providing a dmesg with drm.debug=0xe might prove useful when tracking down what goes on with the backlight changes. Created attachment 97861 [details]
DMESG output
and crap i just notied i made a typo in the cmdline, now to redo all of that at least that means there is still a chance that will work :) Created attachment 97871 [details]
Requested DMESG output (fixed)
AWESOME IT WORKED!!!!!!
there is a minor issue, but it will not stop me from using kernels > 3.6.11
The only issue is the Fn keys allow the brightness to go 4 steps over the maximum, there are 11 brightness levels (0-10) and 16 levels
there are 5 levels that are 100%
(In reply to comment #19) > AWESOME IT WORKED!!!!!! > there is a minor issue, but it will not stop me from using kernels > 3.6.11 Ooookay, in a strange way that sort of was not the answer I was hoping for, because this means taming some BIOS dragons. But thanks for reporting back, and at least you have a workaround now. :) > The only issue is the Fn keys allow the brightness to go 4 steps over the > maximum, there are 11 brightness levels (0-10) and 16 levels > there are 5 levels that are 100% Now I have a hunch about that too. Please mount the debugfs and attach the output of 'hexdump < /sys/kernel/debug/dri/0/i915_opregion' (assuming that's where the debugfs is mounted, etc.). (Note to developers: I presume both issues are related to our ACPI opregion handling, and changes in the way BIOS caters for Windows 8.) LKML reference to another backlight problem bisected to the commit mentioned in comment #15: http://article.gmane.org/gmane.linux.kernel/1443070 Created attachment 97981 [details]
requested file (hex data)
i could have told of it would be close to the BIOS level
the boot parameter was not needed on the 208 BIOS version
with that parameter is is no longer a regression
this laptop was sold with windows 7, we should keep that in mind when assuming windows 8 behavior
if you are interested is solving the remaining issues with the back-light i am up for it
these issues were present, in the 1st place (note sure about the fn key over limit bug)
Note: that file was generated under the 3.8.0-17-generic stock Ubuntu kernel I've been using a testing hdd to test my quick setup script for raring There are some new backlight ACPI related fixes in drm-intel-nightly branch of git://people.freedesktop.org/~danvet/drm-intel. Please see if those will fix the issue _without_ acpi_osi="!Windows 2012". Do i compile this the same way i did in post 7? can i get it pre compiled here? http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/current/ ok i compiled it (~47.6 min) and gave it a try like i did in post 7 i hope i did not have to use git checkout or something, i just cloned it. it compile a rc5 kernel, i tested it and the 3.9 mainline kernel from the ubuntu mainline bug is present in both, it is rather annoying switching out my disk drives to test this, so if i compiled that wrong, tell me how to compile it next time (In reply to comment #25) > Do i compile this the same way i did in post 7? > can i get it pre compiled here? > http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/current/ At a glance, that *seems* to contain all the commits I was referring to. I don't know who maintains it, though, so I can't really endorse it in any way. (In reply to comment #26) > ok i compiled it (~47.6 min) and gave it a try like i did in post 7 > i hope i did not have to use git checkout or something, i just cloned it. > it compile a rc5 kernel, i tested it and the 3.9 mainline kernel from the > ubuntu mainline > > bug is present in both, it is rather annoying switching out my disk drives to > test this, so if i compiled that wrong, tell me how to compile it next time Unfortunately, that does not give you the drm-intel-nightly branch. You'll need to go to your cloned tree, and checkout the drm-intel-nightly branch. the copy in here today (may 5th) http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/current/ bug is present, works fine with the acpi_osi='!Windows 2012' What commit number do i checkout? how would i even get these numbers? I presume this will get fixed when [1] gets merged. [1] http://mid.gmane.org/1381214401-24672-1-git-send-email-aaron.lu@intel.com Please try kernel v3.13. without the acpi_osi='!Windows 2012' parameter? I have been using the 3.13 kernel since i believe rc3 was out and i have not had any issues though i have been using the acpi_osi='!Windows 2012' parameter in grub on a side note on my amd desktop with the 3.12.9 kernel if i set the cpu governor to userspace and select a frequency when i wake from suspend the frequency changes to 100% should be reproducible on intel system that are not using the new intel_pstate cpu frequency manager This is the script i use to manage the governor https://github.com/GM-Script-Writer-62850/xfce-genmon-scripts/blob/master/cpu-freq-plugin (In reply to pqwoerituytrueiwoq from comment #32) > without the acpi_osi='!Windows 2012' parameter? > I have been using the 3.13 kernel since i believe rc3 was out and i have not > had any issues > though i have been using the acpi_osi='!Windows 2012' parameter in grub Would be nice to check without that acpi_osi setting too. > on a side note... Off-topic for this bug. :) I am not 100% sure if it is working perfectly but even without the acpi_osi='!Windows 2012' parameter, the backlight seems to work much better than it did when i made the initial report i can not tell a difference with or without the parameter, so that is a definite improvement i would not consider the current state a regression, in its current state it is manageable, the fn brighness changes do not show up in software so if you change that during boot when the user logs in the brightness reset to whet ever it was set to via software or 100% if it was never set via software like xbacklight now lets have some fun with 3.14rc1 :) with the current 1.13.1 and 3.14rc1 i cant see a difference with or without the added parameter when using the fn keys there are a few levels over 100% that are all actually 100%, what i mean by that is i hit fn+F6 to up it 20 times when i hit fn+f5 to bring it down the 1st few times don't do anything as long as xbacklight or my backlightx script works that is good enough for me Thanks, closing. Please file a new bug if you encounter any issues. (This one was originally filed against a patch set, so reopening it might be confusing.) (In reply to Jani Nikula from comment #35) > Please file a new bug if you encounter any issues. (This > one was originally filed against a patch set, so reopening it might be > confusing.) Disregard that, it's just me mixing this up with another bug. Sorry for the noise. |