# swsusp2 + kernel 2.6.9 + nvidia-kernel ?

## hothead

Hi,

I want to get the nvidia driver on sofware suspend2 working. When I suspend from console with the nvidia driver unloaded resuming works. But when I suspend from X with the native nvidia driver loaded the system gets stalled - I can't either reboot with magic 3-Fingers.

There are some threads where people write that the have software suspend2 running with the nvidia driver. 

The hack from the software suspend wiki doesn't works for me: http://swsusp.sourceforge.net/wiki/Nvidia.

Maybe I have the wrong kernel and/or xorg configuration or it doesn't work for the 2.6.9 kernel yet.

If you are one of the lucky people that made it work, please supply me with detailed information about your kernel, xorg and hibernate configuration.

Thanks,

Ruben

----------

## baeksu

I'm just a newbie so I won't even pretend to know much about this subject. But I did manage to get Nvidia to work with suspending.

 I had the same problem: couldn't suspend from X with the Nvidia drivers loaded (well, couldn't resume actually), though without X everything worked well. The problem stems from the Nvidia drivers, of course.

 From google I found this thread:

http://www.nvnews.net/vbulletin/showthread.php?t=39295

 In it, someone posted a patch that fixes the drivers so that they resume properly. I'm using it on the 6111-version, though I didn't follow the instructions exactly.

 First, unpack the driver (with sh NVIDIA-Linux.. -x) you downloaded from http://www.nvidia.com/object/linux_display_ia32_1.0-6111.html.

 Download the patch file from the thread or from http://www.nvnews.net/vbulletin/attachment.php?attachmentid=8489.

 cd into the NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv

 patch the nv.c file with "patch -p0 < /path/to/patch/file

 make install

 modprobe nvidia

 start X

 suspend

 resume

 enjoy

 Note, though. Your nvidia-glx should be same version (6111), i.e. ~x86 is needed. Also, it might be necessary to unmerge the original nvidia-kernel module. And remember to use the same version of gcc that you used to compile your kernel. I use 3.3 version, cause I've had problems compiling some external modules with the 3.4.

 In the /etc/hibernate/hibernate.conf I left both the LeaveXBeforeSuspend and nVidiaHacks commented out. They don't seem to be necessary for suspend to work with this patched driver.

 Not sure how much mileage this solution will give you, or even if this was your original problem. But it has worked for me so far.

----------

## Apexman

There's the easiest way: replace

/usr/portage/media-video/nvidia-kernel/files/1.0.6111/power-suspend-2.6.9-changes.patch

with new one and re-emerge nvidia-kernel...

----------

## hothead

I tried the patch, but it doesn't work for me yet.

Do you have a kernel 2.6.9 with nvidia-kernel and software suspend2 successfully running, or do you use another kernel? Have there any special settings to be made when configuring the kernel -  agpgart, dri? What X-Server do you use? - Special Settings in xorg.conf?

Thanx for the answer.

Ruben

----------

## Apexman

2.6.9-nitro2 with swsusp2

xorg-6.8.1

nvidia-kernel-6111-r2, emerged with patch from nvidia forums, instead one in portage-tree, as mentioned above

in xorg.conf

```

Section "Device"

    Identifier  "Video0"

    Driver      "nvidia"

    Option      "NvAgp" "1" # Use NV-AGP instead AGPGart

#  if it doesn't help, try 

#  Option      "NvAgp" "0" # which disables AGP mode

EndSection

```

My system resumes with very high refresh rates, which are not supported by my monitor, without that NvAgp options...

----------

## hothead

@Apexman

I tried the nitro kernel you have running, but it doesn't work on my maschine (AthlonXP nforce2). Everytime I boot from the nitro kerne it hangs in runlevel 3. 

Can you please post your hibernate settings (hibernate.conf) and your kernel-config. 

Thanx

----------

