You are not logged in.
Hi!
I have built my own pm-powersave script, and then i blacklisted every other script in /usr/lib/pm-utils/power.d/* and put my script in /etc/pm/power.d/, chmod +x it.
I have only one problem left to finally love pm-powersave (and forget about laptop-mode-tools and acpid) : it seems that after suspend/hibernation, pm-powersave cannot recognize my state properly (battery or ac) and obviously my power management script is set wrongly.
I noticed that in /usr/lib/pm-utils/sleep.d/ there is a script called 00powersave that tries to do what i need, but probably it isn't working. (as far as i understood, it simply put itself on ac mode before sleeping and then, while resuming, it calls pm-powersave again).
From my logs, i can see the 00powersave script is always executed, but simply sometimes it doesn't work!
Tried with a "sleep 5 &&" before pm-powersave in 00powersave script, but it doesn't fix.
Hope someone can help, i'll post my pm-suspend.log and pm-powersave.log here.
Thanks
EDIT: pm-suspend.log:
Initial commandline parameters:
Blacklisting laptop-mode.
Blacklisting hal-cd-polling.
Blacklisting intel-audio-powersave.
Blacklisting journal-commit.
Blacklisting pcie_aspm.
Blacklisting readahead.
Blacklisting sata_alpm.
Blacklisting sched-powersave.
Blacklisting wireless.
Blacklisting xfs_buffer.
Wed May 16 14:14:22 CEST 2012: Running hooks for suspend.
Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:
Linux arch 3.3.4-netbook #1 SMP PREEMPT Sat May 5 12:41:32 UTC 2012 i686 GNU/Linux
Module Size Used by
fuse 50181 2
af_packet 18181 0
ipv6 177809 0
zram 6859 4
bfq_iosched 19352 1
eeepc_wmi 1692 0
uvcvideo 48718 0
asus_wmi 10656 1 eeepc_wmi
pci_hotplug 7616 1 asus_wmi
sparse_keymap 1888 1 asus_wmi
ath9k 53020 0
videobuf2_vmalloc 1384 1 uvcvideo
videobuf2_memops 1170 1 videobuf2_vmalloc
ath9k_common 1302 1 ath9k
videodev 55730 1 uvcvideo
ath9k_hw 310132 2 ath9k_common,ath9k
videobuf2_core 13522 1 uvcvideo
atl1c 22743 0
wmi 5831 1 asus_wmi
i2c_i801 6153 0
total used free shared buffers cached
Mem: 2058868 910988 1147880 0 28572 720892
-/+ buffers/cache: 161524 1897344
Swap: 4230388 0 4230388
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:
Blacklisting laptop-mode.
Blacklisting hal-cd-polling.
Blacklisting intel-audio-powersave.
Blacklisting journal-commit.
Blacklisting pcie_aspm.
Blacklisting readahead.
Blacklisting sata_alpm.
Blacklisting sched-powersave.
Blacklisting wireless.
Blacklisting xfs_buffer.
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub suspend suspend:
/usr/lib/pm-utils/sleep.d/01grub suspend suspend: success.
Running hook /etc/pm/sleep.d/01tuxonice suspend suspend:
/etc/pm/sleep.d/01tuxonice suspend suspend: success.
Running hook /etc/pm/sleep.d/11netcfg suspend suspend:
/etc/pm/sleep.d/11netcfg suspend suspend: success.
Running hook /etc/pm/sleep.d/49bluetooth suspend suspend:
/etc/pm/sleep.d/49bluetooth suspend suspend: success.
Running hook /etc/pm/sleep.d/50asd suspend suspend:
:: Syncing tmpfs to physical disc [BUSY] [DONE]
/etc/pm/sleep.d/50asd suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.
Running hook /etc/pm/sleep.d/90alsa suspend suspend:
/etc/pm/sleep.d/90alsa suspend suspend: success.
Running hook /etc/pm/sleep.d/90clock suspend suspend:
/etc/pm/sleep.d/90clock suspend suspend: success.
Running hook /etc/pm/sleep.d/94cpufreq suspend suspend:
/etc/pm/sleep.d/94cpufreq suspend suspend: success.
Running hook /etc/pm/sleep.d/95led suspend suspend:
/etc/pm/sleep.d/95led suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
Kernel modesetting video driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
kernel.acpi_video_flags = 0
/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Wed May 16 14:14:23 CEST 2012: performing suspend
Wed May 16 14:14:31 CEST 2012: Awake.
Wed May 16 14:14:31 CEST 2012: Running hooks for resume
Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success.
Running hook /etc/pm/sleep.d/95led resume suspend:
/etc/pm/sleep.d/95led resume suspend: success.
Running hook /etc/pm/sleep.d/94cpufreq resume suspend:
/etc/pm/sleep.d/94cpufreq resume suspend: success.
Running hook /etc/pm/sleep.d/90clock resume suspend:
/etc/pm/sleep.d/90clock resume suspend: success.
Running hook /etc/pm/sleep.d/90alsa resume suspend:
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
/etc/pm/sleep.d/90alsa resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules resume suspend:
Reloaded unloaded modules.
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
Running hook /etc/pm/sleep.d/50asd resume suspend:
/etc/pm/sleep.d/50asd resume suspend: success.
Running hook /etc/pm/sleep.d/49bluetooth resume suspend:
/etc/pm/sleep.d/49bluetooth resume suspend: success.
Running hook /etc/pm/sleep.d/11netcfg resume suspend:
/etc/pm/sleep.d/11netcfg resume suspend: success.
Running hook /etc/pm/sleep.d/01tuxonice resume suspend:
/etc/pm/sleep.d/01tuxonice resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub resume suspend:
/usr/lib/pm-utils/sleep.d/01grub resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave resume suspend:
Blacklisting laptop-mode.
Blacklisting hal-cd-polling.
Blacklisting intel-audio-powersave.
Blacklisting journal-commit.
Blacklisting pcie_aspm.
Blacklisting readahead.
Blacklisting sata_alpm.
Blacklisting sched-powersave.
Blacklisting wireless.
Blacklisting xfs_buffer.
/usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging resume suspend:
/usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
Wed May 16 14:14:33 CEST 2012: Finished.pm-powersave.log:
/etc/pm/power.d/hal-cd-polling false: success.
Running hook /etc/pm/power.d/intel-audio-powersave false:
/etc/pm/power.d/intel-audio-powersave false: success.
Running hook /etc/pm/power.d/journal-commit false:
/etc/pm/power.d/journal-commit false: success.
Running hook /etc/pm/power.d/laptop-mode false:
/etc/pm/power.d/laptop-mode false: success.
Running hook /etc/pm/power.d/pcie_aspm false:
/etc/pm/power.d/pcie_aspm false: success.
Running hook /etc/pm/power.d/powersave false:
/dev/sda:
setting fs readahead to 128
setting Advanced Power Management level to disabled
setting standby to 120 (10 minutes)
readahead = 128 (on)
APM_level = off
/etc/pm/power.d/powersave false: success.
Running hook /etc/pm/power.d/readahead false:
/etc/pm/power.d/readahead false: success.
Running hook /etc/pm/power.d/sata_alpm false:
/etc/pm/power.d/sata_alpm false: success.
Running hook /etc/pm/power.d/sched-powersave false:
/etc/pm/power.d/sched-powersave false: success.
Running hook /etc/pm/power.d/wireless false:
/etc/pm/power.d/wireless false: success.
Running hook /etc/pm/power.d/xfs_buffer false:
/etc/pm/power.d/xfs_buffer false: success.as you can see, in pm-powersave.log it says "false" even if i'm on battery.
EDIT2: no repo testing!
EDIT3 : woops sorry... xfce 4.10 ![]()
EDIT4: the strangest thing is that if i have my power management set wrongly after suspend, simply a "sudo pm-powersave" in terminal fix it.
So i think upower knows in what state the machine is. I believe the problem is all in pm-utils. Please help me! ![]()
Last edited by nierro (2012-05-23 10:26:35)
Offline
Woow it seems i can get it fixed, i'm an hero ![]()
I had to create a script called 00powersave in /etc/pm/sleep.d/ that is read in place of /usr/lib/pm-utils/sleep.d/00powersave, with following content:
#!/bin/bash
case $1 in
suspend|hibernate)
pm-powersave false ;;
thaw|resume)
if cat /sys/class/power_supply/AC0/online | grep 0 > /dev/null 2>&1
then
pm-powersave true
else
pm-powersave false
fi
;;
esacHope this can help someone!
I find it very strange that scripts coming with pm-utils won't work with it, but evidently that script is not right (may be someone can explain me why, because for me it looks good).
I have only a little stupid-probably question: i was used to rely on laptop-mode-tools and acpid (daemons) to set my laptop power management. Now that i'm using pm, how can i have power management set even if i'm on a tty? That is, if pm-utils and upower are not executed by a de, how can i have my power management?
Thanks guys!
Offline