How to Set Default Sound Card on Debian/GNU Linux for a Lenovo x240

I recently decided to downgrade from a giant workstation laptop (Lenovo W520) to a Lenovo X240 purely for mobility reasons. I ran Ubuntu 14.04 LTS for a while but as always I run into the same issue. The unity interface freezes everyonce in a while and it drives me truly insane when it happens. I then install XFCE on Ubuntu and I always run into some serious errors. Presumably something to do with unity and XFCE battling it out. I'm far to lazy to chase it down, so I end up installing Debian every time.

Anyway I've discovered that there's two sound cards for the X240 and Debian Sid seems to believe that I should be using the HDMI output from the display port as the default card, which is completely incorrect.

I found after installing Debian that my multimedia buttons for sound didn't work. I was too lazy to figure it out. Later when I install Pithos it wouldn't playback any sound and presented a GStreamer error.

I found the problem was the default sound card.

Let's fix it here's the two sound cards:

  ~  lspci -nn | grep -i audio 00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)

Now we're going to manually set the load order via modprobe:

# As rootroot@lenovox240:/home/projects# touch /etc/modprobe.d/alsa-base.confroot@lenovox240:/home/projects# gvim /etc/modprobe.d/alsa-base.conf

Now add this and save it:

# Regular Sound Cardoptions snd_hda_intel index=0 model=auto vid=8086 pid=9c20# Minidisplay Portoptions snd_hda_intel index=1 model=auto vid=8086 pid=0c0c

Now you can attempt to reload the alsa modules and audio services. Personally I find Linux audio services to be rather difficult to work with. I'd suggest restarting, it's just simpler.