sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #02414
Re: problems with adam's script & ubuntu 11.10
2011/11/15 Heikki Wilenius <heikki.wilenius@xxxxxx>:
> Hi, I upgraded my Ubuntu 11.04 installation to 11.10 (Vaio
> VPC-Z13M9E/B).
<snip>
> Has somebody tweaked Adam's script successfully to make it work with
> 11.10? Any other ideas what I'm doing wrong?
Hi Heikki,
Since you are using Ubuntu, you could just use the existing (and I
guess preferred) alternatives system, like I have done in my attached
/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.
set_alternatives_to_intel()
{
echo "Intel card active."
# For Ubuntu 11.04
# update-alternatives --set gl_conf /usr/lib/mesa/ld.so.conf
# For Ubuntu 11.10
update-alternatives --set x86_64-linux-gnu_gl_conf
/usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
ldconfig
return 0
}
set_alternatives_to_nvidia()
{
echo "NVidia card active."
# For Ubuntu 11.04
# update-alternatives --set gl_conf /usr/lib/nvidia-current/ld.so.conf
# For Ubuntu 11.10
update-alternatives --set x86_64-linux-gnu_gl_conf
/usr/lib/nvidia-current-updates/ld.so.conf
ldconfig
return 0
}
modprobe sony-laptop 2>/dev/null
if [ -e /sys/devices/platform/sony-laptop/speed_stamina ]
then
[ "$(cat /sys/devices/platform/sony-laptop/speed_stamina)" =
"stamina" ] && set_alternatives_to_intel || set_alternatives_to_nvidia
fi
exit 0
Attachment:
vaioz-gfx-config
Description: Binary data
Follow ups
References