zaterdag 22 mei 2010

Easiest fix for sound Sony VAIO VPCEB1S1E

Easiest fix for sound Sony Vaio VPCEB1S1E



In my previous post I allready explained some fixes. But now it's even more easier, just follow these little steps

   1)Download the following zip file on your pc
vaio_soundfix.zip


   2)Go to the folder where you downloaded the file and extract it

   3)This will create a folder called "vaio_soundfix"
Because we will need root privileges we will continue in terminal:
   4)Open up a terminal

   5)Change the current directory to the vaio_soundfix you just created*

   6)type in the following command (caution: capital I) and confirm with enter
sudo ./Install.sh

This will output something like:

username@computername:DirectoryWhereYouExtractedFiles/vaio_soundfix$ sudo ./Install.sh
Now in directory /opt/vaio/vaio_soundfix
update-rc.d: warning: /etc/init.d/soundvaio missing LSB information
update-rc.d: see
Adding system startup for /etc/init.d/soundvaio ...
/etc/rc0.d/K20soundvaio -> ../init.d/soundvaio
/etc/rc1.d/K20soundvaio -> ../init.d/soundvaio
/etc/rc6.d/K20soundvaio -> ../init.d/soundvaio
/etc/rc2.d/S20soundvaio -> ../init.d/soundvaio
/etc/rc3.d/S20soundvaio -> ../init.d/soundvaio
/etc/rc4.d/S20soundvaio -> ../init.d/soundvaio
/etc/rc5.d/S20soundvaio -> ../init.d/soundvaio
All done, press enter to quit…

So the warning is normal.

   7)Reboot & enjoy the bootsound!

   *Some more information on how to go to the right directory. If you have for example downloaded vaio_soundfix.zip to 'Downloads'. You just type the following command in the terminal:
cd ~/Downloads

'~' Must be a 'tilde' for some reason it won't show correctly...
cd is the change directory command and is followed by the directory to which you want to change. ~ is a wildcard that gets replaced by the home directory of the userdirectory. So this command will move your current directory to the Downloads-folder in your own home-folder.

For the people interested: You can also just open the Install.sh script with gedit if you want to see what it does. I've commented it a little bit.

dinsdag 4 mei 2010

Fixing sound issue on Sony vaio VPCEB1S1E

edit:The easiest solution (which is also persistent!) is explained in a newer post which can be found here!!!


This blogpost will explain how to make sound work on a Sony Vaio VPCEB1S1E. The solution is based on bug report 445889. Where Arwin Tugade posted a solution. In this post I'll try to provide a more detailed explanation.

There are 2 solutions: an easy one and a hard one. The easy one is however not persistent. So after each reboot you'll have to redo all the steps to enable your sound. The hard one on the other hand is persistent. I will explain both.

Easy (non persistent) solution



For the easy solution a python script has to be downloaded. This script is called HDA Analyzer and provides a GUI which will help us to enable the intern speaker of our notebook. (HDA Analyzers wiki can be found on:http://www.alsa-project.org/main/index.php/HDA_Analyzer)
First you'll have to download the script. This can be don by starting up a terminal and execute the following command:
wget -O run.py http://www.alsa-project.org/hda-analyzer.py

Next will have to run this script with super user privileges. This can be done by executing the next command in the terminal:
sudo python run.py

You will be prompted to enter your password. After entering your password a GUI will start up. In the GUI click on "Node[0x19] PIN" in the list on the left-side. Then in the right part you'll have to change the value of the dropdownlist next to VREF to HIZ. See picture:

Now the sound of your notebook should work!

When you close the application a popup will ask "HDA-Analyzer: Would you like to revert settings for all HDA codecs?". Answer No.

Hard (persistent) solution



Warning: The following instructions are to be used on Lucid only. If the process isn't performed right, it might break your system. And thus you will need to re-install your computer. I hereby clearly state that I won't take any responsibility for broken systems.

Before trying this you might first check out the solution above because if that won't work, this also won't work. For a persistent solution we wil create a custom kernel. This means we need to recompile the kernel. Therefore we first need to be sure the have some packages. This by entering the 2 following commands:
sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package

and
sudo apt-get build-dep linux


Then we need to download the kernel source, do this by entering the following commands:

sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)

&
apt-get source linux-image-$(uname -r)


Note: The source will be placed in your current working directory. You can use the pwd command to print this directory out. As I myself am new to building kernels I have just put it in my home folder. But there might be a better practice.

Note2:The `uname -r` command makes sure that you download the source of the kernel you are currently using

Go into the directory with the kernel source:
It's name will start with linux and contain the first part of the kernel release number.
For example when the `uname -r` command returns "2.6.32-21-generic". The kernel source will be in a map with a name like `linux-2.6.32`. In that case you want to go into that directory by executing the following command:

cd linux-2.6.32


Now we are going to change the source. Therefore we need to open the file that needs to be changed in a text-editor. You can open it with gedit by executing the following command:

gedit sound/pci/hda/patch_realtek.c


Then find “static struct hda_verb alc269_init_verbs[] = {“. In my file it was around line number 13272 but it may be different because you might have got another version of the file, depending on your current kernel. In this struct definition (thus the code between curly brackets) you must find the line stating:
{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},

and you will have to change this line into:

{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},

Than save and quit the file.

Now that the source is changed we need to recompile the kernel.
This is done by executing the following 2 commands:
fakeroot debian/rules clean


And

AUTOBUILD=1 fakeroot debian/rules binary-debs-FLAVOUR

Where FLAVOUR must be changed to the flavour you wish. If you type `uname -r` in your terminal you will get the release of your kernel and normally this contains the flavour you need. For example:
if `uname -r` results in the following answer:
2.6.32-21-generic

Then your flavour is generic and the second command should have been:
AUTOBUILD=1 fakeroot debian/rules binary-debs-generic

I haven't test this because I had executed
AUTOBUILD=1 fakeroot debian/rules binary-debs

by mistake and this command builds kernels for every possible flavour. You can do this also, but I don't recommend this since building may take a while...

After the building of the kernel you will have 2 deb files. You can install them by executing the command:

sudo dpkg -i name_of_file.deb


I have first installed the header file and then the image, but I don't know if the order is important.

URLs of the webpages that helped me a lot:



The bug report that showed me the solution. (THANK YOU Arwin Tugade)
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/445889

The necessary information on Kernel compiling
https://help.ubuntu.com/community/Kernel/Compile