# Laptop lid/power buttons

## VoVaN

Hello,

I have quite strange problem with my laptop lid/power: they doesn't generate events for evdev (I used kacpimon to watch them). However if I enable creating depreciated entries in proc I can see that, for instance, lid events are detected properly. Does somebody have any clue what could be wrong and where (kernel/userspace)?

Thanks in advance,

Vlad.

UPDATE: It could be related to https://bugzilla.redhat.com/show_bug.cgi?id=599679 and https://bugzilla.redhat.com/show_bug.cgi?id=512958

However, I see that this patch is not in the 3.0.6, so still no solution ;-(

UPDATE #2: Compiled the old 2.6.38 kernel with .config restored from backup and everything starts working automagically again. So, there's nothing wrong with user space, but with kernel... It's hard to find what exactly has such a bad impact.Last edited by VoVaN on Thu Oct 27, 2011 10:33 am; edited 2 times in total

----------

## dE_logics

I bet something's wrong with ACPI support in the kernel config, cross check it and rebuild kernel.

Also, you don't use a DE?

----------

## VoVaN

 *dE_logics wrote:*   

> I bet something's wrong with ACPI support in the kernel config, cross check it and rebuild kernel.

 

In my opinion the ACPI config looks fine (the same ACPI config works with power button on my desktop). Any tips what particularly should I check?

 *dE_logics wrote:*   

> Also, you don't use a DE?

 

I use gnome 2.3 as my main DE, but all the modern power daemons are relaying on upower and upower doesn't detect events as well. So I'm trying to troubleshoot this situation from bottom to top. As I can see the chain: kernel(ACPI/evdev)->upower->dbus->policykit->... At the moment I'm at the very first step. As I mentioned, I can see lid events in depreciated /proc interface, but nowhere else.

----------

## dmpogo

 *VoVaN wrote:*   

> Hello,
> 
> I have quite strange problem with my laptop lid/power: they doesn't generate events for evdev (I used kacpimon to watch them). However if I enable creating depreciated entries in proc I can see that, for instance, lid events are detected properly. Does somebody have any clue what could be wrong and where (kernel/userspace)?
> 
> Thanks in advance,
> ...

 

Are you using kernel 3.0.6 ?  With that I also had strange things on thinkpad with acpi events if old entries in proc are not enabled.

Namely,  witout /proc  acpi events got renamed and some Fn buttons stop generated them at all, but with /ol proc, I believe I stopped getting any !

This is with thinkpad_acpi module loaded as usual, and using acpi_listen from acpid

Had to roll back to 2.6.39 for now, until I have time to investigagte.

However, in your case may it  be just an issue that kacpimon uses /proc and not /sys ?

----------

## VoVaN

 *dmpogo wrote:*   

> Are you using kernel 3.0.6 ?  With that I also had strange things on thinkpad with acpi events if old entries in proc are not enabled.
> 
> Namely,  witout /proc  acpi events got renamed and some Fn buttons stop generated them at all.

 

I'm using 3.07. However, I didn't use this laptop for a while, but I can recall that all the keys/and buttons were working a year ago... I used the same configuration and just "make oldconfig"...

 *dmpogo wrote:*   

> However, in your case may it  be just an issue that kacpimon uses /proc and not /sys ?

 

As I mentioned, only /proc/acpi... reports events (this is kernelspace), but not kacpimon. So it looks like kacpimon uses somethig else (evdev/netlink?). The problem is that nothing in user space is catching this particular kernel events. Any thoughts???

----------

## dmpogo

 *VoVaN wrote:*   

>  *dmpogo wrote:*   Are you using kernel 3.0.6 ?  With that I also had strange things on thinkpad with acpi events if old entries in proc are not enabled.
> 
> Namely,  witout /proc  acpi events got renamed and some Fn buttons stop generated them at all. 
> 
> I'm using 3.07. However, I didn't use this laptop for a while, but I can recall that all the keys/and buttons were working a year ago... I used the same configuration and just "make oldconfig"...
> ...

 

I think modern tools are supposed to use netlink, yes. Actually in make case it says so when you launch it.

----------

## VoVaN

 *dmpogo wrote:*   

>  *VoVaN wrote:*    *dmpogo wrote:*   Are you using kernel 3.0.6 ?  With that I also had strange things on thinkpad with acpi events if old entries in proc are not enabled.
> 
> Namely,  witout /proc  acpi events got renamed and some Fn buttons stop generated them at all. 
> 
> I'm using 3.07. However, I didn't use this laptop for a while, but I can recall that all the keys/and buttons were working a year ago... I used the same configuration and just "make oldconfig"...
> ...

 

kacpimon clearly saying it can use both /proc/acpi/event or netlink, but while lid status changed properly in /proc/acpi/button/lid... kacpimon reports _nothig_. I've tried simply cat corresponding /dev/input/event* or /proc/acpi/event, but still nothing.

----------

## dmpogo

[quote="VoVaN"][

I noticed that kcpimon does not use /proc interface, if acpid that uses it is already running

----------

