← Back to team overview

sony-vaio-z-series team mailing list archive

Re: Getting Speed mode working on a VPCZ13M9E

 

At Mon, 31 Jan 2011 19:06:09 +0000,
Tim Fountain wrote:
> I recently bought a VPCZ13M9E and have been trying to get Ubuntu 10.10
> setup. With the help of the custom kernels (thanks for all your efforts!) I
> now have a working installation in Stamina mode, but I'm having trouble
> getting Speed mode working.
> 
> In Stamina mode everything seems fine. If I then install the Nvidia drivers
> (via. jockey), switch to Speed mode and reboot, the machine doesn't get past
> the console screen. If I login from the command line and then run 'startx' I
> get the "no screens found" error. If I reboot back in to Stamina mode I also
> have some issues - windows lacking title bars etc. which I think means
> Compiz isn't working, so presumably it's trying to use the Nvidia drivers
> there too (uninstalling them fixes the problem).
> 
> I'm running the custom kernel (2.6.37-6-vaioz) with the upstart script
> installed. I've tried enabling the ubuntu-x-updates PPA to get more recent
> Nvidia drivers. Some of the guides talk about booting into older kernels
> once just after the Nvidia drivers are installed, but the kernel numbers
> don't match my options so I'm a little unsure what I'd need to do there (for
> reference by kernel choices on boot are: 2.6.37-6-vaioz, 2.6.35-25-generic,
> 2.6.35-22-generic).
> 
> I'd appreciate it if someone could point me in the right direction!

I have a Z12 with 10.10 and a patched bios for static switching,
though I think this isn't required anymore. 

To get the switching working well, install Adam's upstart script but
change it to the attached file. Ubuntu/Debian handle the GL library
switching through their alternatives system.

Booting into speed works for me, I have to boot then reboot to get
stamina to work. Though I think that's fixable with just an X restart.

Simon

replaces /usr/local/sbin/vaioz_gfx_config

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.


modprobe sony-laptop 2>/dev/null

set_alternatives_to_intel()
{
    echo "Intel card active."
    update-alternatives --set gl_conf /usr/lib/mesa/ld.so.conf
    ldconfig
    if [ -f /etc/X11/xorg.conf ]
    then
	grep "\<nvidia\>" /etc/X11/xorg.conf 2>/dev/null >/dev/null  && mv -f /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia 2>/dev/null
    fi
    return 0
}

set_alternatives_to_nvidia()
{
    echo "NVidia card active."
    update-alternatives --set gl_conf /usr/lib/nvidia-current/ld.so.conf
    ldconfig
    [ ! -f "/etc/X11/xorg.conf" ] && [ -f "/etc/X11/xorg.conf.nvidia" ] && echo "Copy nvidia xorg.conf" && cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
    return 0
}

if uname -r | grep -e "-vaioz$" >/dev/null
then
    [ "$(cat /sys/devices/platform/sony-laptop/speed_stamina)" = "stamina" ] && set_alternatives_to_intel || set_alternatives_to_nvidia
fi

exit 0
 

References