[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel 2.6.*: vlock breaks sleep button?



On Tue, 22 Feb 2005 02:15:20 +0100
Wolfgang Pfeiffer <roto@gmx.net> wrote:

Hi,
Some time ago I heard of this problem and a possible sollution.
The following test shows parts of the appropriate thread:

## THREAD START ##
> When you trigger sleep with kernel 2.6 or later the kernel will
> switch to a new vt to keep the current vt clean and don't mess
> it with annoying sleep and resume messages. If you had 'vlock -a'
> running exactly this is not possilbe anymore -> the kernel got stuck
> and wait until it is possible again.
> 
> There is a symbol in the kernel sources calles SUSPEND_CONSOLE,
> defined in kernel/power/power.h. If you remove this symbol (there is
> no config option for that so you have to modify the source files
> directly), compile and install this patched kernel, your script worked
> as desired. But be carefull: I just verified my theory and haven't
> checked all side effects of this patch.

Me again... with solution, now.

"vlock -a" prevents console switching and kernel tries to switch to
console MAX_NR_CONSOLES-1, which is 63.  But if we are on the console
63, then kernel does not switch (or something) and there is no
incompatibility. :]

The script below works quite well (but not perfectly):

      suspend)
        case "$3" in
          ram)
            ;;
          disk)
            ;;
        esac
        openvt -swfc 63 -- su - wrobell -c "tput clear; vlock -a" &
## THREAD END ##

 I hope this will help you solving your problem

  Best Regards
    Matthias




Reply to: