Thursday, June 5, 2008

Ubuntu Hardy Heron on a Sony Vaio VGN-FZ31E

REACT! 
This aricle probably also applies to:
  • VGN-FZ38M



Yeap I bought it. I though that since it had an NVidia card and it was Centrino based etc it wouldn't have any incompatibilities with Linux. (aaaargh if I only knew...) Anyway.

The laptop came with Vista. I was going to keep them for a week or so just to make sure I don't miss any of the Sony specific programs that was preinstalled. Well I couldn't bare them for more than 24 hours. I made some factory restore CDs and repartitioned the whole drive which now only has Ubuntu installed in it.

What worked out of the box:

The SD/MS reader (104c:803b). It works out of the box with SD cards but the MS PRO slot doesn't work for me and I have found no way to make it work.

Graphics Card (10de:0426): The NVidia GeForce 8400 GT worked perfectly with the closed source drivers that Ubuntu installed. The temperature sensor works OK too.
Nevertheless I recreated the xorg.conf (for no specific reason). Here is the new one.

DVD-Drive (PIONEER DVD-RW DVRKD08): It works OK. I recorded a data DVD with Brasero (for some reason it couldn't verify the burned disk afterwards but it worked perfectly). I also installed Diablo 2 through Wine. The CD protection of Diablo 2 works OK and recognizes the original CD.

CPU (Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz): Both cores are recognized and the temperature sensors work OK. The same goes for frequency scaling.

Wireless and LAN (8086:4229 and 11ab:4351): They both work perfectly right out of the box.

What didn't work out of the box but works with some tricks. Before trying the tricks enable the extra repositories (universe, multiverse etc) from System->Administration->Software sources).

Camera (05ca:183b): HAL loads a wrong module for the camera that in addition to not working, makes the laptop crash when you try to suspend it. So you must remove the misbehaving module from the kernel and prohibit reloading it.

  1. Type the following in a console (you can find the console in Applications->Accessories->Terminal):

    sudo gedit /etc/pm/config.d/unload_modules

    Give your password and then copy and paste the following line at the end of the file:

    SUSPEND_MODULES=uvcvideo


    Save the file and close the text editor.

  2. To download the r5u870 drive you will need svn, so in a console type:

    sudo apt-get install subversion

    (answer yes to any questions you may encounter)

  3. To download the source of the driver, type in the console:

    svn co http://svn.mediati.org/svn/r5u870/trunk r5u870

  4. Now that all files are downloaded go into their directory by typing:

    cd r5u870

  5. Install the build-essential package before trying to compile the drivers by typing:

    sudo apt-get install build-essential

  6. Compile the driver by typing:

    make

  7. and then install the driver by typing:

    sudo make install

  8. Now instead of restarting you may just load the module into the kernel by typing:

    sudo modprobe r5u870

    When you reach this point the camera will only work with some applications like Skype.


    If you open Cheese (a very nice application for capturing video and still pictures from your camera, install it by typing sudo apt-get install cheese) you will notice that it doesn't recognize your camera. That's because the system doesn't recognize it as a Video4Linux camera.

  9. To fix this you will have to download this file and copy it to /usr/share/hal/fdi/information/20thirdparty . If you don't know how to do this just type the following two lines in the console:

    cd /usr/share/hal/fdi/information/20thirdparty
    sudo wget http://students.ceid.upatras.gr/~asimakis/10-r5u870-webcam.fdi

  10. Now either restart you computer or execute this in the console:
    sudo /etc/init.d/hal restart

    Now you should have a perfectly working camera! Oh, you may now delete the sources by typing:

    sudo rm -r ~/r5u870


Sleep and Hibernate
: They don't work initially. The computers go to sleep but when awaken it stays in a black screen. Fixing the camera will fix this problem too. :-)

Sound Card (8086:284b)
: Well, playback worked out of the box but when opening the sound options there were no recording controls and the sound was coming out only through the builtin speakers, plugging in headphones changed nothing. To fix all these problems follow these simple steps:

  1. Optional step. I suggest that you don't use Pulseaudio because I found it a bit buggy. To switch back to ALSA go to System->Preferences->Sound and change everything to ALSA.

  2. Type the following in a console:

    echo "options snd-hda-intel model=vaio" sudo tee -a /etc/modprobe.d/snd-hda-intel

  3. Restart you computer.

  4. Open the sound controls by clicking the sound icon next to the clock.

  5. Select File->Change Device->HDA Intel (Alsa mixer)

  6. Then goto Edit->Preferences and select everything.


  7. Play around with the controls. Don't forget to look at all three tabs (in the third tab you will find the record selection switches: Internal Mic, PCM, Mic Jack)

Bluetooth (044e:3010): It is properly recognized by the system but it will not work. Here is a way to fix it:

  1. In a console type:

    sudo gedit /etc/rc.local

  2. Now append the following line before the exit command (if there is one) near the end of the file:

    hciconfig hci0 reset

  3. Now save the file and close gedit.

This way the bluetooth will work correctly but if you switch it off and again on (using the hardware switch in the front side of the laptop) it will stop working so you also have to do the following:


  1. Right click on an empty space on your panel and select "Add to panel..."

  2. Then create a new custom launcher and in the command textfield copy and paste this:

    gksudo hciconfig hci0 reset
This way when your bluetooth stops working, just click on the new launcher that you made and it will ask for your password and then reset the bluetooth device so that it will start working again


VGA-out:

Open a console and type:

cp /etc/X11/xorg.conf ~/xorg.conf.back

This will back up your xorg.conf file just in case you mess it up.
Now you will have to install the NVIDIA settings manager. To do this just type:

sudo apt-get install nvidia-settings

And then run it by typing:

sudo nvidia-settings

The NVIDIA settings manager will open. (you might need to resize this window because for some strange reason it initializes too small)


Now select X Server Display Configuration and then click on Detect Displays to detect the connected display. Now you will be able to configure the two screens using the options in the Display and the X Screen tabs.

From ere you may also set the resolution to for your laptop's monitor to the correct one (1280x800). If you select a resolution from the Resolution drop-down-list (it's visible in the above picture) the drop-down-list on its right will be enabled and you can then select the desired refresh rate.

Afterwords don't forget to click on Save to X Configuration File.

If you mess up then type this in a console to restore your backup:

sudo cp ~/xorg.conf.back /etc/X11/xorg.conf

To delete your backup type:

rm ~/xorg.conf.back

Tip: To get rid of the annoying NVIDIA splash screen type this a a terminal:

sudo gedit /etc/X11/xorg.conf

Then find all the Device sections and add this line inside them:

Option "NoLogo" "True"


Then save and exit.


What doesn't work and still I have found no solution:

The Fn buttons don't work. In fact the sound controls work, the next track, previous track, play, stop buttons work too. The S1 (customizable button), the AV MODE and the brightness control buttons doesn't work. I am still looking for a solution. The MS PRO slot doesn't work and I still haven't found any solution.

What I haven't fully tried yet:

S-Video out, HDMI output. I'll try them some time... (Shawe in the comments says that HDMI works OK but without any sound.)


References:
http://ubuntuforums.org/showthread.php?t=706530
https://bugs.launchpad.net/ubuntu/+bug/147757
http://wiki.mediati.org/Installation
https://launchpad.net/ubuntu/+source/alsa-driver/+bug/33719

PS: If I fix more problems I will update this post so you might want to check back later. If you find any problems or omissions please leave a comment.

PS2: It seems like someone did a partial translation of this article into Catalan. Here is a link to it. :-)

PS3: Thank you for your comments and the info you provided!

Popular Posts
{"cc_re__cc_re__cc_by_sa_3_0": ["cap-bottom'>\n<div class='cap-left'></div>\n<div class='cap-right'></div>\n</div>\n</div>\n<footer>\n<div class='footer-outer'>\n<div class='footer-cap-top cap-top'>\n<div class='cap-left'></div>\n<div class='cap-right'></div>\n</div>\n<div class='fauxborder-left footer-fauxborder-left'>\n<div class='fauxborder-right footer-fauxborder-right'></div>\n<div class='region-inner footer-inner'>\n<div class='foot section' id='footer-1'><div class='widget HTML' id='HTML1'>\n<div class='widget-content'>\n<center>\n<br /><a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" /></a><br />Except where otherwise noted, <span xmlns:dct=\"http://purl.org/dc/terms/\" href=\"http://purl.org/dc/dcmitype/Text\" property=\"dct:title\" rel=\"dct:type\">INSHAME Blog</span> by <a xmlns:cc=\"http://creativecommons.org/ns#\" href=\"http://www.inshame.com\" property=\"cc:attributionName\" rel=\"cc:attributionURL\">Tritonio</a> is licensed<br />under a <a rel=\"license\" href=\"http://cr", "ommons.org/licenses/by-sa/3.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" /></a><br />Except where otherwise noted, <span xmlns:dct=\"http://purl.org/dc/terms/\" href=\"http://purl.org/dc/dcmitype/Text\" property=\"dct:title\" rel=\"dct:type\">INSHAME Blog</span> by <a xmlns:cc=\"http://creativecommons.org/ns#\" href=\"http://www.inshame.com\" property=\"cc:attributionName\" rel=\"cc:attributionURL\">Tritonio</a> is licensed<br />under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.\n<br />Copyright 2007-2011 Konstantinos Asimakis<br />\n<a href=\" \" onclick=\"alert('this website uses statcounter to track visitor countries, popular pages, referrals, etc. if do not like been tracked just install adblock plus on firefox and then block the http://www.statcounter.com/counter/counter_xhtml.js and google-analytics.com/ga.js scripts. if you do not know how to block it, then you should try subscribing to abp tracking fil"], "copyright__copyright__copyright": ["hread.php?t=706530\nhttps://bugs.launchpad.net/ubuntu/+bug/147757\nhttp://wiki.mediati.org/Installation\nhttps://launchpad.net/ubuntu/+source/alsa-driver/+bug/33719\n\nPS: If I fix more problems I will update this post so you might want to check back later. If you find any problems or omissions please leave a comment.\n\nPS2: It seems like someone did a partial translation of this article into Catalan. Here is a link to it. :-)\n\nPS3: Thank you for your comments and the info you provided!\n\nPopular Posts"]}