Skip to main content

Install Sway on Void Linux - Complete Guide

Here is a clean, simple guide to install and run Sway on Void Linux, including Wayland utilities, login setup, and common fixes.


Install Sway on Void Linux
#

1️⃣ Install Sway and essential tools
#

sudo xbps-install -S sway swaybg swayidle swaylock \
  waybar foot wl-clipboard grim slurp bemenu-wayland \
  kanshi mako

Optional but useful:
#

sudo xbps-install -S network-manager-applet \
  brightnessctl alsa-utils seatd

Enable seatd (needed for input devices)
#

Void uses seatd, not elogind by default.

Enable & start seatd:
#

sudo ln -s /etc/sv/seatd /var/service/
sudo sv up seatd

Allow your user to use seatd:

sudo usermod -aG seatd $USER

Then log out and log back in.


Start Sway
#

Start directly from TTY:
#

sway

If you get:

permission denied: /dev/dri/card0

→ You must be in the video group:

sudo usermod -aG video $USER

Autostart Sway with greetd (recommended)#

Void does not ship a Wayland display manager by default.

Install greetd + tuigreet:
#

sudo xbps-install -S greetd greetd-tuigreet

Create config:
#

sudo nano /etc/greetd/config.toml

Put this:

[terminal]
vt = 1

[default_session]
command = "tuigreet --time --cmd sway"
user = "your_username"

Enable greetd:

sudo ln -s /etc/sv/greetd /var/service/

Basic Sway Config (~/.config/sway/config)
#

If you want a minimal config:

mkdir -p ~/.config/sway
nano ~/.config/sway/config

Paste:

set $mod Mod4

# Terminal
bindsym $mod+Return exec foot

# Exit
bindsym $mod+Shift+e exec "swaymsg exit"

# Reload config
bindsym $mod+Shift+c reload

# Kill focused window
bindsym $mod+Shift+q kill

# Run launcher
bindsym $mod+d exec bemenu-run

# Lock screen
bindsym $mod+Shift+l exec swaylock

Waybar (panel)
#

Create config:

mkdir -p ~/.config/waybar
cp /etc/xdg/waybar/config ~/.config/waybar/
cp /etc/xdg/waybar/style.css ~/.config/waybar/

Start automatically by adding into sway config:

exec waybar

🔧 Common problems & fixes
#

❌ Sway crashes / black screen
#

Install correct video driver:

  • Intel:

    sudo xbps-install -S mesa-intel-dri
  • AMD GPU:

    sudo xbps-install -S mesa-amdgpu-dri
  • Nvidia (only nouveau works on Wayland):

    sudo xbps-install -S mesa-dri

❌ Clipboard not working
#

Install:

sudo xbps-install -S wl-clipboard

Copy:

wl-copy

Paste:

wl-paste

❌ No sound
#

sudo xbps-install -S alsa-utils
alsamixer

Youcef
Author
Youcef
My name is youcef and i’m linux user who fool in love with linux , like free and open software .