Bug 88941 - asus brightness hotkeys doesn't work
Summary: asus brightness hotkeys doesn't work
Status: CLOSED DUPLICATE of bug 70241
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 low
Assignee: Aaron Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-26 15:22 UTC by Jaime Pérez
Modified: 2014-12-30 00:53 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.18-rc7
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
lspci -vvnn output (10.03 KB, text/plain)
2014-12-01 13:43 UTC, Jaime Pérez
Details
acpidump (594.21 KB, text/plain)
2014-12-02 21:04 UTC, Jaime Pérez
Details
backlight folders (16 bytes, text/plain)
2014-12-02 21:04 UTC, Jaime Pérez
Details
max brightness (4 bytes, text/plain)
2014-12-02 21:05 UTC, Jaime Pérez
Details
memory dump (365 bytes, application/octet-stream)
2014-12-03 15:05 UTC, Jaime Pérez
Details
i915 opregion (8.00 KB, application/octet-stream)
2014-12-03 15:07 UTC, Jaime Pérez
Details
Work around firmware that provides 8+ video output devices (2.78 KB, patch)
2014-12-05 02:56 UTC, Aaron Lu
Details | Diff
dmesg output with patch (73.08 KB, text/plain)
2014-12-08 09:21 UTC, Jaime Pérez
Details

Description Jaime Pérez 2014-11-26 15:22:47 UTC
With previous kernels the problem was solved using debug 

acpi_osi= acpi_sleep=s3_bios

in GRUB_CMDLINE_LINUX_DEFAULT, but with this version that doesn't work anymore.
Comment 1 Zhang Rui 2014-12-01 07:25:41 UTC
what graphics are you using?
please attach the lspci output.
Comment 2 Jaime Pérez 2014-12-01 13:43:12 UTC
Created attachment 159361 [details]
lspci -vvnn output
Comment 3 Aaron Lu 2014-12-02 01:28:19 UTC
Please attach your acpidump:
# acpidump > acpidump.txt

Please show me:
# ls /sys/class/backlight

And for each directory there, please test if manually set a value to brightness works:
# cd /sys/class/backlight/acpi_videoX
# cat max_brightness
10
# echo 2 > brightness
# echo 5 > brightness
...

# cd /sys/class/backlight/intel_backlight
# cat max_brightness
5000
# echo 1000 > brightness
# echo 2000 > brightness
...
Comment 4 Jaime Pérez 2014-12-02 21:04:19 UTC
Created attachment 159451 [details]
acpidump
Comment 5 Jaime Pérez 2014-12-02 21:04:45 UTC
Created attachment 159461 [details]
backlight folders
Comment 6 Jaime Pérez 2014-12-02 21:05:12 UTC
Created attachment 159471 [details]
max brightness
Comment 7 Jaime Pérez 2014-12-02 21:05:38 UTC
I am able to change it manually and form GUI menu, but not with hotkeys
Comment 8 Aaron Lu 2014-12-03 07:53:26 UTC
Please dump the below memory range:
0xDAB0EE18, size 0x16D
You can get it by:
$ sudo dd if=/dev/mem of=memory.dump bs=1 count=$((0x16D)) skip=$((0xDAB0EE18))

Please also attach: /sys/kernel/debug/dri/0/i915_opregion
Comment 9 Jaime Pérez 2014-12-03 15:05:16 UTC
Created attachment 159541 [details]
memory dump
Comment 10 Jaime Pérez 2014-12-03 15:07:14 UTC
Created attachment 159551 [details]
i915 opregion
Comment 11 Aaron Lu 2014-12-05 02:56:06 UTC
Created attachment 159751 [details]
Work around firmware that provides 8+ video output devices

Looks like a similar bug:
https://lkml.org/lkml/2014/2/11/1032

Please test this work around patch.
Comment 12 Jaime Pérez 2014-12-05 08:59:42 UTC
I have to compile the whole kernel or there is a method to compile only the i915 driver and change it in actual kernel?
Comment 13 Jaime Pérez 2014-12-05 09:39:11 UTC
I have applied the patch with 
patch -p1 < patch.patch

now I go to driver's folder and type make, but says 
make: *** No targets. Stop.

I type
gcc intel_opregion.c

and get
intel_opregion.c:30:24: fatal error: linux/acpi.h: No such file or directory
Comment 14 Jaime Pérez 2014-12-05 13:57:42 UTC
ok, I build intel_opregion.ko then I used sudo modprobe intel_opregion.ko, but nothing happens. With sudo insmod intel_opregion.ko I get "Unknown symbol in module"

Have I made something wrong?
Comment 15 Jaime Pérez 2014-12-06 18:24:51 UTC
Ok, I achieved building the module and installing it. Fix actually works, but with debug options in kernel load. I'm going to test without them.
Comment 16 Jaime Pérez 2014-12-06 18:27:31 UTC
It works without debug options, but minimum brightness is null, so if I press lower brightness key too much, my screen goes black until I press higher brightness key
Comment 17 Aaron Lu 2014-12-08 08:31:15 UTC
Please report back what's the effect of adding "acpi_osi=" to your kernel cmdline option. You do not need to apply any patch with this cmdline option, just use a normal kernel.
Comment 18 Jaime Pérez 2014-12-08 08:46:38 UTC
That fix the problem of the minimum brightness
Comment 19 Aaron Lu 2014-12-08 08:48:30 UTC
What about the other hotkeys? Do those hotkeys always work or they start to work with the newly added cmdline option?
Comment 20 Aaron Lu 2014-12-08 08:50:22 UTC
Oh I just realized you have been using acpi_osi=. So with v3.18-rc7 the hotkey for backlight control stops working, what about the final v3.18? Can you please try that kernel version? I have a patch in the final v3.18 that may affect the result:

commit 35d0565b95547ec12d025dc9b1394f22968d113d
Author: Aaron Lu <aaron.lu@intel.com>
Date:   Mon Dec 1 02:09:18 2014 +0100

    ACPI / video: update condition to check if device is in _DOD list
Comment 21 Jaime Pérez 2014-12-08 09:08:38 UTC
ok, trying. But what i meant was that keys work without debugging options, but the minimum turns off the screen. With acpi_osi= the minimum is fixed. I'll report results in a moment
Comment 22 Jaime Pérez 2014-12-08 09:14:15 UTC
Keys are blocked with 3.18 vanilla
Comment 23 Jaime Pérez 2014-12-08 09:15:55 UTC
If I press the key for disabling touchpad, it doesn't switch off/on the touchpad, but write a p. I suppose this is not normal
Comment 24 Jaime Pérez 2014-12-08 09:17:11 UTC
The problem appears to with 3.18-rc7
Comment 25 Jaime Pérez 2014-12-08 09:21:05 UTC
Created attachment 160011 [details]
dmesg output with patch

I think this output is different from the last one.
Comment 26 Jaime Pérez 2014-12-08 09:23:26 UTC
In 3.18 I dont have any strange output in dmesg, only in 3.18-rc7
Comment 27 Aaron Lu 2014-12-09 03:15:59 UTC
With acpi_osi= in your kernel cmdline, what's the output of:
# ls /sys/class/backlight

Presumably acpi_osi= has been used to make those hotkeys work, since which kernel version that cmdline option stops working? And when it stops working, what's the output of:
# ls /sys/class/backlight

Also, when it doesn't work, please run acpi_listen and then press the backlight hotkey, is there any output?
Comment 28 Jaime Pérez 2014-12-09 16:16:03 UTC
KERNEL VERSION  || WORKS?  || OUTPUT of ls /sys/class/backlight
--------------------------------------------------------------
3.13.0          ||  YES    || intel_backlight acpi_video0
3.14.26         ||  YES    || intel_backlight acpi_video0
3.15.10         ||  YES    || intel_backlight acpi_video0
3.16.7          ||  YES    || intel_backlight acpi_video0
3.17.6          ||  YES    || intel_backlight acpi_video0
--------------------------------------------------------------
3.18.rc7        ||  NO     || intel_backlight
3.18.0          ||  NO     || intel_backlight
Comment 29 Jaime Pérez 2014-12-09 16:19:29 UTC
with 3.18.0 there isn't any output when I use acpi_listen. With 3.17 , there is
Comment 30 Aaron Lu 2014-12-10 02:01:33 UTC

*** This bug has been marked as a duplicate of bug 70241 ***

Note You need to log in before you can comment on or make changes to this bug.