DevKit-Power doesn't detect the system is running on battery power if you boot your laptop without AC power

Emilio López buhitoescolar at gmail.com
Tue Nov 17 16:26:31 PST 2009


2009/11/17 Richard Hughes <hughsient at gmail.com>:
> 2009/11/17 Emilio López <buhitoescolar at gmail.com>:
>> emilio at laptop:~$ ls /sys/class/power_supply
>> ACAD
>
> There's the problem.
>
>> emilio at laptop:~$ cat /proc/acpi/battery/BAT1/state
>> present:                 yes
>> capacity state:          ok
>> charging state:          discharging
>> present rate:            2056 mA
>> remaining capacity:      1956 mAh
>> present voltage:         10699 mV
>>
>> The battery magically appears, and all the actions get triggered (like
>> lowering screen brightness).
>>
>> emilio at laptop:~$ ls /sys/class/power_supply
>> ACAD  BAT1
>
> That's insane. Your battery driver is broken.
>
>> It seems that cheching that /proc/acpi/battery/BAT1/state makes
>> devkit-power aware of the battery. Any thoughts?
>
> Are you using a custom kernel battery driver? Is the source available?

I am using Ubuntu Karmic Koala without any special modules. Here is a
lsmod of my PC, the only think that might be PC-specific is acer_wmi,
as my PC is an Acer Aspire 6930, but I don't know if this module does
something on non-acer PCs. I didn't install it myself, it came with
the distro. Here is some information about it:
http://www.kernel.org/doc/Documentation/laptops/acer-wmi.txt

Module                  Size  Used by
binfmt_misc            10220  1
ppdev                   8232  0
vboxnetadp              6528  0
vboxnetflt             14288  0
vboxdrv              1777804  2 vboxnetadp,vboxnetflt
joydev                 13088  0
snd_hda_codec_intelhdmi    14880  1
snd_hda_codec_realtek   277860  1
arc4                    2144  2
ecb                     3296  2
iwlagn                124768  0
iwlcore               134820  1 iwlagn
mac80211              243360  2 iwlagn,iwlcore
snd_hda_intel          31880  4
snd_hda_codec          87584  3
snd_hda_codec_intelhdmi,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               9352  1 snd_hda_codec
snd_pcm_oss            44704  0
snd_mixer_oss          18976  1 snd_pcm_oss
snd_pcm                93160  4 snd_hda_intel,snd_hda_codec,snd_pcm_oss
coretemp                7072  0
snd_seq_dummy           3460  0
snd_seq_oss            33440  0
snd_seq_midi            8192  0
uvcvideo               65260  0
snd_rawmidi            27360  1 snd_seq_midi
videodev               43360  1 uvcvideo
v4l1_compat            16804  2 uvcvideo,videodev
v4l2_compat_ioctl32    13344  1 videodev
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
acer_wmi               18504  0
led_class               5256  2 iwlcore,acer_wmi
snd_seq                60608  6
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              26992  2 snd_pcm,snd_seq
iptable_filter          3872  0
snd_seq_device          8308  5
snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
ip_tables              21200  1 iptable_filter
x_tables               25832  1 ip_tables
psmouse                57124  0
serio_raw               6596  0
cfg80211              152424  3 iwlagn,iwlcore,mac80211
lp                     11908  0
parport                40528  2 ppdev,lp
snd                    77096  20
snd_hda_codec_intelhdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               9088  1 snd
snd_page_alloc         10928  2 snd_hda_intel,snd_pcm
dm_raid45              78504  0
xor                     5456  1 dm_raid45
fbcon                  41344  72
tileblit                3136  1 fbcon
font                    8832  1 fbcon
bitblit                 6688  1 fbcon
softcursor              2336  1 bitblit
i915                  246984  3
drm                   193856  3 i915
i2c_algo_bit            7076  1 i915
usbhid                 43968  0
atl1e                  37780  0
usb_storage            65984  0
video                  23612  1 i915
output                  3680  1 video
intel_agp              32816  2 i915

>
> Richard
>

If you need any other information, do not hesitate to request it.

Emilio


More information about the devkit-devel mailing list