Toon posts:

fleptop batterij

Pagina: 1
Acties:

Verwijderd

Topicstarter
Vast al eens besproken, maar de o zo brakke search wil het niet echt pakken.

Hoe kan ik de status van de batterij van me labtop uitlezen? Het liefst in console. Moet ik dan nog speciale kernelmodules meebakken? Tis een Dell Inspiron 4100.

  • _nethack
  • Registratie: September 2000
  • Laatst online: 03-08 12:04

_nethack

We're all MAD here

je moet apm support in je kernel hebben, dan kun je vanaf de commandline met het commando 'apm' de status van de battery uitlezen.

Sometimes you just have to sit back, relax, and let the train wreck itself


  • Roel
  • Registratie: Februari 2000
  • Laatst online: 05-08 07:47

Roel

screen -x addict

Zoals Oparations al vertelde met de kernel module klopt, maar je moet ook de deamon ampd opstarten, anders kun je nog niks.. :)

Resistance is futile (If < 1 Ohm)


Verwijderd

Topicstarter
Het werkt, thx.

Verwijderd

Topicstarter
even een aanvulling:
compilen onder kernel 2.4.19 van apmd wil niet. Je krijgt dan errors als:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Compile log for apmd  3.0.2  Built on Sun Aug 11 14:53:27 UTC 2002
gcc -c  -mcpu=i686  -march=i686 -O3 -Os   -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.
2\" -DAPMD_PROXY_NAME=\"/etc/apmd_proxy\" apmlib.c
ar rv libapm.a apmlib.o
a - apmlib.o
ranlib libapm.a
gcc -c  -mcpu=i686  -march=i686 -O3 -Os   -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.
2\" -DAPMD_PROXY_NAME=\"/etc/apmd_proxy\" apm.c
gcc -o apm apm.o  -L. -lapm
gcc -c  -mcpu=i686  -march=i686 -O3 -Os   -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.
2\" -DAPMD_PROXY_NAME=\"/etc/apmd_proxy\" apmd.c
gcc -o apmd apmd.o  -L. -lapm
gcc -c  -mcpu=i686  -march=i686 -O3 -Os   -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.
2\" -DAPMD_PROXY_NAME=\"/etc/apmd_proxy\" -DNARROWPROTO xapm.c
gcc -o xapm xapm.o  -L. -lapm -L/usr/X11R6/lib -lXaw -lXmu -lXt -lXext -lSM -lICE -lX11
gcc -c  -mcpu=i686  -march=i686 -O3 -Os   -Wall -pipe -I. -I/usr/src/linux/include -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include -DVERSION=\"3.0.
2\" -DAPMD_PROXY_NAME=\"/etc/apmd_proxy\" apmsleep.c
In file included from apmsleep.c:49:
/usr/src/linux/include/asm/spinlock.h: In function `spin_lock':
/usr/src/linux/include/asm/spinlock.h:137: parse error before `LOCK_SECTION_START'
/usr/src/linux/include/asm/spinlock.h: In function `read_lock':
/usr/src/linux/include/asm/spinlock.h:188: parse error before `LOCK_SECTION_START'
/usr/src/linux/include/asm/spinlock.h:188: warning: implicit declaration of function `LOCK_SECTION_START'
/usr/src/linux/include/asm/spinlock.h:188: parse error before string constant
/usr/src/linux/include/asm/spinlock.h: In function `write_lock':
/usr/src/linux/include/asm/spinlock.h:197: parse error before `LOCK_SECTION_START'
/usr/src/linux/include/asm/spinlock.h:197: parse error before string constant
apmsleep.c: At top level:
apmsleep.c:64: warning: `rcsid' defined but not used
make: *** [apmsleep.o] Error 1
rm apm.o apmd.o


Rebooten onder 2.4.18, symlink van /usr/src/linux naar de sources van 2.4.18 zetten en dan compilen lukt wel. Daarna weer gereboot naar 2.4.19, symlink omgezet en de binary gedraait, geen probleem. Lijkt dus een 2.4.19 probleem.

hmm... die edit knop werkt vast nie ;)