Archive for October, 2008

Linux sucks – Getting Skype working

Monday, October 20th, 2008

Months after intially installing Skype, I finally got it to work properly (i.e. not conflict with music players / YouTube / etc).  It took way too much Googling and I spent a lot of time trying suggestions that ended up not working, but eventually I found a solution (full thread) on the Ubuntu Forums that almost works. These are the steps that actually worked for me:

  1. Put this into ~/.asoundrc (create the file if it doesn’t exist):
    pcm.skypeout
    {
        type plug
        slave.pcm "dmix"
    }
    ctl.skypeout
    {
        type hw
        card 0
    }
    pcm.skypein
    {
        type plug
        slave.pcm "dsnoop"
    }
    ctl.skypein
    {
        type hw
        card 0
    }
  2. Edit /etc/pulse/default.pa as root (I can’t figure out a “nice” way to do this from the GUI, but in a terminal you could try “sudo gedit /etc/pulse/default.pa” – I used vim).
    1. Comment out “load-module module-hal-detect”
    2. Find the “module-alsa-sink” and “module-alsa-source” sections and add these two lines:
      load-module module-alsa-sink device=dmix sink_name=output
      load-module module-alsa-source device=hw:0,0

      On my Desktop PC, I used “device=hw:SB,0″ rather than “device=hw:0,0″.

      I’ve attached a patch that you can use to automate this (“sudo patch -p0 -d /etc/pulse < default.pa.diff”)

  3. Restart PulseAudio (or reboot).  You can restart PulseAudio by running this in a terminal:
    killall pulseaudio && pulseaudio &

    I got some error messages, but you can ignore them.

  4. Try Skype.  If it still isn’t playing nice with other applications, go to the Sound Devices section in Skype’s settings and change “Sound In” to skypein, and “Sound Out” and “Ringing” to skypeout.
  5. If Skype still isn’t working, go back to step 2, but instead of “hw:0,0″, try other values like “hw:SB,0″; if that doesn’t work, you’re going to need to do some more Googling.

There are three things that suck:

  • It doesn’t work out of the box
  • There is no obvious way to edit a config file in /etc (this requires root privileges, but “Text Editor” doesn’t use the graphical sudo functionality to get the privileges it needs)
  • Following this advice means that in a future upgrade (maybe to 8.10, for example) you risk having to merge differences between your hacked “default.pa” and the maintainer’s version; this would be unreasonably difficult for most people to understand.

Linux sucks – Data Recovery / Dirty Filesystems

Sunday, October 12th, 2008

Most of my “linux sucks” complaints have stemmed from issues I ran into over a period of a year. However, I discovered this issue today when trying to recover data from an older hard drive that was dying (during bootup, the BIOS warned me that SMART indicated “imminent” failure and said that I should immediately back up my data; before this, Windows had stopped responding). The drive still largely worked, but would produce numerous read failures; any accesses were extremely slow.

I put the drive into a USB enclosure (they make this stuff so much easier!) and connected it to my Ubuntu box:"Cannot mount volume" error message

I clicked details to see what was going on:"Cannot mount volume" error dialog, with details

This is pretty awful. The text looks like something a command-line tool spewed, shoved into a GUI that didn’t respect the line breaks. Getting to the actual content, neither choice is very good. Choice 1 would require a Windows box. Choice 2 involves forcing something “for your own responsibility”. What does that mean? Ignoring the Engrish, I’m assuming it means “at your own risk” and that I may lose data, but I have no idea how likely data loss is. Is it the usual risk associated with an unclean shutdown (which most people I know are willing to accept), or is it significantly higher? From a more technical perspective, is there more risk than there would be if I used Windows? (Is the Linux NTFS driver less robust?) Of course, neither option actually works:

Attempting to force-mount my drive

Attempting to mount my drive using

I happen to know I need to be root (and how to become root), but a hypothetical family member / significant other using my PC would not.

Things that need to change:

  1. The “Cannot mount volume” dialog needs to be intelligent enough to do more than to just show the raw output from /bin/mount. If it’s going to suggest editing fstab (a horrible solution, with long-term consequences), it needs to be clear about how to edit it as root.
  2. Forcing a mount needs to be something that can be done from within the GUI.
  3. If there is a fsck.ntfs, it should automatically run; I should be notified that this is happening and be notified again when it has completed. If there is no fsck.ntfs, someone needs to write one. I can’t find one.

I know NTFS under Linux has been flaky in the past, so for now I’m going to use a Windows box to fix the situation (fortunately, I have one available). If people are trying to make Linux more accessible to “normal users”, then it’s important to handle this kind of situation better. As it is right now, Linux is not a good way to back up files from a dying NTFS drive (if the drive is working, it’s likely to be clean anyway).