Re: Battery status files created on the fly?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Wim Van Deun [2011.05.18 0823 +0200]:
> Hi Norbert,
> 
> I have the exact same issue on a dell latitude e5510 running the x86_64
> kernel. And on a dell latitude 1220 running the i686 kernel.
> Didn't know about the hack, thanks.

Great, my hack actually helps someone else.  In case you also have the issue I
mentioned after wakeup:

> > Also, after suspending, the files remain present but cannot be read.
> > Querying the battery through the /proc interface once again brings
> > everything back to normal.

a similar solution as after boot fixes this one:  I put the following script
into /etc/pm/sleep.d/91battery:

#!/bin/sh

case "$1" in
  hibernate|suspend)
    ;;
  thaw|resume)
    cat /proc/acpi/battery/BAT?/state > /dev/null
    ;;
  *)
    exit $NA
    ;;
esac

With this, the files in /sys/class/power_supply/BAT0 become readable again.

It would be nice, though, to figure out how to get things working without such
hacks.

Cheers,
Norbert


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux