You are not logged in.

#1 2008-05-22 23:47:39

alexertech
Member
From: Mérida, Venezuela
Registered: 2008-05-18
Posts: 23
Website

Laptop-Mode doesnt resume after suspend...

Hi everybody.

Just that. After a suspend, laptop-mode doesn't wake up, and the famous "thick noise" appears again...

I don't see where can i set the modules that should be reloaded after a suspend/hibernate state. Only found which modules should be unloaded after.

Thanks in advance! big_smile


"Any question has two points of view: the wrong one and ours."
www.alexertech.com

Offline

#2 2008-05-30 15:14:12

AbtZ
Member
Registered: 2008-05-30
Posts: 31

Re: Laptop-Mode doesnt resume after suspend...

Try unplugging and then reconnecting the AC to your laptop. That usually fixes it for people using laptop mode.

A bit tedious, though.

Offline

#3 2008-05-30 15:34:38

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Laptop-Mode doesnt resume after suspend...

AbtZ wrote:

Try unplugging and then reconnecting the AC to your laptop. That usually fixes it for people using laptop mode.

A bit tedious, though.

There's surely a more elegant solution than this wink

For example, if you're using pm-utils to suspend/hibernate you can create a file called /etc/pm/sleep.d/10lmrestart (the actual filename doesn't matter, as long as the file is in this directory) that looks something like this:

#!/bin/bash
case $1 in
    hibernate)
        /etc/rc.d/laptop-mode stop
        ;;
    suspend)
        /etc/rc.d/laptop-mode stop
        ;;
    thaw)
        /etc/rc.d/laptop-mode start
        ;;
    resume)
        /etc/rc.d/laptop-mode start
        ;;
    *)
        echo Something is not right.
        ;;
esac

You get the idea...  Alternatively you can use hibernate-script (package in extra) to better configure what happens when you suspend/resume...  Or you can write your own script that stops laptop mode before sending the laptop to sleep and then starts it again when after resume...

EDIT: BTW, the script above must be made executable with chmod +x in order to work.

Last edited by fwojciec (2008-05-30 15:38:32)

Offline

#4 2008-07-25 04:18:56

alexertech
Member
From: Mérida, Venezuela
Registered: 2008-05-18
Posts: 23
Website

Re: Laptop-Mode doesnt resume after suspend...

Hey fwojciec!

I totally forgot to told you: THANKSSSSSSSS!!!

This works perfect.

Again: THANKS!!

(late but sure wink)


"Any question has two points of view: the wrong one and ours."
www.alexertech.com

Offline

#5 2008-08-05 14:52:29

AbtZ
Member
Registered: 2008-05-30
Posts: 31

Re: Laptop-Mode doesnt resume after suspend...

That is a cool solution, fwojciec. Perhaps this would be the wrong forum to ask, but I would like to do the same in Ubuntu -- does anyone here know what kind of script I should write, and where I should put it?

Offline

#6 2008-08-11 04:56:11

AbtZ
Member
Registered: 2008-05-30
Posts: 31

Re: Laptop-Mode doesnt resume after suspend...

OK, I found the solution myself. For future reference I will put it here. Ubuntu uses pm-utils for power management too. Thus the only necessary modification to fwojciec's script is to change the rc.d folder to init.d. For example:

hibernate)
        /etc/init.d/laptop-mode stop
        ;;

Offline

Board footer

Powered by FluxBB