You are not logged in.

#1 2006-01-22 16:06:44

Blaasvis
Member
Registered: 2003-01-17
Posts: 467

powersave and suspend to ram added

hi guys,

After tpowa updated kernel26 2.6.15.1-2, we now can use suspend to ram
again. In the last day or so i spend making powersave ready for
archlinux. I now can finaly suspend my system.

I just added the package to unstable, cause it is something that could
cause corruption data.

known issues:
- nforce drivers won't work for suspend, your soundcard will be not
making any noise after suspend, it is blacklisted.
- nvidia driver will work if you use nvagp in your xorg.conf. add
'Option "NvAGP" "1"' to your Device section.
- there is a blacklist of modules, they will be unloaded if possible and
reloaded on resume.
- netfs network and alsa will be stopped on suspend and started again on
resume.

requirements
- hal 0.5.5.1-5
- kernel 2.6.15.1-2
- acpid
- your user will need to be in the group
"power"

If you are going to test it, please keep in mind you will have all of
your important docs closed.

how to use it:
install powersave from unstable.
start the powersaved daemon.
run hal-system-power-suspend

see if it works, if it doesn't you can look at /var/log/suspend2ram.log
and see what goed wrong, try to give any feedback on troubles and so.
This way we can try to get as much working suspend to ram systems.

I hope people will test it and give me feedback what should be improved.
feedback can be given on irc/mailinglist/bugtracker.


Freedom is what i love

Offline

#2 2006-01-24 23:10:26

niqo
Member
From: Paris
Registered: 2005-11-04
Posts: 29

Re: powersave and suspend to ram added

Hi Blaasvis,
I have tried this package, I'm using arch with xorg 7.0 from testing and nvidia drivers.
after installing powersave, I edited /etc/powersave/sleep like this :

UNLOAD_MODULES_BEFORE_SUSPEND2RAM=""
SUSPEND2RAM_UNMOUNT_FATFS="no"

I had to close kmix (because it block suspend a take 100% cpu)

and suspendtoram work !

after resume :

nvidia issues: (I think)

text-mode is shrinked
I have this message each 10 seconds :
NVRM: Xid: 16, Head 00000000 Count 00000001

Offline

#3 2006-01-25 02:05:11

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: powersave and suspend to ram added

I installed powersave, added my user to the power group, and successfully started the powersaved daemon. But when I run "hal-system-power-suspend", nothing happens. I waited a few minutes before I finally do ctrl-z and kill it. Nothing is displayed in the terminal and there is also no /var/log/suspend2ram.log file generated.

Edit: This is weird. When I typed 'exit' into the terminal, suddenly it did indeed suspend. And everything worked perfectly! Network came back up and everything. But I can't make it suspend again, I'm really not sure what's going on.. Am I doing something wrong?

Also, a few errors in my log file:

Resuming:
---------
switched back to console: ' 7'

Reloading modules:
inserting PCMCIA cards...

Restarting services:
starting network:
##  stty: standard input: Invalid argument
##  :: S   [DONE] twork 
starting alsa:
##  stty: standard input: Invalid argument
##  :: R   [DONE] LSA Levels 
starting netfs:
##  stty: standard input: Invalid argument
##  :: M   [DONE] twork Filesystems 

Remounting filesystems:
  not necessary.
======================================
restore_after_suspend_to_ram: finished

Edit 2: Btw, thanks for working on this btw, Blaasvis. Being able to suspend to ram with the vanilla kernel is one of the few things I sorely want smile


I am a gated community.

Offline

#4 2006-01-25 03:32:29

Eugenia
Member
From: Bay Area, CA, USA
Registered: 2005-03-08
Posts: 74
Website

Re: powersave and suspend to ram added

Doesn't work here:

[root@lc2430 Downloads]# /etc/rc.d/powersaved start
:: Starting Powersave Daemon                                                                 [DONE]
[root@lc2430 Downloads]# hal-system-power-suspend
Cannot connect to powersaved. Is the daemon running? (dbus error)

(dbus and hal are all running btw). Also, this is a bit inconvenient to try to suspend the laptop through a command. It should do it automatically when closing the lid of the laptop.

Offline

#5 2006-01-25 04:05:59

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

Re: powersave and suspend to ram added

Eugenia wrote:

Doesn't work here:

[root@lc2430 Downloads]# /etc/rc.d/powersaved start
:: Starting Powersave Daemon                                                                 [DONE]
[root@lc2430 Downloads]# hal-system-power-suspend
Cannot connect to powersaved. Is the daemon running? (dbus error)

(dbus and hal are all running btw). Also, this is a bit inconvenient to try to suspend the laptop through a command. It should do it automatically when closing the lid of the laptop.

Not everyone likes that, especially when suspend can be hit and miss. but you are free to configure it yourself. man acpid.

tips for suspend guys,
Unload every module you can for suspend, sound and usb can easily be removed, and are often the cause of suspend issues.

nvidia commonly causes problems with suspend, and I suggest you use the hibernate-scripts in community to suspend to ram on an nvidia system as they contain some workarounds for all sorts of problems. I suggest these as they have an option to suspend to ram instead of disk and IMHO are a much more complete and tested set of suspend scripts.

iphitus

Offline

#6 2006-01-25 11:05:21

Blaasvis
Member
Registered: 2003-01-17
Posts: 467

Re: powersave and suspend to ram added

well seems like hal-system-power-suspend still need some work, powersave -{u,m} works fine.
i will see what i can do, but first i will implement the vbe stuff. I need it for my own laptop, it now doesn't turn off the screen. If things do not work for you please send met your /var/log/suspend2ram.log wink


Freedom is what i love

Offline

#7 2006-01-26 02:18:25

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: powersave and suspend to ram added

Update on my earlier post.. It seems that the "read seconds_to_sleep" in the script is what causes the script to 'freeze'. If I comment out that line, it works fine over here.


I am a gated community.

Offline

#8 2006-01-26 03:34:22

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: powersave and suspend to ram added

like stonecrest i had to commend the line read seconds_to_sleep in order to suspend (or just press enter twice to suspend, here's my suspend2ram.log if it helps

Offline

#9 2006-01-28 11:42:15

Blaasvis
Member
Registered: 2003-01-17
Posts: 467

Re: powersave and suspend to ram added

new version is up, it isn't perfect yet but it is improved.

- new dep : vbetool
          this will enable saving vbestates and turning off monitors on sleep
- usblp is blacklisted
          reason for this is it makes the computer wake up right away.
- cups will be restarted
          because usblp is reloaded.

for processor throtteling you will need to load all cpufreq modules, i just need a way to do this when cpu throtteling is availble... wink


Freedom is what i love

Offline

#10 2006-01-29 16:39:53

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: powersave and suspend to ram added

Perhaps I missed something, but where is this new version you speak of? tongue


I am a gated community.

Offline

#11 2006-01-29 18:00:58

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: powersave and suspend to ram added

stonecrest wrote:

Perhaps I missed something, but where is this new version you speak of? tongue

:arrow: http://cvs.archlinux.org/cgi-bin/viewcv … ag=CURRENT

check the PKGBUILD it compile 0.11.6 and not 0.11.5 wink

Offline

#12 2006-01-29 20:59:22

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: powersave and suspend to ram added

Yes but the package is still 0.11.5. I guess I assumed that a new package was going to be made for the new version, isn't that typically how things work..?


I am a gated community.

Offline

#13 2006-01-29 21:14:10

Blaasvis
Member
Registered: 2003-01-17
Posts: 467

Re: powersave and suspend to ram added

hmm sorry seems i forgot to run unstable-db


Freedom is what i love

Offline

#14 2006-01-29 23:43:11

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

Re: powersave and suspend to ram added

When I try to run hal-system-power-suspend, it says "command not found". I have installed all the packages that were mentioned as required. My version of hal is 0.5.6-1 - as far as I can see, it's the most recent version in extra - whereas in the post, it says that one needs 0.5.5 - could that be it?

Offline

#15 2006-01-30 01:41:12

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: powersave and suspend to ram added

It seems that the scripts got moved to /usr/share/hal/scripts, so they're no longer in your $PATH by default.

I'm not really sure what the benefit of running these hal-* scripts are, I've just been running the binary directly (powersave -u) and it's been working perfectly.


I am a gated community.

Offline

#16 2006-01-30 08:39:16

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: powersave and suspend to ram added

stonecrest wrote:

Yes but the package is still 0.11.5. I guess I assumed that a new package was going to be made for the new version, isn't that typically how things work..?

Yea that is how it works, but am not sure why...

Offline

#17 2006-02-02 21:25:34

hjorthboggild
Member
From: Denmark
Registered: 2005-11-05
Posts: 89

Re: powersave and suspend to ram added

Can someone make a package for the Kpowersave frontend to powersave? I've tried to do it myself, and most of the functionality in Kpowersave seems to be working after installing it with the package I made, only I can't make it autosuspend when the computer has been idle for the amount of time specfied to trigger an autosuspend. I'm not sure if it's because I somehow made the package incorrectly, or if the fault lies somewhere else. My user is a member of the 'power' group, and I can explicitly trigger a 'suspend to ram' using Kpowersave, but as mentioned the autosuspend to ram, triggered by the computer being idle doesn't work.

This is my PKGBUILD (my very first build ever): Please feel free to correct it, or tell me what to do differently if it has been made wrong, and do share your experiences with Kpowersave, what's working and what's not.

Regards
Simon

pkgname=kpowersave
pkgver=0.5.4
pkgrel=1
pkgdesc="KDE-frontend for the powersave daemon"
url="http://freshmeat.net/projects/kpowersave"
license="GPL"
depends=('powersave')
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://heanet.dl.sourceforge.net/sourceforge/powersave/$pkgname-$pkgver.tar.bz2)
md5sums=(2202063d3c276c70047003dc3098b5e6)

build() {
  cd $startdir/src/$pkgname-$pkgver
  make -f admin/Makefile.common cvs
  ./configure --prefix=/opt/kde --enable-debug-msg
  make || return 1
  make DESTDIR=$startdir/pkg install
}

Offline

#18 2006-02-03 08:30:45

hjorthboggild
Member
From: Denmark
Registered: 2005-11-05
Posts: 89

Re: powersave and suspend to ram added

I now have the autosuspend working in Kpowersave, it seems that Kpowersave expects 'pidof' to be in /sbin whereas in Arch it's in /bin. Making a symlink solves the problem and now am able to autosuspend

Offline

#19 2006-02-04 00:17:27

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

Re: powersave and suspend to ram added

Well, this has surely been a last couple of days of success - I got my wireless card working, my printer working, and now also suspend to ram. I also had to comment out the read seconds to sleep line (or do powersave -u directly).
The only problems I have noticed so far is that I have to call up my network again after sleep, and restart the network, but that's certainly much quicker than rebooting (so now I too can start bragging about my uptime  :-)

Offline

#20 2006-02-04 12:26:58

Blaasvis
Member
Registered: 2003-01-17
Posts: 467

Re: powersave and suspend to ram added

which module do you use for network ? cause networking should be restarted on resume...


Freedom is what i love

Offline

#21 2006-02-04 15:51:07

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: powersave and suspend to ram added

Yeah, even ndiswrapper is working perfectly on resume (if you had told me that was going to be the case, I wouldn't have believed you). Kudos to the powersave guys.


I am a gated community.

Offline

#22 2006-02-06 12:03:09

matsche
Member
From: .at
Registered: 2004-04-27
Posts: 120

Re: powersave and suspend to ram added

i use kpowersave 0.5.5 as well but i get:

suspend2ram failed on unloading 'via_agp'. Trying to recover...

when i want to switch to suspend to ram! Any solutions are welcome!


THX!!
cu matsche

Offline

#23 2006-02-06 12:14:00

Blaasvis
Member
Registered: 2003-01-17
Posts: 467

Re: powersave and suspend to ram added

well, try disabling the loading of the via_agp in rc.conf, it is probably held by your X server. via_agp doesn't work with resume, it destroys the glx part.
you can also edit the /usr/lib/powersave/script/sleeper_helper_functions and remove via_agp from it but i am far from sure if it will work well.


Freedom is what i love

Offline

#24 2006-02-06 17:47:31

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

Re: powersave and suspend to ram added

Blaasvis wrote:

which module do you use for network ? cause networking should be restarted on resume...

I use ipw2100.
Another problem, which is more serious: If I test it and restart immediately, everything comes up and stays up. However, if the suspended time lasts for a little longer, the system immediately goes down after it has come up again. From the messages, I see that it somehow is sent a legit halt command and switches to runlevel 0. The screen turns black, with the cursor near the top left corner, and after some seconds, it briefly says "Power down", and ... well, power is off.
I suspect this has to do with some other settings that are wrong, the screen power management or something like that, because I seem to remember that something similar happened earlier, long before I tried out powersave. I'd be grateful for any advice here, because this  makes the utility rather useless, for the time being.

Offline

#25 2006-02-07 10:05:48

demonus
Member
Registered: 2005-01-31
Posts: 62

Re: powersave and suspend to ram added

eyolf wrote:

Another problem, which is more serious: If I test it and restart immediately, everything comes up and stays up. However, if the suspended time lasts for a little longer, the system immediately goes down after it has come up again. From the messages, I see that it somehow is sent a legit halt command and switches to runlevel 0. The screen turns black, with the cursor near the top left corner, and after some seconds, it briefly says "Power down", and ... well, power is off.

try disabling acpi daemon, had the same issue, after disabling acpid it works flawlessly

Offline

Board footer

Powered by FluxBB