← Back to team overview

sony-vaio-z-series team mailing list archive

Re: switch-x-to.conf / sony-laptop problem with 2.6.31-15 kernel

 

Hello Nifty,

Thank you for your reply to the switch-x-to.conf upstart-job,

Am Montag, den 09.11.2009, 10:07 +0300 schrieb Nifty:
> Just updated kernel in Ubuntu 9.10 to 2.6.31-15 (from 2.6.31-14) with
> "Update Manager".
> After this update - script /etc/init/switch-x-to.conf failed, due to
> delays in initialization of "speed_stamina" device
> (/sys/devices/platform/sony-laptop/speed_stamina).
> This problem also applies to the old (2.6.31-14) kernel, but it appears
> not so often.

I never had such problems. There is imho nothing to be 'initialized'
there. It must just be loaded and when that is done with
options sony-laptop speed_stamina=3
it wil load the value from acpi in
/sys/devices/platform/sony-laptop/speed_stamina

> 
> So I make small changes to the script: 
> ----------------------------------------------------------------
> --- switch-x-to.conf	2009-11-09 09:35:38.519835074 +0300
> +++ switch-x-to.conf	2009-11-09 09:38:39.039874142 +0300
> @@ -17,6 +17,9 @@
>      speed='false'; gc='intel';
>      mod='sony-laptop'; moddir="/lib/modules/`uname -r`";
>      modfilename="$(modinfo $mod|grep ^filename:|awk '{print $NF}')";
> +    while ! grep -qs -e speed -e
> stamina /sys/devices/platform/sony-laptop/speed_stamina; do
> +      sleep 1
> +    done
>      grep -qs speed /sys/devices/platform/sony-laptop/speed_stamina && 
>      ! lspci|grep -qs "VGA compatible controller: Intel" &&
> speed='true';
>      $speed && gc='nvidia';
> ----------------------------------------------------------------

Since 1 second is an eternity while booting and the gdm does not wait
for switch-x-to until it is ready, maybe changing the sleeptime to ".1"
whould be better.
or even better, remove the line:

grep -qs speed /sys/devices/platform/sony-laptop/speed_stamina &&

completely from the script, it is not really needed to boot and switch
to the right libs.

> Now it works.

hard for me to understand!

how did you find out that it was the kernel-module (which I can not yet
really believe)?
could you please send me the trace-logs from
etc/init/switch-x-to intel
and
etc/init/switch-x-to nvidia
from then when you encountered the 'delay in initialization'

to create those trace-logs, you have to attach 'debug' to this line:

    /etc/X11/switch-x-to $gc;

to make it look this way

    /etc/X11/switch-x-to $gc debug;

You will find the traces in
/var/log/sony-laptop-zseries/
(don't forget to switch it of later to not fill your harddisk with
unneeded traces)

What BIOS do you use?
what Z-Series do you have?

regards,

Raphael




Follow ups

References