Linux on Lenovo t410s #2: Temporary Workaround for Sound Card

Short Version

  1. Blacklist PC-speaker:
    bash -c 'echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist.conf'
    Reboot after this
  2. Get basic sound working by running:
    sudo modprobe snd-hda-intel && pushd "/sys/bus/pci/drivers/HDA Intel/" && sudo bash -c "echo '8086 3b57' > new_id" && popd
  3. You will need to run this after every boot! You can add to /etc/rc.local before the line ‘exit 0’ the following:
    modprobe snd-hda-intel
    echo '8086 3b57' > "/sys/bus/pci/drivers/HDA Intel/new_id"
  4. Wait one more week until alsa 1.0.23 gets to testing and updgrade to 3.6.34 (updates will be posted here). See updated post here
  5. Sound doesn’t work everywhere, and only basic volume is supported. Patience is appreciated

Edit (15/06/2010): Aside from step #1 (removing pcspkr), please see the updated post, with a permanent solution

Long Version
Sound is a sorry affair in Linux. If you want to get some background, start here. Expect more howtos in this area in the future, but for now let’s just get some sound out.

  1. Abolish PC speaker. After initial installation you may have noticed some humming from your speakers. That was your <em>pcspkr</em> module. If you’d run the <em>powertop</em> application, you would see <em>pcspkr</em> is firing interrupts like crazy. Plus, when hitting the wrong key in the terminal you get a sound appropriate for a Pavlovian-response experiment, but terribly annoying otherwise. For these reasons and more, most distributions blacklist the pcspkr module, forcing it never to load. To do this:
    bash -c 'echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist.conf'
  2. Reboot is required since the module wouldn’t unload voluntarily.

  3. Get basic sound working. To get sound fully working we’ll need system-wide cooperation, in the meantime find out what’s the PCI ID of your sound device by running:
    lspci -nn | grep -i audio
    I’ve got:
    00:1b.0 Audio device [0403]: Intel Corporation Device [8086:3b57] (rev 06)
    01:00.1 Audio device [0403]: nVidia Corporation High Definition Audio Controller [10de:0be3] (rev a1)

    The first is the integrated sound-card, which is HDA Intel type. The second is sound over HDMI/DisplayPort from the discrete graphics card (I’d sure like to this one works in the future).
    Next, we’ll take the ID and put it in a file where HDA Intel sound driver can find it:
    pushd "/sys/bus/pci/drivers/HDA Intel/" && sudo bash -c "echo '8086 3b57' > new_id" && popd
    Finally we can manually load the driver by running:
    sudo modprobe snd-hda-intel
  4. Current status and next steps. At this point Phonon recognizes the card, but gives only the basic master sound volume control. This means no microphone, no fancy 5.1 audio, and at some applications no sound at all. This is since Alsa, another brick in the sound system stack, doesn’t know how to work this card yet. Fortunately, a new version of Alsa with initial support for this card (see changelog) has been released. Moreover, it has been accepted to Debian unstable just a couple days ago see here. This means that if all goes well, in another week it will arrive to testing. Yes, you can install it from unstable now, but I really recommend to wait just a bit longer.
    Also, Linux 2.6.34 is required to solve the card identification problem. More on that on later post (probably when Alsa 1.0.23 reaches testing).

Leave a comment

Filed under devenv, howto, linux

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s