Saturday, June 05, 2010

Ubuntu lucid lynx 10.04 on the sony vaio core i7 2010 VPCZ11Z9E
switching the intel and nvidia cards

First of all read http://questier.com/2010/04/26/ubuntu-10-4-lucid-lynx-on-sony-vaio-vpcz11x9e/

To get suspend to ram working when using the intel ** card add
ADD_PARAMETERS="--quirk-test --quirk-s3-bios --quirk-s3-mode"

to /etc/pm/config.d/default (which does not exist by default) and install uswsusp.

To make the nvidia card working I used the the trick described above... I then made it work automatically like this:
1) set grub to automatically boot from the 2.6.32 kernel
2) create a script in /usr/local/bin/force_reboot which just calls /sbin/reboot -f
3) add a grub entry which boots the 2.6.31-20 kernel and add it the parameter init=/usr/local/bin/force_reboot
4) create the config file for nvidia and intel as /etc/X11/xorg.conf.{intel,nvidia}
5) add a boot time service (see the script below) which switches the 2 cards config (must change the xorg.conf file and setup ld.so making it able to find mesa/nvidia libglx.so versions)

# goes into /etc/init/vga_card_switch.conf
# setup the proper video-card

description "Detect wich videocard to use and st it up"
author "Vincenzo Di Massa <hawk.it@tiscali.it>"

start on filesystem
#console output
task
script
FOUND=intel
PCIID=$(dmesg | awk '/Boot video device/ {print $4}')
PCIID=${PCIID%:*}
PCIID=${PCIID#*:}
lspci | grep $PCIID | grep -q nVidia && FOUND=nvidia
if [ "$FOUND" = "nvidia" ]; then
ln -sf /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
update-alternatives --set gl_conf /usr/lib/nvidia-current/ld.so.conf
else
ln -sf /etc/X11/xorg.conf.intel /etc/X11/xorg.conf
update-alternatives --set gl_conf /usr/lib/mesa/ld.so.conf
fi
exec ldconfig
end script





** to get intel and nvidia working properly you must install grub, as described above and remove the nomodeset option from the boot parameters

Of course all of the above is hackish.

4 comments:

Aleix said...

Which is the way for having Intel working?
I'm using Ubuntu 10.04 amd64 booting always using Frederick's method. No BIOS flash.

Thanks.

Vincenzo said...

Just install grub :-)

Aleix said...

I've grub2 installed and running prefectlly.

Vincenzo said...

Grub2 causes problems with the graphics framebuffer. Try to install the previus version of grub.