Skip to Content.
Sympa Menu

linux-sony-z1 - Re: [linux-sony-z1] Fn-Esc script (was: my experiences ....Alps touchpad, suspend config)

Subject: Linux users of Sony Z1 series

List archive

Re: [linux-sony-z1] Fn-Esc script (was: my experiences ....Alps touchpad, suspend config)


Chronological Thread 
  • From: Brouard Nicolas <>
  • To: Linux Sony Z1 users <>, Andre Roth <>
  • Subject: Re: [linux-sony-z1] Fn-Esc script (was: my experiences ....Alps touchpad, suspend config)
  • Date: Tue, 23 Nov 2004 20:51:13 +0100

Le dimanche 21 novembre 2004 à 13:24 +0100, Andre Roth a écrit :
> > it's working!! rouuhaa.. :)
> congrats :)
>
> > juste my last problem :p ... presently ... tty is not under framebuffer
> > (1400x1050) and it's horrible to read it! .. how may i do to have
> > 1400x1050 resolution under my console?
>
> no, suspend with framebuffer is a bit hard to do. read
> Documentation/power/video.txt in your kernel tree.
>
> > and ... somebody have a script to suspend and resume ? thanks !
>
> yes, it's a very quick hack, so maybe better solutions exists...
>
> you need to have the sonypid-1.9.1 utility installed.
> then I have a script /etc/init.d/sonysleep.sh which is started
> automatically at boot time. For this you need a link
> lrwxrwxrwx 1 root root 22 Nov 11 21:02 /etc/rc2.d/S99sonysleep ->
> ../init.d/sonysleep.sh
> (ok, the script lacks handling to start and stop parameter)
>
> this script starts the sonypid deamon and pipes the output to another
> script, /usr/local/bin/sleep.sh which greps for the right key combination
> and suspends the laptop.
>
> any improvements are welcome :-)

Sonyxosd of Stuart is the most recent and most customizable script. Yes,
it requires some perl library. I made a Mandrake rpm and updated it in
order to assign Fn_Esc to susptoram which is a nice idea.

But if people like simplifications of code versus lack of confort,
sonypid is even not necessary and you can replace it by dd (not fully
tested!)

sonysleep.sh:
#!/bin/bash
dd if=/dev/sonypi bs=1 cbs=1 conv=unblock | /usr/local/bin/sleepsony.sh

sleepsony.sh
#!/bin/bash

Fn_Esc=$'\013'
while true
do
read i
if [ "$i" = "$Fn_Esc" ]; then
echo "FnEsc pressed"
echo 3 > /proc/acpi/sleep
elif [ $i = ")" ]; then
echo "Fn pressed"
done

I used dd to test if the sonypi resumed well with latest patches from
Setlian Pop. And it works fine on 2.6.9 (and 2.6.10) but on 2.6.8 I got
a null character before the correct character: ^@) instead of ) for
Fn_release.
But sonypid doesn't care of this parasite null character. So, use
sonypid and not dd at least on 2.6.8 with a patched sonypi module.

Nicolas


> salutations
> andré
>

--
Brouard Nicolas
<>




Archive powered by MHonArc 2.6.18.

Top of Page