I'm on a Dell XPS 13 running Archlinux with Intel chipset ad Intel Graphics HD 4000 video card.
With kernel versions <= 3.8.4, all backlight controls work properly: the slider in the battery plasma widget, hot keys on the keyboard and also echoing directly into /sys/class/backlight/acpi_video0/...
If I update to a version >= 3.8.5 [tested up to 3.8.8] backlight goes crazy and sets brightness to 100% at startup; moreover, none of the mentioned controls will work and thus it will be impossible to reduce brightness.
The other day, a strange thing happened: I was in the described situation and was trying to manually set the brightness with echo.
Now, in my /sys/class/backlight/ there are two directories, acpi_video0 and intel_backlight.
I tried to echo a value into intel_backlight/brightness and the screen started flashing, as if it was trying to repeatedly update both the value in acpi_video0 and the one in intel_backlight.
After a couple more echoes, backlight controls [all of them] simply started working properly, until the following reboot. I didn't try to reproduce this last episode.
There is no code change in acpi video driver from 3.8.4 to 3.8.5. The following commit from graphics driver looks suspicious:
0e7a2fe01333f72c1cec1cd4d5293a62c770fa4f, can you please revert that commit and test? Thanks.
Ehm.... I'm sorry but I'm not sure how to do this :)
Which repository should I clone? Is there a guide somewhere?
I have an update!
I found out that, with one of the "problematic" kernels - I'm on 3.8.10 right now -, if I do
$ echo 0 > /sys/class/backlight/intel_backlight/brightness
it completely restores correct behavior, i.e. plasma widget and special keys work and brightness can be adjusted. The problem is still present on following boots.
Oddly, if I do
$ sudo echo 0 > /sys/class/backlight/intel_backlight/brightness
bash: /sys/class/backlight/intel_backlight/brightness: access denied.
A friend suggested this could be a kernel bug, and may be the key to the solution.
Is this any helpful?
Sorry for the late reply.
Please follow the below steps:
1 clone linux stable git tree
$ git clone http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
2 checkout 3.8 branch
$ git checkout linux-3.8.y
3 set local tree to commit 5016d9ac0938789e7aaba86be3e6fbf24e7b7bee
$ git reset --hard 5016d9ac0938789e7aaba86be3e6fbf24e7b7bee
then build kernel and see if everything works OK
4 if yes, set local tree to commit 0e7a2fe01333f72c1cec1cd4d5293a62c770fa4f
$ git reset --hard 0e7a2fe01333f72c1cec1cd4d5293a62c770fa4f
then build kernel again and see if everything works OK.
Ok,.... I'm not very used to compiling the kernel, so I'm finding it somewhat difficult: when I try make menuconfig, it asks me a lot of questions I don't know how to answer :)
I think you can use your installed kernel's config file.
$ cd linux_git_tree_you_have_cloned
$ cp /boot/config-3.8.4 .config
$ make oldconfig
Then build kernel.
You are very kind helping me like this :)
However, I have no /boot/config-3.8.4 file [I use GRUB2, I think].
Attach the following command output as root:
# lspci -v > lspci.out
Then I can provide the config file for you to use.
Created attachment 100811 [details]
lspci -v output
Here it is :)
P.s. Can I compile the kernel on a different machine and then install the package on this one?
I have a desktop which can compile faster and on a HDD [I have an SSD on this one].
I've built the kernel for you. No initrd is required, so your root= command line will need to use /dev/sda? instead of UUID=.
URL here, since bugzilla doesn't allow upload a file more than 1000KB:
Ok, I did some testing and here's the result.
I took each of the files you shared and copied them into /boot/vmlinuz-linux, then rebooted.
With vmlinuz-good, backlight controls worked; with vmlinuz-bad, they didn't, so I guess you found the core of the problem!
[Maybe unnecessary to tell, with both of them I had some issues like networkmanager and kmix not working, but I think this is because you compiled it away from my hardware]
Did I do well? Is there anything else I can do? :)
Thanks a lot for your support!
Thanks for the test, I'll move this bug to drm/intel category and I think they know what happened.
Hi DRM guys,
Looks like the following commit:
Author: Daniel Vetter <email@example.com>
Date: Fri Mar 22 15:44:46 2013 +0100
Revert "drm/i915: write backlight harder"
breaks backlight functionality of leoni's system, please kindly take a look, thanks.
Awesome, I love the way bugreporting works :)
Thank you all for this!
The original commit "drm/i915: write backlight harder" fixed the issue on Dell XPS 13, but unfortunately it regressed other machines and had to be reverted.
*** This bug has been marked as a duplicate of bug 47941 ***