Arch Linux HTPC notes

Posted on Sun 16 October 2016 in Linux

I run Arch Linux on a Asus Chromebox M022U, a fairly competent machine with an Intel i3 CPU, 4G of RAM and 16G M.2 SSD. Desktop environment is KDE and the computer is connected to my TV, a Sony Bravia KDL-55W805C that is not autodetected by Xorg - I think the EDID data is messed up but honestly I am not sure.


Rather than running a full suite of desktop applications, display manager, network manager etc (as on my laptop for instance) I go with a smaller setup.

  • kde-meta
  • mpd
  • mpv
  • xorg-xinit
  • xf86-video-intel

Configure Xorg

As everyone says you normally do not need to configure Xorg as it is capable of handling everything automatically these days. In my case however it fails to detect the TV so a basic configuration file is necessary.

Section "Monitor"
    Identifier "Monitor0"

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
    BusID "PCI:0:2:0"

Section "Screen"
    Identifier "Screen0"
    Device "Intel Graphics"
    Monitor "Monitor0"
    DefaultDepth 24
    SubSection "Display"
            Depth 24
            Modes "1920x1080_60.00"

Obviously you need to use the correct Driver for your hardware. The only "tricky" part in the above is the value for BusID (which I am not sure is necessary), but is easily retrieved with:

$ lspci | grep VGA | sed 's/ .*//g'

Which becomes 0:2:0 in the configuration file as shown above.

Automatically login on boot

Run systemctl edit getty@tty1.service and enter the below content:

ExecStart=-/usr/bin/agetty --autologin YOURUSERNAME --noclear %I $TERM

Autostart X and KDE

To automatically start X when we login we need to add the below snippet to our ~/.bash_profile:

fgcon="$(fgconsole 2> /dev/null)"
if [ ! -z "$fgcon" ] && [ "$fgcon" -eq 1 ] && [ -z "$DISPLAY" ]; then
    exec startx

We want to start KDE with X:

echo "exec startkde" > ~/.xinitrc

Automatically connect wifi

wifi-menu -o
netctl list
netctl enable <interface>-<network>

To use a static IP just edit the config in /etc/netctl/ and have the below lines present:


If you make any changes to the profile you need to run:

netctl reenable <interface>-<network>

Configure Pulseaudio

I set the default sink (output) to my HDMI interface which is sink number 0 for me, you can use patctl list sinks to see yours. I also disable the supremely frustrating auto-suspend "feature".

pactl set-default-sink 0
sed -i 's/^.*module-suspend-on-idle/#load-module module-suspend-on-idle/g' /etc/pulse/
killall pulseaudio
#To restart pulseaudio