[linux-l] probleme beim resume auf ibm think pad

Frank Reker frank at reker.net
Di Nov 14 09:39:42 CET 2006


problem (fast) geloest - danke fuer die hilfe.

Am Mon 13. Nov 2006 10:04 +0000 schrieb Lutz Willek:

>selbst hinbiegen, ok? Der Fehler liegt in der nichtinitialisierung der 
>Graphikkarte, nachdem der Rechner aus dem Suspend raus kommt.

[an-die-stirn-schlag] - ja, da haett ich wirklich selbst drauf kommen
koennen - manchmal sieht man vor lauter baeume den wald nicht.


>kernel /vmlinuz root=/dev/hda1 ro acpi_sleep=s3_bios ....

tat's nicht.


>SAVE_VBE_STATE in den oben genannten Dateien und kommentiere es aus. 

entsprechende oder aehnliche eintraege hab ich in keinen dateien 
gefunden, aber immerhin hat mich der tip zum tool vbetool gebracht.


>#/bin/sh
>#eventuell: chvt 1
>cat /proc/bus/pci/00/02.0 > /tmp/videobios
>echo -n "mem" > /sys/power/state
>cat /tmp/videobios > /proc/bus/pci/00/02.0
>#eventuell: chvt 7
>#EOF

das alleine hat noch nicht gereicht. aber in kombination mit
vbetool vbestate save|restore
funktionierts. auch mit fb device, aber nicht unter x, von daher
sind konsolen-switches notwendig. das komplette script sieht jetzt
so aus:

----- snip -----

#!/bin/bash
# -*- Mode: shell-script -*-
# Copyright (C) 2005 by Frank Reker <frank at reker.net>
# Redistribution of this file is permitted under the terms of the GNU 
# Public License (GPL)
#
# resume: 19
# suspend: 19
#

. /etc/sysconfig/suspend

ARG=$1

test "$VGA_RESTORE" = yes || exit 0
test "$VIDEO_CARD" || exit 0

function suspend 
{
	# must not be X
	chvt 1
	# create dir if not exist
	mkdir -p /var/suspend
	# save videobios
	cat /proc/bus/pci/"$VIDEO_CARD" > /var/suspend/videobios
	# save vbestate
	vbetool vbestate save > /var/suspend/vbestate
	return 0
}

function resume
{
	# restore videobios
	cat /var/suspend/videobios > /proc/bus/pci/"$VIDEO_CARD"
	# restore vbestate
	vbetool vbestate restore < /var/suspend/vbestate
	# refresh screen
	chvt 2
	usleep 100000
	chvt 1
	return 0
}

case $ARG in
	suspend)
		suspend
		;;
	resume)
		resume
		;;
esac

exit 0



# vim:ts=4:

----- snap -----


jetzt hab ich bloss noch ein problem. durch die chvt's lande ich nach
dem resume immer auf tty1. ich wuerd aber gerne dort landen, von wo
ich gestartet bin. dazu muesste ich am anfang den aktuellen foreground-vt
herausfinden und speichern. weiss jemand wie man den herausbekommt?



-- 
Don't worry be happy ...
Ciao Frank
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : nicht verfügbar
Dateityp    : application/pgp-signature
Dateigröße  : 189 bytes
Beschreibung: nicht verfügbar
URL         : <https://mlists.in-berlin.de/pipermail/linux-l-mlists.in-berlin.de/attachments/20061114/7db12a0d/attachment.sig>


Mehr Informationen über die Mailingliste linux-l