LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-14-2006, 01:43 PM   #1
grcore
Member
 
Registered: Nov 2004
Distribution: Mandriva + kernel 2.6.15
Posts: 38

Rep: Reputation: 15
2006 and suspend - needs vbetool to work


I need a bit of direction. I finally have the ACPI issues straightened out on my laptop, and have one more thing I need to do.

I need to use vbetool to store the video state prior to suspend to RAM, and restore it after the wake up. Problem is, I do not know how to implement it so its automatic.

I created a test script that works, so I know the vbetool utility is doing its job, I could just use a little direction on what scripts I need to edit to make it work.

Thanks

g
 
Old 01-16-2006, 04:47 PM   #2
grcore
Member
 
Registered: Nov 2004
Distribution: Mandriva + kernel 2.6.15
Posts: 38

Original Poster
Rep: Reputation: 15
Ok, after looking through the scripts and folders that it should be running, this is what I found.

There is a script /usr/sbin/pmsuspend2 that starts the suspend process.

This calls the script /etc/sysconfig/suspend-scripts/suspend.control

which processes each script in
/etc/sysconfig/suspend-scripts/suspend.d

I created a script called video, using one of the other scipts as a template.
Code:
#!/bin/bash
# -*- Mode: shell-script -*-
# Copyright (C) 2003 by MandrakeSoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>
# Redistribution of this file is permitted under the terms of the GNU 
# Public License (GPL)
#
# resume: 20
#
 
ARG=$1
 
function suspend {
    /usr/bin/chvt 1
    /usr/sbin/vbetool vbestate save > /tmp/video-state
    true;
}
 
function resume {
    /usr/sbin/vbetool vbestate restore < /tmp/video-state
    /usr/bin/chvt 7
}
 
case $ARG in
    suspend)
suspend
;;
    resume)
resume
;;
esac
debugging it, I see that the resume function gets called, but the suspend function never gets run.

Suggestions? Or am I going about this the wrong way?

Thanks

g
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suspend/hybernate on Inspiron 8100 with Mandriva 2006 tolstyi Linux - Laptop and Netbook 1 12-15-2005 12:36 AM
vncserver does not work - 2006 x86_64 ejennings_98 Mandriva 15 11-25-2005 09:40 AM
Getting Software Suspend 2 to work microsoft/linux Linux - Laptop and Netbook 33 08-30-2005 11:20 AM
Software suspend won't work . iZvi Linux - Software 2 12-05-2004 05:32 AM
SuSE 9.1 suspend-to-disk: resume doesn't work mabuse Linux - General 0 10-25-2004 12:40 PM


All times are GMT -5. The time now is 05:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration