Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[suspend2] help wanted!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Gremo
Guru
Guru


Joined: 27 Feb 2006
Posts: 450

PostPosted: Thu Sep 28, 2006 3:49 pm    Post subject: [suspend2] help wanted! Reply with quote

Hi,
i'm trying to get suspend2 works on my system. I have problems with 855resolution with vesafb-tng.
This is /etc/init.d/855resolution

Code:

#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/855resolution/files/0.4/init,v 1.1 2005/06/19 22:07:03 fafhrd Exp $

depend() {
        before xdm
}

checkconfig() {
        if [ -z "${replace[0]}" ] || [ -z "${with[0]}" ]
        then
                eerror "You need to set at least one replace/with pair in /etc/conf.d/855resolution"
                return 1
        fi
}

start() {
        checkconfig || return 1

        ebegin "Running 855resolution to replace ${#replace[@]} mode(s)"
        i=0; return=0; retval=0
        for target in "${replace[@]}"
        do
                /usr/sbin/855resolution $target ${with[$i]} > /dev/null
                retval=$?
                if [ "$retval"!=0 ]; then return=$retval; fi
                i=$(($i+1))
        done
        modprobe vesafb-tng # <-------------- LOOK HERE!
        eend $return
}


Please look at the last lines. The script patches the video bios and then (as soon as possible) modprobe vesafb-tng in order to get console working at 1280x800 pixels.
The problem is, when i try to resume from suspend, the computer freezes.
If i delete the line "modprobe vesafb-tng" from the script all goes ok

that is, the problem is with vesafb-tng module. I think suspend2 (on resume) restart 855resolution, and modprobe (twice) vesafb-tng.
I want to:
1) on suspend, remove vesafb-tng module
2) on resume, restart 855resolution

this must works. This is my /etc/hibernate/suspend2.conf
Code:

UseSuspend2 yes
Reboot no
EnableEscape yes
DefaultConsoleLevel 1
Encryptor none
Runi855resolution 1 # <---- THIS SHOULD RESTART THE SERVICE
UnloadModules vesafb-tng <---- THIS SHOULD UNLOAD VESAFB-TNG
Include common.conf


I think the module isn't unloaded and the system freezes. In fact, if i try:
Code:

localhost gremo # rmmod vesafb-tng
ERROR: Module vesafb_tng is in use


Probably so also "UnloadModules vesafb-tng" will fails.
How to force unload this module?
Back to top
View user's profile Send private message
mens
Guru
Guru


Joined: 27 Aug 2003
Posts: 392
Location: Belgium

PostPosted: Fri Sep 29, 2006 10:07 am    Post subject: Reply with quote

if the module is in use, you can force it to kill the programs that are using it by adding the following to your /etc/hibernate/suspend2.conf (or even to common.conf):
Code:
IncompatibleDevices /dev/fb0
and then run hibernate with the -k option.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum