tech stuff.

Archive for the ‘Linux’ Category

HD audio buzzzzzzz

leave a comment »

So… I’m using a dangerously long audio cable to connect my computer.  It’s always caused a buzzing sound when connected to the amp but not my computer.  No surprise there.

After a recent hardware refresh, though, it started buzzing while the computer is powered up and connected.  It will start buzzing about 10 seconds after a sound is played and continue buzzing until another sound is played.  This behavior immediately made me think of a Karmic release note about putting sound cards to sleep.

After figuring out where the kernel documentation is for Ubuntu (it’s the linux-doc package), powersave.txt confirmed my suspicions.  The easiest solution for me was to disable this sleep behavior.  I’m using a desktop and while it might be nice to put my sound card to sleep, it’s really not necessary.

It turns out that this option is explicitly set to the default in Ubuntu 9.10 in /etc/modprobe.d/alsa-base.conf.  To disable this behavior, all you have to do is set power_save=0 in the snd-hda-intel options line.  You can change the setting in the running kernel via /sys/module/snd_hda_intel/parameters/power_save.

After a quick “echo 0 >> /sys/module/snd_hda_intel/parameters/power_save”, everything was back to normal, and I could get on with my day.

Written by Lee Verberne

2009/12/26 at 20:12

Posted in Linux

Tagged with ,

rsyslog and logwatch don’t play well together

leave a comment »

Notice a hell of a lot fewer log messages being reported since you’ve upgraded to a modern syslog supporting RFC 3339-style high-precision timestamps?  Yeah, me too.

It seems as though logwatch doesn’t support these timestamps, so it silently filters out all messages recorded by my rsyslog daemons.  What’s worse is that I can’t easily figure out a way to disable that behavior.  It’s implemented using an executable filter, and — while there’s plenty of documentation about how to override configuration in /etc/logwatch — there’s no documentation about how to *remove* a filter.

Oh well.  I never much liked logwatch, anyway.  I mostly don’t like any log monitoring scheme that requires me to read through hundreds of daily e-mails that almost always report everything is normal.  That’s not sustainable…

Written by Lee Verberne

2009/07/21 at 20:09

Posted in Linux

Tagged with ,

Sierra Wireless mobile broadband modem differences

with one comment

As I was recently signing up for Sprint’s mobile broadband solution, I was presented with the choice between the Sierra Wireless USB 598 modem and the older Sierra Wireless Compass 597 USB. I couldn’t find any explanation of the differences between them, so here’s what I’ve found so far:

  • The 598 is prettier with bright, attractive LEDs.
  • The 598 supports higher capacity micro-SD cards
  • The 598 comes with a longer USB extension cable and a laptop clip to attach the modem to the top of your laptop screen.  (I miss this quite a bit, surprisingly)
  • The 598 has a power saving mode that turns off the modem when the Sprint Smartview application isn’t running (OS X)
  • I can’t get the USB disk feature to work at all with a 2GB micro-SD card on my 597, though I suppose mine could be broken

In the end I went with the 597 because of the out-of-the-box Ubuntu support in 8.10, but the 598 is better for non-Linux use.  Of course, I get the impression that Sprint won’t be carrying the 597 for much longer, so the point may be moot…

So far I’ve gotten excellent customer support from Sprint.  I’m really not used to such kind, helpful and competent assistance from a mobile company, so I felt like I should mention it.

    Written by Lee Verberne

    2009/03/01 at 16:27

    Posted in Linux

    Simple encrypted disk images in Linux

    leave a comment »

    The Linux kernel supports encrypted loop images via the cryptoloop driver, so you can use losetup(8) to create simple encrypted loop devices for those situation when cryptsetup/LUKS/device-mapper is unavailable or too complicated.

    You’ll need the following modules loaded (or compiled in):

    • loop
    • cryptoloop
    • twofish (or whatever algorithm you prefer)

    First you’ll need to allocate the file:

    # dd if=/dev/zero of=<file> bs=1k count=<fs-size-in-kilobytes>

    After that, you can ask losetup to loop it to the first free loop device and report back which it chose:

    # losetup -e twofish -f -s <file>

    The first time out you’ll want to format the device (e.g. mke2fs -j /dev/loop0), after that it’s just a matter of mounting (mount /dev/loop0 /mnt).  After you’re done you can use losetup to close the file and remove the device:

    # losetup -d /dev/loop0

    An important note about this method is that there is no sort of password validation.  Whatever password you enter will be used by the encryption algorithm.  That means if you enter the incorrect password then you’ll just read (or worse: write) a bunch of garbled data from the device.

    Written by Lee Verberne

    2009/01/08 at 16:08

    Posted in Linux

    Tagged with