Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Suspend2 unable to unload some modules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
G2k
l33t
l33t


Joined: 06 Mar 2004
Posts: 672
Location: Rome, Italy

PostPosted: Sat May 06, 2006 8:36 am    Post subject: Suspend2 unable to unload some modules Reply with quote

I am trying to get Suspend2 to work but there are some problems with module unloading
Code:
# hibernate
Some modules failed to unload: sony_acpi ipw2200 ieee80211 ieee80211_crypt nvidia firmware_class
Some modules failed to unload: nvidia
hibernate: Aborting suspend due to errors in ModulesUnloadBlacklist (use --force to override).
I am using a Sony Vaio VGN-FS660...I guess I could build the ieee80211 and sony_acpi things in-kernel right? But as for the nvidia-kernel and the other modules, how can I make Suspend2 successfully do its job? I'm using media-video/nvidia-kernel-1.0.8756. This is my /etc/hibernate/hibernate.conf
Code:
### suspend2 (for Software Suspend 2)
UseSuspend2 yes
Reboot no
EnableEscape yes
DefaultConsoleLevel 1
Compressor lzf
Encryptor none
# ImageSizeLimit 200
## useful for initrd usage:
# SuspendDevice swap:/dev/hda2
## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff
# PowerdownMethod 5
## Any other /proc/software_suspend setting can be set like so:
# ProcSetting expected_compression 50
## Or traditionally like this:
# Suspend2AllSettings 0 0 2056 65535 5
## Or even from the results of hibernate --save-settings with this:
# Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf
## For filewriter:
# FilewriterLocation /suspend_file 1000
# VerifyFilewriterResume2 yes
# ProcSetting userui_program /sbin/suspend2ui_text

### sysfs_power_state
## To use /sys/power/state to suspend your machine (which may offer
## suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options
## above for Software Suspend 2, below for acpi_sleep, and uncomment this line.
## You may replace mem with any one of the states from "cat /sys/power/state"
# UseSysfsPowerState mem
# PowerdownMethod shutdown

### acpi_sleep
## To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out
## all the options above for Software Suspend 2 and sysfs, and uncomment this
## line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and
## 4 is suspend-to-disk.
# UseACPISleep 4

##############################################################################
### Some global settings
##############################################################################

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
Distribution gentoo
# XDisplay :0

##############################################################################
### Scriptlets
###   Scriptlets provide support for doing all sorts of things before and after
###   suspending. The defaults settings here should work for most people, but
###   you may wish to edit these to taste. Consult "hibernate -h" for help on
###   the configuration settings.
##############################################################################

### bootsplash
## If you use bootsplash, also enabling SwitchToTextMode is recommended if
## you use X, otherwise you may end up with a garbled X display.Bootsplash on
# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock
SaveClock restore-only

### devices
# IncompatibleDevices /dev/dsp /dev/video*

### diskcache
# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)
FBSplash on
SwitchToTextMode on
# FBSplashTheme suspend2

### filesystems
# Unmount /nfsshare /windows /mnt/sambaserver
# UnmountFSTypes smbfs nfs
# UnmountGraceTime 1
# Mount /windows
UnmountFSTypes ntfs
Unmount /mnt/win
OnResume 20 mount /mnt/win

### grub
# ChangeGrubMenu yes
# GrubMenuFile /boot/grub/menu.lst
# AlternateGrubMenuFile /boot/grub/menu-suspended.lst
# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks
# IbmAcpi yes
# RadeonTool yes

### lilo
# EnsureLILOResumes yes

### lock (generally you only want one of the following options)
# LockConsoleAs root
# LockXScreenSaver yes
# LockKDE yes
# LockXLock yes
# LockXAutoLock yes

### misclaunch
# OnSuspend 20 echo "Good night!"
# OnResume 20 echo "Good morning!"

### modules
# UnloadModules snd_via82cxxx usb-ohci
UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules

### modules-gentoo
GentooModulesAutoload yes

### network
# DownInterfaces eth0
# UpInterfaces auto

### pcmcia
# EjectCards yes

### programs
# IncompatiblePrograms xmms

### services
# RestartServices postfix
# StopServices alsasound
# StartServices aumix

### vbetool
# EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
# VbetoolPost yes
# RestoreVCSAData yes

### xhacks
SwitchToTextMode yes
# UseDummyXServer yes

### xstatus
## This can be set to gnome, kde or x:
# XStatus gnome
XSuspendText Preparing to suspend...
XResumeText Resuming from suspend...
## When using XStatus x, and you have xosd installed:
# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50

_________________
Animula vagula blandula,
Hospes comesque corporis,
Quae nunc abibis in loca
Pallidula rigida nudula,
Nec ut soles dabis iocos...
- Imp. Caesar Hadrianus
Back to top
View user's profile Send private message
pem
Guru
Guru


Joined: 29 Aug 2004
Posts: 390
Location: France

PostPosted: Sat May 06, 2006 9:47 am    Post subject: Reply with quote

In your /etc/X11/xorg.conf, what is your AGP setting?
_________________
Registered user #30505
Back to top
View user's profile Send private message
G2k
l33t
l33t


Joined: 06 Mar 2004
Posts: 672
Location: Rome, Italy

PostPosted: Sat May 06, 2006 5:07 pm    Post subject: Reply with quote

hmmm. I don't have it in my xorg.conf, but dmesg | grep agp returns
Code:
Linux agpgart interface v0.101 (c) Dave Jones
agpgart: Detected an Intel 915GM Chipset.
agpgart: AGP aperture is 256M @ 0x0
what do I have to put in my xorg.conf?
_________________
Animula vagula blandula,
Hospes comesque corporis,
Quae nunc abibis in loca
Pallidula rigida nudula,
Nec ut soles dabis iocos...
- Imp. Caesar Hadrianus
Back to top
View user's profile Send private message
pem
Guru
Guru


Joined: 29 Aug 2004
Posts: 390
Location: France

PostPosted: Sat May 06, 2006 5:35 pm    Post subject: Reply with quote

It means that you are using the autodetection which turns to use the kernel's AgpGart driver. This driver does not allow the nvidia driver to unload properly (check nvidia readme). The best way to proceed is to keep AGP on (though it can be disabled completely) by specifying the nvidia's implementation:
Code:
Section "Device"
    Driver          "nvidia"
    ...
    Option          "NvAGP"                 "1"             # NvAgp
    ...
EndSection

_________________
Registered user #30505
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Sat May 06, 2006 6:00 pm    Post subject: Reply with quote

Try "hibernate --force". I found that my laptop suspends and resumes reliably even though some of the modules I use are blacklisted. If it works, just remove them from the blacklist.
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
G2k
l33t
l33t


Joined: 06 Mar 2004
Posts: 672
Location: Rome, Italy

PostPosted: Sat May 06, 2006 6:14 pm    Post subject: Reply with quote

Ok so apparently I was able to suspend successfully (i've only tried without using X, I'll try with X later) but I must say that I'm a bit taken back by the fact that it's as if I had shutdown normally...I mean, my computer booted up, I saw the grub screen, then I chose Linux and after doing checks to the Filesystem and whatnot, the hibernate image decompressed and took me back to where I was...how is that hibernating my computer? That's just improving boot time by about 5 seconds. Am I doing something wrong or is it just like that? I'm a bit let down, I thought that when I powered on my console would reappear straight away. :cry: ..isn't that how it works with Windows and MacOS?
_________________
Animula vagula blandula,
Hospes comesque corporis,
Quae nunc abibis in loca
Pallidula rigida nudula,
Nec ut soles dabis iocos...
- Imp. Caesar Hadrianus
Back to top
View user's profile Send private message
pem
Guru
Guru


Joined: 29 Aug 2004
Posts: 390
Location: France

PostPosted: Sat May 06, 2006 6:26 pm    Post subject: Reply with quote

Well, I was kinda disapointed too concerning the speed. suspend has to take all your memory and compress it (it's even worth without compression owing to my slow laptop disk ) and finally writes it. When you restart, your complete kernel has to get initialized, then comes the uncompression and the write back in memory. Plus, there are couples of things that are not restored properly and some services must be restarted (for me I restart my wifi and hotplug services). Arggh!

Still, it remains interesting to find back your apps the same way they were started...

You can shorten this time by adjusting stuff in your /etc/hibernate/hibernate.conf. Here's mine as example:
Code:
UseSuspend2 yes
EnableEscape no
DefaultConsoleLevel 0
Compressor lzf
Encryptor none
PowerdownMethod 4
Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 0
Distribution gentoo
SaveClock restore-only
UnloadBlacklistedModules yes
LoadModules auto
DownInterfaces wlan0
UpInterfaces wlan0
RestartServices hotplug
SwitchToTextMode no
UseDummyXServer no
XStatus gnome
XSuspendText Sleep!
XResumeText Wake up!

And I use fbsplash and gnome :!:
_________________
Registered user #30505


Last edited by pem on Sat May 06, 2006 7:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
chrismortimore
l33t
l33t


Joined: 03 Dec 2005
Posts: 721
Location: Edinburgh, UK

PostPosted: Sat May 06, 2006 7:28 pm    Post subject: Reply with quote

G2k wrote:
Ok so apparently I was able to suspend successfully (i've only tried without using X, I'll try with X later) but I must say that I'm a bit taken back by the fact that it's as if I had shutdown normally...I mean, my computer booted up, I saw the grub screen, then I chose Linux and after doing checks to the Filesystem and whatnot, the hibernate image decompressed and took me back to where I was...how is that hibernating my computer? That's just improving boot time by about 5 seconds. Am I doing something wrong or is it just like that? I'm a bit let down, I thought that when I powered on my console would reappear straight away. :cry: ..isn't that how it works with Windows and MacOS?
There are 3 levels of suspend:

"Standby": It just switches a few things off and gives rather piddly power savings. I don't think anyone really uses this.
"Suspend to RAM": Computer everything it needs into the RAM and powers down everything except the RAM and a few essentials needed to power back. This is what Windows and MacOSX call "Sleep"
"Suspend to disk": This is what you've set up. It does a suspend to RAM, writes everything to disk, then shuts down. On the next boot, it reloads the image and restores your computer to how it was. Windows calls this "Hibernation".

Standby and Suspend to RAM take a few seconds to suspend and to restore, because they don't actually power down the computer. If you want fast suspending, use these. However, with these modes, your battery life will still decrease and will eventually run out. And if you use these modes and put it in your bag, your laptop might overheat (a guy I worked with fried his laptop doing this).

Suspend to disk is useful if you (for example) are on the train writing a report and get to your stop and have to move. You can hibernate your machine, and when you get to your next sitting position, you can switch your machine back on and continue as you were, with the benefit of your battery life is not reduced. I always use suspend to disk, because I always have certain programs running and it is nice to just switch my laptop on and have it all set up as I want, without having to load everything again.
_________________
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB 7200rpm Maxtor DiamondMax 10, 2x320GB WD 7200rpm Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB
Back to top
View user's profile Send private message
G2k
l33t
l33t


Joined: 06 Mar 2004
Posts: 672
Location: Rome, Italy

PostPosted: Sat May 06, 2006 8:08 pm    Post subject: Reply with quote

yeah I guess I'm looking for Suspend to RAM then...also cus my laptop has 1 gig of RAM and I never really use it (or abuse it should I say) :twisted:
_________________
Animula vagula blandula,
Hospes comesque corporis,
Quae nunc abibis in loca
Pallidula rigida nudula,
Nec ut soles dabis iocos...
- Imp. Caesar Hadrianus
Back to top
View user's profile Send private message
frederik
n00b
n00b


Joined: 08 Nov 2004
Posts: 44

PostPosted: Sun Sep 03, 2006 11:52 am    Post subject: Reply with quote

Concerning the modules not unloading - I never got my ipw3945 module to unload with rmmod. But it works using
Code:
modprobe -r ipw3945
. So if this is the same for your ipw you could try:
Code:

OnSuspend 20 modprobe -r ipwXXXX

in your hibernate.conf
Back to top
View user's profile Send private message
Lloeki
Guru
Guru


Joined: 14 Jun 2006
Posts: 437
Location: France

PostPosted: Mon Oct 02, 2006 12:37 pm    Post subject: Reply with quote

suspend2 saves the whole ram (incl. disk cache) by default, which results in a 100% state-restored 100% responsive system.

if you want do discard some cache, try ImageSizeLimit setting, and set it to nocache. this way I hibernate in 3sec, resume in 2.
_________________
Moved to using Arch Linux
Life is meant to be lived, not given up...
HOLY COW I'M TOTALLY GOING SO FAST OH F*** ;)
Back to top
View user's profile Send private message
frederik
n00b
n00b


Joined: 08 Nov 2004
Posts: 44

PostPosted: Fri Oct 06, 2006 4:27 pm    Post subject: Reply with quote

This is really a great tip - maybe you want to put it into the wiki or so? Makes everyday resume and suspend much more fun :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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