2009-04-11 21:07:15

by Niel Lambrechts

[permalink] [raw]
Subject: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

Hi there,

With latest git kernel, I'm no longer able to control my Thinkpad (W500)
brightness, although I can still control the backlight, bluetooth etc.

I originally got some errors (below), but I was able to get around them
by changing /etc/modprobe.d/thinkpad_acpi
from the (default OPENSUSE)
options thinkpad_acpi experimental=1 hotkey=enable,0xffffff
to
options thinkpad_acpi experimental=1

Any ideas on how I can regain control over the brightness gas-pedal?

Niel

dmesg:
thinkpad_acpi: ThinkPad ACPI Extras v0.22
thinkpad_acpi: http://ibm-acpi.sf.net/
thinkpad_acpi: ThinkPad BIOS 6FET50WW (1.20 ), EC 7VHT12WW-1.01
thinkpad_acpi: Lenovo ThinkPad W500, model 40622XG
thinkpad_acpi: radio switch found; radios are enabled
thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness
control, supported by the ACPI video driver
thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
thinkpad_acpi: procfs hotkey enable/disable: access by process with PID 890
WARNING: at drivers/platform/x86/thinkpad_acpi.c:2954
hotkey_enabledisable_warn+0x3e/0x43 [thinkpad_acpi]()
thinkpad_acpi: hotkey enable/disable functionality has been removed from
the driver. Hotkeys are always enabled.
Modules linked in: thinkpad_acpi(+) snd_hda_intel(+) rfkill
snd_hda_codec rtc_cmos snd_hwdep mac80211 video i2c_i801 rtc_core
snd_pcm ohci1394 led_class battery ac output snd_timer snd soundcore
snd_page_alloc e1000e intel_agp button joydev wmi i2c_core sr_mod
rtc_lib cfg80211 sg ieee1394 iTCO_wdt agpgart cdrom nvram
iTCO_vendor_support sd_mod ehci_hcd uhci_hcd usbcore ext4 jbd2 crc16 edd
ext3 mbcache jbd fan ahci libata scsi_mod thermal processor
[<f81a3f7c>] hotkey_enabledisable_warn+0x3e/0x43 [thinkpad_acpi]
[<f81a5234>] hotkey_write+0x68/0x162 [thinkpad_acpi]
[<f7c63f62>] thinkpad_acpi_module_init+0x742/0x839 [thinkpad_acpi]
[<f7c63820>] ? thinkpad_acpi_module_init+0x0/0x839 [thinkpad_acpi]
Registered led device: tpacpi::thinklight
thinkpad_acpi: Standard ACPI backlight interface available, not loading
native one.


2009-04-11 22:09:10

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

(cc's added)

On Sat, 11 Apr 2009 23:07:16 +0200 Niel Lambrechts <[email protected]> wrote:

> Hi there,
>
> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
> brightness, although I can still control the backlight, bluetooth etc.

So 2.6.29 was OK?

> I originally got some errors (below), but I was able to get around them
> by changing /etc/modprobe.d/thinkpad_acpi
> from the (default OPENSUSE)
> options thinkpad_acpi experimental=1 hotkey=enable,0xffffff
> to
> options thinkpad_acpi experimental=1
>
> Any ideas on how I can regain control over the brightness gas-pedal?
>
> Niel
>
> dmesg:
> thinkpad_acpi: ThinkPad ACPI Extras v0.22
> thinkpad_acpi: http://ibm-acpi.sf.net/
> thinkpad_acpi: ThinkPad BIOS 6FET50WW (1.20 ), EC 7VHT12WW-1.01
> thinkpad_acpi: Lenovo ThinkPad W500, model 40622XG
> thinkpad_acpi: radio switch found; radios are enabled
> thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness
> control, supported by the ACPI video driver
> thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
> thinkpad_acpi: procfs hotkey enable/disable: access by process with PID 890
> WARNING: at drivers/platform/x86/thinkpad_acpi.c:2954
> hotkey_enabledisable_warn+0x3e/0x43 [thinkpad_acpi]()
> thinkpad_acpi: hotkey enable/disable functionality has been removed from
> the driver. Hotkeys are always enabled.
> Modules linked in: thinkpad_acpi(+) snd_hda_intel(+) rfkill
> snd_hda_codec rtc_cmos snd_hwdep mac80211 video i2c_i801 rtc_core
> snd_pcm ohci1394 led_class battery ac output snd_timer snd soundcore
> snd_page_alloc e1000e intel_agp button joydev wmi i2c_core sr_mod
> rtc_lib cfg80211 sg ieee1394 iTCO_wdt agpgart cdrom nvram
> iTCO_vendor_support sd_mod ehci_hcd uhci_hcd usbcore ext4 jbd2 crc16 edd
> ext3 mbcache jbd fan ahci libata scsi_mod thermal processor
> [<f81a3f7c>] hotkey_enabledisable_warn+0x3e/0x43 [thinkpad_acpi]
> [<f81a5234>] hotkey_write+0x68/0x162 [thinkpad_acpi]
> [<f7c63f62>] thinkpad_acpi_module_init+0x742/0x839 [thinkpad_acpi]
> [<f7c63820>] ? thinkpad_acpi_module_init+0x0/0x839 [thinkpad_acpi]
> Registered led device: tpacpi::thinklight
> thinkpad_acpi: Standard ACPI backlight interface available, not loading
> native one.
>

2009-04-11 22:17:51

by Arkadiusz Miskiewicz

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Saturday 11 of April 2009, Niel Lambrechts wrote:
> Hi there,
>
> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
> brightness, although I can still control the backlight, bluetooth etc.

Same problem here (but no warning) on T400. I wasn't able to get it working.
Tried using different values (0, 1,2, 3) for brightness_mode without success.

[ 7527.512263] thinkpad_acpi: ThinkPad ACPI Extras v0.22
[ 7527.512269] thinkpad_acpi: http://ibm-acpi.sf.net/
[ 7527.512274] thinkpad_acpi: ThinkPad BIOS 7UET61WW (2.07 ), EC 7VHT12WW-1.01
[ 7527.512279] thinkpad_acpi: Lenovo ThinkPad T400, model 2764CTO
[ 7527.526581] thinkpad_acpi: radio switch found; radios are enabled
[ 7527.526902] thinkpad_acpi: This ThinkPad has standard ACPI backlight
brightness control, supported by the ACPI video driver
[ 7527.526909] thinkpad_acpi: Disabling thinkpad-acpi brightness events by
default...
[ 7527.547485] Registered led device: tpacpi::thinklight
[ 7527.547747] Registered led device: tpacpi::power
[ 7527.547799] Registered led device: tpacpi::standby
[ 7527.554449] thinkpad_acpi: Standard ACPI backlight interface available, not
loading native one.
[ 7527.554921] input: ThinkPad Extra Buttons as /class/input/input21


> Niel

--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/

2009-04-11 22:39:58

by Arkadiusz Miskiewicz

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Sunday 12 of April 2009, Arkadiusz Miskiewicz wrote:
> On Saturday 11 of April 2009, Niel Lambrechts wrote:
> > Hi there,
> >
> > With latest git kernel, I'm no longer able to control my Thinkpad (W500)
> > brightness, although I can still control the backlight, bluetooth etc.
>
> Same problem here (but no warning) on T400. I wasn't able to get it
> working. Tried using different values (0, 1,2, 3) for brightness_mode
> without success.

The more interesting is that brightness control starts working after I suspend
to ram and resume.

Possibly related line logged after resume:
[ 8579.660535] ACPI: EC: non-query interrupt received, switching to interrupt
mode
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/

2009-04-11 22:44:57

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On 04/12/2009 12:05 AM, Andrew Morton wrote:
> (cc's added)
>
> On Sat, 11 Apr 2009 23:07:16 +0200 Niel Lambrechts <[email protected]> wrote:
>
>
>> Hi there,
>>
>> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
>> brightness, although I can still control the backlight, bluetooth etc.
>>
>
> So 2.6.29 was OK
Hi Andrew,

Yes - I quickly rebooted to 2.6.29.1, and it is working fine there ...

So these results are with both kernels using:
options thinkpad_acpi experimental=1

Thanks,
Niel

2009-04-11 22:55:13

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On 04/12/2009 12:05 AM, Andrew Morton wrote:
> (cc's added)
>
> On Sat, 11 Apr 2009 23:07:16 +0200 Niel Lambrechts <[email protected]> wrote:
>
>
>> Hi there,
>>
>> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
>> brightness, although I can still control the backlight, bluetooth etc.
>>
>
> So 2.6.29 was OK?
>
>
>> I originally got some errors (below), but I was able to get around them
>> by changing /etc/modprobe.d/thinkpad_acpi
>> from the (default OPENSUSE)
>> options thinkpad_acpi experimental=1 hotkey=enable,0xffffff
>> to
>> options thinkpad_acpi experimental=1
>>
>> Any ideas on how I can regain control over the brightness gas-pedal?
>>
>> Niel
>>
>> dmesg:
>> thinkpad_acpi: ThinkPad ACPI Extras v0.22
>> thinkpad_acpi: http://ibm-acpi.sf.net/
>> thinkpad_acpi: ThinkPad BIOS 6FET50WW (1.20 ), EC 7VHT12WW-1.01
>> thinkpad_acpi: Lenovo ThinkPad W500, model 40622XG
>> thinkpad_acpi: radio switch found; radios are enabled
>> thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness
>> control, supported by the ACPI video driver
>> thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
>> thinkpad_acpi: procfs hotkey enable/disable: access by process with PID 890
>> WARNING: at drivers/platform/x86/thinkpad_acpi.c:2954
>> hotkey_enabledisable_warn+0x3e/0x43 [thinkpad_acpi]()
>> thinkpad_acpi: hotkey enable/disable functionality has been removed from
>> the driver. Hotkeys are always enabled.
>> Modules linked in: thinkpad_acpi(+) snd_hda_intel(+) rfkill
>> snd_hda_codec rtc_cmos snd_hwdep mac80211 video i2c_i801 rtc_core
>> snd_pcm ohci1394 led_class battery ac output snd_timer snd soundcore
>> snd_page_alloc e1000e intel_agp button joydev wmi i2c_core sr_mod
>> rtc_lib cfg80211 sg ieee1394 iTCO_wdt agpgart cdrom nvram
>> iTCO_vendor_support sd_mod ehci_hcd uhci_hcd usbcore ext4 jbd2 crc16 edd
>> ext3 mbcache jbd fan ahci libata scsi_mod thermal processor
>> [<f81a3f7c>] hotkey_enabledisable_warn+0x3e/0x43 [thinkpad_acpi]
>> [<f81a5234>] hotkey_write+0x68/0x162 [thinkpad_acpi]
>> [<f7c63f62>] thinkpad_acpi_module_init+0x742/0x839 [thinkpad_acpi]
>> [<f7c63820>] ? thinkpad_acpi_module_init+0x0/0x839 [thinkpad_acpi]
>> Registered led device: tpacpi::thinklight
>> thinkpad_acpi: Standard ACPI backlight interface available, not loading
>> native one.
>>
>>
>
>
>
Could it be related to this commit?

commit 0e501834f8c2ba7de2a56e332d346dcf4ac0b593
Author: Henrique de Moraes Holschuh <[email protected]>
Date: Sat Apr 4 04:25:53 2009 +0000

thinkpad-acpi: rework brightness support

Refactor and redesign the brightness control backend...

Regards,
Niel

2009-04-11 23:10:40

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On 04/12/2009 12:55 AM, Niel Lambrechts wrote:
> Could it be related to this commit?
>
> commit 0e501834f8c2ba7de2a56e332d346dcf4ac0b593
> Author: Henrique de Moraes Holschuh <[email protected]>
> Date: Sat Apr 4 04:25:53 2009 +0000
>
> thinkpad-acpi: rework brightness support
>
> Refactor and redesign the brightness control backend...
>
Okay, please bear with me (I'm a git novice) but when I did

'git revert 0e501834f8c2ba7de2a56e332d346dcf4ac0b593'

and recompiled I was still unable to control the brightness with the
hotkeys...

Niel

Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Sat, 11 Apr 2009, Andrew Morton wrote:
> > options thinkpad_acpi experimental=1 hotkey=enable,0xffffff

Someday someone might be able to give me a good reason for why the hell
distros like to do this sort of crap... but I don't think it will be
anytime soon.

> > Any ideas on how I can regain control over the brightness gas-pedal?

I think what you're experiencing is some sort of breakage in ACPI video...

> > WARNING: at drivers/platform/x86/thinkpad_acpi.c:2954
> > hotkey_enabledisable_warn+0x3e/0x43 [thinkpad_acpi]()
> > thinkpad_acpi: hotkey enable/disable functionality has been removed from
> > the driver. Hotkeys are always enabled.

I will silence the warning for module parameters, thanks for the head's up.
That was indeed an oversight.

But it is a red-herring, it doesn't change the driver behaviour at all in
this case...

> > thinkpad_acpi: Standard ACPI backlight interface available, not loading
> > native one.

And this has always been true for any Lenovo Vista BIOS, it is not new.

I really think we need to get the people dealing with ACPI video in the
loop for this one.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Sun, 12 Apr 2009, Niel Lambrechts wrote:
> Okay, please bear with me (I'm a git novice) but when I did
>
> 'git revert 0e501834f8c2ba7de2a56e332d346dcf4ac0b593'
>
> and recompiled I was still unable to control the brightness with the
> hotkeys...

Which is not surprising. None of those codepaths are active for your
thinkpad, at least not by default.

Try bissecting keyed to changes to the ACPI video driver, or to the whole
acpi directory (but do try Linus' latest git kernel, first. One never
knows...)

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Sat, 11 Apr 2009, Andrew Morton wrote:
> > With latest git kernel, I'm no longer able to control my Thinkpad (W500)
> > brightness, although I can still control the backlight, bluetooth etc.

Niels, something just occourred to me. Is your problem the hotkeys, or the
brightness control itself? Check /sys/class/backlight/*, please. What do
you have in there? Does it work?

If it is the hotkeys, make sure you either have the legacy ACPI events
enabled in kconfig, or that you have something tied to the thinkpad-acpi
input device (no, HAL doesn't do it _yet_, it just forwards the events to
X.org)...

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

2009-04-12 18:37:29

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On 04/12/2009 06:14 PM, Henrique de Moraes Holschuh wrote:
> On Sat, 11 Apr 2009, Andrew Morton wrote:
>
>>> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
>>> brightness, although I can still control the backlight, bluetooth etc.
>>>
>
> Niels, something just occourred to me. Is your problem the hotkeys, or the
> brightness control itself? Check /sys/class/backlight/*, please. What do
> you have in there? Does it work?
>
Hi Henrique,

The directory is empty - this is when I used 2.6.30-rc1 (latest git)
from yesterday. I'll keep retrying with the latest git kernels though.

The only additional observations I can provide is:
1) pulling/plugging the power cord does actually have an effect on the
brightness.
2) resuming form hibernate - Xorg is blank, until I simultaneously press
a keyboard key and touch the synaptics pad. But I have this problem in
2.6.28/2.6.29 as well, and I guess it could either be vesafb or ACPI
related, as it also happened when I used s2disk in a console session
outside of X.

In 2.6.29.1:
lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
-> ../../devices/virtual/backlight/acpi_video0

which contains:
drwxr-xr-x 3 root root 0 Apr 12 20:01 ./
drwxr-xr-x 3 root root 0 Apr 12 20:01 ../
-r--r--r-- 1 root root 4096 Apr 12 20:02 actual_brightness
-rw-r--r-- 1 root root 4096 Apr 12 20:02 bl_power
-rw-r--r-- 1 root root 4096 Apr 12 20:02 brightness
-r--r--r-- 1 root root 4096 Apr 12 20:01 max_brightness
drwxr-xr-x 2 root root 0 Apr 12 20:02 power/
lrwxrwxrwx 1 root root 0 Apr 12 20:01 subsystem ->
../../../../class/backlight/
-rw-r--r-- 1 root root 4096 Apr 12 20:01 uevent

max_brightness = 15 and echoing values [0-15] to brightness controls it
as expected, or just using the standard thinkpad keys (Fn-Home to increase).
> If it is the hotkeys, make sure you either have the legacy ACPI events
> enabled in kconfig, or that you have something tied to the thinkpad-acpi
> input device (no, HAL doesn't do it _yet_, it just forwards the events to
> X.org)...
>
I'm not sure what provides the "glue", other than "it works" in 2.6.29.1
and 2.6.28.9 with OpenSUSE 11.1 with xorg-x11-server-7.4-41.8.

Would it help if I send the ACPI parts of my .config? These are based on
the default /proc/config.gz that comes with the distro.

# Power management and ACPI
options
CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_PROCFS=y

CONFIG_ACPI_PROCFS_POWER=y

CONFIG_ACPI_SYSFS_POWER=y

CONFIG_ACPI_PROC_EVENT=y

CONFIG_ACPI_AC=m

CONFIG_ACPI_BATTERY=m

CONFIG_ACPI_BUTTON=m

CONFIG_ACPI_VIDEO=m

CONFIG_ACPI_FAN=m

CONFIG_ACPI_DOCK=y
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_CUSTOM_DSDT_FILE=""
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=2001
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_ACPI_CONTAINER=m
CONFIG_ACPI_SBS=m
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_POWERNOW_K7_ACPI=y
CONFIG_X86_POWERNOW_K8_ACPI=y
CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
CONFIG_PNPACPI=y
CONFIG_BLK_DEV_IDEACPI=y
CONFIG_ATA_ACPI=y
CONFIG_PATA_ACPI=m
CONFIG_THINKPAD_ACPI=m
# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
# CONFIG_THINKPAD_ACPI_DEBUG is not set
CONFIG_THINKPAD_ACPI_BAY=y
CONFIG_THINKPAD_ACPI_VIDEO=y
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
CONFIG_ACPI_WMI=m
# CONFIG_ACPI_ASUS is not set
CONFIG_ACPI_TOSHIBA=m

Regards,
Niel

2009-04-12 22:39:08

by Maxim Levitsky

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): ACPI video backlight support broken. (WAS:thinkpad-acpi: cannot control brightness with hotkeys )


I have an acer aspire 5720, and have same issue.
I don't use acer-wmi.
I use standard acpi video module, and now it doesn't work
nothing in /sys/class/backlight, and this in dmesg:

[ 211.907597] ACPI: Failed to switch the brightness (using hardware
keys)

This is when I try to change brightness, and this on module load


> [ 1910.228636] ACPI Error (video-0537): Current brightness invalid [20090320]
> [ 1910.229006] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:34/device:35/input/input9
> [ 1910.390188] ACPI: Video Device [VGA] (multi-head: yes rom: no post: no)
>
>


Best regards,
Maxim Levitsky

2009-04-13 01:20:45

by Zhao, Yakui

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Mon, 2009-04-13 at 02:37 +0800, Niel Lambrechts wrote:
> On 04/12/2009 06:14 PM, Henrique de Moraes Holschuh wrote:
> > On Sat, 11 Apr 2009, Andrew Morton wrote:
> >
> >>> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
> >>> brightness, although I can still control the backlight, bluetooth etc.
> >>>
> >
> > Niels, something just occourred to me. Is your problem the hotkeys, or the
> > brightness control itself? Check /sys/class/backlight/*, please. What do
> > you have in there? Does it work?
> >
> Hi Henrique,
Will you please check whether there exists the /sys/class/backlight/*/*?

If not, will you please load the i915 driver and see whether the
backlight can be controlled by hotkeys?(The CONFIG_DRM_I915_KMS should
be enabled in kernel configuration).

Thanks.
>
> The directory is empty - this is when I used 2.6.30-rc1 (latest git)
> from yesterday. I'll keep retrying with the latest git kernels though.
>
> The only additional observations I can provide is:
> 1) pulling/plugging the power cord does actually have an effect on the
> brightness.
> 2) resuming form hibernate - Xorg is blank, until I simultaneously press
> a keyboard key and touch the synaptics pad. But I have this problem in
> 2.6.28/2.6.29 as well, and I guess it could either be vesafb or ACPI
> related, as it also happened when I used s2disk in a console session
> outside of X.
>
> In 2.6.29.1:
> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
> -> ../../devices/virtual/backlight/acpi_video0
>
> which contains:
> drwxr-xr-x 3 root root 0 Apr 12 20:01 ./
> drwxr-xr-x 3 root root 0 Apr 12 20:01 ../
> -r--r--r-- 1 root root 4096 Apr 12 20:02 actual_brightness
> -rw-r--r-- 1 root root 4096 Apr 12 20:02 bl_power
> -rw-r--r-- 1 root root 4096 Apr 12 20:02 brightness
> -r--r--r-- 1 root root 4096 Apr 12 20:01 max_brightness
> drwxr-xr-x 2 root root 0 Apr 12 20:02 power/
> lrwxrwxrwx 1 root root 0 Apr 12 20:01 subsystem ->
> ../../../../class/backlight/
> -rw-r--r-- 1 root root 4096 Apr 12 20:01 uevent
>
> max_brightness = 15 and echoing values [0-15] to brightness controls it
> as expected, or just using the standard thinkpad keys (Fn-Home to increase).
> > If it is the hotkeys, make sure you either have the legacy ACPI events
> > enabled in kconfig, or that you have something tied to the thinkpad-acpi
> > input device (no, HAL doesn't do it _yet_, it just forwards the events to
> > X.org)...
> >
> I'm not sure what provides the "glue", other than "it works" in 2.6.29.1
> and 2.6.28.9 with OpenSUSE 11.1 with xorg-x11-server-7.4-41.8.
>
> Would it help if I send the ACPI parts of my .config? These are based on
> the default /proc/config.gz that comes with the distro.
>
> # Power management and ACPI
> options
> CONFIG_ACPI=y
>
> CONFIG_ACPI_SLEEP=y
>
> CONFIG_ACPI_PROCFS=y
>
> CONFIG_ACPI_PROCFS_POWER=y
>
> CONFIG_ACPI_SYSFS_POWER=y
>
> CONFIG_ACPI_PROC_EVENT=y
>
> CONFIG_ACPI_AC=m
>
> CONFIG_ACPI_BATTERY=m
>
> CONFIG_ACPI_BUTTON=m
>
> CONFIG_ACPI_VIDEO=m
>
> CONFIG_ACPI_FAN=m
>
> CONFIG_ACPI_DOCK=y
> CONFIG_ACPI_PROCESSOR=m
> CONFIG_ACPI_HOTPLUG_CPU=y
> CONFIG_ACPI_THERMAL=m
> CONFIG_ACPI_CUSTOM_DSDT_FILE=""
> # CONFIG_ACPI_CUSTOM_DSDT is not set
> CONFIG_ACPI_BLACKLIST_YEAR=2001
> # CONFIG_ACPI_DEBUG is not set
> # CONFIG_ACPI_PCI_SLOT is not set
> CONFIG_ACPI_CONTAINER=m
> CONFIG_ACPI_SBS=m
> CONFIG_X86_ACPI_CPUFREQ=m
> CONFIG_X86_POWERNOW_K7_ACPI=y
> CONFIG_X86_POWERNOW_K8_ACPI=y
> CONFIG_HOTPLUG_PCI_ACPI=m
> CONFIG_HOTPLUG_PCI_ACPI_IBM=m
> CONFIG_PNPACPI=y
> CONFIG_BLK_DEV_IDEACPI=y
> CONFIG_ATA_ACPI=y
> CONFIG_PATA_ACPI=m
> CONFIG_THINKPAD_ACPI=m
> # CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
> # CONFIG_THINKPAD_ACPI_DEBUG is not set
> CONFIG_THINKPAD_ACPI_BAY=y
> CONFIG_THINKPAD_ACPI_VIDEO=y
> CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
> CONFIG_ACPI_WMI=m
> # CONFIG_ACPI_ASUS is not set
> CONFIG_ACPI_TOSHIBA=m
>
> Regards,
> Niel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2009-04-13 01:53:34

by Zhang, Rui

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

please attach the acpidump output.
please apply this patch and see if it helps,
http://patchwork.kernel.org/patch/17339/

thanks,
rui

On Mon, 2009-04-13 at 02:37 +0800, Niel Lambrechts wrote:
> On 04/12/2009 06:14 PM, Henrique de Moraes Holschuh wrote:
> > On Sat, 11 Apr 2009, Andrew Morton wrote:
> >
> >>> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
> >>> brightness, although I can still control the backlight, bluetooth etc.
> >>>
> >
> > Niels, something just occourred to me. Is your problem the hotkeys, or the
> > brightness control itself? Check /sys/class/backlight/*, please. What do
> > you have in there? Does it work?
> >
> Hi Henrique,
>
> The directory is empty - this is when I used 2.6.30-rc1 (latest git)
> from yesterday. I'll keep retrying with the latest git kernels though.
>
> The only additional observations I can provide is:
> 1) pulling/plugging the power cord does actually have an effect on the
> brightness.
> 2) resuming form hibernate - Xorg is blank, until I simultaneously press
> a keyboard key and touch the synaptics pad. But I have this problem in
> 2.6.28/2.6.29 as well, and I guess it could either be vesafb or ACPI
> related, as it also happened when I used s2disk in a console session
> outside of X.
>
> In 2.6.29.1:
> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
> -> ../../devices/virtual/backlight/acpi_video0
>
> which contains:
> drwxr-xr-x 3 root root 0 Apr 12 20:01 ./
> drwxr-xr-x 3 root root 0 Apr 12 20:01 ../
> -r--r--r-- 1 root root 4096 Apr 12 20:02 actual_brightness
> -rw-r--r-- 1 root root 4096 Apr 12 20:02 bl_power
> -rw-r--r-- 1 root root 4096 Apr 12 20:02 brightness
> -r--r--r-- 1 root root 4096 Apr 12 20:01 max_brightness
> drwxr-xr-x 2 root root 0 Apr 12 20:02 power/
> lrwxrwxrwx 1 root root 0 Apr 12 20:01 subsystem ->
> ../../../../class/backlight/
> -rw-r--r-- 1 root root 4096 Apr 12 20:01 uevent
>
> max_brightness = 15 and echoing values [0-15] to brightness controls it
> as expected, or just using the standard thinkpad keys (Fn-Home to increase).
> > If it is the hotkeys, make sure you either have the legacy ACPI events
> > enabled in kconfig, or that you have something tied to the thinkpad-acpi
> > input device (no, HAL doesn't do it _yet_, it just forwards the events to
> > X.org)...
> >
> I'm not sure what provides the "glue", other than "it works" in 2.6.29.1
> and 2.6.28.9 with OpenSUSE 11.1 with xorg-x11-server-7.4-41.8.
>
> Would it help if I send the ACPI parts of my .config? These are based on
> the default /proc/config.gz that comes with the distro.
>
> # Power management and ACPI
> options
> CONFIG_ACPI=y
>
> CONFIG_ACPI_SLEEP=y
>
> CONFIG_ACPI_PROCFS=y
>
> CONFIG_ACPI_PROCFS_POWER=y
>
> CONFIG_ACPI_SYSFS_POWER=y
>
> CONFIG_ACPI_PROC_EVENT=y
>
> CONFIG_ACPI_AC=m
>
> CONFIG_ACPI_BATTERY=m
>
> CONFIG_ACPI_BUTTON=m
>
> CONFIG_ACPI_VIDEO=m
>
> CONFIG_ACPI_FAN=m
>
> CONFIG_ACPI_DOCK=y
> CONFIG_ACPI_PROCESSOR=m
> CONFIG_ACPI_HOTPLUG_CPU=y
> CONFIG_ACPI_THERMAL=m
> CONFIG_ACPI_CUSTOM_DSDT_FILE=""
> # CONFIG_ACPI_CUSTOM_DSDT is not set
> CONFIG_ACPI_BLACKLIST_YEAR=2001
> # CONFIG_ACPI_DEBUG is not set
> # CONFIG_ACPI_PCI_SLOT is not set
> CONFIG_ACPI_CONTAINER=m
> CONFIG_ACPI_SBS=m
> CONFIG_X86_ACPI_CPUFREQ=m
> CONFIG_X86_POWERNOW_K7_ACPI=y
> CONFIG_X86_POWERNOW_K8_ACPI=y
> CONFIG_HOTPLUG_PCI_ACPI=m
> CONFIG_HOTPLUG_PCI_ACPI_IBM=m
> CONFIG_PNPACPI=y
> CONFIG_BLK_DEV_IDEACPI=y
> CONFIG_ATA_ACPI=y
> CONFIG_PATA_ACPI=m
> CONFIG_THINKPAD_ACPI=m
> # CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
> # CONFIG_THINKPAD_ACPI_DEBUG is not set
> CONFIG_THINKPAD_ACPI_BAY=y
> CONFIG_THINKPAD_ACPI_VIDEO=y
> CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
> CONFIG_ACPI_WMI=m
> # CONFIG_ACPI_ASUS is not set
> CONFIG_ACPI_TOSHIBA=m
>
> Regards,
> Niel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2009-04-13 15:16:36

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On 04/13/2009 03:21 AM, yakui_zhao wrote:
> On Mon, 2009-04-13 at 02:37 +0800, Niel Lambrechts wrote:
>
>> On 04/12/2009 06:14 PM, Henrique de Moraes Holschuh wrote:
>>
>>> On Sat, 11 Apr 2009, Andrew Morton wrote:
>>>
>>>
>>>>> With latest git kernel, I'm no longer able to control my Thinkpad (W500)
>>>>> brightness, although I can still control the backlight, bluetooth etc.
>>>>>
>>>>>
>>> Niels, something just occourred to me. Is your problem the hotkeys, or the
>>> brightness control itself? Check /sys/class/backlight/*, please. What do
>>> you have in there? Does it work?
>>>
>>>
>> Hi Henrique,
>>
> Will you please check whether there exists the /sys/class/backlight/*/*?
>
I already did mention that the directory does not exist when using
2.6.30 - see down below.

The directory only exists when I use 2.6.29.1 or 2.6.28.x, so there is
some type of regression.
>
> If not, will you please load the i915 driver and see whether the
> backlight can be controlled by hotkeys?(The CONFIG_DRM_I915_KMS should
> be enabled in kernel configuration).
>

I'm not using modeset=1, as I have even worse results with
i915.modeset=1 enabled (freezing system / black screen). So the results
I gave was using:

Graphics card: Mobile Intel GM45 Express Chipset

Option "EXANoComposite"
Option "AccelMethod" "exa"
Option "MigrationHeuristic" "greedy"
Option "ExaNoComposite" "false"
Option "VBERestore" "true"

> Thanks.
>
>> The directory is empty - this is when I used 2.6.30-rc1 (latest git)
>> from yesterday. I'll keep retrying with the latest git kernels though.
>>
>> The only additional observations I can provide is:
>> 1) pulling/plugging the power cord does actually have an effect on the
>> brightness.
>> 2) resuming form hibernate - Xorg is blank, until I simultaneously press
>> a keyboard key and touch the synaptics pad. But I have this problem in
>> 2.6.28/2.6.29 as well, and I guess it could either be vesafb or ACPI
>> related, as it also happened when I used s2disk in a console session
>> outside of X.
>>
>> In 2.6.29.1:
>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
>> -> ../../devices/virtual/backlight/acpi_video0
>>
>> which contains:
>> drwxr-xr-x 3 root root 0 Apr 12 20:01 ./
>> drwxr-xr-x 3 root root 0 Apr 12 20:01 ../
>> -r--r--r-- 1 root root 4096 Apr 12 20:02 actual_brightness
>> -rw-r--r-- 1 root root 4096 Apr 12 20:02 bl_power
>> -rw-r--r-- 1 root root 4096 Apr 12 20:02 brightness
>> -r--r--r-- 1 root root 4096 Apr 12 20:01 max_brightness
>> drwxr-xr-x 2 root root 0 Apr 12 20:02 power/
>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 subsystem ->
>> ../../../../class/backlight/
>> -rw-r--r-- 1 root root 4096 Apr 12 20:01 uevent
>>
>> max_brightness = 15 and echoing values [0-15] to brightness controls it
>> as expected, or just using the standard thinkpad keys (Fn-Home to increase).
>>
Thanks
Niel

2009-04-13 15:18:49

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On 04/13/2009 03:53 AM, Zhang Rui wrote:
> please attach the acpidump output.
> please apply this patch and see if it helps,
> http://patchwork.kernel.org/patch/17339/
>
Hi,

The patch you mention above has no effect when applied to the latest
2.6.30-rc1 git kernel. I'm still unable to control brightness, and the
display is still blank on resume (unless I press both a keyboard key and
touch the synaptic pad).

dmesg shows:
thinkpad_acpi: ThinkPad ACPI Extras v0.22
thinkpad_acpi: http://ibm-acpi.sf.net/
thinkpad_acpi: ThinkPad BIOS 6FET50WW (1.20 ), EC 7VHT12WW-1.01
thinkpad_acpi: Lenovo ThinkPad W500, model 40622XG
thinkpad_acpi: radio switch found; radios are enabled
thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness
control, supported by the ACPI video driver
thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
Registered led device: tpacpi::thinklight
Registered led device: tpacpi::power
Registered led device: tpacpi::standby
thinkpad_acpi: Standard ACPI backlight interface available, not loading
native one.
pci 0000:00:02.0: power state changed by ACPI to D0

but /sys/class/backlight still is empty.

acpidump output attached, please let me know if I can test anything else
or provide more info...

thanks
Niel


Attachments:
acpidmp.gz (87.64 kB)

2009-04-13 18:21:42

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On 04/13/2009 05:18 PM, Niel Lambrechts wrote:
> On 04/13/2009 03:53 AM, Zhang Rui wrote:
>
>> please attach the acpidump output.
>> please apply this patch and see if it helps,
>> http://patchwork.kernel.org/patch/17339/
>>
>>
> Hi,
>
> The patch you mention above has no effect when applied to the latest
> 2.6.30-rc1 git kernel. I'm still unable to control brightness, and the
> display is still blank on resume (unless I press both a keyboard key and
> touch the synaptic pad).
>
> dmesg shows:
> thinkpad_acpi: ThinkPad ACPI Extras v0.22
> thinkpad_acpi: http://ibm-acpi.sf.net/
> thinkpad_acpi: ThinkPad BIOS 6FET50WW (1.20 ), EC 7VHT12WW-1.01
> thinkpad_acpi: Lenovo ThinkPad W500, model 40622XG
> thinkpad_acpi: radio switch found; radios are enabled
> thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness
> control, supported by the ACPI video driver
> thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
> Registered led device: tpacpi::thinklight
> Registered led device: tpacpi::power
> Registered led device: tpacpi::standby
> thinkpad_acpi: Standard ACPI backlight interface available, not loading
> native one.
> pci 0000:00:02.0: power state changed by ACPI to D0
>
> but /sys/class/backlight still is empty.
>
> acpidump output attached, please let me know if I can test anything else
> or provide more info...
>
I've just retried this with the latest Lenovo firmware *2.12-1.01
*6FET64WW (which came out last week). It still gives the same bad result
though...

I attach acpidump again in case it matters after upgrading the BIOS.

cheers
Niel


Attachments:
acpidmp.gz (88.21 kB)
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Mon, 13 Apr 2009, Niel Lambrechts wrote:
> >> In 2.6.29.1:
> >> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
> >> -> ../../devices/virtual/backlight/acpi_video0

Well, that at least confirms that thinkpad-acpi doesn't have anything to
do with your troubles, you were using acpi video.

While the problem isn't fixed, you can try forcing thinkpad-acpi to
provide a backlight interface and use that (docs in
Documentation/laptops/thinkpad-acpi.txt). But you get to keep both pieces
if that causes the kernel or X.org's GPU drivers to blow up in pieces when
the SMBIOS messes with the GPU behind their backs.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

2009-04-14 01:02:28

by Zhang, Rui

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

Niel,

please make sure CONFIG_ACPI_VIDEO is set,
please attach the full dmesg output.

thanks,
rui

On Tue, 2009-04-14 at 02:20 +0800, Niel Lambrechts wrote:
> On 04/13/2009 05:18 PM, Niel Lambrechts wrote:
> > On 04/13/2009 03:53 AM, Zhang Rui wrote:
> >
> >> please attach the acpidump output.
> >> please apply this patch and see if it helps,
> >> http://patchwork.kernel.org/patch/17339/
> >>
> >>
> > Hi,
> >
> > The patch you mention above has no effect when applied to the latest
> > 2.6.30-rc1 git kernel. I'm still unable to control brightness, and the
> > display is still blank on resume (unless I press both a keyboard key and
> > touch the synaptic pad).
> >
> > dmesg shows:
> > thinkpad_acpi: ThinkPad ACPI Extras v0.22
> > thinkpad_acpi: http://ibm-acpi.sf.net/
> > thinkpad_acpi: ThinkPad BIOS 6FET50WW (1.20 ), EC 7VHT12WW-1.01
> > thinkpad_acpi: Lenovo ThinkPad W500, model 40622XG
> > thinkpad_acpi: radio switch found; radios are enabled
> > thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness
> > control, supported by the ACPI video driver
> > thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
> > Registered led device: tpacpi::thinklight
> > Registered led device: tpacpi::power
> > Registered led device: tpacpi::standby
> > thinkpad_acpi: Standard ACPI backlight interface available, not loading
> > native one.
> > pci 0000:00:02.0: power state changed by ACPI to D0
> >
> > but /sys/class/backlight still is empty.
> >
> > acpidump output attached, please let me know if I can test anything else
> > or provide more info...
> >
> I've just retried this with the latest Lenovo firmware *2.12-1.01
> *6FET64WW (which came out last week). It still gives the same bad result
> though...
>
> I attach acpidump again in case it matters after upgrading the BIOS.
>
> cheers
> Niel
>

2009-04-14 03:03:43

by Zhang, Rui

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys

On Tue, 2009-04-14 at 09:02 +0800, Zhang Rui wrote:
> Niel,
>
> please make sure CONFIG_ACPI_VIDEO is set,
> please attach the full dmesg output.
>
and please make sure the patch at
http://patchwork.kernel.org/patch/18010/
is applied on top of the previous one.

thanks,
rui


> thanks,
> rui
>
> On Tue, 2009-04-14 at 02:20 +0800, Niel Lambrechts wrote:
> > On 04/13/2009 05:18 PM, Niel Lambrechts wrote:
> > > On 04/13/2009 03:53 AM, Zhang Rui wrote:
> > >
> > >> please attach the acpidump output.
> > >> please apply this patch and see if it helps,
> > >> http://patchwork.kernel.org/patch/17339/
> > >>
> > >>
> > > Hi,
> > >
> > > The patch you mention above has no effect when applied to the latest
> > > 2.6.30-rc1 git kernel. I'm still unable to control brightness, and the
> > > display is still blank on resume (unless I press both a keyboard key and
> > > touch the synaptic pad).
> > >
> > > dmesg shows:
> > > thinkpad_acpi: ThinkPad ACPI Extras v0.22
> > > thinkpad_acpi: http://ibm-acpi.sf.net/
> > > thinkpad_acpi: ThinkPad BIOS 6FET50WW (1.20 ), EC 7VHT12WW-1.01
> > > thinkpad_acpi: Lenovo ThinkPad W500, model 40622XG
> > > thinkpad_acpi: radio switch found; radios are enabled
> > > thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness
> > > control, supported by the ACPI video driver
> > > thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
> > > Registered led device: tpacpi::thinklight
> > > Registered led device: tpacpi::power
> > > Registered led device: tpacpi::standby
> > > thinkpad_acpi: Standard ACPI backlight interface available, not loading
> > > native one.
> > > pci 0000:00:02.0: power state changed by ACPI to D0
> > >
> > > but /sys/class/backlight still is empty.
> > >
> > > acpidump output attached, please let me know if I can test anything else
> > > or provide more info...
> > >
> > I've just retried this with the latest Lenovo firmware *2.12-1.01
> > *6FET64WW (which came out last week). It still gives the same bad result
> > though...
> >
> > I attach acpidump again in case it matters after upgrading the BIOS.
> >
> > cheers
> > Niel
> >

2009-04-14 23:59:48

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On 04/13/2009 10:34 PM, Henrique de Moraes Holschuh wrote:
> On Mon, 13 Apr 2009, Niel Lambrechts wrote:
>
>>>> In 2.6.29.1:
>>>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
>>>> -> ../../devices/virtual/backlight/acpi_video0
>>>>
>
> Well, that at least confirms that thinkpad-acpi doesn't have anything to
> do with your troubles, you were using acpi video.
>

Okay, I've bisected it to:

74a365b3f354fafc537efa5867deb7a9fadbfe27 is first bad commit
commit 74a365b3f354fafc537efa5867deb7a9fadbfe27
Author: Matthew Garrett <[email protected]>
Date: Thu Mar 19 21:35:39 2009 +0000

ACPI: Populate DIDL before registering ACPI video device on Intel

---

Matthew, can you help?

Regards,
Niel

2009-04-15 00:41:45

by Maxim Levitsky

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On Wed, 2009-04-15 at 01:59 +0200, Niel Lambrechts wrote:
> On 04/13/2009 10:34 PM, Henrique de Moraes Holschuh wrote:
> > On Mon, 13 Apr 2009, Niel Lambrechts wrote:
> >
> >>>> In 2.6.29.1:
> >>>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
> >>>> -> ../../devices/virtual/backlight/acpi_video0
> >>>>
> >
> > Well, that at least confirms that thinkpad-acpi doesn't have anything to
> > do with your troubles, you were using acpi video.
> >
>
> Okay, I've bisected it to:
>
> 74a365b3f354fafc537efa5867deb7a9fadbfe27 is first bad commit
> commit 74a365b3f354fafc537efa5867deb7a9fadbfe27
> Author: Matthew Garrett <[email protected]>
> Date: Thu Mar 19 21:35:39 2009 +0000
>
> ACPI: Populate DIDL before registering ACPI video device on Intel
>
> ---
>
> Matthew, can you help?
>
> Regards,
> Niel


Just to note,

I have nvidia, and yet have the same bug.
I reverted this commit - didn't help.

I get lots of
ACPI: Failed to switch the brightnes
when I press hardware keys that change brightness
(even these sometimes don't work)


the /sys/class/backlight is empty

2.6.29 works fine.


Best regards,
Maxim Levitsky

2009-04-15 01:50:32

by Zhang, Rui

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On Wed, 2009-04-15 at 07:59 +0800, Niel Lambrechts wrote:
> On 04/13/2009 10:34 PM, Henrique de Moraes Holschuh wrote:
> > On Mon, 13 Apr 2009, Niel Lambrechts wrote:
> >
> >>>> In 2.6.29.1:
> >>>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
> >>>> -> ../../devices/virtual/backlight/acpi_video0
> >>>>
> >
> > Well, that at least confirms that thinkpad-acpi doesn't have anything to
> > do with your troubles, you were using acpi video.
> >
>
> Okay, I've bisected it to:
>
> 74a365b3f354fafc537efa5867deb7a9fadbfe27 is first bad commit
> commit 74a365b3f354fafc537efa5867deb7a9fadbfe27
> Author: Matthew Garrett <[email protected]>
> Date: Thu Mar 19 21:35:39 2009 +0000
>
> ACPI: Populate DIDL before registering ACPI video device on Intel
>

please set CONFIG_DRM_I915_KMS, reload the ACPI video driver after
loading i915 and see if it helps.

thanks,
rui

2009-04-15 01:51:22

by Zhang, Rui

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On Wed, 2009-04-15 at 09:50 +0800, Zhang Rui wrote:
> On Wed, 2009-04-15 at 07:59 +0800, Niel Lambrechts wrote:
> > On 04/13/2009 10:34 PM, Henrique de Moraes Holschuh wrote:
> > > On Mon, 13 Apr 2009, Niel Lambrechts wrote:
> > >
> > >>>> In 2.6.29.1:
> > >>>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
> > >>>> -> ../../devices/virtual/backlight/acpi_video0
> > >>>>
> > >
> > > Well, that at least confirms that thinkpad-acpi doesn't have anything to
> > > do with your troubles, you were using acpi video.
> > >
> >
> > Okay, I've bisected it to:
> >
> > 74a365b3f354fafc537efa5867deb7a9fadbfe27 is first bad commit
> > commit 74a365b3f354fafc537efa5867deb7a9fadbfe27
> > Author: Matthew Garrett <[email protected]>
> > Date: Thu Mar 19 21:35:39 2009 +0000
> >
> > ACPI: Populate DIDL before registering ACPI video device on Intel
> >
>
> please set CONFIG_DRM_I915_KMS, reload the ACPI video driver after
> loading i915 and see if it helps.
>
sorry, you don't need to reload the ACPI video driver...

> thanks,
> rui
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2009-04-15 05:52:21

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On 04/15/2009 02:41 AM, Maxim Levitsky wrote:
> On Wed, 2009-04-15 at 01:59 +0200, Niel Lambrechts wrote:
>
>> On 04/13/2009 10:34 PM, Henrique de Moraes Holschuh wrote:
>>
>>> On Mon, 13 Apr 2009, Niel Lambrechts wrote:
>>>
>>>
>>>>>> In 2.6.29.1:
>>>>>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
>>>>>> -> ../../devices/virtual/backlight/acpi_video0
>>>>>>
>>>>>>
>>> Well, that at least confirms that thinkpad-acpi doesn't have anything to
>>> do with your troubles, you were using acpi video.
>>>
>>>
>> Okay, I've bisected it to:
>>
>> 74a365b3f354fafc537efa5867deb7a9fadbfe27 is first bad commit
>> commit 74a365b3f354fafc537efa5867deb7a9fadbfe27
>> Author: Matthew Garrett <[email protected]>
>> Date: Thu Mar 19 21:35:39 2009 +0000
>>
>> ACPI: Populate DIDL before registering ACPI video device on Intel
>>
>> ---
>>
>> Matthew, can you help?
>>
>> Regards,
>> Niel
>>
>
>
> Just to note,
>
> I have nvidia, and yet have the same bug.
> I reverted this commit - didn't help.
>
While you may have _some_ of the same symptoms, you clearly don't have
the same bug.

I reverted the commit as well, and my laptop is working fine under
2.6.30-rc2 now.

> I get lots of
> ACPI: Failed to switch the brightnes
> when I press hardware keys that change brightness
> (even these sometimes don't work)
>
Mine consistently did not work, and I had no messages.

I understand you could try to do a limited bisect using something like
git bisect start -- drivers/acpi drivers/video

Perhaps you can do a bisect as well?

Regards,
Niel

2009-04-15 06:53:56

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On 04/15/2009 03:50 AM, Zhang Rui wrote:
> On Wed, 2009-04-15 at 07:59 +0800, Niel Lambrechts wrote:
>
>> On 04/13/2009 10:34 PM, Henrique de Moraes Holschuh wrote:
>>
>>> On Mon, 13 Apr 2009, Niel Lambrechts wrote:
>>>
>>>
>>>>>> In 2.6.29.1:
>>>>>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
>>>>>> -> ../../devices/virtual/backlight/acpi_video0
>>>>>>
>>>>>>
>>> Well, that at least confirms that thinkpad-acpi doesn't have anything to
>>> do with your troubles, you were using acpi video.
>>>
>>>
>> Okay, I've bisected it to:
>>
>> 74a365b3f354fafc537efa5867deb7a9fadbfe27 is first bad commit
>> commit 74a365b3f354fafc537efa5867deb7a9fadbfe27
>> Author: Matthew Garrett <[email protected]>
>> Date: Thu Mar 19 21:35:39 2009 +0000
>>
>> ACPI: Populate DIDL before registering ACPI video device on Intel
>>
>>
>
> please set CONFIG_DRM_I915_KMS, reload the ACPI video driver after
> loading i915 and see if it helps.
>
In all the kernels I've tried (up to 2.6.30-rc2), I get issues with KMS:

I boot with 'modeset=1 i915=1', console login is okay and 'modprobe i915
modeset=1' seems to work - the console resolution changes (very small
1920x1200).

When I do 'init 5' kdm loads (and display the logon screen) but after
entering my username/password it hangs at the KDE splash-screen (the
last icon, so some progress must have been made). Caps lock then won't
even work, but emergency sync seemed to do the trick.

/var/log/warnings:
Apr 15 07:55:11 linux-7vph nm-dispatcher.action: Script
'/etc/NetworkManager/dispatcher.d/autofs' exited with error status 1.
Apr 15 07:55:12 linux-7vph kernel: allocated 1920x1200 fb: 0x02020000,
bo f598acc0
Apr 15 07:55:12 linux-7vph kernel: Console: switching to colour frame
buffer device 240x75
Apr 15 07:55:13 linux-7vph nm-dispatcher.action: Script
'/etc/NetworkManager/dispatcher.d/nfs' exitedwith error status 6.
Apr 15 07:55:19 linux-7vph kdm_config[3234]: Multiple occurrences of key
'UseTheme' in section [X-*-Greeter] of /usr/share/kde4/config/kdm/kdmrc
Apr 15 07:55:22 linux-7vph kernel: CE: hpet increasing min_delta_ns to
15000 nsec
Apr 15 07:56:10 linux-7vph kernel: Emergency Sync complete
Apr 15 07:56:26 linux-7vph kernel: CE: hpet increasing min_delta_ns to
22500 nsec
Apr 15 07:56:27 linux-7vph kernel: Emergency Sync complete
Apr 15 07:56:49 linux-7vph kernel: Emergency Sync complete
Apr 15 07:56:55 linux-7vph kernel: CE: hpet increasing min_delta_ns to
33750 nsec
Apr 15 07:56:56 linux-7vph kernel: Emergency Sync complete

So while I'd love to use KMS, I have never been able to get X up using it.

Regards,
Niel

2009-04-15 12:35:37

by Peter Zijlstra

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On Wed, 2009-04-15 at 08:53 +0200, Niel Lambrechts wrote:
> On 04/15/2009 03:50 AM, Zhang Rui wrote:
> > On Wed, 2009-04-15 at 07:59 +0800, Niel Lambrechts wrote:
> >
> >> On 04/13/2009 10:34 PM, Henrique de Moraes Holschuh wrote:
> >>
> >>> On Mon, 13 Apr 2009, Niel Lambrechts wrote:
> >>>
> >>>
> >>>>>> In 2.6.29.1:
> >>>>>> lrwxrwxrwx 1 root root 0 Apr 12 20:01 /sys/class/backlight/acpi_video0
> >>>>>> -> ../../devices/virtual/backlight/acpi_video0
> >>>>>>
> >>>>>>
> >>> Well, that at least confirms that thinkpad-acpi doesn't have anything to
> >>> do with your troubles, you were using acpi video.
> >>>
> >>>
> >> Okay, I've bisected it to:
> >>
> >> 74a365b3f354fafc537efa5867deb7a9fadbfe27 is first bad commit
> >> commit 74a365b3f354fafc537efa5867deb7a9fadbfe27
> >> Author: Matthew Garrett <[email protected]>
> >> Date: Thu Mar 19 21:35:39 2009 +0000
> >>
> >> ACPI: Populate DIDL before registering ACPI video device on Intel
> >>
> >>
> >
> > please set CONFIG_DRM_I915_KMS, reload the ACPI video driver after
> > loading i915 and see if it helps.
> >
> In all the kernels I've tried (up to 2.6.30-rc2), I get issues with KMS:
>
> I boot with 'modeset=1 i915=1', console login is okay and 'modprobe i915
> modeset=1' seems to work - the console resolution changes (very small
> 1920x1200).

Hehe, at least you get something, I consistently get a black screen
whenever KMS gets enabled in a config.


2009-04-15 16:50:08

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

Does this help?

diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
index 6942772..8dc1fd3 100644
--- a/drivers/gpu/drm/i915/i915_opregion.c
+++ b/drivers/gpu/drm/i915/i915_opregion.c
@@ -370,11 +370,8 @@ int intel_opregion_init(struct drm_device *dev, int resume)
if (mboxes & MBOX_ACPI) {
DRM_DEBUG("Public ACPI methods supported\n");
opregion->acpi = base + OPREGION_ACPI_OFFSET;
- if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
intel_didl_outputs(dev);
- if (!resume)
- acpi_video_register();
- }
} else {
DRM_DEBUG("Public ACPI methods not supported\n");
err = -ENOTSUPP;
@@ -391,6 +388,10 @@ int intel_opregion_init(struct drm_device *dev, int resume)
opregion->asle = base + OPREGION_ASLE_OFFSET;
}

+ if (!resume)
+ acpi_video_register();
+
+
/* Notify BIOS we are ready to handle ACPI video ext notifs.
* Right now, all the events are handled by the ACPI video module.
* We don't actually need to do anything with them. */

--
Matthew Garrett | [email protected]

2009-04-15 19:56:44

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On 04/15/2009 06:49 PM, Matthew Garrett wrote:
> Does this help?
>
> diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
> index 6942772..8dc1fd3 100644
> --- a/drivers/gpu/drm/i915/i915_opregion.c
> +++ b/drivers/gpu/drm/i915/i915_opregion.c
> @@ -370,11 +370,8 @@ int intel_opregion_init(struct drm_device *dev, int resume
>
Hi Matthew,

Yes please, after your patch the brightness can be adjusted again. :)

The behaviour seems slightly different from before your 74a365b3f354
commit in that /sys/class/backlight remains empty until i915 gets loaded
for the first time, the contents then persist even if i915 is unloaded.
Perhaps the directory was populated by a different kernel module, since
when I did the bisect yesterday the directory would be there on boot
before I started X or loaded i915.

I'm not sure if that matters to any other user-space app. (or if
ideally one is supposed to be able to control brightness in the console
without having to load i915), but it's fine for controlling brightness
in Xorg.

Thanks,
Niel

2009-04-15 20:01:50

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On Wed, Apr 15, 2009 at 09:55:55PM +0200, Niel Lambrechts wrote:

> The behaviour seems slightly different from before your 74a365b3f354
> commit in that /sys/class/backlight remains empty until i915 gets loaded
> for the first time, the contents then persist even if i915 is unloaded.
> Perhaps the directory was populated by a different kernel module, since
> when I did the bisect yesterday the directory would be there on boot
> before I started X or loaded i915.

In the past the directory would be created when the acpi video driver
was loaded, but probably wouldn't work. Doing it that way is a violation
of the opregion spec and causes some machines to break in a horrible
manner, so I'd prefer not to go back to that version...

> I'm not sure if that matters to any other user-space app. (or if
> ideally one is supposed to be able to control brightness in the console
> without having to load i915), but it's fine for controlling brightness
> in Xorg.

If you use modesetting then you shouldn't need to launch X to get
working brightness control. The problem with the old-style world is that
you won't get interrupts until X comes up.

--
Matthew Garrett | [email protected]

2009-04-15 20:57:46

by Niel Lambrechts

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On 04/15/2009 10:01 PM, Matthew Garrett wrote:
> On Wed, Apr 15, 2009 at 09:55:55PM +0200, Niel Lambrechts wrote:
>
>
>> The behaviour seems slightly different from before your 74a365b3f354
>> commit in that /sys/class/backlight remains empty until i915 gets loaded
>> for the first time, the contents then persist even if i915 is unloaded.
>> Perhaps the directory was populated by a different kernel module, since
>> when I did the bisect yesterday the directory would be there on boot
>> before I started X or loaded i915.
>>
>
> In the past the directory would be created when the acpi video driver
> was loaded, but probably wouldn't work. Doing it that way is a violation
> of the opregion spec and causes some machines to break in a horrible
> manner, so I'd prefer not to go back to that version...
>
Cool, I suspected it was intended behaviour... :)

So is there any chance of getting this fix merged any time soon (at
least before 2.6.30 is out)?

> If you use modesetting then you shouldn't need to launch X to get
> working brightness control. The problem with the old-style world is that
> you won't get interrupts until X comes up.

I'd love to use KMS, but I have no idea how to troubleshoot the freeze
I'm getting after the main gdm login screen. Or is there still a future
i915 milestone(s) to be reached before I can realistically do
i915.modeset=1, given the large amount of activity around this in recent
times?

Thanks for the help!
Niel

2009-04-15 21:00:37

by Matthew Garrett

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On Wed, Apr 15, 2009 at 10:57:12PM +0200, Niel Lambrechts wrote:

> So is there any chance of getting this fix merged any time soon (at
> least before 2.6.30 is out)?

Yeah, I'd hope it's merged before .30. I've sent it to the maintainers.

> I'd love to use KMS, but I have no idea how to troubleshoot the freeze
> I'm getting after the main gdm login screen. Or is there still a future
> i915 milestone(s) to be reached before I can realistically do
> i915.modeset=1, given the large amount of activity around this in recent
> times?

There's still a lot of work being done in this area, and it can be a bit
sensitive to you using the correct X driver version with a given kernel
version.

--
Matthew Garrett | [email protected]

2009-04-16 01:01:57

by Zhao, Yakui

[permalink] [raw]
Subject: Re: 2.6.30-rc1 (latest git): thinkpad-acpi: cannot control brightness with hotkeys (BISECTED)

On Thu, 2009-04-16 at 00:49 +0800, Matthew Garrett wrote:
> Does this help?
If so, we don't need the following patch.
>http://marc.info/?l=linux-acpi&m=123967828429865&w=2
>check whether the ACPI video driver is deferrable only when KMS is
set


> diff --git a/drivers/gpu/drm/i915/i915_opregion.c b/drivers/gpu/drm/i915/i915_opregion.c
> index 6942772..8dc1fd3 100644
> --- a/drivers/gpu/drm/i915/i915_opregion.c
> +++ b/drivers/gpu/drm/i915/i915_opregion.c
> @@ -370,11 +370,8 @@ int intel_opregion_init(struct drm_device *dev, int resume)
> if (mboxes & MBOX_ACPI) {
> DRM_DEBUG("Public ACPI methods supported\n");
> opregion->acpi = base + OPREGION_ACPI_OFFSET;
> - if (drm_core_check_feature(dev, DRIVER_MODESET)) {
> + if (drm_core_check_feature(dev, DRIVER_MODESET))
> intel_didl_outputs(dev);
> - if (!resume)
> - acpi_video_register();
> - }
> } else {
> DRM_DEBUG("Public ACPI methods not supported\n");
> err = -ENOTSUPP;
> @@ -391,6 +388,10 @@ int intel_opregion_init(struct drm_device *dev, int resume)
> opregion->asle = base + OPREGION_ASLE_OFFSET;
> }
>
> + if (!resume)
> + acpi_video_register();
> +
> +
> /* Notify BIOS we are ready to handle ACPI video ext notifs.
> * Right now, all the events are handled by the ACPI video module.
> * We don't actually need to do anything with them. */
>