Adventures of a Xipe Totec

Assorted bollocks relating to my life, free software, and ideas the world over.

Archive for the ‘Dell’ Category

Getting Suspend and Hibernate to work with compiz fusion and the NVIDIA binary driver on a Dell E1505N

Posted by xipietotec on July 15, 2007

I spent several hours hacking this today, and I finally have a surefire (if somewhat hacky) way of getting suspend and resume to work on my Inspiron E1505N.

Because of a bug in the NVIDIA Binary (which supposedly is going to be fixed this september), compiz-fusion crashes pretty much everything on resume.

First: So the first thing you’ll need to do is update your /etx/X11/xorg.conf and add an


“Option “NvAGP” “1″
line in the “Section “Device”"

Section "Device" ... Option "NvAGP" "1" EndSection...


Second:
Disable warm-booting and vbe post/save options on resume by editing your /etc/default/acpi-support:

... # Should we attempt to warm-boot the video hardware on resume?POST_VIDEO=false # Should we save and restore state using VESA BIOS Extensions?SAVE_VBE_STATE=false ...


Third:
Create a file called 25-compiz-kill.sh in your /etc/acpi/resume.d/ After creating it, type in terminal: sudo chmod 711 /etc/acpi/resume.d/25-compiz-kill.sh

#!/bin/bash#/etc/acpi/resume.d/25-compiz-kill.shkillalll compiz.real

Fourth: Create a file in /etc/acpi/resume.d called 99-compiz-resume.sh
            Then type: sudo chmod 711 99-compiz-resume.sh

Edit this file to have the following

#!/bin/bash#/etc/acpi/resume.d/99-compiz-resume.sh export DISPLAY=:0.0sudo -H -b -u your_user_id compiz --replace &

And lastly, go into compiz-config settings, under General Options, and Display settings, and uncheck v-sync to blank.

And that’s it =) Now it’s important to note that this only works for 1 user. Which is generally fine for a laptop, I wasn’t able to get it to work with the $USER wildcard. If anyone has improvements to this, please let me know. I’m not very good at scripting so there’s obviously a better solution, but this is a very very simple and direct way to do it, so if your more advanced scripts fail, this is pretty much guaranteed to work.

Edit: Thanks to Andy in comments.

Posted in Dell, Linux, Ubuntu, shell | 1 Comment »