Update 15 Jun 2007: See Dell Latitude D800 Suspend to RAM with Fedora 7 for an updated version of this article.

With a 1-day delay of my Air France flight to Paris, I had enough time to fix suspend to RAM on my new Dell Latitude D800 under Fedora Core 3.

The following assumes that your D800 contains an NVIDIA graphics card, a Broadcom ethernet adapter, and an Intel PRO/Wireless 2200 adapter.

As noted in Aram Kananov's How To, you first need to replace the nv driver with NVIDIA's nvidia driver. The setup is described in the README that is part of the driver package.

Next, you need a script to remove certain modules before entering suspend mode, and for reloading those modules afterwards. Place the following in /etc/acpi/actions/suspend2mem.sh - credits for the original version go to Tomislav Vujec:

#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
export PATH

# The synergyc process would block the unloading
# of the ethernet module, so we kill it.
killall synergyc

# Unmount all network filesystems
service netfs stop

# Stop local networking
service network stop

# Disable network modules
rmmod tg3
rmmod ipw2200
rmmod ieee80211
rmmod ieee80211_crypt

# Disable USB modules
rmmod usb_storage
rmmod uhci_hcd
rmmod ehci_hcd

# Preventive sync
sync

# Suspend
echo mem > /sys/power/state

# Come back...

# Resync clock
hwclock --hctosys

# Reenable USB
modprobe uhci_hcd
modprobe ehci_hcd

# Reenable network modules
modprobe tg3
modprobe ipw2200

# Start local networking
service network start

# Mount all network filesystems
service netfs start

To make ACPI use this script when you press Fn+Esc, put this into /etc/acpi/events/sleep:

event=button/sleep.*
action=/etc/acpi/actions/suspend2mem.sh

Now, don't press Fn+Esc yet. As noted in Appendix S of the NVIDIA driver README, the 2.6 kernel AGP driver has problems when waking up from a suspend. So, save everything and try Fn+Esc, but don't be surprised if X won't come back.

To test if the AGP driver is the culprit, add the following line in the "Driver" section of /etc/X11/xorg.conf:

Option      "NvAgp" "0"

Restart your X server, and try suspend+resume again. If it works now, you should compile a custom kernel to disable the kernel AGP driver.

If suspend doesn't work, look into /var/log/messages, and search for "Stopping tasks". This sometimes fails for some processes, which you then have to kill in the suspend2mem.sh script. Other processes, like Synergy2, can block the unloading of network modules, so they too have to be killed.

Install the kernel source RPM with up2date --get-source kernel, or download it from one of the Fedora mirrors. Go to /usr/src/redhat/SPECS, and generate the patched kernel source with rpmbuild -bp --target=i686 kernel-2.6.spec.

Afterwards, the source is in /usr/src/redhat/BUILD/kernel-2.6.10/linux-2.6.10. Configure it to compile the AGP drivers as modules - the easiest way to do this is to remove all lines starting with "CONFIG_AGP" from .config. Build and install the kernel with make modules bzImage modules_install install.

If you need special drivers or LVM to mount your root filesystem, don't forget to run mkinitrd. You also have to reinstall the NVIDIA driver for the new kernel.

In /etc/X11/xorg.conf, change the NvAgp option to "1", to activate NVIDIA's internal AGP support.

I found no clean way to disable the kernel AGP driver, so I just renamed /lib/modules/2.6.10-prep/kernel/drivers/char/agp/intel_agp.ko to intel_agp.ko.disabled.

When you now start X, and look at /proc/driver/nvidia/agp/status, you should see that the NVIDIA AGP driver is used, and suspend+resume should work.

23:30, 19 Mar 2005 by Carsten Clasohm Permalink | Comments (0)

RSS

Archive

March 2005
S M T W T F S
    2  5 
10  11  12 
13  14  15  16  17  18  19 
20  21  22  23  24  25  26 
27  28  29  30  31     
September 2008
July 2008
June 2007
May 2007
March 2007
January 2007
December 2006
September 2006
June 2006
April 2006
March 2006
February 2006
January 2006
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
January 2005
December 2004
November 2004
October 2004

Blog Categories

Hiking (5)
Desktop Linux (28)
Server Linux (5)
Palm (3)
Photography (5)
Politics (2)
Web Applications (15)

Notifications

Request notifications

Syndication Feed

RSS

Recent Comments

  1. Anonymous Visitor: Thanks
  2. Anonymous Visitor: AT&T U.S.
  3. Anonymous Visitor: All went well under CentOS 5.0 in Croatia (VIP network)
  4. Anonymous Visitor: tmp crypt not necessary
  5. Anonymous Visitor: Great article
  6. Anonymous Visitor: So it's not a Virus...
  7. Anonymous Visitor: Thanks! Helps also on Windows!
  8. Anonymous Visitor: Thank you
  9. Anonymous Visitor: Economic Incentives
  10. Anonymous Visitor: thank you