Sunday, July 25, 2010

In Ubuntu 9.04 Beta on a Dell Vostro 1320 I get no sound recorded.



The audio functionality of any computer system belongs to the very basic functions of a PC and OS. No sound, poor sound, limited functionality - No use for such a system!

The main idea behind upgrading ALSA with attached script is to make Linux available to a slightly wider community.

The script bridges the huge delay (up to a year) of Alsa updates supplied through the official channels.
By running the upgrade you'll have a much bigger chance to get your soundcard working or problems resolved.

The script installs the latest official stable ALSA release. (optional the even more up 2 date driver snapshot will be installed)

Upgraded packages

Alsa 1.0.23 (stabil)

See: Changelog Alsa 1.0.23


Supported kernels: 2.6.24/26/27/28/29/30/31/32 family (including rt-kernel & NON-Ubuntu ZEN-rt-kernel)

Note: The restore currently does not not work on custom kernels!


The script is not in line with Debian/Ubuntu rules for package handling. It just overwrites existing files.
You won't see any changes on the ALSA package-ids within Synaptic!

The script recognizes severe problems during the installation and will stop automatically. It shouldn't mess up your setup.
If the script stops with an error-message nothing should have been touched!

In the worst case scenario the -r restore option restores your old system status as good as possible. It'll reinstall kernel, kernel-headers and Alsa related packages.

Ubuntu upgrades/updates might overwrite your Alsa installation once in a while (e.g. Major upgrades, kernel-upgrades or ALSA-package upgrades).
You just need to rerun the upgrade-script using the -i option in this case (if you still have the compiled sources on the disk).

Disclaimer: I won't take any responsibility for mess-ups caused by using the script! -- Of course - I do my best to avoid these and support you as much as I can.

As usual - Make a backup first! - A restore will just take 5 minutes with rsync. That might save you hours of troubleshooting and frustration .

Please consider that I rely on your support to improve the script and really appreciate your involvement.

Short Alsa-Upgrade script install instructions:

1. download the script and save it somewhere
2. cd
3. tar xvf AlsaUpgrade-1.0.23-2.tar
4. sudo ./ -d
5. sudo ./ -c
6. sudo ./ -i
7. sudo shutdown -r 0

Logging: I recommend to log all the upgrade steps, e.g.

script -a -c "./ -d" /tmp/Alsa_1.0.23-2_upgrade_download.log

You'll find a log file /tmp/Alsa_1.0.23-2_upgrade_download.log as soon as the script is finished.
You need to run this procedure for every single step. Choose whatever logfile names.

Test and Troubleshooting

After reboot you can type:

cat /proc/asound/version

This will let you know if you're running the new version.

The easiest and most reliable test to verify if Alsa is working is "aplay" - the Alsa player application. If aplay won't work -- nothing else will work.

Make sure that all your channels are unmuted and volume is up!

Type in a terminal:
$ aplay -l
(This won't work on e.g. webcams with a microphone only. Here you need to do a $cat /proc/asound/cards to see if it is there"

If you see your soundcards, you're almost there.

To test your first (default-index 0 X=0) soundcard, type e.g.:
$ aplay -Dplughw:X,0 -fcd //.wav
or e.g.
$ speaker-test -Dplughw:X,0 -c2
replace the X with the index of your soundcard index , which you find out by typing "aplay -l" - look for "card X"

Multichannel you can test the following way:
1. Type $aplay -L to find out about your pcm device . e.g "surround51"
2. Type $speaker-test -D surround51 -c6
Note: If the channel mapping should be wrong you need to adjust it in .asoundrc

Before reporting "NO SOUND" problems - check if your alsamixer-channels are activated and unmuted (gnome-mixer/volume-control/preferences)!!
Very often there are headphone-jack, Toslink, SPDIF or microphone issues reported. Usually this has something to do with wrong alsamixer settings or more seldom with a wrong model-id assigned to your sound-driver in /etc/modprobe.d/alsa-base.conf .
If you're lacking certain controls in alsamixer or your driver is not even being loaded, you should check-out your model-id in attached HD-Audio-Models.txt.
I strongly recommend to try similar model-id's matching your codec to checkout if your faulty function gets working.
I'd guess 80% of the reported problems (group: other than alsamixer issues) over here are related to the model setting in alsa-base.

1. sudo gedit /etc/modprobe.d/alsa-base.conf

2. Look for:
options snd-hda-intel index=-2
3. Lookup your model in HD-Audio-Models.txt and change entry accordingly:
options snd-hda-intel index=-2 model=XXXXX
4. Save & Exit & Reboot

Please also have a look at these sides for further help:

Bookmark and Share

Thursday, March 25, 2010

How to restore Grub from a live Ubuntu cd.

EDIT: I have not been around in a long time, but it appears grub can still give people headaches I notice people are still referring to this guide now and then, so I wanted to post a link to a grub2 guide. There are differences so you may want to check there as well Glad to see Ubuntu is still going strong Take care.

This will restore grub if you already had grub installed but lost it to a windows install or some other occurence that erased/changed your MBR so that grub no longer appears at start up or it returns an error.

(This how to is written for Ubuntu but should work on other systems. The only thing to take note of, when you see "sudo" that will mean to you that the following command should be entered at a root terminal.)

Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.

When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)

sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands

find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)

root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)

Next enter the command to install grub to the mbr

setup (hd0)
Finally exit the grub shell
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.

Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.


Tuesday, February 23, 2010

Enable InnoDB as MySQL Engine on Windows

1. Shut down your MySQL server (stop the service)
2. Open my.ini (mysql's config file), which is located in your MySQL program folder.
3. In my.ini, find:
4. Replace this line with:
 # skip-innodb
5. Save the file
6. Start the MySQL server again