21 March 2008

ATI & Nvidia: Resume, Good News, Bad News

If you're using ATI or Nvidia's binary drivers on a laptop, you've probably noticed that resuming from suspend & hibernate doesn't work so well. The fix is pretty simple, but definitely not intuitive.

  1. Hit alt+f2 (or if you use KDE whatever their runbox thing is...or use a terminal)
  2. Type in gksu gedit /etc/default/acpi-support (replace gksu gedit with kdesu kate if you use KDE)
  3. Scroll to Line 17, which says MODULES="" and put fglrx (if you use ATI) or nvidia (if you use Nvidia) in the quotes
  4. Save and exit

This will make the computer automatically unload your ATI or Nvidia drivers when you hibernate/suspend and reload them when you resume. If for some reason it still doesn't work perfectly (like the 3D is gone when you come back), try turning off Compiz before you suspend or hibernate. I've seen that mess with things too.

In the realm of good news, ATI has agreed to release open source drivers for Linux, just like Intel did years ago. Yay! In the realm of bad news, Nvidia still has not. We want to put pressure on Nvidia to rise to ATI's and Intel's challenge, do we not? Please take a moment to sign the Open Letter to Nvidia asking for fully free and open source 3D-accelerated Nvidia graphics drivers for Linux (8,264 signatures at time of posting) and Digg It. In case you aren't aware, there are 2D open source (barely...the code's fairly well obfuscated) Nvidia drivers on Linux, but that's not good enough for games or for Compiz. Nouveau has been working on creating these 3D open source Nvidia drivers for a while now by reverse engineering and doing lots of hardware probing. For now, they've got better 2D than Nvidia's own open source driver (haha) and some experimental 3D support on the cards the developers have in their own computer and therefore get to mess with the most.

Best Digg comment on the Open Letter:

Dear Nvidia,
We will help you fix your memory bugs.
Signed, Open Source.
The "black window bug" in Compiz is caused by a memory leak in the Nvidia drivers, so now a bunch of Nvidia cards are blacklisted in Compiz because the cards don't have enough memory built-in to cover the amount of memory the driver leaks.


9 comments:

gamemank said...

That suspend/resume fix sounds like something that should be done by the fglrx/nvidia packages in Ubuntu. Is there an LP bug on this?

Mackenzie said...

Uh...good question. As I was typing that I was thinking "jeez that should just be in the file by default."

Victor said...

Much better (for nvidia and fglrx at least) is to prevent acpi-support (and HAL+pm-utils in hardy) from running the quirks it usually does. nvidia and fglrx (and intel, in hardy) know how to suspend and resume their hardware, the video quirks Ubuntu applies by default just mess things up for them.

Hardy should not have this issue at all, thanks to bug# 198808.

baffled badger said...

I have been searching for a solution to this problem for ages.

Thank you very much.

tapoxi said...

Sweet! I guess it just gives me another reason to hate the fglrx driver though...

Keith Rennie said...

THANKS!!! Worked like a charm. I've spent days searching for this solution. Need to get better links to the main forums.

How do I suppress the candy stripe screen on resume, between hitting the button and the time when the reload login screen appears? Any ideas?
:D

Richard said...

Thanks. This was part of my solution.

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

Also needed: Run EnvyNG after every kernel upgrade *until* (hopefully) fglxr (or an equivalent) becomes part of the ubuntu family. Similar issue for nVidia.

Avoid Kernels 2.6.24-16, -17, and -18. Good: -12 and -19.

One minor annoyance remains in ACPI. LOCK_SCREEN=false in /etc/default/acpi-support (or just commenting out the original LOCK_SCREEN=true) doesn't seem to work. It still locks the screen no matter what the LOCK_SCREEN condition is.

-Richard

Bob said...

I'm having a similar problem in Hardy on a Thinkpad T42p. It has ATI Mobility FireGL T@/ AGP 4X 128MB video card... Is this fix good for that as well? I have been turning off the compiz-Fusion before I hibernate, but it is losing all my settings (cube, transparency, etc.) when I resume and turn the compiz back on. I guess I could live without the eye candy, but if I could fix it, great.

Mackenzie said...

It might keep your graphics acceleration from dying, but it probably won't fix Compiz forgetting its settings, which is a weird weird bug in itself. If a bug report hasn't been filed on Compiz forgetting settings, you should probably do that.