mjans n00b


Joined: 26 Nov 2003 Posts: 4
|
Posted: Thu Feb 10, 2005 12:51 pm Post subject: 855gm suspend to ram workaround found |
|
|
Hi, I have a Dell Inspiron 510m with intel extreme 2 graphics card working to suspend to memory.
Suspend to memory normally only works when you use the vesa driver in X.org with a small resolution (1024x768 or so). What I do is starting a second X session with this driver and then suspend to memory. After resume the X session will be stopped and you will be back in you original X (or original console, just were you started the suspending).
Further I use the 855resolution program to use the 1400x1050 resolution and the ondemand scaling driver (always, not only on battery) for cpu frequency scaling.
/usr/sbin/suspend2mem-helper
| Code: | #!/bin/bash
echo mem > /sys/power/state
|
/usr/sbin/suspend2mem
| Code: | #!/bin/bash
export PATH=$PATH:/sbin:/usr/X11R6/bin
/etc/init.d/hald stop
/etc/init.d/hotplug stop
rmmod uhci_hcd
rmmod ohci_hcd
rmmod ehci_hcd
xinit /usr/sbin/suspend2mem-helper -- :1 \
-config /etc/X11/xorg.conf.vesa -ac -br
modprobe uhci_hcd
modprobe ohci_hcd
modprobe ehci_hcd
/etc/init.d/hotplug start
/etc/init.d/hald start
/etc/init.d/ntp-client restart
|
/etc/X11/xorg.conf.vesa
| Code: | Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/share/fonts/misc/"
EndSection
Section "Module"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mouse0"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "LGP"
ModelName "d154"
EndSection
Section "Device"
Identifier "Card0"
Driver "vesa"
VendorName "Intel Corp."
BoardName "82852/855GM Integrated Graphics Device"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 8
SubSection "Display"
Viewport 0 0
Depth 8
Modes "1024x768"
EndSubSection
EndSection
|
/etc/acpi/default.sh
| Code: | #!/bin/sh
# Default acpi script that takes an entry for all actions
set $*
group=${1/\/*/}
action=${1/*\//}
case "$group" in
button)
case "$action" in
power) /sbin/init 0
;;
sleep)
# For when I forgot to plug in my mouse
/etc/init.d/xdm restart
;;
lid)
state="`cat /proc/acpi/button/lid/LID/state | cut -c 13-`"
case $state in
open)
# make sure to start 'xhost local:' in your X session
/usr/X11R6/bin/xset -display :0.0 dpms force on
;;
closed)
/usr/sbin/suspend2mem
;;
esac
;;
*) logger "ACPI action $action is not defined"
;;
esac
;;
ac_adapter)
if [ -f /proc/acpi/ac_adapter/AC/state ]; then
state="`cat /proc/acpi/ac_adapter/AC/state | grep state | cut -c 26-`"
case $state in
online)
hdparm -a 256 -S 0 /dev/hda > /dev/null
logger "A/C adapter plugged in"
;;
off-line)
hdparm -a 8192 -S 24 /dev/hda > /dev/null
logger "A/C adapter plugged out"
;;
esac
fi
;;
processor|battery)
echo 1700000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
;;
*)
logger "ACPI group $group / action $action is not defined"
;;
esac
|
If I forgot something, please ask. Hopefully it will work for you too. If someone can tweak this, or can suspend to memory on a different way, I'd be very glad to hearing that. Tnx in advance.
Greetings, Mark |
|