Published: Mon Feb 26 2024

Manjaro

I've switched my main PC from Windows to Manjaro Linux.

I've used Linux a lot in the past (Fedora, Ubuntu, openSUSE) and liked it, and Windows has been annoying me more and more recently. I could write a lot about what I don't like about Windows, but what really pushed me was how cheap the whole thing feels. The start menu is a particular point of contention, as not only does it contain adverts for things I don't want, but it also often loses the first few characters of keyboard input or refreshes when I'm part way through typing to find the thing I do want. Recently I set up a new copy of Windows 11 on a laptop and it asked me for my credit card twice - once for Office and again for something to do with Xbox. I just paid a lot of money for the laptop (part of which goes to Microsoft) and Microsoft is trying to sell me things before they let me use it. This is not how you create a positive impression of your products!

Overall Manjaro has been a much nicer experience than Windows and I'm glad I switched, but it hasn't all been smooth sailing. Two not insigificant problems I've faced are UI performance and audio.

The UI performance was a problem between NVIDIA and KDE/Kwin under Xorg. I tried Wayland instead of Xorg, but that was very unstable and not usable day to day. In the end I switched from KDE to Cinnamon and the issue went away. NVIDIA are notorious for their poor Linux support (there's a reason that the Valve chose AMD graphics for the Steam Deck, despite NVIDIA dominating laptop graphics), so it wasn't a huge surprise but a bit disappointing nontheless. Cinnamon's not bad at all. I prefer KDE, but that's just personal preference. KDE6 should end up in the repositories in a few weeks and I'll see then if there's any improvement.

The audio issue was predictable as I have an Audient iD14 audio interface, which only works properly on Windows with custom drivers (and, actually, crashes the Windows installer unless it's unplugged!). The problem is that Manjaro detects it as a surround sound device so audio out is unbalanced as a result. It does kind of rebalance itself when changing the volume, but the left and right volumes can get unlinked so it's not ideal.

The reason I have the iD14 is because I used to plug my guitar into it. I've since mostly replaced this setup with a portable battery powered modelling amp (Spark Mini), so, in some ways, the iD14 is a bit of a nuisance now. I have a high quality XLR mic plugged into it that I use for video calls, but if this wasn't the case I would have just switched back to my motherboard's onboard audio.

Manjaro (or rather PulseAudio) is not entirely unreasonable in thinking it's a surround sound device, because it does indeed have 4 output channels (stereo headphones, plus a left and right speaker). Unfortunately, it really is just two stereo channels.

With some fiddling I found a way to get it all to work acceptably. It is possible to remap the channels to look like a stero device, but it requires changes to various config files:

Firstly, in /etc/pulse/daemon.conf, tell PulseAudio to stop fiddling with the channels:

enable-remixing = no
remixing-use-all-sink-channels = no

Then in /etc/udev/rules.d/91-pulseaudio-custom-profiles.rules tell PulseAudio to use a custom profile for the device:

SUBSYSTEM=="sound", SUBSYSTEMS=="usb", ACTION=="change", KERNEL=="card*", ENV{ID_VENDOR}=="Audient", ENV{ID_MODEL}=="Audient_iD14", ENV{PULSE_PROFILE_SET}="/etc/pulse/profile-sets/audient-id14.conf"

And create the corresponding profile: /etc/pulse/profile-sets/audient-id14.conf

[General]
auto-profiles = no

[Mapping mic-input]
device-strings = hw:%f
channel-map = left,right,rear-left,rear-right
exact-channels = false
fallback = yes
priority = 1
direction = input

[Mapping stereo-output]
description = Stereo output
device-strings = hw:%f
channel-map = front-left,front-right
paths-output = analog-output
paths-input = analog-input
direction = output
priority = 1
exact-channels = false

[Profile output:stereo-output+input:mic-input]
description = Stereo Output + Mic Input
output-mappings = stereo-output
input-mappings = mic-input
priority = 100
skip-probe = no

Then create a bash script to run at login to complete the remapping:

#!/bin/sh
pacmd unload-module module-remap-source
pacmd load-module module-remap-source source_name=AudientiD14_mic master=alsa_input.usb-Audient_Audient_iD14-00.mic-input master_channel_map=front-right,front-right channel_map=front-left,front-right

pacmd unload-module module-remap-sink
pacmd load-module module-remap-sink sink_name=AudientiD14_headphones master=alsa_output.usb-Audient_Audient_iD14-00.stereo-output master_channel_map=left,front-right channel_map=front-left,front-right

pacmd set-default-sink AudientiD14_headphones
pacmd set-default-source AudientiD14_mic

card=$(aplay -l | grep 'iD14' | sed 's/:.*$//g'| sed 's/card //')
amixer -c $card sset 'Speaker' 100%

Set this as a startup application under your desktop environment's settings.

The last couple of lines of the bash script will set the ALSA volume to 100% at startup, which seems to help with equalising left and right channels.

Overall it's a bit of a faff and I'm not sure if all of these changes are necessary, but it's working now and I don't really want to touch it again.

Obviously this doesn't expose the DI (instrument input) through PulseAudio but I don't think that matters as you'd typically use ALSA or JACK for low latency audio input in a DAW. For what it's worth, I have had DI working in Reaper under ALSA.

So, in summary, I probably wouldn't recommend an iD14 if you are using Linux, but it's not impossible to get it working.