You are not logged in.

#26 2007-09-20 01:19:48

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Thanx thayer.w! pm-utils is great, my Dell Latitude D830 suspend to ram/disk and resume without problems!

Is there any GUI for KDE to control pm-*? Their is klaptop, but I don't know if it will use pm-* (or hal?)

Also, any way to set some timeouts?
If system has critically low battery, suspend.
If idle for more than x minutes, suspend2ram.
If system is in suspend2ram for an hour, suspend2disk.
etc...

Offline

#27 2007-09-20 02:39:58

RobF
Member
Registered: 2006-10-10
Posts: 157

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

big_gie wrote:

Is there any GUI for KDE to control pm-*? Their is klaptop, but I don't know if it will use pm-* (or hal?)

Also, any way to set some timeouts?
If system has critically low battery, suspend.
If idle for more than x minutes, suspend2ram.
If system is in suspend2ram for an hour, suspend2disk.
etc...

Kpowersave-devel 0.7.2 (in AUR)
Disable KLaptop when you use KPowersave.
It handles all of the above.

Offline

#28 2007-09-20 03:04:59

RobF
Member
Registered: 2006-10-10
Posts: 157

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

eyolf wrote:

I followed the excellent guides, and ran into the following problem with the cpu scaling:
before, with powersaved, the cpu (dual core) usually was down at around 200Mz at moderate, non-powerconsuming use. Now, cpufreq-info reports that my hardware limits are 1-1.6 GHz, and sure enough,  with the powersave governor on, both processors are stuck at 1Ghz -- and the fans are kicking in every 30 seconds. Unbearable. Can I underclock it? Force a minimum value of 200 Mhz? (yes, I'm really sensitive to fan noise)

thayer.w is correct: When you use the p4-clockmod module instead of the acpi_cpufreq module the min freq for both processors will be 208 MHz, if you have the 1.67 GHz dual core processor.

If you decide to install KPowersave (e.g. version devel 0.7.2 in AUR) which is a GUI frontend for both KDE and Gnome for acpid, pm-utils and cpufrequtils, you may possibly be able to utilize its active scheme "acoustic" which seems to be geared toward minimizing fan noise.  Which governor and module (cpufreq_acoustic?) would be utilized for this scheme and whether it's supported in Arch, I don't know.

Offline

#29 2007-09-24 07:49:35

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

thayer and RobF: thanks for the pointers. P4-clockmod did indeed let me go down to 208 Mhz. Not that the fan is any quieter -- on the contrary. Sigh.

One question: in the pm-utils guide it says to modprobe acpi-cpufreq with a hyphen, but if I tabcomplete it after "modprobe acpi<tab>" I get an undercore: acpi_cpufreq. Are they treated as the same?

Offline

#30 2007-09-24 07:53:48

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Sorry, that should be "in the cpufrequtils guide... "

Offline

#31 2007-09-24 12:21:18

iggy
Member
From: Germany, L.E. - Leipzig
Registered: 2004-10-17
Posts: 367

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

p4-clockmod: Warning: EST-capable CPU detected. The acpi-cpufreq module offers voltage scaling in addition of frequency scaling. You should use that instead of p4-clockmod, if possible.

so, is it better to use acpi-cpufreq? can someone explain the difference between p4-clockmod and acpi-cpufreq?

i have a core solo.

mfg iggy


sorry for my bad english smile

Offline

#32 2007-09-24 14:45:00

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Iggy, I'm no authority on the subject, but I believe that some of the scaling drivers have been deprecated and replaced by acpi_cpufreq.  I know this is the case for speedstep_centrino and it may be for others as well.  In my experience, both p4-clockmod and acpi_cpufreq have worked fine for my Core Duo.  Again, I could be totally wrong here, but I think acpi_cpufreq is meant to be a more generic drop-in that will detect a number of processor types and work accordingly.

PS: For the record, I use acpi_cpufreq.

Last edited by thayer.w (2007-09-24 14:46:15)


thayer williams ~ cinderwick.ca

Offline

#33 2007-10-25 23:23:55

holytrousers
Member
From: 3rd Rock from the Sun
Registered: 2007-10-19
Posts: 75

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Hello,ithink that i understand the point here ...
But when i try to load the acpi-frequtils, i get this :
modprobe acpi-cpufreq
>FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.23-ARCH/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko): No such device

However this command : modprobe -l | grep acpi-cpufreq
states that the module is available :
/lib/modules/2.6.23-ARCH/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko

Well, whats the solution ? i have updated acpi many times, but nothing : my hardware : Dell inspiron 1501 turion x2.
Thanx for the help !

Offline

#34 2007-10-25 23:31:45

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

I have no idea, trousers, sorry... it might have something to do with the x86_64 package though, as I've never encountered problems with the 32-bit.


thayer williams ~ cinderwick.ca

Offline

#35 2007-10-26 00:30:41

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

I get this same message on my 32bit desktop but not my laptop.  Haven't figured out what is the cause yet though.

Offline

#36 2007-10-26 00:39:17

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Might be a *very* good idea to mention laptop-mode-tools. It's gotta be the best power saving package you could possibly install. It does speedstepping, but importantly, it covers a huge range of other tweaks and options to help save power.

I see a 50% increase in battery life running it. My laptop's hardly a typical example, the battery life is now measured in minutes, about 60 without laptop-mode-tools, about 90 with it.

James

Last edited by iphitus (2007-10-26 00:41:04)

Offline

#37 2007-10-26 02:28:03

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

> Well, whats the solution ? i have updated acpi many times, but nothing : my hardware : Dell inspiron 1501 turion x2.

Turion, that's AMD. acpi-cpufreq won't work with that, use powernow-k8.


1000

Offline

#38 2007-10-26 14:52:58

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

byte wrote:

> Well, whats the solution ? i have updated acpi many times, but nothing : my hardware : Dell inspiron 1501 turion x2.

Turion, that's AMD. acpi-cpufreq won't work with that, use powernow-k8.

I have:

MODULES=(powernow-k8 cpufreq_powersave k8temp ...

(I'm with Athlon, but you should have something similar. I.e. powernow-k8 AND cpufreq_<your-favourite-governor>.)

Offline

#39 2007-10-30 20:45:29

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Just a note here - I added the "Alternative Configuration" section to the acpid wiki page. I don't want to step on any toes here, but it's probably a much better way to set this up.

In fact, I feel our default scripts are crap and need to be reevaluated - it's on "the list" 8)

Offline

#40 2007-10-31 03:25:12

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Hello all,

I have a suggestion and a question on the "Getting user name at the current display" section of the ACPID wiki page. I'll start with the suggestion.

I don't believe the getuser function will work as written in the wiki. The reason is that the DISPLAY environment variable wouldn't be available to the process that runs the ACPI daemon. Bash says the following on the export builtin:

export [-fn] [name=[word]]
export -p
     The supplied names are marked for automatic export to the environment of subsequently executed  commands.

I take this to mean that since your X session generally starts long after acpid has started running, acpid will not have access to the DISPLAY variable. Not to worry, you can get the display number by looking at the sockets that X has open in /tmp/.X11-unix/. One might write the following:

getXuser() {
    user=$(who | grep " $DISPLAY" | awk '{print $1}')
    if [ ! -z "$user" ]; then
        userhome=`getent passwd $user | cut -d: -f6`
        export XAUTHORITY=$userhome/.Xauthority
    else
        export XAUTHORITY=""
    fi
}

button/power)
    case "$2" in
        PBTN)
            for x in /tmp/.X11-unix/*; do
                export DISPLAY=":$(echo $x | sed s#/tmp/.X11-unix/X##)"
                getuser
                if [ ! -z "$XAUTHORITY" ]; then
                    su $user -c "dcop ksmserver ksmserver logout 0 2 0"
                fi
            done
            ;;
        *)    logger "ACPI action undefined $2" ;;
    esac
    ;;

This is pretty much what the ati-powermode.sh script installed with fglrx does.

Now for my question. I am using slim to log into ratpoison (though this happens with any window manager) and when I log into an X session, my user does not show up in the output of the who command. This means that scripts like the one above won't work for me. My slim configuration is the default suggested config; I have done nothing special. Here's the output of "who -a":

$ who -a
                        2007-10-30 15:44              1589 id=rc    term=0 exit=0
           system boot  2007-10-30 15:44
           run-level 5  2007-10-30 15:44                   last=S
                        2007-10-30 15:44              6260 id=rm    term=0 exit=0
                        2007-10-30 15:45              6654 id=c1
LOGIN      vc/2         2007-10-30 15:44              6571 id=c2
LOGIN      vc/3         2007-10-30 15:44              6572 id=c3
                        2007-10-30 15:44              6573 id=x
LOGIN      vc/1         2007-10-30 15:45              6654 id=1

PID 6573 is my slim process, but for some reason my user doesn't show up. If I log into a console this works fine. Also, if I use kdm this works fine. Does anyone have any idea why my who is broken? ps and top and other utils see my user, but not who or finger. This is one of the the main outstanding problems I have before I'm satisified with my Arch setup.

Thanks and regards.

Offline

#41 2008-10-02 18:27:00

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Under KDE4 there is a daemon called powerdevil meant to replace Kpowersave

PowerDevil is an utility for KDE4 for Laptop Powermanagement. It consists of a Daemon (a KDED module), a KCModule to configure it, and will feature a Plasmoid soon.

With PowerDevil you can set up preferences for lid Closing, Brightness, CPU scaling, Idle time, both when connected to AC and when on Battery. It is built upon Solid, and it's very lightweight and won't overkill your system resources. If you missed KLaptop or KPowersave, this might be the tool you were looking for.

PowerDevil is part of kdebase from 4.2 on. This means it's included in kde core releases and you no longer need to compile it as an external application.

From  http://www.kde-apps.org/content/show.ph … tent=85078

Powerdevil also manages profiles
for example at 10% battery left, aggressive power saving meaning for example after 2min idle time, no display after 5min suspend to disk


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#42 2008-10-02 18:44:53

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Anyone with experiences with tools that don't use /proc/acpi/event? That interface is deprecated but acpid relies on it. DBus, Netlink, evdev should be used instead, but I am not technically savvy enough to understand what this implies. Until now I could find the following possible replacements: http://www.mail-archive.com/linux-acpi@ … 10399.html http://lapsus.berlios.de/ (kpowersave seems to do its thing with dbus, does it?: http://powersave.sourceforge.net/powersave/DBus.html)

Is this (going to be) an issue at all?
Thanks for your opinions.

Andreas

Offline

#43 2008-10-04 11:08:37

ioky
Member
Registered: 2008-06-19
Posts: 93

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Pm-utils are the most annoying thing with laptop. EVEN worst than wireless network. haha, no, seriously many Laptop have problem with sleep. And Arch is behind on getting pm-utils up to date. Just a little require, can developer give more time to those core tools? I mean getting the cutting edge app up is great, but Most people do want a most strong base system. I am not trying to rush the term, they have been great, just some personal suggestion to match up the Arch Way. Pm-utils is now 1.2. I mean people can always do it themselves, but it would be a big risk to deal with a core software like this. I mean no big deal if you getting app like newest blender, or the newest GIMP goes wrong, But when a power manager like Pm-utils and those thing wrong, you can totally screw up your system, not just that, it is not so good for the hardware too.

BTW, those wiki are great. Thank you so much.

Offline

#44 2008-10-04 18:30:38

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

ioky wrote:

Pm-utils are the most annoying thing with laptop. EVEN worst than wireless network. haha, no, seriously many Laptop have problem with sleep.

pm-utils allows you to easily drop-in specific settings for your specific hardware.  It's simply a framework to configure your own system, providing some sane defaults along the way. I suggest you have a look at the following websites:

http://en.opensuse.org/Pm-utils
http://pm-utils.freedesktop.org/wiki/
http://people.freedesktop.org/~hughsien … index.html

ioky wrote:

And Arch is behind on getting pm-utils up to date. Just a little require, can developer give more time to those core tools?

I just updated it to 1.2.0...coming to a repo near you.  There was nothing critical (in terms of hardware support) that was fixed between the last release so if you have high expectations of miracles being performed on their own then you may be disappointed.


thayer williams ~ cinderwick.ca

Offline

#45 2010-04-16 11:45:02

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Sorry for necromancing, but...

pm-utils works as described. However, locking the screen on coming back up from hibernation doesn't work, functions perfectly with suspend to  RAM though.

I'm using 32-bit Arch with vanilla KDE.

And since thayer is the wiki man for this package, I thought I'd kill a kitten...

I checked the forum and found a couple of threads, but they all refer to xscreensaver (as does this thread).  I hibernate from the kde logout screen or power manager.


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#46 2010-04-16 11:47:44

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Wikis: pm-utils, cpufrequtils, acpid (Core Power Management Tools)

Oops, tried it again just now and it does work! Will watch it - oh, and wicd-gui does not come up although the laptop connects to the network.

EDIT:
Put the following hook in /etc/pm/sleep.d/06wicd:

#!/bin/sh

# stop wicd during suspend
case "$1" in
  hibernate|suspend)
    /etc/rc.d/wicd stop
  ;;
  thaw|resume)
    /etc/rc.d/wicd start & wicd-client
  ;;
esac

But still no joy (and yes, made it executable). What else have I forgotten, methinks???

Here the suspend log:

...
/etc/pm/sleep.d/06wicd thaw hibernate::: Starting wicd Daemon    [BUSY] tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Can't connect to the daemon, trying to start it automatically...
Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1022, in <module>
    setup_dbus()
  File "/usr/share/wicd/curses/wicd-curses.py", line 1014, in setup_dbus
    dbus_ifaces = dbusmanager.get_dbus_ifaces()
  File "/usr/lib/python2.6/site-packages/wicd/dbusmanager.py", line 36, in get_dbus_ifaces
    return DBUS_MANAGER.get_dbus_ifaces()
  File "/usr/lib/python2.6/site-packages/wicd/dbusmanager.py", line 62, in get_dbus_ifaces
    if not self._dbus_ifaces: connect_to_dbus()
  File "/usr/lib/python2.6/site-packages/wicd/dbusmanager.py", line 48, in connect_to_dbus
    return DBUS_MANAGER.connect_to_dbus()
  File "/usr/lib/python2.6/site-packages/wicd/dbusmanager.py", line 79, in connect_to_dbus
    proxy_obj = self._bus.get_object("org.wicd.daemon", '/org/wicd/daemon')
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.wicd.daemon was not provided by any .service files
Returned exit code 1.
/usr/lib/pm-utils/sleep.d/01grub thaw hibernate:not applicable.
/usr/lib/pm-utils/sleep.d/00powersave thaw hibernate:   [DONE] 
success.
/usr/lib/pm-utils/sleep.d/00logging thaw hibernate:success.

toad@archtop 988\19 /etc/pm/sleep.d >

Not sure where to go from here, must mull things over...

Last edited by toad (2010-04-16 14:08:46)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

Board footer

Powered by FluxBB