Subject: Linux users of Sony Z1 series
List archive
- From: Brouard Nicolas <>
- To:
- Subject: Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches
- Date: Wed, 10 Nov 2004 14:01:39 +0100
Thank you for all these informations from Ionut but also from Olaf and
latest from Richard.
It seems to me that we are currently mostly discussing basic Linux
questions and not really which best distro to use with a Sony Z1 even if
our goal, at least mine, is to have distros having solved the Sony
hardware questions and competing with other features.
>From what I read recently, I believe that we have no chance to have S3
working with a 2.6.8 kernel. So the current solution of Mandrake with
its 2.6.8 kernel is out (it is not out if you need only S4 with a
patched kernel given on my sony web page). I am using other proprietary
softwares like Win4lin and I can't be operational until I get the
corresponding patches from the recent kernel that is the reason why I
need a widely used kernel.
So lets take Fedora Core 3 because it has a 2.6.9 kernel (I haven't
tested it). It will differ from vanilla kernel at least because some of
the ACPI patch might be included and
the latest acpi-20040816-2.6.9.diff.gz will not apply. But I am not sure
that any after 2.6.9 ACPI patch is necessary for the Sony and I am
pretty sure that they don't include the video_post and kernel patch
which are too recent I suppose.
But I am pretty sure that we need the video_post because I suspect that
Ionut tested succesfully S4 using swsusp2 instead (but I can be wrong).
And swsusp2 concerns suspend to disk (suspend to RAM has another name I
think):
"Software suspend is the ability to take a snapshot of the state of a
computer's memory and save it to disk, and restore that image later."
Swusp1 also concerns suspend to disk.
Swsusp1 is the default kernel way. You need to add a resume=/dev/hdaN
in your lilo or grub in order to copy your memory to the swap partition
of your disk and your laptop is pwered off and doesn't consume battery.
Swsusp2 is more experimental and you need a resume2=swap:/dev/hda8 in
your lilo in order to resume.
Swsusp2 uses a special command in order to activate the suspension
with an echo >/proc/swsusp/activate
This command is included in a
file /etc/hibernate/scriptlets.d/swsusp2-15
from the special swsusp2 suspend-script package.
Swsusp1 uses the standard S4/ACPI command echo 4 > /proc/acpi/sleep
(Even if your kernel is compiled with swsusp2 you can make S4/ACPI
suspending to disk). In recent kernels, the standard way of suspending
is
echo shutdown >/sys/power/disk; echo disk > /sys/power/state
But both commands are working (or not working).
The standard command S3/ACPI for suspending to RAM is
echo 3 >/proc/acpi/sleep
Then your laptop will not completely halt but the button will blink and
your memory is still alive, thus consuming some battery. If you hold the
button you will resume. If you hold the button for a long time, you will
halt and loose all what was in your memory.
With old laptop is was easier because the suspension was done by the
BIOS not by software.
>From my experience, swsusp2 doesn't work as well as swsusp1 (ACPI/S4)
because evdev and psmouse did not resume correctly and have to be
unloaded before suspending. Some code is missing (see my WEB page and
a discussion between Nigel and Dmitry). Thus the alps, even patched,
doesn't resume and you are back to a ps2 mouse with wrong parameters or
something like that.
Also you have to take the latest Alps patch. I think that alps.patch
from synaptics-0.13.6 is ok. Ok means that you can use
Option "Protocol" "auto-dev"
in your xorg.conf
and this means that you don't need to specify a fixed
Option Device/dev/input/event1 .
It is particularly interesting after resuming if you have introduced
your laptop into a dock station and/or added a psmouse because the event
number attached to the touchpad may have changed and corresponds now to
something else than 1 (in this example).
I don't know why this alps patch is still not filed into a standard
kernel. In fact I know: it is because the tapping doesn't work
completely satisfactorily.
Moving to xorg seems mandatory now. You can get my experimental
xorg.conf on my sony site.
S3 or suspend to RAM is working with a 2.6.9 vanilla kernel by doing
echo 3>/proc/acpi/sleep
if you have include the vga_post kernel patch in your kernel and
vga_post at the correct place. Apparently, on Sony Z1, you won't get
access to the console but on X (no framebuffer). Also usb devices do not
resume correctly if USB is compile into the kernel. If compiled into
module it has been reporting at least once. I haven't tried 2.6.9 .
In addition, if you are interested in suspending to disk, you might be
interested by latest patches (2.6.10 but which are working against 2.6.8
and 2.6.9 tooà concerning sonypi which will resume well (either with
swsusp2 [I guess] and swsusp1.
In summary, currently on 2.6.9 (vanilla or Fedora Core 3 I presume) you
need
- latest alps patch
- latest sonypi patch
- latest vga_post kernel patch
I am not sure that you need latest ACPI patches after 2.6.9.
Your kernel will be able to suspend to disk (with standard swsusp1) and
to ram with best conditions.
But you also need, the following software: vga_post, xorg.conf with
parameters specific to alps (you still have "load synaptics"), and a
script to suspend to disk (for clock and some usb modules).
In order to make other hardware working, you probably need hsfmodem (any
alternative to this proprietary software?) kernel patch. Win4lin kernel
patch might also be interesting if your are using it.
Concerning WIFI I haven't tested ip2200 but there has been some reports
on the list (this is mostly software I think).
That's it.
Please report errors and mistakes.
Nicolas
Le mardi 09 novembre 2004 à 17:03 +0100, Ionut Georgescu a écrit :
> Hello,
>
> just tried it twice so it can't be wrong :-)
>
> Due to a mistake in the suspend script, I just discovered that S3 works
> even without video_post. The console is unusable but frankly I don't
> care. In all the situations where I needed S3 I was working under X and
> X works marvelously. Even the ALPS touchpad [1].
>
> Now only the Fn keys need to be implemented the right way to have this
> computer perfectly supported by linux!
>
> Ingredients:
> * linux-2.6.9
> * acpi-20040816-2.6.9.diff.gz
> * software-suspend-2.1-for-2.6.9.tar.bz2 and
> * alps.patch from synaptics-0.13.6.
>
> So long and happy Z1-linuxing :-)
> Ionut
>
> [1] With swsusp2 the touchpad is much slower after resume, as if it lost
> its resolution and/or acceleration settings. It gets better if you
> restart X, but that's not an option.
--
Brouard Nicolas
<>
- S3 suspend on Z1RMP works even without video_post!, Ionut Georgescu, 11/09/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Brouard Nicolas, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Ionut Georgescu, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Ionut Georgescu, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Brouard Nicolas, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Ionut Georgescu, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, BROUARD Nicolas, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Ionut Georgescu, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Ionut Georgescu, 11/10/2004
- Re: [linux-sony-z1] S4/S3 suspend on Z1RMP and kernel patches, Brouard Nicolas, 11/10/2004
Archive powered by MHonArc 2.6.18.