Posts: 137
duncan_mk
Joined: 19 Sep 2012
#1
Part of my conky setup looks like this:

${color}battery: ${battery_percent BAT1}%
${color}AC adapter: ${color}$acpiacadapter

The battery shows up OK but the on-screen message about the adapter is"no ac_adapters?"

another slight problem may be that:

$ acpi -bai

shows the following:

Battery 0: Charging, 74%, 01:22:25 until charged
Battery 0: design capacity 4726 mAh, last full capacity 4231 mAh = 89%
Adapter 0: on-line

I've tried using BAT0 in conky but conky doesn't recognise it & it makes no difference to the status of the adapter.

I can't help thinking I'm missing something obvious. Any ideas?

dmk
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#2
My 3 conky lines in my EEEPC for battery are as follows

Code: Select all

${color}Bat:${battery BAT0}
${alignr}${battery_bar 6,200 BAT0}
${battery_time BAT0}
That works for me but I am using AntiX 8.5 still on that EEEPC 701SD netbook.

My conky thread : 701sd-conky-with-temps-fanspeed-battery-link-strength-t2618.html

I would go to the second page because my conkyrc file has evolved since initial install.
Posts: 279
afab4
Joined: 17 Oct 2009
#3
Also check out this old post.

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"antix.freeforu ms.org/post16119.html"
linktext was:"antix.freeforu ms.org/post16119.html"
====================================
Posts: 137
duncan_mk
Joined: 19 Sep 2012
#4
Thanks, I'll have a look - and Roky, I'm running antiX on a (by now) venerable, 3/4(?) yr old Dell netbook. What you have to say is probably right up my street!

dmk
Posts: 137
duncan_mk
Joined: 19 Sep 2012
#5
Ah! Actually these are all about the battery - the reports from that are fine. The problem is with the AC adapter. Because I have the habit of a) plugging the adapter into the mains and forgetting to turn the mains 'on' or b) attaching the cable to the netbook but neglecting to plug it into the wall - an on-screen indication of what I'm doing would be useful.
Posts: 137
duncan_mk
Joined: 19 Sep 2012
#6
Still struggling with this! Trawled WWW, found a lot of stuff on Linux Questions but nothing relevant (someone called rokytnji seems to be the King of Conk there - sounds familiar?), tried acpi=force - nbg (no bloody good) but dug up a couple of ref's in antiX

1) $ acpi --help
-p, --proc use old proc interface instead of new sys interface

so ran (with acpi=force):

$ acpi -baip # and got:
No support for device type: battery
No support for device type: ac_adapter

Off to /proc to see what I could find:

root@antiX1:/home/dmk-antiX
# alf /proc/acpi
total 0
dr-xr-xr-x 3 root root 0 Nov 7 09:54 button/
-rw-r--r-- 1 root root 0 Nov 7 09:54 wakeup

root@antiX1:/home/dmk-antiX
# cat /proc/acpi/wakeup
Device S-state Status Sysfs node
LID0 S3 *enabled
HDEF S4 *disabled pci:0000:00:1b.0
PXS1 S4 *disabled
PXS2 S4 *disabled pci:0000:03:00.0
PXS3 S3 *enabled pci:0000:04:00.0
PXS4 S4 *disabled
PXS5 S4 *disabled
PXS6 S4 *disabled
USB1 S0 *enabled pci:0000:00:1d.0
USB2 S0 *enabled pci:0000:00:1d.1
USB3 S0 *enabled pci:0000:00:1d.2
USB4 S0 *enabled pci:0000:00:1d.3
USB7 S0 *enabled pci:0000:00:1d.7
SLT0 S4 *disabled
SLT1 S4 *disabled
SLT2 S4 *disabled
SLT3 S4 *disabled
SLT6 S4 *disabled

root@antiX1:/home/dmk-antiX
# alf /proc/acpi/button
total 0
dr-xr-xr-x 3 root root 0 Nov 7 09:55 lid/
root@antiX1:/home/dmk-antiX
# alf /proc/acpi/button/lid
total 0
dr-xr-xr-x 2 root root 0 Nov 7 09:55 LID0/
root@antiX1:/home/dmk-antiX
# alf /proc/acpi/button/lid/LID0/
total 0
-r--r--r-- 1 root root 0 Nov 7 09:55 state

root@antiX1:/home/dmk-antiX
# cat /proc/acpi/button/lid/LID0/state
state: open

All of which means nothing to me - and, anyway, being a modernista I would prefer the 'new' interface.

???????????????????????????????????????

2) /usr/share/doc/acpi/README:
please include a tar file of /proc/acpi or /sys/class depending on the
interface you used.

And that led to:

$ alf /sys/class/power_supply/
total 0
lrwxrwxrwx 1 root root 0 Nov 4 08:40 ACAD -> ../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:2f/ACPI0003:00/power_supply/ACAD/
lrwxrwxrwx 1 root root 0 Nov 4 08:40 BAT1 -> ../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:2f/PNP0C0A:00/power_supply/BAT1/

and, eventually, here:

# alf /sys/devices/LNXSYSTM\:00/device:00/PNP0A08\:00/device:2f/ACPI0003\:00/power_supply/ACAD/
total 0
drwxr-xr-x 2 root root 0 Nov 7 09:15 power/
lrwxrwxrwx 1 root root 0 Nov 7 09:15 device -> ../../../ACPI0003:00/
-r--r--r-- 1 root root 4.0K Nov 7 09:00 online
lrwxrwxrwx 1 root root 0 Nov 7 09:15 subsystem -> ../../../../../../../../class/power_supply/
-r--r--r-- 1 root root 4.0K Nov 7 09:00 type
-rw-r--r-- 1 root root 4.0K Nov 7 09:15 uevent


I can't help thinking that the answer's in here somewhere but - no Indiana Jones me - I confess to being cold, lonely, hungry & discouraged. It would be nice if someone (preferably a beautiful young woman) would arrive & give me a hand out of here.

dmk

antiX on a Dell Inspiron 1011 netbook
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#7
I can't help thinking that the answer's in here somewhere but - no Indiana Jones me - I confess to being cold, lonely, hungry & discouraged. It would be nice if someone (preferably a beautiful young woman) would arrive & give me a hand out of here
Image

__{{emoticon}}__ Sorry bro. All ya got is me. Do you have lm-sensors and run sensors detect yet. acpitool was another I needed installed.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://packages.debian.org/stable/acpitool"
linktext was:"http://packages.debian.org/stable/acpitool"
====================================

Code: Select all

$ apt-cache policy lm-sensors
lm-sensors:
  Installed: 1:3.3.2-2
  Candidate: 1:3.3.2-2
  Version table:
 *** 1:3.3.2-2 0
        100 /var/lib/dpkg/status

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://wiki.debian.org/ACPI"
linktext was:"http://wiki.debian.org/ACPI"
====================================


Looks like BAT1 is in there somewhere.

Code: Select all

$alf /sys/class/power_supply/
lrwxrwxrwx 1 root root 0 Nov 4 08:40 BAT1 -> ../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:2f/PNP0C0A:00/power_supply/BAT1
Ah! Actually these are all about the battery - the reports from that are fine. The problem is with the AC adapter. Because I have the habit of a) plugging the adapter into the mains and forgetting to turn the mains 'on' or b) attaching the cable to the netbook but neglecting to plug it into the wall - an on-screen indication of what I'm doing would be useful.
post26691.html#p26691

That covers whether I have the charger unplugged or not. The Battery time remaining line covers that. You might want to use BAT1 instead of Bat0 though. Good luck __{{emoticon}}__
Posts: 137
duncan_mk
Joined: 19 Sep 2012
#8
I'm giving up on this. Having done a thoro' trawl this is not a problem unique to me. As Roky says, the most important thing is the report on the battery level which is fine.

It just bugs me that the $acpiacadapter doesn't work - altho' I can get the information thru' acpi -a on the terminal.

dmk

PS. Roky, thanks for your help and for my lovely assistant.