You are not logged in.

#1 2009-05-28 18:08:23

jimmy the saint
Member
Registered: 2009-04-10
Posts: 41

lightweight power managment?

I have a thinkpad with Arch freshly installed and so far everything has worked quite nicely.  I have openbox with no DE, trayer, tint2, conky and its lovely.  I am trying to avoid as many gnome/KDE dependencies as possible to keep the system lightweight (curses on Abiword for requiring so many gnome dependencies!).  Obviously I would like to avoid gnome-power-manager if possible.

Can someone recommend the best lightweight apps for

1) Screen brightness.  I would like to be able use my laptop's buttons to adjust the screen brightness on the fly.

2) suspend/hibernate.  I have found wiki entries and forum posts listing several opportunities.  I assume some are obsolete.  What are you using/what would you recommend?

3) My volume buttons should work out of the box (according to some forum posts) but I think I need to install an application that is aware of them because alsamixer is not.  Is there a small app that I can run that does not require a panel icon?

4) finally, I am completely new to the "Arch way."  I am used to everything just being there and hoping it works right.  Are there any other power managment or similar apps that I should consider to make the laptop work better/longer.

Thanks for the help guys (and ladies)

I am loving Arch, but I'm still at the bottom of the learning curve.


JTS

Offline

#2 2009-05-28 18:42:52

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: lightweight power managment?

i know it's just a small bit of your post but i can speak to the multimedia buttons:

run a little utility called xev (i believe it's in xorg-utils package) then press your keys.  if they "should work out of the box" as you say then you should see something like XF86AudioMute or XF86AudioRaiseVolume go by on the screen

if you do, you can easily map those keys to any alsa volume changing script or utility you like through ~/.config/openbox/rc.xml like so:

 <keybind key="XF86AudioMute">
      <action name="Execute">
        <execute>/home/patrick/.bin/ossvol -t</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <execute>/home/patrick/.bin/ossvol -i 1</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <execute>/home/patrick/.bin/ossvol -d 1</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioNext">
      <action name="Execute">
        <execute>mpc next</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioPrev">
      <action name="Execute">
        <execute>mpc prev</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioPlay">
      <action name="Execute">
        <execute>mpc toggle</execute>
      </action>
    </keybind>
    <keybind key="XF86AudioStop">
      <action name="Execute">
        <execute>mpc stop</execute>
      </action>
    </keybind>
  </keyboard>

here ossvol is my self written script that adjusts oss volume depending on the option passed.

you do have to write/find some script to actually do the volume changing.  there's a nice bruenig utility called dvol which you can search for on the forums, it's for alsa, and displays a nice dzen notification as the volume changes (ossvol is my rewrite of it for oss)

reading/understanding a small script like dvol and getting your hands dirty in ~/.config/openbox/rc.xml is a good first step up that learning curve wink

Offline

#3 2009-05-28 18:56:32

jstarek
Member
Registered: 2008-02-27
Posts: 15

Re: lightweight power managment?

jimmy the saint wrote:

Are there any other power managment or similar apps that I should consider to make the laptop work better/longer.

You should definitely think about letting your hard drive rest by using laptop mode. Additionally, if you have the time, optimize your boot process with the help of bootchart and check for inefficient applications (in terms of energy consumption -- this does not necessarily mean they're badly written!) with powertop.


Restoring the oldest German radio telescope: http://astropeiler.de

Offline

#4 2009-05-28 18:59:36

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: lightweight power managment?

Also, my recommandation is to disable advanced hard drive power saving, as it will wear and tear your hard drive into failure.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#5 2009-05-28 21:15:28

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: lightweight power managment?

1. I also use openbox, and a lot of machines will have the multimedia keys already mapped to the standard codes such as XF86AudioLowerVolume. Then you just need to add sections to your .config/openbox/rc.xml like:

<keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <execute>/usr/bin/amixer set Master 2%-</execute>
      </action>
</keybind>

This should take care of most of your volume/mute/play/pause, etc needs.

2. Laptop mode mode tools will take care of screen brightness, etc when you unplug. It's fairly well documented.
3. The pm-utils package will take care of suspend/hibernate for you (pm-suspend or pm-hibernate). You also might need the uswsusp package, depending on how well your machine supports the default suspend/hibernate tools. You might have to edit your /etc/acpi/handler.sh file to enable actions such as sleeping when the lid is closed.

Good luck!

Scott

Offline

#6 2009-05-28 22:03:34

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: lightweight power managment?

@ Moljac
What advanced hd power settings?
You mean strict no to CONTROL_HD_WRITECACHE?

Offline

#7 2009-05-28 23:49:21

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: lightweight power managment?

ammon wrote:

@ Moljac
What advanced hd power settings?
You mean strict no to CONTROL_HD_WRITECACHE?

No, the hard disk power management.
You can set it off with "hdparm -B 255 /dev/sdaX"


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#8 2009-05-29 00:36:52

vi3dr0
Member
From: Poland
Registered: 2009-03-22
Posts: 208

Re: lightweight power managment?

moljac024 wrote:

No, the hard disk power management.
You can set it off with "hdparm -B 255 /dev/sdaX"

It's makes HDD much warmer, and since it is located under right palmrest it's uncomfortable above 40-45 degrees.


Thinkpad T61p : T7700 | 4GB RAM | nVidia FX 570M | Intel 4965
Arch64 @ Openbox

Offline

#9 2009-05-29 09:06:04

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: lightweight power managment?

So what should i do?
I've noticed same problem that vi3dr0 described. Under my right palmrest...
My settings are default.

Offline

#10 2009-05-29 10:45:37

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: lightweight power managment?

what model do you use?

i have a T43 and the volume + brightness buttons work apart from any software (even while booting)

tpb is a tool which shows an OSD when you use your thinkpad buttons + lets you configure an action for the blue button (unfortunately, tpb must be run as root and after X is started)

suspend/hibernate can be done with acpid (check the wiki)

Last edited by robmaloy (2009-05-29 10:46:29)


☃ Snowman ☃

Offline

Board footer

Powered by FluxBB