Author Topic: Power Management  (Read 13536 times)

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Power Management
« Reply #30 on: March 21, 2006, 05:17:24 am »
For those running pdaXrom without X  setfl and apm are all the power managment i need

setfl changes brightness, just add 0 to 6 after it and apm is the on/off, i would like auto off on inactivity however i have walked away from my zaurus in text mode and come back 8 hours latter and it was still going, i still have no idea why it didnt run out of battery

for people using screen i would recomend you have a look at www.grml.org, its a live CD thats text bassed but well set up, thier zsh and screen configs are the best, just 'liberate' the screen config file as it has apm support in it (bar at the bottom changes color, there zsh scripts do as well with the prompt changing color with remaining power

i use twin as my window manager: http://linuz.sns.it/~max/twin/index.shtml get the ipkg here http://mail.pdaxrom.org/contrib/dtruchan/
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

miskinis

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
    • http://
Power Management
« Reply #31 on: March 21, 2006, 05:56:25 am »
Wow, my SL-6000 charging light just went off!  And, then I just took
it out of the cradle and put it back to make sure it was not the LED or
the power supply, and it went on for a minute or so, and back off!
_John Miskinis_

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Power Management
« Reply #32 on: March 21, 2006, 02:42:36 pm »
Quote
Wow, my SL-6000 charging light just went off!  And, then I just took
it out of the cradle and put it back to make sure it was not the LED or
the power supply, and it went on for a minute or so, and back off!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119558\"][{POST_SNAPBACK}][/a][/div]

Cool - in reply to your earlier post, I currently have my SL6000 in the cradle with battery fully charged (light is off), and /proc/apm only shows 100%. I am still running RC12 though. I did notice while running the enlightenment battery applet that it had some strange numbers shown that were constantly changing.
SL6000-L, RC12

Dobby

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Power Management
« Reply #33 on: September 11, 2006, 06:16:24 pm »
I've just read this thread and I'm a little confused as to what people managed to get working. I'm using Xfce 4.4 beta 2 and would like to get power management working (removing ac changes power settings). Is this possible? It doesn't seem to be working at the moment.

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Power Management
« Reply #34 on: September 11, 2006, 10:59:00 pm »
Quote
I've just read this thread and I'm a little confused as to what people managed to get working. I'm using Xfce 4.4 beta 2 and would like to get power management working (removing ac changes power settings). Is this possible? It doesn't seem to be working at the moment.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=141160\"][{POST_SNAPBACK}][/a][/div]
All you need to do is run the matchbox battery monitor applet - it will take care of this. I believe it needs some sort of panel to run in (I'm using fbpanel), but I presume it will also work with the xfce panel.
SL6000-L, RC12

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Power Management
« Reply #35 on: September 11, 2006, 11:53:52 pm »
All the matchbox battery applet does is check apm every two seconds, and if the ac state changes it invokes "lightnpower.py --loadandquit". A small script could probably do the same thing pretty easily if you don't want to (or can't) run the applet.
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Power Management
« Reply #36 on: September 12, 2006, 01:02:56 am »
Quote
All the matchbox battery applet does is check apm every two seconds, and if the ac state changes it invokes "lightnpower.py --loadandquit". A small script could probably do the same thing pretty easily if you don't want to (or can't) run the applet.
Might be less hassle to just run a cron job every minute to execute "lightnpower.py --loadandquit".

Edit: but lightnpower.py might be resource heavy to load, so maybe write a script that does the equivalent of the battery applet (ie check power status then run lightnpower.py accordingly)
« Last Edit: September 12, 2006, 01:06:32 am by desertrat »
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Dobby

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Power Management
« Reply #37 on: September 12, 2006, 04:32:21 am »
Yea I like the cron job idea I think that would work ok. Especially as I like the xfce battery icon better.

Dobby

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Power Management
« Reply #38 on: September 12, 2006, 04:40:25 am »
How can I check the status cause I think you're right desertrat it does take some time to load. Although Zumi is busy rewriting the py apps so maybe this will help.

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Power Management
« Reply #39 on: September 12, 2006, 04:51:40 am »
Quote
How can I check the status
No idea, have a look at the battery applet, if it's written in python then dissect it.

Quote
cause I think you're right desertrat it does take some time to load.
As lightnpower.py is a python program it should be possible to examine and just lift out the parts which does the apm and stick it into a shell script. It's the loading of the gui that takes a long time.

Quote
Although Zumi is busy rewriting the py apps so maybe this will help.
The rewritten apps are ready for beta testing, see main pdaXrom site for announcement.
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

Dobby

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Power Management
« Reply #40 on: September 12, 2006, 04:56:29 am »
All good points

It's just the date & time app so far. I've tested it out and it's looking good.

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Power Management
« Reply #41 on: September 12, 2006, 11:10:23 pm »
@pelrun: thanks for the info - if I'd known this back when I started the thread it would've saved some time! (the battery applet is compiled, not a python script so there is no dissecting as I couldn't even find the source)

@Dobby: I imagine such a script would go something like this:

Code: [Select]
#!/bin/sh

if [ ! -f ~/.apm_store ]; then
  lightnpower.py --loadandquit
  cat /proc/apm > ~/.apm_store
else
  $CUR = $(cat /proc/apm)
  $OLD = $(cat ~/.apm_store)
  if [ ! "$OLD" = "$CUR" ]; then
    lightnpower.py --loadandquit
    cat /proc/apm > ~/.apm_store
  fi
fi

(and you could run it every so often with atd)
SL6000-L, RC12

Dobby

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Power Management
« Reply #42 on: September 13, 2006, 04:15:24 am »
cool! Thanks for that karlto. Finally starting to get a usable device!