Unofficial MSIwWind Homepage
Unofficia MSI Wind Homepage MSI Wind Forums MSI Wind Wiki MSI Wind Links MSI Wind Images IRC MSI Wind Chat


It is currently Sat Jul 04, 2009 12:23 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Ubuntu can't suspend more than once
PostPosted: Sat Jul 05, 2008 10:51 pm 
Offline
Member

Joined: Sat Jul 05, 2008 4:57 pm
Posts: 12
Running Ubuntu on the Advent 4211, when I close the lid it successfully does a suspend and the sleep light on the machine flashes away.

It resumes again after hitting the power button, but the sound is gone and the syslog is spammed with the following errors:

Jul 5 23:46:39 ichigo kernel: [ 2478.123868] sd 2:0:0:0: [sdb] READ CAPACITY failed
Jul 5 23:46:39 ichigo kernel: [ 2478.123878] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK
Jul 5 23:46:39 ichigo kernel: [ 2478.123891] sd 2:0:0:0: [sdb] Sense not available.
Jul 5 23:46:39 ichigo kernel: [ 2478.124021] sd 2:0:0:0: [sdb] Write Protect is off
Jul 5 23:46:39 ichigo kernel: [ 2478.124031] sd 2:0:0:0: [sdb] Mode Sense: 00 00 00 00
Jul 5 23:46:39 ichigo kernel: [ 2478.124038] sd 2:0:0:0: [sdb] Assuming drive cache: write through

In addition, the machine won't suspend again after this - it just goes to a prompt and comes back up again when the lid is opened.

lsusb also seems to hang indefinitely.

Any ideas?


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Sun Jul 06, 2008 8:41 pm 
Offline
Member

Joined: Sat Jul 05, 2008 4:57 pm
Posts: 12
Looks like this is a bug with Ubuntu itself, not a compatibility issue with the Wind...

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/206952


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Tue Jul 08, 2008 10:56 am 
Offline
Member

Joined: Sat Jul 05, 2008 4:57 pm
Posts: 12
Okay, I think I've gotten around this problem.

The solution for me was to use uswsusp instead of the default Ubuntu suspend program - it has better features, such as suspend saving an image to the hard drive as well as ram in case the battery runs out, and.. well... it actually works!

Here is how I got it running as the default suspend/resume program in Ubuntu:

First off, you need to install it!
Code:
sudo apt-get install uswsusp


Double check that this installed correctly by typing /sbin/s2 and hitting tab twice - it should show /sbin/s2both and /sbin/s2disk.

Next, you need to disable the old pmi version of suspend. To do this I used dpkg-divert - a clever little utility that just moves modules rather than deleting them so it doesn't break all the module's dependents as it would if you used apt to uninstall it. In addition, all updates to the module are still applied so you can revert back to it whenever you like - but it doesn't overwrite everything you've done when it's updated! Hurray!

Code:
sudo dpkg-divert --rename --divert /usr/sbin/pmi-disabled /usr/sbin/pmi
sudo dpkg-divert --rename --divert /usr/sbin/pm-suspend-disabled /usr/sbin/pm-suspend
sudo dpkg-divert --rename --divert /usr/sbin/pm-hibernate-disabled /usr/sbin/pm-hibernate


Now you need to edit the suspend and hibernate scripts in Ubuntu. Previously these had built in support for other suspend programs, but now they don't so you'll have to add it yourself!

Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-suspend-linux


Replace the following code:

Code:
if [ -x /usr/sbin/pm-suspend ] ; then
   /usr/sbin/pm-suspend $QUIRKS
   RET=$?
else
   unsupported
fi


with this:

Code:
if [ -x /usr/sbin/pm-suspend ] ; then
   /usr/sbin/pm-suspend $QUIRKS
   RET=$?
elif [ -x /sbin/s2both ] ; then
   /sbin/s2both
   RET=$?
else
   unsupported
fi


And similarly for hibernate:
Code:
sudo gedit /usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux


This should have a similar section to the one above - edit it so it looks like this:

Code:
if [ -x /usr/sbin/pm-hibernate ] ; then
   /usr/sbin/pm-hibernate $QUIRKS
   RET=$?
elif [ -x /sbin/s2disk ] ; then
   /sbin/s2disk
   RET=$?
else
   unsupported
fi


That's all!

Now when you suspend or hibernate it should run s2both and s2disk respectively, which, for me at least, work perfectly.

If at any time you want to revert back to the original versions of suspend and hibernate, you can just run the following commands:

Code:
sudo dpkg-divert --rename --remove /usr/sbin/pmi
sudo dpkg-divert --rename --remove /usr/sbin/pm-suspend
sudo dpkg-divert --rename --remove /usr/sbin/pm-hibernate


(This was cobbled together from a guide at http://blog.paulbetts.org/index.php/2007/02/11/fixing-software-suspend-hibernate-with-uswsusp-in-ubuntu-feisty-and-edgy/ and comments there from Robin Battey)

Hope it works for you too!

-Cupcake


Last edited by Cupcake on Tue Jul 08, 2008 2:15 pm, edited 1 time in total.

Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Tue Jul 08, 2008 1:50 pm 
Offline
Forum Moderator
User avatar

Joined: Mon May 19, 2008 9:35 pm
Posts: 128
Location: Finland
I am in hurry, so I just updated link in Wiki :) Somebody with more time can edit the suspend-section there :)

_________________
Wind enthusiast, no Wind yet (waiting for 6-cell, if you know a place in Europe to get one and which delivers to Finland, pm me :)


Top
 Profile  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Wed Jul 09, 2008 8:20 pm 
Offline
Member
User avatar

Joined: Wed Jul 02, 2008 12:57 pm
Posts: 20
Location: Scotland
hibernation works great now with uswsusp, thanks!. but no sound though, will have a look, it's a common issue, guess the sound system needs a kick when coming out of hibernation.


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 10, 2008 12:39 am 
Offline
Wind Master

Joined: Mon May 26, 2008 11:46 am
Posts: 62
Location: Carlisle, U.K.
i've not got round to messing yet, but i've just noticed this section at the end of hibernate script

Quote:
#Refresh devices as a resume can do funny things
for type in button battery ac_adapter
do
devices=`hal-find-by-capability --capability $type`
for device in $devices
do
dbus-send --system --print-reply --dest=org.freedesktop.Hal \
$device org.freedesktop.Hal.Device.Rescan
done
done


Its seems to be saying that some devices need to be re-initiated on resume, maybe sound could be added to that list.

Just a thought.

_________________
*waits for inspiration on a better signature*

Owning a white XP Wind from www.play.com


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 10, 2008 7:36 am 
Offline
New Member

Joined: Thu Jul 10, 2008 7:24 am
Posts: 7
Has anybody else had difficulty getting it to suspend with s2both? When I use s2both it saves everything then shuts down. No sleep light, just plain switched off. Is everyone having this problem or is it just me?


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 10, 2008 9:40 am 
Offline
Member

Joined: Sat Jul 05, 2008 4:57 pm
Posts: 12
Yeah, it does that on mine too - I guess it just doesn't have support for the suspend light. It still boots faster than s2disk though when turned back on - ~20 seconds for me.


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 10, 2008 4:15 pm 
Offline
New Member

Joined: Thu Jul 10, 2008 7:24 am
Posts: 7
Well mine goes through the bios screen when starting back up so I don't think that it is suspending to ram at all. I think it is just turning off because the msi wind isn't whitelisted.


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 10, 2008 8:12 pm 
Offline
Wind Master

Joined: Mon May 26, 2008 11:46 am
Posts: 62
Location: Carlisle, U.K.
i'm having this problem too. I've tried forcing it to suspend using s2both --force and still get the same problem. I've tried the acpi_sleep options as well and all the same.

_________________
*waits for inspiration on a better signature*

Owning a white XP Wind from www.play.com


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 10, 2008 8:28 pm 
Offline
New Member

Joined: Thu Jul 10, 2008 7:24 am
Posts: 7
I tried that as well. I think our best bet is waiting for ubuntu to fix the suspend bug in the kernel because that works best. Something that I noticed was that after suspending with s2both I can use the kernel suspend as many times as I want.


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 10, 2008 9:11 pm 
Offline
Wind Master

Joined: Mon May 26, 2008 11:46 am
Posts: 62
Location: Carlisle, U.K.
sampattuzzi wrote:
I tried that as well. I think our best bet is waiting for ubuntu to fix the suspend bug in the kernel because that works best. Something that I noticed was that after suspending with s2both I can use the kernel suspend as many times as I want.



I can confirm that.


Adding acpi_sleep s3_bios to the kernel options in /boot/grub/menu.lst has no effect

_________________
*waits for inspiration on a better signature*

Owning a white XP Wind from www.play.com


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Fri Jul 18, 2008 4:55 am 
Offline
Wind User

Joined: Sat Jul 05, 2008 9:57 pm
Posts: 26
Have anyone tried to follow those instructions to make s2ram work:
http://en.opensuse.org/S2ram

I'm running Suse 11.0 on 2.6.25.9-0.2-pae and not having any problems with susped/hibernate. The only thing was that Advent is not yet included on s2ram whilelist and therefore is not automatically detected. Running s2ram with -f option sorted it out. s2disk worked straight out of the box.
By the way I've sent "s2ram -n" output to s2ram developers so hopefully will include Advent in their next release.
Could anyone with Wind confirm if getting anything different from below:
Quote:
# s2ram -n
Machine unknown
This machine can be identified by:
sys_vendor = "DIXONSXP"
sys_product = "To be filled by O.E.M."
sys_version = "Ver.001"
bios_version = "4.6.3"

_________________
Suse 11.0 & KDE4 feeding Advent


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Jul 31, 2008 3:23 pm 
Offline
Wind User

Joined: Fri Jun 13, 2008 9:09 pm
Posts: 32
I found out how to Resume

To resume, it is related to the boot process, so GRUB and initrd has to be properly configured.

a. GRUB, go to boot/grub, edit menu.lst, make sure the resume option is there. Here is how my menu.lst look like.

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=25d8c849-34b1-4009-81e1-d313a20844d7 resume=UUID=6d77e24a-79d3-425c-bac6-f875a3f35855 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet


Make sure the resume points the UUID of your Swap partition.

Taken from this thread and modified for the path of grub in HH

http://ubuntuforums.org/showthread.php?t=750216


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Fri Aug 01, 2008 4:12 am 
Offline
Wind User

Joined: Fri Jun 13, 2008 9:09 pm
Posts: 32
To fix the sound type this into terminal "sudo alsa force-reload"


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Sat Aug 02, 2008 5:40 pm 
Offline
New Member

Joined: Sat Aug 02, 2008 1:31 pm
Posts: 1
Hi,

I tried your method to fix hibernate & suspend, but it doesn't fix it.
So I tried another method, if it can help, it apparently works for me :
http://forums.msiwind.net/default-msiwind/suspend-and-hibernate-working-with-sound-ubuntu-t1982.html

jix


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Sat Aug 02, 2008 6:27 pm 
Offline
Wind Master
User avatar

Joined: Sat Jul 19, 2008 11:48 am
Posts: 57
Location: Poland
Netbooks: MSI Wind U100
Hej jix, please I need some feedback in my thread, I can't be expected to root around the forum to see if my method works :]

_________________
MSI Wind U100 White. 2GB RAM. Intel 4965AGN WLAN.


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Mon Aug 04, 2008 3:14 pm 
Offline
Wind User

Joined: Mon Aug 04, 2008 2:44 pm
Posts: 41
Netbooks: Medion Akoya e1210
@cupcake : can you give me the version of the kernel you use please ?

because I have always the error message :

Code:
Jul 5 23:46:39 ichigo kernel: [ 2478.123868] sd 2:0:0:0: [sdb] READ CAPACITY failed
Jul 5 23:46:39 ichigo kernel: [ 2478.123878] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK
Jul 5 23:46:39 ichigo kernel: [ 2478.123891] sd 2:0:0:0: [sdb] Sense not available.
Jul 5 23:46:39 ichigo kernel: [ 2478.124021] sd 2:0:0:0: [sdb] Write Protect is off
Jul 5 23:46:39 ichigo kernel: [ 2478.124031] sd 2:0:0:0: [sdb] Mode Sense: 00 00 00 00
Jul 5 23:46:39 ichigo kernel: [ 2478.124038] sd 2:0:0:0: [sdb] Assuming drive cache: write through


thanks !

(I am using ubuntu 8.04.1)

_________________
Medion Akoya E1210 / 10.5.7 retail install
working to get SnowLeopard ...


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Thu Aug 07, 2008 12:24 pm 
Offline
Member

Joined: Sat Jul 05, 2008 4:57 pm
Posts: 12
Hey carmelo,

I've taken the step of ditching the Realtek card and using the Intrepid Kernel to fix all the issues with suspend and resume so I no longer experience this problem...

On the old kernel (2.6.24-16) I was using when I first posted this, the error you are seeing were caused by the card reader not being accessible. The card reader uses the USB subsystem I believe and since this was hanging after resume it couldn't access the card reader.


Top
 Profile E-mail  
 
 Post subject: Re: Ubuntu can't suspend more than once
PostPosted: Wed Aug 27, 2008 1:14 pm 
Offline
New Member

Joined: Wed Aug 27, 2008 12:07 pm
Posts: 5
Netbooks: Advent 4211
Quote:
Next, you need to disable the old pmi version of suspend. To do this I used dpkg-divert - a clever little utility ...


I think this step is not necessary if you modify the file hal-system-power-hibernate-linux the following way after installing uswsusp.

Code:
if [ -x /sbin/s2disk ] ; then
        /sbin/s2disk
        RET=$?
elif [ -x /usr/sbin/pm-hibernate ] ; then
        /usr/sbin/pm-hibernate $QUIRKS
        RET=$?
else
        unsupported
fi


That is to check the existence of uwsusp utilites before pm-utils.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO

Contact US  --   Forums  --   Wiki  --   Images