[ltp] Suspend to Disk garbage screen workaround: for Xfree86 4.4.X or X.org 6.8.0 + ACPI

Konstantin Filtschew linux-thinkpad@linux-thinkpad.org
Mon, 13 Sep 2004 23:07:17 +0200


hi,

I've talked to some people and found out, that there is a missing implementation
in the DRI Modules for suspend with ACPI. APM should work fine without!

I've posted a bugtrack and wrote a script to get it still working, so you are
able to use X.org with DRI and still use Suspend to Disk with ACPI.

You don't need this for Suspend to RAM and for APM. This should work for all
the people, who gets a garbage screen after resume.

It works, but I had also system freezes because of the faked Xsession, which
fixes the garbage screen.


---------------CUT HERE ------------------

#!/bin/sh

#
# IT'S NOT A SOLUTION, BUT ONLY A WORK AROUND FOR
# THE DRI FAULT. FOR USERS WITH A GARBAGE SCREEN
# AFTER RESUME AND ESPECIALLY THOSE WITH ACPI.
# WORKS FOR RADEON AND NVIDIA USERS!!!!
#
# RELEASED UNDER GPL License 2 and later ....


# Software-Suspend 2 script
# or where ever your hibernate script
# or command is.
/usr/local/sbin/hibernate

# Use this, if you don't have 
# Software Suspend 2, but only
# the integretad software-suspend
# from Kernel
# echo -n 4 > /proc/acpi/sleep

# Or this,which depends on your kernel config
# For pmdisk(Suspend to disk called) mode
# echo -n disk > /sys/power/state

# Only on some systems need with garbage
# screen after wake up from suspend, try 
# to run the fake Xsession command without
# suspend stuff as User root.
# Gentoo Users will need this!
export PATH=/usr/X11R6/bin:"${PATH}"  

# Starts a fake Xsession and abort it afterwards
# The dri fault in the radeon driver need this,
# to remove the garbage screen after resume from
# Suspend to Disk especially.
/usr/bin/X11/xinit /bin/false -- :1 &  


exit 0

----------------- CUT HERE --------------------


Suspend to RAM works fine without!

Greetz

Konstantin Filtschew



----------------
Building an operation system without soruce code,
is like buying a  self assemble space shuttle without
instructions.