Ubuntu 9.04: Skype issues

This article addresses an issue similar to another that I have already adressed for Ubuntu 8.04: How to correctly configure Skype on Ubuntu 9.04.

First, I assume that Skype was installed from midibuntu.org repositories.

Issue 1: Speakers do not work.

The first required configuration change is setting Skype to use Pulse Audio Support instead of default (ALSA) sound drivers. Go to Skype->Options->Audio Devices. Select “pulse” for all audio devices.

I also recommend to disable an option like “Allow Skype to automatically adjust mixer levels” for this first moment. While this option was enabled, I have experienced Skype undoing the correct configuration and turning off my microphone volume before each call . After you manage to have Skype working fine, then you may enable this option again to see if Skype continues working fine :-)

Issue 2: Voice gets delayed or cut.

There is a known issue where Skype overloads CPU while the microphone records from the Pulse Audio Support. Voice gets heavily delayed (eg. more than 60 seconds). You need to switch the microphone device to another but not “pulse” nor “alsa”. Try selecting the entry that describes your microphone hardware. You may need to take several tries until you find out the device that really maps to your microphone. Fortunately, you can play around during a test call, if you always press the “apply” button. On my desktop, the correct option is called “Intel ICH5 (hw:ICH5,0)”.

Ubuntu 9.04: Microphone issues

Continuing the discussion of audio configuration issues on Ubuntu 9.04…

If you are using Skype, please also read my next article that discusses Skype on Ubuntu 9.04.

I suggest testing the microphone with the “Sound Recorder” that is found in the “Applications”->”Sound and Video” menu of the top bar on the Ubuntu desktop. Ensure that “voice, lossless (.wav)” (may vary according to your language) is selected. Click on “Record” and talk to the microphone. The “Level” bar should increase as you talk louder. Click on “Stop” and “Play” to hear if your voice was recorded sucessfully.

Issue 3: Microphone does not work

Solution: Enable the microphone capture. Right-click the volume icon on the left of the top bar on the Ubuntu desktop and select “Mixer” or “Volume Control” (may vary on according to your language). The mixer dialog opens. Click on “Preferences” to open the preferences dialog, enable “Microphone” and “Microphone Capture” and click on “Close” to return back. Move the “Microphone” slide up, ensure button underneath the slide is not “muted”. On the “Switches” tab, enable “”Microphone Capture”.

Issue 4: Microphone is too quiet

Solution: Raise capture volume. Back to the mixer dialog, click on “Preferences” to open the preferences dialog, enable “Capture” and click on “Close” to return back. On the “Recording” tab, move the “Capture” slide up, ensure button underneath the slide is not “muted”.

Issue 5: Is still too quiet

Solution: Enable the microphone boost. Back to the mixer dialog, click on “Preferences” to open the preferences dialog, enable “Mic boost +20dB” and click on “Close” to return back. On the “Switches” tab, enable “Mic boost +20dB”. If microphone becomes too lound or too noisy, just disable this option again.

Ubuntu 9.04: External and internal speaker issues – part 2

If you run Ubuntu 9.04 and your desktop or laptop is featured with both internal speaker and TRS jacks for external speakers, then you might face some issues that sound is played on both. I have written some articles where I propose some very simple solutions and you may try them and choose the one you like most.

Issue 2: Connecting the headset does not turn off internal speaker.

Try to connect/remove a headset from the external jack and observe if your internal speaker becomes automatically muted. If not, then some more configuration is required.

Solution 1: Previously, I explained how to display the “Master mono” and “Headset” slide bars. Slide down the “Master Mono” and click on the “Mute” button underneath this bar. This will completely disable the internal speaker (until you un-mute it again and raise its volume slide bar).

Solution 2: Right-click the volume icon on the left of the top bar on the Ubuntu desktop and select “Mixer” or “Volume Control” (may vary on according to your language). The mixer dialog opens. Click on “Preferences”. Enable “Headphone Jack Sense” (eventually you will need to scroll down the list to see this option). Click on “Close”. The previous mixer dialog should now display a “Switches” tab. Click to open it and you will see the “Headphone Jack Sense” switch. Whenever you want the internal speaker to mute automatically when an external speaker is connected, just enable it.

Actually, I use to enable it once and leave it enabled forever…

Ubuntu 9.04: External and internal speaker issues

If you run Ubuntu 9.04 and your desktop or laptop is featured with both internal speaker and TRS jacks for external speakers, then you might face some issues that sound is played on both. I have written some articles where I propose some very simple solutions and you may try them and choose the one you like most.

Of course, I discarded any inappropriate solutions that were proposed in several forums: editing mysterious configuration files,recompiling the kernel and unplugging the internal speaker from the motherboard.

There are much simpler approaches. First, let play some of your favorite songs to observe if the proposed changes really reflect the audio configuration.

Issue 1: Does master volume really work?

Click on the volume icon that uses to be placed on the right of the top bar on your Ubuntu desktop. Slide the bar and observe if music gets more or less louder. If nothing happens, then there will no common control for both internal and external speakers, unfortunately.

Solution: Right-click the volume icon and select “Preferences”. Ensure that the first line display the option that contains “Alsa Mixer”. Then select “Master mono” or “Headset”. Now the slide bar will control the volume of your internal or external speaker. It will control only one of them, but not both. It is not ideal, but less inconvenient than controlling nothing. If you now a better solution, please leave me a note.

Right-click the volume icon and select “Mixer” or “Volume Control” (may vary on according to your language). The mixer dialog opens. Click on “Preferences”. Disable “Master”. The master volume slide bar will disappear. Ensure that “Headset” and “Master mono” is enabled. Now you might control the volume of both internal and external speaker independently through the mixer dialog. Just note that if your have an external speaker connected to the external jack, then the slide bar for “Headset” is actually changing volume of your speaker.

Regex that matches path, filename and extension

I was looking for a regular expression for Python capable to match a string containing a valid path, file name and extension. Finally, I discovered following solution:
^(.*/)?(?:$|(.+?)(?:(\.[^.]*$)|$))
Let me explain how I got this regular expression. Fortunately, Scott Carpenter has written an excellent article about a regular expression to match a file name with extension. Matching the file name extension is not trivial for all possible situations.

Read more of this post

Skype on Ubuntu 8.10: microphone and internal speaker issues

It has been a long time since my last post… Also, it has been some time I managed live without a PC and Internet. Now I have a PC and Internet again and I took the chance to immediately install Linux!

Updated: I also solved the issue of skype consuming 100% cpu during a call.

Although the Ubuntu Guide has a good description how to install Skype on Ubuntu Intrepid, it can be quite challenging to place a call successfully. Shame on Gnome, Pulse Audio and Skype! I had to overcome following issues:

  • No audio on skype, or Skype complaining that sound device does not work.
  • No microphone input during calls.
  • Call also audible from the internal speaker (even when headset is connected to the green audio jack).
  • Skype consuming 100% cpu during the call and Skype delaying audio over 60 seconds!

Here is the solution that worked for me.

Read more of this post

Resume scp/rsync file transfer

This is very basic Linux knowledge, but the question has arisen too often and I decided to document it.

Problem:

Transfer (or upload/download) a large tree of files and directories from one machine to another using a ssh connection, and being able to resume/continue if the operation is interrupted.

Solution:

Until now, I believe that the best solution is using rsync over ssh, since rsync has a feature to resume interrupted file transfer, even when an entire tree of directories is involved.

Command line:

rsync -vrlPtz -e ssh host:/remote_path/* /local_path/

Explained:

-e ssh rsync will use ssh client instead of rsh
-z compress file transfer
-t preserve time (other attributes as owner or permissions are also possible)
-l copy symlinks as symlinks
-P resume incomplete file transfer
-r recursive into subdirectories
-v verbose
Optionally, you may also add following options, that make sense only if both machines have the save user name space:
-p preserve permissions
-o preserve owner
-g preserve group