Fun with Arch Linux

arch-linux-logo

I recently put Arch Linux on a newly purchased ASUS Zenbook, mostly due to a general feeling of bloat coming from my desktops ~3 year old Linux Mint installation. I’ve always admired distributions like Arch and Slackware for their no-frills approach and seemingly seriously-into-linux userbase. I’ve also been itching to try an arch instlalation with XFCE4 (my desktop’s mint installation didn’t quite play well with XFCE4 for some reason or another).

While I don’t consider myself a linux newbie, I definitely consider myself an Arch newbie. I followed the Beginner’s Guide, used chroot for what might be the second or third time in my life, and went through al the steps to setup things I’d long since taken for granted (timezones, locale, etc) without any GUI support. I was pleased to not have to deal with wpa-supplicant, however, as I’ve had to do on small devices in the past. I found myself combining things I usually only dealt with when something was *wrong* (managing boot partitions, re-generating initramfs images), to create my first working Arch install.

One of the things I recently ran into (and wanted to share a solution for) was getting sound to properly come out of my Zenbook. My zenbook has a mini-HDMI out, as well as the usual 3.5mm audio jack. This meant that I had two competing sound devices, and the wrong one (the HDMI audio) was winning out (despite it not being connected).

Finding a solution amounted to lots of searching and reading Arch’s fantastic guide, and the following steps:

Finding out the current order in whic cards were being used:

cat /proc/asound/modules

After installing Clementine (to try to play local MP3s to rule out flash/browser issues), I found that I was missing some GStreamer plugins so:

sudo pacman -S gstreamer0.10-plugins

(This actually points you to several other packages, I took the base-plugins, and good-plugins)

Listing and getting familiar with which cards were available:

aplay -l

Getting information about the system as a whole (this led to a dead end investigating Jack server actually):

alsa_info.sh

Managing the sound levels

alsamixer

Note that the first editable device will be the default one — for me, this showed the HDMI device, and 3 SPDIF inputs that meant nothing (I could switch to the PCH device, and see what you would normally expect from controls for an audio device).

Finally, I arrived at what the issue was – The HDMI card being set to the default. This meant I only needed to figure out how to change the default, for which I consulted the arch guide

This meant adding the file /etc/asound.conf with the following contents:

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

And restarting alsa with the following command:

alsactl restore

Now, sound is working through Clementine, which is pretty awesome.