← Back to team overview

sony-vaio-z-series team mailing list archive

Re: Adam's kernel 2.6.36-vaioz, intel and nvidia card

 

Hi Alban/list,

	In case you missed it, I created an upstart script at:

http://www.voip-x.co.uk/files/adam/upstart-vaioz-gfx.tar.bz2

	This does pretty much the sort of thing that your modified script does, 
though it specifically saves and restores either the standard or NVidia gl 
related files ( that it needs to. ) It also tried to determine which files are 
currently on the system so if, for example, you update using apt-get or 
whatever whilst using the NVidia card, the new system files will get saved as 
Intel ones and restored next time you boot in stamina mode. You still need to 
boot an old kernel every time you want to use the NVidia card though ( or hack 
the BIOS. )

	The other advantage is that you can add "and started vaioz-gfx-config" to 
the startup dependency list for the display manager ( /etc/init/[gk]dm.conf ) 
which prevents the need to restart the display manager.

Adam.


On Tuesday 02 November 2010 17:14:47 Alban wrote:
> Dear all,
> 
> I totally agree to the Jan point of view (see previous post Re: [Sony-
> vaio-z-series] Sony Vaio Z and VirtualBox)
> I also found as a reader of the mailist precious and valuable
> information to get my own vaio VPC-Z12L9 working with the distribution
> Ubuntu 10.04.
> 
> And since I found a way to work Intel card and nvidia card with glx
> together and as I never found it before in the net (but may be I did not
> search well...), I take the time to explain how. It may be help somebody
> else.
> 
> First thanks you for Adam and all of you !
> The Adam's kernel 2.6.36.0 is working for my laptop.
> 
> I have kept  this option linux16 and initrd16 (instead of linux and
> initrd) in the file /etc/grub.d/10_linux and
> GRUB_CMDLINE_LINUX_DEFAULT="i8042.reset i8042.nomux i8042.nopnp
> i8042.noloop acpi_osi=\"!Windows 2006\" acpi_backlight=vendor" in the
> grub option (/etc/default/grub and update-grub)
> I do not know if it is needed, but I had sometimes no keyboard working
> after the boot without these modifications, even with the new kernel
> 2.6.36-vaioz (it is strange since I read this problem was fixed ?)
> Now,it seems to work correctly everytime (but I have not so much
> retrospect to be sure of that, since I made the modification since a
> very few time,...)
> 
> As soon as I install the Adam's kernel 2.6.36.0, the Intel card is now
> working.
> But, when I install the nvidia driver, problems are rising... and the
> intel card could not find glx any more...
> After some tests, I even can not install the current nvidia driver :
> dpkg: error processing nvidia-current (--configure): subprocess
> installed post-installation script returned error exit status 10
> 
> It seems there are two problems:
> 
> 1. the problem is that the nvidia driver modify (I don't know where the
> paths of the ModulePath implicitely)
> 
> extract of \var\log\Xorg.0.log:
> "(==) ModulePath set to "/usr/lib/xorg/extra-
> modules,/usr/lib/xorg/modules" "
> As a consequence, the intel driver try to use glx library of nvidia in
> the stamina mode.
> 
> 2. it seems that only the more recent nvidia driver is working with the
> kernel 2.6.36. In fact, this is the only one I was able to install after
> installing the Adam's kernel (see http://forum.ubuntu-
> fr.org/viewtopic.php?id=425047).
> 
> My solution to get both working is as follows:
> 
> - install the Adam's 2.6.36-vaioz kernel (and perharps the linux-source
> https://launchpad.net/ubuntu/natty/amd64/linux-source-2.6.36/2.6.36-1.7
> 
> : I try it to see if it solved the problem of installing the current
> 
> driver nvidia available directly in Ubuntu 10.04, so I don't known if it
> is really required to install the nvidia 256.53 driver ...)
> - Remove the package nvidia-current, nvidia-setting
> - Reinstall the package xserver-xorg-video-intel (I do not know if it is
> really needed)
> - Install the nvidia 256.53 driver:
> http://dl.dropbox.com/u/737114/vpcs11e7e/nvidia-
> current_256.53-0ubuntu3_amd64.deb
> (see http://forum.ubuntu-fr.org/viewtopic.php?id=425047)
> NB: problem of dependency occurs when I try to install nvidia-setting
> 256.53 , but I install the current one of the distribution Ubuntu 10.04,
> and it seems ok.
> 
> - Then, get the following command:
> 
> sudo mv /usr/lib/nvidia-current/xorg /usr/lib/nvidia-current/xorg_speed
> sudo mkdir /usr/lib/nvidia-current/xorg_stamina
> sudo rm -rf xorg
> 
> Then I modify the rc.local file provided by Adam:
> 
> BLUETOOTH=0
> WWAN=0
> 
> [ "$(uname -r)" = "2.6.28.10-vaioz" ] && reboot
> 
> [ -x /etc/init.d/kdm ] && DM="service kdm start" || DM="service gdm
> start"
> 
> if [ "$(uname -r)" = "2.6.35-rc6-vaioz" -o "$(uname -r)" =
> "2.6.35-vaioz" -o "$(uname -r)" = "2.6.36-rc3-vaioz" -o "$(uname -r)" =
> "2.6.36-0-vaioz" ]
> then
>     if [ "$(cat /sys/devices/platform/sony-laptop/speed_stamina)" =
> "stamina" ]
>     then
>             rm -rf /usr/lib/nvidia-current/xorg
>              ln -sf /usr/lib/nvidia-current/xorg_stamina /usr/lib
> /nvidia-current/xorg
>         if [ -f /etc/X11/xorg.conf ]
>         then
>             if grep "\<nvidia\>" /etc/X11/xorg.conf 2>/dev/null
> 
> >/dev/null
> 
>             then
>                  [ ! -f /etc/X11/xorg.conf.nvidia ] && mv
> /etc/X11/xorg.conf /etc/X11/xorg.conf.nvidia || rm /etc/X11/xorg.conf
>             fi
>             eval $DM restart
>         fi
>         sleep 3
>         echo 52 >/proc/acpi/video/GFX0/LCD/brightness
>     else # speed
>              rm -rf /usr/lib/nvidia-current/xorg
>             ln -sf /usr/lib/nvidia-current/xorg_speed /usr/lib/nvidia-
> current/xorg
>         [ ! -f "/etc/X11/xorg.conf" -a -f "/etc/X11/xorg.conf.nvidia" ]
> && cp /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf && eval $DM restart
>     fi
> fi
> 
> for i in /sys/class/rfkill/*
> do
>     grep bluetooth $i/name 2>/dev/null >/dev/null && echo $BLUETOOTH
> 
> >$i/state
> 
>     grep wwan $i/name 2>/dev/null >/dev/null && echo $WWAN >$i/state
> done
> 
> So I add the following lines :
> for stamina mode
>             rm -rf /usr/lib/nvidia-current/xorg
>             ln -sf /usr/lib/nvidia-current/xorg_stamina /usr/lib/nvidia-
> current/xorg
> for speed mode
>             rm -rf /usr/lib/nvidia-current/xorg
>             ln -sf /usr/lib/nvidia-current/xorg_speed /usr/lib/nvidia-
> current/xorg
> 
> As a consequence:
> - when booting in stamina mode, /usr/lib/nvidia-current/xorg remains
> empty and the system use  the Intel glx library located in
> /usr/lib/xorg/modules (since ModulePath set to "/usr/lib/xorg/extra-
> modules,/usr/lib/xorg/modules")
> - when booting in speed mode, /usr/lib/nvidia-current/xorg is the right
> one for nvidia
> 
> Finally, stamina mode and speed mode (unfortunately always by booting
> first with the old kernel...) are working.
> One problem is remaining: when I boot from the intel to the nvidia card,
> I need to restart the X server (Alt+Imp Sys+k) to have the right
> resolution.
> 
> Here is my own contribution... The solution is not very clean... but it
> seems to work. Perhaps someone has a clever solution: if so, let me know
> !
> 
> Warning and question: "Suspend" gives me a black screen when I
> reactivate it, whatever the mode (stamina or speed). Is it normal ?
> Another question: how to make the keyboard backlight working ?
> 
> Alban



References