Archive

Archive for the ‘God Damnit Linux’ Category

Well, Here Goes Nothing

December 14th, 2010 No comments

During a routine update of my Fedora 13 system, I received the following notification:

You’ll notice, upon careful inspection, that the update utility would like to remove my kernel. This ought to be fun.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: God Damnit Linux, Jon F Tags:

Why I Hate Samba

December 12th, 2010 9 comments

This file copy is running over my local wireless network:

Apparently Samba uses less than 1% of available network bandwidth for file copies...

That is all.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: God Damnit Linux, Jon F Tags: , ,

Unwanted Effects on my Line-in Interface

August 26th, 2010 No comments

Shortly after purchasing an xbox360, I wrote a short piece that gave instructions for forwarding your line-in audio through your pc speakers. By using this method and sharing my network connection, I’ve managed to run my xbox as a peripheral to my main computer setup, saving me space and money.

Lately however, the line-in loopback has not been working as expected. At times, it sounds like effects have been applied to the line. In particular, it sounds like somebody has applied a phaser or a delay effect to the input signal.

For the last week or so, I’ve been scratching my head about this issue, trying to figure out what part of my system may have applied effects to my loopback, but not to other audio on the system. Tonight, I was reviewing my original instructions for setting the thing up, and noticed that the module was being loaded on startup after being added to a system config file:

sudo sh -c ' echo "load-module module-loopback" >>  /etc/pulse/default.pa '

On a hunch, I took a look at the end of the file, and found the following lines:

### Make some devices default
#set-default-sink output
#set-default-source input
load-module module-loopback
load-module module-loopback

It looked like the instruction to load the loopback module had ended up in the config file twice! Because of this, the module was being loaded twice on startup.

So what does this have to do with the effects on the line? Well, if you play two copies of the same sound with a half-second gap between them, your ears will be tricked into thinking that you’re hearing one copy of the sound, but that it’s all echoey, as if a delay effect had been applied. If you repeat the experiment but this time decrease the gap between the two sounds even further, say to a few milliseconds, your ears will hear one copy of the sound with a phaser effect applied.

Essentially, when the module loaded twice, it was capturing the mix from the line-in port twice and playing back two separate copies of the audio. Depending on how close together these instances  were, the result sounded normal, phased, or delayed. I fixed the issue by removing one of the lines and then restarting the machine. This time, it started only one copy of the service, and everything sounded fine.

The moral of the story: If you’re loading modules at startup, make sure that you only start one copy of them.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

PulseAudio: Monitoring your Line-In Interface

July 11th, 2010 21 comments

At home, my setup consists of three machines -  a laptop, a PC, and an XBOX 360. The latter two share a set of speakers, but I hate having to climb under the desk to switch the cables around, and wanted a better way to switch them back and forth. My good friend Tyler B suggested that I run the line out from the XBOX into the line-in on my sound card, and just let my computer handle the audio in the same way that it handles music and movies. In theory, this works great. In practice, I had one hell of a time figuring out how to force the GNOME sound manager applet into doing my bidding.

After quite a bit of googling, I found the answer on the Ubuntu forums. It turns out that the secret lies in a pulse audio module that isn’t enabled by default. Open up a terminal and use the following commands to permanently enable this behaviour. As always, make sure that you understand what’s up before running random commands that you find on the internet as root:

pactl load-module module-loopback
sudo sh -c ' echo "load-module module-loopback" >>  /etc/pulse/default.pa '

The first line instructs PulseAudio (one of the many ways that your system talks with the underlying sound hardware) to load a module called loopback, which unsurprisingly, loops incoming audio back through your outputs. This means that you can hear everything that comes into your line-in port in real time. Note that this behaviour does not extend to your microphone input by design. The second line simply tells PulseAudio to load this module whenever the system starts.

Now if you’ll excuse me, I have jerks to run over in GTA…




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Adobe Air and Fedora 12

March 22nd, 2010 2 comments

This weekend, I installed Fedora 12 (Constantine) on my laptop, and I have to say that so far, I’m impressed. Thanks to the standard GNOME desktop, it looked familiar, and felt like a more polished version of the Debian desktop that I’m used to. The installation only took 15 minutes, and almost everything worked immediately.

One of the only things that I’ve had troubles with thus far is Adobe AIR. Now normally, I avoid Adobe apps like they’re the plague, since the great ones are really expensive (Photoshop, Premiere, etc), and the free ones are awful and full of security holes (Reader, Flash on anything but Windows). In this case however, I got hooked on the AIR framework because of Tweetdeck, an excellent little application that makes managing Twitter feeds a dream.

Unfortunately, it doesn’t work worth a shit on Fedora 12.

Now most AIR apps ship with an installer that will put the framework on your system if you don’t already have it. I’ve always had problems with this method on Linux, and have instead downloaded AIR directly from Adobe as a *.bin file, and installed it manually from a root terminal.

The next step is to install the app. In the case of Tweetdeck, the process is a little bit convoluted because they use a Flash widget on their website (Christ, why?) that starts the installation for you – sketchy from a security standpoint, but it’s always worked well for me in the past. Under Fedora, the installer just crashed.

Hoping for a workaround, I downloaded the *.air installer file to my desktop and tried to use the Adobe AIR Application Installer from my root terminal to do the job. All that got me was a bunch of angry error text. After a quick IxQuicking, I found this blog post with some answers in the comments:

#delete the AIR certs:
rm -rf /etc/opt/Adobe/certificates/crypt/

#install your application like this:
su – /opt/Adobe\ AIR/Versions/1.0/airappinstaller /path/to/install/file.air

While this worked, and the install actually completed (albeit with a bunch of angry error messages yelling at me for deleting the AIR security certs), Tweetdeck failed to function on launch first launch, complaining about Adobe AIR failing, and requesting that I file a bug.

Luckily, one quick restart later, and everything worked perfectly.

So long story short, AIR is kinda dirty on Fedora, and doesn’t work as well as on other distributions. Everything else, however, works great.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Empathy: What a Piece of Garbage

March 20th, 2010 17 comments

The Empathy instant messaging client for Gnome is not yet ready to be the default client on your favourite Gnome-based distribution. In fact, I can’t even make it work! Tyler B originally posted about this problem way back in October, but it doesn’t seem to have been fixed during the interim.

To demonstrate my point, allow me to walk you through the process of adding an MSN account, one of the officially supported protocols, to a clean install of Empathy:

  1. After launching Empathy, select Accounts from the Edit menu:

    The accounts manager for Empathy

    Hey guys, nice UI. Way to give that listbox a default width. And why the hell is this dialogue box so big, anyway?

  2. Select the MSN protocol from the dropdown menu, and hit the create button:

    The list of protocols that Empathy "supports"

    Wow, way to get icons for every protocol, guys. Either have icons, or don't, ok?

  3. Enter your MSN email address and account password, and hit the Connect button:

    Adding my account details to the new MSN account in Empathy

    Hey, see that Add button under the listbox? If I click that, I can add a new account, before even finishing with this one! Wow, recursion in a GUI! Sweet!

  4. With the new account created, hit the Close button, and watch as the authentication of your newly added MSN account fails:

    Authentication of my newly added account failed

    Wouldn't you know it, my freshly minted account failed to authenticate. I wonder what the problem is...

  5. Hit the Edit Account button, and open up the Advanced area of the Account Manager window that pops up:

    The Advanced area of the Account Manager window in Empathy

    Have you ever seen anything communicate over port 0? I haven't

  6. Open up your working copy of the trusty Pidgin instant messenging client, put the correct port number into the Port textbox in Empathy, and try to figure out how to save your changes:

    Empathy notifies me that I have unsaved changes

    Since I couldn't click apply, I hit Close. Empathy warned me that I hadn't saved my changes, and only then enabled the Apply button in the Account Manager window... Fuck me

  7. Watch as, even with the correct Server and Port information, Empathy continues to fail miserably at connecting to an MSN account:

    The contact list again

    Hey, it's still failing to connect. Imagine that.

The Bottom line? This application is buggy, untested, incompatible, falsely-advertised garbage. I want my Pidgin back. It may have some rough edges, but at least it connects. How these glaring errors and this horrible GUI design ever got past the community is beyond me. I do hope that Empathy has something even somewhat mediocre up their sleeves for their 2.29 release, but until then, I’m headed back to Pidgin.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Pulse Audio Nonsense

January 4th, 2010 3 comments

Just a heads up: This isn’t the kind of post that contains answers to your problems. It is, unfortunately, the kind of post that contains a lot of the steps that I took to fix a problem, without much information about the order in which I performed them, why I performed them, or what they did. All that I can tell you is that after doing some or all of these things in an arbitrary order, stuff seemed to work better than it did before.

It’s funny how these posts often seem to come about when trying to get hardware related things working. I distinctly remember writing one of these about getting hardware compositing working on Debian. This one is about getting reliable audio on Kubuntu 9.10.

You see, I have recently been experiencing some odd behaviour from my audio stack in Kubuntu. My machine almost always plays the startup/shutdown noises, Banshee usually provides audio by way of GStreamer, videos playing in VLC are sometimes accompanied by audio, and Flash videos almost never have working sound. Generally speaking, restarting the machine will change one or all of these items, and sometimes none. The system is usuable, but frustrating (although I might be forgiven for saying that having no audio in Flash prevents me from wasting so much time watching youtube videos when I ought to be working).

Tonight, after some time on the #kubuntu IRC channel and the #pulseaudio channel on freenode, I managed to fix all of that, and my system now supports full 5.1 surround audio, at all times, and from all applications. Cool, no? Basically, the fix was to install some PulseAudio apps:

sudo apt-get install pulseaudio pavucontrol padevchooser

Next, go to System Settings > Multimedia, and set PulseAudio as the preferred audio device in each of the categories on the left. Finally, restart the machine a couple of times. If you’re lucky, once you restart and run pavucontrol from the terminal, you’ll see a dialog box called Volume Control. Head over to the Configuration tab, and start choosing different profiles until you can hear some audio from your system. Also, I found that most of these profiles were muted by default – you can change that on the Output Devices tab. If one of the profiles works for  you, congratulations! If not, well, I guess you’re no worse off than you were before. I warned you that this was that kind of post.

Also, while attempting to fix my audio problems, I found some neat sites:

  • Colin Guthrie – I spoke to this guy on IRC, and he was really helpful. He also seems to write a lot of stuff for the PulseAudio/Phonon stack in KDE. His site is a wealth of information about the stack that I really don’t understand, but makes for good reading.
  • Musings on Maintaining Ubuntu – Some guy named Dan who seems to be a lead audio developer for the Ubuntu project. Also a very interesting read, and full of interesting information about audio support in Karmic.
  • A Script that Profiles your Audio Setup – This bash script compiles a readout of what your machine thinks is going on with your audio hardware, and automatically hosts it on the web so that you can share it with people trying to help you out.
  • A Handy Diagram of the Linux Audio Stack – This really explains a lot about what the hell is going on when an application tries to play audio in the Linux.
  • What the Linux Audio Stack Seems Like – This diagram reflects my level of understanding of Linux audio. It also reminds me of XKCD.
  • Ardour – The Digital Audio Workstation – In the classic tradition of running before walking, I just have to try this app out.



On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Kubuntu 9.10 (Part II)

January 4th, 2010 No comments

Well I managed to fix my compositing problem but I honestly don’t know why it worked. Basically I went into the System Settings > Desktop > Desktop Effects menu and manually turned off all desktop effects. Next I used jockey-text to disable the ATI driver. After a quick restart I re-enabled the ATI driver and restarted again. Once I logged in I went back into the System Settings > Desktop > Desktop Effects menu and enabled desktop effects. This magically worked… but only until I restarted. In order to actually get it to start enabled I had to go back into System Settings > Desktop > Desktop Effects and then click on the Advanced tab and then disable functionality checks. I am sure this is dangerous or something but its the only way I can get my computer to restart with the effects enabled by default.

I’m really starting to hate this graphics card…




I am currently running a variety of distributions, primarily Linux Mint Debian Edition.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

Linux Saves the Day

December 23rd, 2009 5 comments

Earlier this week I had an experience where using Linux got me out of trouble in a relatively quick and easy manner. The catch? It was kind of Linux’s fault that I was in trouble in the first place.

Around halfway through November my Linux install on my laptop crapped out, and really fucked things up hard. However, my Windows install wasn’t affected, so I started using Windows on my laptop primarily, while switching to an openSUSE VM on my desktop for my home computing needs.

About a week back I decided it was time to reinstall Linux on my laptop, since exams and my 600 hojillion final projects were out of the way. I booted into Win7, nuked the partitions being used by Linux and… went and got some pizza and forgot to finish my install. Turns out I hadn’t restarted my PC anywhere between that day and when shit hit the fan. When I did restart, I was informed to the merry tune of a PC Speaker screech that my computer had no bootable media.

… Well shit.

My first reaction was to try again, my second was to check to make sure the hard drive was plugged in firmly. After doing this a few times, I was so enraged about my lost data that I was about ready to repave the whole drive when I had the good sense to throw in a BartPE live CD and check to see if there was any data left on the drive. To my elation, all of my data was still in tact! It was at this precise moment I thought to myself “Oh drat, I bet I uninstalled that darned GRUB bootloader. Fiddlesticks!”

However, all was not lost. I know that Linux is great and is capable of finding other OS installs during its install and setting them up in GRUB without me having to look around for a windows boot point and do it myself. 20 minutes and an openSUSE install later, everything was back to normal on my laptop, Win7 and openSUSE 11.1 included!

As we speak I’m attempting an in-place upgrade to openSUSE 11.2 so hopefully I get lucky and everything goes smoothly!

Going Linux, Once and for All

December 23rd, 2009 7 comments

With the linux experiment coming to an end, and my Vista PC requiring a reinstall, I decided to take the leap and go all linux all the time. To that end, I’ve installed Kubuntu on my desktop PC.

I would like to be able to report that the Kubuntu install experience was better than the Debian one, or even on par with a Windows install. Unfortunately, that just isn’t the case.

My machine contains three 500GB hard drives. One is used as the system drive, while an integrated hardware RAID controller binds the other two together as a RAID1 array. Under Windows, this setup worked perfectly. Under Kubuntu, it crashed the graphical installer, and threw the text-based installer into fits of rage.

With plenty of help from the #kubuntu IRC channel on freenode, I managed to complete the Kubuntu install by running it with the two RAID drives disconnected from the motherboard. After finishing the install, I shut down, reconnected the RAID drives, and booted back up. At this point, the RAID drives were visible from Dolphin, but appeared as two discrete drives.

It was explained to me via this article that the hardware RAID support that I had always enjoyed under windows was in fact a ‘fake RAID,’ and is not supported on Linux. Instead, I need to reformat the two drives, and then link them together with a software RAID. More on that process in a later post, once I figure out how to actually do it.

At this point, I have my desktop back up and running, reasonably customized, and looking good. After trying KDE’s default Amarok media player and failing to figure out how to properly import an m3u playlist, I opted to use Gnome’s Banshee player for the time being instead. It is a predictable yet stable iTunes clone that has proved more than capable of handling my library for the time being. I will probably look into Amarok and a few other media players in the future. On that note, if you’re having trouble playing your MP3 files on Linux, check out this post on the ubuntu forums for information about a few of the necessary GStreamer plugins.

For now, my main tasks include setting up my RAID array, getting my ergonomic bluetooth wireless mouse working, and working out folder and printer sharing on our local Windows network. In addition, I would like to set up a Windows XP image inside of Sun’s Virtual Box so that I can continue to use Microsoft Visual Studio, the only Windows application that I’ve yet to find a Linux replacement for.

This is just the beginning of the next chapter of my own personal Linux experiment; stay tuned for more excitement.

This post first appeared at Index out of Bounds.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.