Introduction
Void Linux is my main distro. It’s fast, it’s lightweight and it doesn’t use systemd, which isn’t a great deal to me, but I noticed that runit takes significantly less time to boot up than systemd. Having said that Void is great, it can be a headache to set everything up once you installed it.
I’ll briefly cover all you need to know to set up everything nicely:
If you have any trouble or need specific documentation on something, consult the void wiki or the arch wiki, as most of the arguments in the arch wiki are relevant for all linux distributions.
Note: I’m going to assume you have installed Void (glibc) from local or at least have a working window manager running, as it can be slightly more complicated to set everything up for the first time without access to the browser, although not at all impossible.
Package Manager
Void uses xbps
as its package manager, which I believe to be the fastest out of all package managers I’ve tried (Including pacman, apt and dnf). It can be complicated to use though: unlike most common package managers, which all have one command followed by it’s parameters (for example pacman has pacman -S
for installing a program and pacman -R
to remove it)
void uses three main different commands: xbps-install
, xbps-remove
and xbps-query
, which all have their own parameters.
For semplicity’s sake, I’ll list the most used ones here:
Command | Description |
---|---|
xbps-install -S | Installs a package |
xbps-install -Syu | Updates the system |
xbps-query -Rs | Searches for the package in the repositories |
xbps-remove | Uninstalls a package |
Keep in mind that all the commands above are followed by arguments (specifically, the name of the package/s).
I recommend setting aliases for these commands as they can be quite long to type. Ex: alias in "sudo xbps-install -S"
.
If you need more information on xbps, consult the void wiki.
Recommended packages
You’ll soon notice that, by default, void’s repositories ship with no proprietary software or media player, such as mpv. To fix this, you simply have to install the packages void-repo-nonfree and void-repo-multilib and update the system.
sudo xbps-install -S void-repo-nonfree void-repo-multilib void-repo-multilib-nonfree
sudo xbps-install -Syu
Also, coming from arch, the thing I miss the most is the AUR. A good alternative is the void-packages repository: a collection of source files to build binary packages for Void Linux.
Flatpak
In order to expand software availability you’ll want to install flatpak:
sudo xbps-install -S flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
If you’re insterested in a basic guide to get you started with flatpak I recommend you chack out this guide I made.
XDEB
If you want to install a package which only ships in .deb format, you can install it with XDEB, which is a “simple utility to convert deb(ian) packages to xbps packages”.
Init system
This is probably the hardest thing to learn to use but at the same time is what attracts most people to this distribution: Void Linux uses runit as its init system and many consider it to be superior to systemd. I won’t go over the differences between the two, but, to quote the Void Wiki, some advantages of using runit include:
- a small code base, making it easier to audit for bugs and security issues.
- each service is given a clean process state, regardless of how the service was started or restarted: it will be started with the same environment, resource limits, open file descriptors, and controlling terminals.
- a reliable logging facility for services, where the log service stays up as long as the relevant service is running and possibly writing to the log.
In short, it’s light, fast and effecient.
It can be complicated to learn at first, although once you learn how it works it becomes stupidly easy to use.
How to use it
Let’s go over the basics: all the services you can enable are contained in the directory /etc/sv and all the services that are enbled are in /var/service.
What you have to do in order to enable a service is to create a symbolic link for /etc/sv/sudo ln -s /etc/sv/NetworkManager/ /var/service
, so next time I boot up my system, it would be running as a daemon. Following the same process, if I wanted to disable a process from running at boot time I would just delete the symbolic link I previously created, for example sudo rm /var/service/NetworkManager
.
If you want to chack the status of an installed service, just type sudo sv status <service>
, and use sv up <service>
or sv down <service>
to activate or kill a service during your current boot period.
As always, if need more information on the matter, consult the wiki.
Audio server
My first ever issue with void was the absence of audio (even though pulseaudio was installed and running). So I installed pipewire with sudo xbps-install -S pipewire
, uninstalled pulse with sudo xbps-remove pulseaudio
added pipewire-pulse to my autostart script (check your window manager/desktop enviroment’s autostart session or .xinitrc).
Graphical drivers
There are different packages you have to install depending on the gpu you’ve installed.
AMD
Here’s a list of all the recommended packages:
sudo xbps-install -S vulkan-loader mesa-vulkan-radeon amdvlk mesa-vaapi mesa-vdpau
If you installed void form source or (you just have xorg-minimal) you might need to install these packages:
sudo xbps-install -S xf86-video-amdgpu mesa-dri
If you experience any screen tearing after rebooting your system, create this file:
sudo mkdir /etc/X11/xorg.conf.d/
sudo touch /etc/X11/xorg.conf.d/20-amdgpu.conf
Open this newly created file with a text editor (as sudo), and add the following:
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "TearFree" "true"
EndSection
After that, reboot the system.
Intel
Packages you have to install:
sudo xbps-install -S vulkan-loader mesa-vulkan-intel intel-video-accel
If you installed void form source or (you just have xorg-minimal) you might nedd to install linux-firmware-intel: sudo xbps-install -S linux-firmware-intel
Nvidia
Nvidia cards users require the installation of the nvidia package: simply type sudo xbps-install nvidia
and reboot your system.
The gui application gets installed alongside the driver, so just run sudo nvidia-settings
and configure your gpu.
Troubleshoot
Deleted /var/service/
If, for any reason, you deleted the /var/service/
folder, do not fear. Runit is very stable in that regard: /var/service
is a link to /var/run/runit/runsvdir/current
, which is itself a link to /etc/runit/runsvdir/current
.
To recover the service folder just:
sudo ln -s /var/run/runit/runsvdir/current /var/service
Alternatively, you can check you broken packages with sudo xbps-pkgdb -a
and, if the ouput includes runit, just reinstall it:
xbps-install -f runit