Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Software Suspend
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Tue Jan 07, 2003 11:08 pm    Post subject: Software Suspend Reply with quote

After working a few hours, I got swsusp (software suspend) stable(?) for my system.
:P

Because my system doesn't work either with ACPI nor APM in any standby modes, I tested swsusp.
Now it works !

If a few people are interested I will post a "light-guide",
but before I'm doing this, I want to check if it finds anybody usefull.

:?:
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Wed Jan 08, 2003 12:13 am    Post subject: Reply with quote

count me in... documentation is good, especially for Software Suspend (which might be useful for my laptop :) )
Back to top
View user's profile Send private message
jeb-c4
n00b
n00b


Joined: 27 Jul 2002
Posts: 35

PostPosted: Wed Jan 08, 2003 6:43 am    Post subject: kernel? Reply with quote

I would love to have this . . .

What kernel did you patch? (It would be great in gentoo-sources)

And did you have to patch init?

Jeb
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Wed Jan 08, 2003 8:38 pm    Post subject: Docu Reply with quote

Hi,

I've written a little docu and some (modified) scripts.

Have a look here: http://www.darav.de/gentoo/swsusp.html
:roll:
Feel free to post comments here.
After resuming I'll look here.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20053

PostPosted: Wed Jan 08, 2003 8:56 pm    Post subject: Reply with quote

Moved from Desktop Environments.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
snowmoon
n00b
n00b


Joined: 05 Jun 2002
Posts: 64
Location: Albany,NY USA

PostPosted: Thu Jan 09, 2003 2:32 am    Post subject: Reply with quote

Your X problems are easy to solve.

Manualy you can do a left click and select refresh desktop.

I'm sure their is a programatic way to do this, so if that can be automated ( say as part of the swsusp resuming process you would be all set.
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Thu Jan 09, 2003 12:00 pm    Post subject: Reply with quote

ok. What abou a DCOP-script to do this ?
(I ask, because I'm not able to write one)

But how to figure out, which console runs X ? Any ideas ?
:?:
Back to top
View user's profile Send private message
henryk
n00b
n00b


Joined: 02 Sep 2002
Posts: 5
Location: Berlin, Germany

PostPosted: Mon Jan 20, 2003 1:27 pm    Post subject: Reply with quote

Moin,

snowmoon wrote:

I'm sure their is a programatic way to do this, so if that can be automated ( say as part of the swsusp resuming process you would be all set.


There is:
Code:

henryk@gleam henryk $ whatis xrefresh
xrefresh             (1x)  - refresh all or part of an X screen
henryk@gleam henryk $ epm -qf `which xrefresh `
xfree-4.2.1-r2


Ravage wrote:

But how to figure out, which console runs X? Any ideas?


I'd grep /var/log/XFree86.0.log for "(++) using VT number 7" (with arbitrary values for 7) and use chvt to switch to that console. Something like
Code:

grep "using VT number" /var/log/XFree86.0.log | cut -b 22- | xargs chvt


That will only switch to Display 0, though. If you regularly start your only X-Server on different display numbers, you might want your script to look into /tmp/.X11-unix for the numbers of the currently running displays.

--
Henryk Plötz
Grüße aus Berlin
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Mon Jan 20, 2003 7:57 pm    Post subject: Reply with quote

Nice docs, I'll test them later (last time I tried swsusp, I failed horribly).

I'd like to know: can you pause (ctrl-z) an emerge-process/compilation, and then software-supend & resume your PC, and then continue the compilation afterwards (fg)?

Or is this just a foolish thought? Please try or comment, thanks!
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Mon Jan 20, 2003 9:33 pm    Post subject: Reply with quote

@henryk: I will try to integrate your suggestions, so stay tuned :)
Update: xrefresh doesn't help. the config option for nvidia is the choice that helps. Your grep-suggestion works fine. Thanks.

@AlterEgo: Since I'm using this, even if running my "emerge -u world", there weren't any problems so far.

Just a note: 2.5.xx didn't work for me (it crashes after resume), so 2.4.20+patch is currently the better choice for me.
Back to top
View user's profile Send private message
haste
n00b
n00b


Joined: 01 Sep 2002
Posts: 3

PostPosted: Tue Jan 21, 2003 5:30 pm    Post subject: SuSE kernel Reply with quote

Hi,

Well, I've tried the swsusp a couple of times on my i830 based notebook, but there always seems to be some kind of problems.

I have noticed that suspend to ram is working in 2.5, and the other day I came across this describtion of the kernel in SuSE 8.1:
http://www.suse.com/us/private/products/suse_linux/i386/acpi.html

They basically back ported the acpi code from 2.5 to 2.4 so you'll have a working suspend to ram feature on 2.4.

Now, does anybody know if SuSE's patches is available, and we could make a gentoo suse kernel package?
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Tue Jan 21, 2003 6:00 pm    Post subject: Reply with quote

May be you meant this:

* sys-kernel/acpi-sources
Latest version available: 2.4.20-r9
Latest version installed: [ Not Installed ]
Size of downloaded files: 27,326 kB
Homepage: http://www.kernel.org/ http://www.gentoo.org/
Description: Full sources for the latest ACPI Linux kernel
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Tue Jan 21, 2003 7:52 pm    Post subject: Reply with quote

Ravage, I got swsusp working basically, thanks :)

It took me hours to find out why my NFS shares were not remounted upon resume, only to find that nothing will be remounted upon resume :roll:
There is a tiny but nasty typo in your script: /etc/suspend.conf:
Line 61: SWSUSP_REMOUNTS=""
must be:
Line 61: SWSUSP_REMOUNT=""
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Wed Jan 22, 2003 8:31 pm    Post subject: new version Reply with quote

Hello,

I updated the new suspend-script (version 0.7) and the HowTo at
http://www.darav.de/gentoo/swsusp.html

So feel free to test it. :roll:
Back to top
View user's profile Send private message
AlterEgo
Veteran
Veteran


Joined: 25 Apr 2002
Posts: 1619

PostPosted: Wed Jan 22, 2003 9:17 pm    Post subject: Re: new version Reply with quote

Ravage wrote:
Hello,

I updated the new suspend-script (version 0.7) and the HowTo at
http://www.darav.de/gentoo/swsusp.html

So feel free to test it. :roll:

Cool :)
Your new script works more elegantly and error-free, it seems. Nice work!

Seems swsusp does not like my nvidia-driver very much though, the nv driver is fine.
Back to top
View user's profile Send private message
vod
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jun 2002
Posts: 90

PostPosted: Sun Jan 26, 2003 7:54 am    Post subject: Reply with quote

could someone please post a brief explanation about what software suspend in linux really does and why it's good?
thanks!
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Sun Jan 26, 2003 10:51 am    Post subject: Reply with quote

this is something like windows' hibernation.

http://fchabaud.free.fr/English/Tricks/Laptop/Swsusp/OldStuff/Doc/suspend.txt
Back to top
View user's profile Send private message
Schmolch
l33t
l33t


Joined: 16 Jun 2002
Posts: 746
Location: Germany

PostPosted: Thu Feb 20, 2003 10:38 pm    Post subject: Reply with quote

Hi all!

I got sw-suspend almost working.. almost.

After completing the resume, i would like to return to my Gnome-Session, but it doesn't work.

When i try to switch to it immediately after the resume, all i see is 1 empty panel on 1 (out of 2) screens (dual-head) and the system freezes.

When i start a second (new) X-Session first, i can switch back to my old Gnome-Session and everything works fine.

When i go to a console first and look at top, i have 380MB free out of 512MB and there seems to be no X or Gnome-Stuff running.


Well... hmm... what could i do?
What could be the reason?


And btw, just in case it will never work, i would like to know how much faster the booting-process becomes for everyone when using sw-suspend.
How many seconds do you save?
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Mon Mar 03, 2003 12:00 pm    Post subject: Reply with quote

Hello,

currently I'm not at home - so I can't test how many seconds it saves. I will post it later.

Also I don't know the correct option for solving your problem. But have a look at my "little docu" at the last lines... SWSUSP_XXX="nvidia" should help you !

Also F.Chabaud updated the suspend script with my suggestion - now the "original" works with gentoo !
You might try it.
Back to top
View user's profile Send private message
Ravage
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jun 2002
Posts: 107

PostPosted: Wed Mar 05, 2003 11:35 am    Post subject: Times Reply with quote

Hi,
here're my system startup and shutdown times:

Without SW-Suspend:
Shutdown: 40 sec
Startup: 1min 56 sec


With SW-Suspend:
Shutdown: 18 sec
Startup: 1min 19 sec
.

The test was to boot into kde (user login) and shutdown and restart up to kde.

There're some apps and servers that are started and a few daemons - so the real advantage is that there's no need to start all of your daemons and apps. They remain open.

For other system the times may be different. Even for my system it would be possible to speed up sw-suspend's resume.
Back to top
View user's profile Send private message
rj
n00b
n00b


Joined: 14 May 2003
Posts: 13

PostPosted: Thu May 15, 2003 6:53 pm    Post subject: Reply with quote

Is it possible to patch this into gentoo-sources instead of vanilla?

I'd like to use it, but having to use vanilla sources is a bit of a turn off.. having said that i've no idea how much of an improvement the gento optimised sources are. :S
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Fri May 23, 2003 2:29 am    Post subject: Reply with quote

anyone get it working with 2.5.x? Those kernels come aleady patched with swsusp enabled, which is most excellent, but the scripts (suspend.sh) seem to be outdated - there is no longer a /proc/sys/kernel/swsusp device to write to; I believe it is supposed to now be /proc/acpi/sleep, which I thought was only for acpi machines. But anyway, I was wondering if anyone has a modified suspend.sh script, or knew what device we're to write to - when I change /proc/sys/kernel/swsusp in the file /sbin/hibernate (shell script) to /proc/acpi/sleep, I get errors about echo having a write error something.
_________________
-Phil Crosby
Back to top
View user's profile Send private message
Reformist
Guru
Guru


Joined: 06 Oct 2002
Posts: 323

PostPosted: Fri May 23, 2003 8:37 pm    Post subject: Reply with quote

Or, as 2 posts above me questioned, is it possible to patch into Gentoo sources? That would be great as well.
_________________
-Phil Crosby
Back to top
View user's profile Send private message
steveforse
n00b
n00b


Joined: 26 Dec 2002
Posts: 21
Location: Wilmington, CA, USA

PostPosted: Wed May 28, 2003 3:42 am    Post subject: WOLK-sources, too Reply with quote

The WOLK-sources don't have SWSUSP built-in and it's been too heavily patched, I think, to apply any of the other patches. It'd be nice if WOLK were supported, seeing as it's a very optimized kernel.

Last edited by steveforse on Sun Jul 31, 2005 11:40 am; edited 1 time in total
Back to top
View user's profile Send private message
sKewlBoy
Guru
Guru


Joined: 03 Nov 2002
Posts: 406
Location: Portugal

PostPosted: Tue Jul 22, 2003 11:09 am    Post subject: Reply with quote

swsusp works great for me except X...
I change to console and then do "hibernate". Then I resume and it goes back to the console where I was. Then I swith to VT 7 (where X is running) and I get my keyboard and touchpad locked, only the usb mouse works. If I then kill X and rerun it, I get everything locked (keyboard and both pointers)...
--EDIT--
better: if I kill X before hibernating, after I resume X won't work also. I run "startx", desktop appears and all kinda input goes off. I have to login through SSH and kill the session....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum