Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Suspend2 unable to unload some modules

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
G2k
l33t
l33t
User avatar
Posts: 672
Joined: Sat Mar 06, 2004 5:58 pm
Location: Rome, Italy

Suspend2 unable to unload some modules

  • Quote

Post by G2k » Sat May 06, 2006 8:36 am

I am trying to get Suspend2 to work but there are some problems with module unloading

Code: Select all

# 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: Select all

### 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
Top
pem
Guru
Guru
User avatar
Posts: 390
Joined: Sun Aug 29, 2004 12:24 pm
Location: France
Contact:
Contact pem
Website

  • Quote

Post by pem » Sat May 06, 2006 9:47 am

In your /etc/X11/xorg.conf, what is your AGP setting?
Registered user #30505
Top
G2k
l33t
l33t
User avatar
Posts: 672
Joined: Sat Mar 06, 2004 5:58 pm
Location: Rome, Italy

  • Quote

Post by G2k » Sat May 06, 2006 5:07 pm

hmmm. I don't have it in my xorg.conf, but dmesg | grep agp returns

Code: Select all

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
Top
pem
Guru
Guru
User avatar
Posts: 390
Joined: Sun Aug 29, 2004 12:24 pm
Location: France
Contact:
Contact pem
Website

  • Quote

Post by pem » Sat May 06, 2006 5:35 pm

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: Select all

Section "Device"
    Driver          "nvidia"
    ...
    Option          "NvAGP"                 "1"             # NvAgp
    ...
EndSection
Registered user #30505
Top
chrismortimore
l33t
l33t
User avatar
Posts: 721
Joined: Sat Dec 03, 2005 1:14 am
Location: Edinburgh, UK

  • Quote

Post by chrismortimore » Sat May 06, 2006 6:00 pm

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
Top
G2k
l33t
l33t
User avatar
Posts: 672
Joined: Sat Mar 06, 2004 5:58 pm
Location: Rome, Italy

  • Quote

Post by G2k » Sat May 06, 2006 6:14 pm

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
Top
pem
Guru
Guru
User avatar
Posts: 390
Joined: Sun Aug 29, 2004 12:24 pm
Location: France
Contact:
Contact pem
Website

  • Quote

Post by pem » Sat May 06, 2006 6:26 pm

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: Select all

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 :!:
Last edited by pem on Sat May 06, 2006 7:32 pm, edited 1 time in total.
Registered user #30505
Top
chrismortimore
l33t
l33t
User avatar
Posts: 721
Joined: Sat Dec 03, 2005 1:14 am
Location: Edinburgh, UK

  • Quote

Post by chrismortimore » Sat May 06, 2006 7:28 pm

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
Top
G2k
l33t
l33t
User avatar
Posts: 672
Joined: Sat Mar 06, 2004 5:58 pm
Location: Rome, Italy

  • Quote

Post by G2k » Sat May 06, 2006 8:08 pm

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
Top
frederik
n00b
n00b
Posts: 44
Joined: Mon Nov 08, 2004 12:09 am

  • Quote

Post by frederik » Sun Sep 03, 2006 11:52 am

Concerning the modules not unloading - I never got my ipw3945 module to unload with rmmod. But it works using

Code: Select all

modprobe -r ipw3945
. So if this is the same for your ipw you could try:

Code: Select all

OnSuspend 20 modprobe -r ipwXXXX
in your hibernate.conf
Top
Lloeki
Guru
Guru
User avatar
Posts: 437
Joined: Wed Jun 14, 2006 2:14 pm
Location: France
Contact:
Contact Lloeki
Website

  • Quote

Post by Lloeki » Mon Oct 02, 2006 12:37 pm

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*** ;)
Top
frederik
n00b
n00b
Posts: 44
Joined: Mon Nov 08, 2004 12:09 am

  • Quote

Post by frederik » Fri Oct 06, 2006 4:27 pm

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 :)
Top
Post Reply

12 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic