Author Topic: Icewm, Power Management - Screen Still Shuts Off  (Read 4376 times)

klatt

  • Newbie
  • *
  • Posts: 47
    • View Profile
Icewm, Power Management - Screen Still Shuts Off
« on: September 19, 2006, 10:21:22 am »
Hello All,

Well after trying XFCE (+/- Fbpanel) I almost settled on IceWM+FBpanel or Matchbox+FBpanel.
 
However in the end I went with a straight up IceWM installation.

Why you ask?  Didn't I lost all my powermanagement?

The answer is yes and no.

As of right now I have the hinge key mapped in IceWM to the /etc/systemconfig/clamshell/closed.sh script which shuts off the screen when closing the lid.  This was a big thing for me as I didn't want to burn the screen out and often leave my zaurus on with the lid closed (3200) and on a/c power.

Without running the IceWM apm applet the zaurus does not switch screen brightness when unplugged or plugged in, which is the way I like it (Rarely use it for more than a few minutes not plugged in).  With the applet loaded it works almost like matchbox.

I am not running the IceWM battery applet or the mb-applet-battery.  I found the mb-applet-battery in fbpanel didnt make the screen blank on closing of the lid and that was my biggest gripe.  I can manually suspend the Z by pressing the power button if I wanted.  This is all I really asked.  

Anyway, IceWM is very fast, the task bar is working wonderfully but my main problem is that the screen STILL shuts off after 5 minutes on A/C power.  It does not do this with mb-applet-battery running in fbpanel (it respects my settings in lightandpower.py).

I was looking at the apm command and found apm -i on the net which ignores any power management when the unit is plugged in but however THIS version of apm (and apm.x) does not have this flag.  I have no idea where to find documentation on the flags that it DOES offer though:

usage: apm [-VvmMsSd] [--verbose] [--minutes] [--monitor] [--suspend] [--standby]

Anyone have any idea about these commands or why else the screen might be blanking still?


Thanks,
Frank

klatt

  • Newbie
  • *
  • Posts: 47
    • View Profile
Icewm, Power Management - Screen Still Shuts Off
« Reply #1 on: September 19, 2006, 10:25:13 am »
Well,  I thought to myself: "Why don't I just try all the flags"

It turns out none of them do anything like keeping the screen on.

Anyone have any ideas?

TIA,
Frank

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #2 on: September 19, 2006, 04:32:11 pm »
In order for the screen to stay on, you have several options:

1) Run '/usr/bin/lightnpower.py --loadandquit' while plugged in. This will change the settings to AC power mode. Note that this is (normally) done when you start X, so if it is plugged in then, AC mode will be set.

2) Run the battery applet which takes care of the above.

3) Change the settings for on battery in the lightnpower applet to the same as on AC.

Obviously with your various scripts when closing the lid etc you could build in something to do the right thing there too. The lightnpower applet keeps a simple text file with settings in ~/Choices/, which allows a much larger number of different settings simply by swapping the files over in a script and running the applet as in 1) above. (I use it to set an always on mode for listening to music on batteries for example)
SL6000-L, RC12

klatt

  • Newbie
  • *
  • Posts: 47
    • View Profile
Icewm, Power Management - Screen Still Shuts Off
« Reply #3 on: September 19, 2006, 05:02:53 pm »
Hi Karlto,

I am running lightandpower.py at startup with the A/C plugged in but even then the screen goes off after a few minutes.   In lightandpower.py I have the settings set for it to stay on indefinitely.

I'm thinking about using atd to constantly call lightandpower.py -loadandexit but that seems like overkill....

Again, I'm NOT running the IceWM apm applet or mb-applet-battery (or xscreensaver for that matter).  To me nothing should be turning the screen off...

Any other ideas?

Thanks,
Frank

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #4 on: September 20, 2006, 03:50:10 pm »
Quote
Hi Karlto,

I am running lightandpower.py at startup with the A/C plugged in but even then the screen goes off after a few minutes.   In lightandpower.py I have the settings set for it to stay on indefinitely.

I'm thinking about using atd to constantly call lightandpower.py -loadandexit but that seems like overkill....

Again, I'm NOT running the IceWM apm applet or mb-applet-battery (or xscreensaver for that matter).  To me nothing should be turning the screen off...

Any other ideas?

Thanks,
Frank
[div align=\"right\"][a href=\"index.php?act=findpost&pid=141817\"][{POST_SNAPBACK}][/a][/div]
That's quite odd... I haven't any experience with iceWM, but I use xfce4 and have worked through power problems. Provided your saved settings (via the lightnpower applet) never turn the screen off, it should be fine. In my experience the settings stay the same after calling lightnpower.py until you call it the next time (no matter what changes happen in between). This seems ideal for your requirements; the battery applet wouldn't help if something else is interfering anyway, because it doesn't do anything unless you change power source (ditto for using atd to run the applet if it's on power anyway).

Have you timed it to see if it appears to be using the battery power settings or if it perhaps could be something else? Have you tried setting the battery settings to never turn off also?

Maybe check the apm scripts in /etc/apm to see if things are happening behind your back when suspending and resuming (or maybe add something here to make sure it works as you intend?)
SL6000-L, RC12

klatt

  • Newbie
  • *
  • Posts: 47
    • View Profile
Icewm, Power Management - Screen Still Shuts Off
« Reply #5 on: September 20, 2006, 05:28:01 pm »
Hmm everything looks normal.  However when running top I did see the following three processes that seemed interesting.  I can't find anything else about them on the system, or even google for that matter (other than that they appear in some source code).

Anyone have any idea what these are?

battchrgon

battchrgoff

sharpsl_bat

Thanks,
Frank

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #6 on: September 20, 2006, 05:37:26 pm »
Quote
Hmm everything looks normal.  However when running top I did see the following three processes that seemed interesting.  I can't find anything else about them on the system, or even google for that matter (other than that they appear in some source code).

Anyone have any idea what these are?

battchrgon

battchrgoff

sharpsl_bat

Thanks,
Frank
[div align=\"right\"][a href=\"index.php?act=findpost&pid=141905\"][{POST_SNAPBACK}][/a][/div]
That's normal - these are kernel processes managing the apm stuff. They don't go into the userland area of power management.

As far as I know, the lightnpower.py applet is the only thing that is involved with the power management settings - what it says should stick.
SL6000-L, RC12

miskinis

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #7 on: September 20, 2006, 07:12:32 pm »
Hi,

FYI - Now and then, on pdaXrom on SL-6000 using the all of the default
"desktop" stuff (openbox, matchbox panel, etc.), when resuming after a
few days of suspending, the unit will suspend after a few minutes, right
after resuming, although apm shows the battery as a somewhat decent charge.

I have the suspend time for both battery and plugged in, set to 0.

I figured I'd post this, as maybe there is an issue that is independent of the
icewm window manager, and any other optional desktop "stuff".

In any case, using power-on to resume, works fine, and I can continue working.
_John Miskinis_

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #8 on: September 21, 2006, 01:06:18 pm »
Same problem, I use icewm and have disabled blank screen and auto power off for both ac and battery. Auto power off works, ie I disabled it and it stays disabled and does NOT turn off. However blank screen doesn't work, it still blanks the screen both on ac and battery - and the timeout period is pretty random, ranges from 5 minutes to 15mins+. And I don't think it's anything to do with icewm because I'm pretty sure the same thing happens when using the default openbox/matchbox.
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #9 on: September 21, 2006, 02:52:03 pm »
There's also the X screensaver timer, which is independent of the dpms stuff lightnpower.py manages. (geez!)

The default .xinitrc (linked to /usr/bin/mbsession) turns it off:

Code: [Select]
/usr/X11R6/bin/xset s 0
but that might be missing with your setup. Considering the dpms stuff needs to be explicitly disabled (instead of turning itself off when set to 0 like it's SUPPOSED TO *grumble*) it might be useful to also add:

Code: [Select]
/usr/X11R6/bin/xset s off
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

klatt

  • Newbie
  • *
  • Posts: 47
    • View Profile
Icewm, Power Management - Screen Still Shuts Off
« Reply #10 on: September 25, 2006, 11:08:36 am »
Quote
There's also the X screensaver timer, which is independent of the dpms stuff lightnpower.py manages. (geez!)

The default .xinitrc (linked to /usr/bin/mbsession) turns it off:

Code: [Select]
/usr/X11R6/bin/xset s 0
but that might be missing with your setup. Considering the dpms stuff needs to be explicitly disabled (instead of turning itself off when set to 0 like it's SUPPOSED TO *grumble*) it might be useful to also add:

Code: [Select]
/usr/X11R6/bin/xset s off[div align=\"right\"][a href=\"index.php?act=findpost&pid=142000\"][{POST_SNAPBACK}][/a][/div]


Hmmmm, this is verrrry interesting. I'm going to try throwing those in my .xinitrc

klatt

  • Newbie
  • *
  • Posts: 47
    • View Profile
Icewm, Power Management - Screen Still Shuts Off
« Reply #11 on: September 25, 2006, 01:50:51 pm »
Works beautifully :-)

That's it.

Thanks karlto!

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #12 on: September 25, 2006, 04:11:52 pm »
Quote
Works beautifully :-)

That's it.

Thanks karlto!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=142270\"][{POST_SNAPBACK}][/a][/div]
Don't thank me - pelrun came up with the correct answer!

Maybe the lightnpower.py applet should manage the screensaver too...?
« Last Edit: September 25, 2006, 04:12:36 pm by karlto »
SL6000-L, RC12

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Icewm, Power Management - Screen Still Shuts Off
« Reply #13 on: September 25, 2006, 08:07:43 pm »
It only took me a couple of minutes to modify lightnpower.py to force the screensaver off. As a bonus you get my other edits that add  disable-screenoff and disable-suspend override options - like mb-applet-blanker, but they actually work

(I think I spent more time trying to get this board to accept the attachment than I did making the edit! No py or tgz? Preposterous!)
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

klatt

  • Newbie
  • *
  • Posts: 47
    • View Profile
Icewm, Power Management - Screen Still Shuts Off
« Reply #14 on: September 25, 2006, 09:59:02 pm »
Quote
Quote
Works beautifully :-)

That's it.

Thanks karlto!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=142270\"][{POST_SNAPBACK}][/a][/div]
Don't thank me - pelrun came up with the correct answer!

Maybe the lightnpower.py applet should manage the screensaver too...?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=142279\"][{POST_SNAPBACK}][/a][/div]

haha whoops. THANKS PELRUN! thanks for the zip too!