Hello. I have noticed for a long ago this bug, and I have "solved" it with Archlinux forums help. I don't understand a lot of things of the Linux Kernel, but I try to explain. I have a Packard Bell EasyNote TS with nVidia Optimus. Out-the-box backlight keys work correctly, but I can't set brightness with this nor xbacklight. If I add to the kernel line "acpi_backlight=vendor", I can set brightness with xbacklight, but backlight keys don't work. In that forum an user recommends me add acpi_osi="!Windows 2006" acpi_osi="!Windows 2009" to the kernel line and it solved my problem, but this user think is a bug (I think this too, in a too old kernel version it works correctly with acpi_backlight=vendor line). I attach an acpidump and show you the topic. https://bbs.archlinux.org/viewtopic.php?id=164662 Sorry for my English :). Regards.
Created attachment 104651 [details] An acpi dump from my laptop using acpidump.
Please provide the output of dmidecode and it's better to do a quirk for this machine to use vendor video driver defaultly.
Created attachment 104721 [details] A dmidecode from my laptop
Hello Lan Tianyu, I have uploaded an dmidecode. I hope that helps. Regards.
Oh, I realized KDE/xbacklight can't set brightness... I prefer doing it by keys, but I share all I can =). Regards.
1 Please show me the output of: $ ls /sys/class/backlight I saw your post of the arch page, do you have only one file intel_backlight there? 2 Please use acpi_listen to check if any event is received when pressing the backlight hotkey. acpi_listen is provided by acpid package. Thanks.
1.- This is the output: acpi_video0 intel_backlight Yes, I have only one file intel_backlight. 2.- No... I can see CDPLAY, CDSTOP, CDNEXT events, but no anything when I press backlight hotkeys. Thank you =). Regards.
(In reply to comment #7) > 1.- This is the output: > > acpi_video0 intel_backlight I think this is two :-) Does manually change brightness using acpi_video0 work? # cd /sys/class/backlight/acpi_video0 # echo 2 > brightness # echo 5 > brightness Any effect? > > Yes, I have only one file intel_backlight. > > 2.- No... I can see CDPLAY, CDSTOP, CDNEXT events, but no anything when I > press > backlight hotkeys. This means we have a bug in hotkey notification, I'll prepare a debug asl file for you to test a moment later.
Can you build kernel from source?
(In reply to comment #8) > I think this is two :-) > > Does manually change brightness using acpi_video0 work? > # cd /sys/class/backlight/acpi_video0 > # echo 2 > brightness > # echo 5 > brightness > Any effect? No, it has no effect :(. If I not use acpi_osi lines in kernel line in GRUB2, I can change brightness with this method, but in intel_backlight/brightness file. > This means we have a bug in hotkey notification, I'll prepare a debug asl > file > for you to test a moment later. Ok, I am ready to help :). But I need you explain me how to do this :). (In reply to comment #9) > Can you build kernel from source? I should need to learn it... I think this is enough https://wiki.archlinux.org/index.php/Kernels/Compilation/Traditional . If I don't have to configure anything I think I don't have any problem :). Regards.
(In reply to comment #10) > (In reply to comment #8) > > > I think this is two :-) > > > > Does manually change brightness using acpi_video0 work? > > # cd /sys/class/backlight/acpi_video0 > > # echo 2 > brightness > > # echo 5 > brightness > > Any effect? > > No, it has no effect :(. If I not use acpi_osi lines in kernel line in GRUB2, > I > can change brightness with this method, but in intel_backlight/brightness > file. So only intel_backlight works, right? > > I should need to learn it... I think this is enough > https://wiki.archlinux.org/index.php/Kernels/Compilation/Traditional . If I > don't have to configure anything I think I don't have any problem :). Just remembered no need to compile kernel at this time, override DSDT in initrd should do the trick too. I'll attach a DSDT table named dsdt.aml, please follow the below steps to replace your initrd: // make a copy of your original initrd, after test, restore it $ sudo cp /boot/initramfs-xxx.img /boot/initram-xxx.img.orig // insert the new DSDT table into a new initrd $ mkdir $HOME/initrd/kernel/firmware/acpi $ cd $HOME/initrd // the dsdt.aml is the new DSDT table I'll attach shortly $ cp dsdt.aml kernel/firmware/acpi // generate the new initrd $ find kernel |cpio -H newc --create > new_initrd // cat it with the original one $ cat /boot/initramfs-xxx.img >> new_initrd Now the new initrd is ready, use it to boot the system. Also, make sure to add the following kernel command line, no other command line option required: acpi.aml_debug_output=1 After boot, press backlight hotkey, and then attach dmesg output here, thanks. If you have any problem, please let me know.
Created attachment 104921 [details] Add debug statement in _Q11/_Q12 Add some debug statements in DSDT table to check some value in asl code.
Yes, only intel_backlight works. I have removed all acpi lines in GRUB (only stays the debug one). Intel_backlight method still works, but xbacklight can't set brightness. Dsmeg: [ 115.698208] [ACPI Debug] String [0x0B] "_Q11, LMST=" [ 115.698234] [ACPI Debug] Integer 0x00000000 [ 115.698247] [ACPI Debug] String [0x0B] "_Q11, OSYS=" [ 115.698256] [ACPI Debug] Integer 0x000007D9 [ 115.698268] [ACPI Debug] String [0x0A] "_Q11, OBV=" [ 115.698274] [ACPI Debug] Integer 0x00000086 [ 122.476867] [ACPI Debug] String [0x0B] "_Q12, LMST=" [ 122.476897] [ACPI Debug] Integer 0x00000000 [ 122.476922] [ACPI Debug] String [0x0A] "_Q12, OBV=" [ 122.476930] [ACPI Debug] Integer 0x00000086 115.* lines are "Brighness down" hotkey, and 122.* "Brightness up" hotkey. I remember: without acpi lines in GRUB, xev recognize the keys, but OSD brightness only works if I push "alternate-ly" "Brightness down" and "Brightness up" keys. I don't understand, really XD. Thanks for helping :). Regards.
According to the debug message, the notification is sent out. Please add the following content to /etc/X11/xorg.conf(if not exist, just create it): Section "Device" Identifier "Intel Graphics" Driver "intel" Option "AccelMethod" "sna" Option "Backlight" "intel_backlight" Identifier "Card0" Driver "intel" BusID "PCI:0:2:0" EndSection Then reboot, this time, no kernel command line is required. Let me know if everything works fine, thanks.
It's ok now, but I had to remove Identifier "Card0" Driver "intel" BusID "PCI:0:2:0" because Xorg told me a parse error: 2 fields identifier. So is it no a bug? Is it only an error? In my old installation I have no Xorg.conf for my intel card... It doesn't disturb me but I have to ask it =). All is OK now. I'm sorry for disturb, guys. I'll save this Xorg safely :).
No problem. The problem is, userspace(X for example) would pick acpi_video0 interface by default, which is broken on your system. So we have to tell X to use an workable interface, as is done in xorg.conf. Then for backlight brightness change, you have intel_backlight for it; for hotkey notification, you have ACPI for that. This is the current way we workaround backlight problems, maybe we need a better one in the future... Thanks for testing! I'll close the bug as DOCUMENTED.