All posts

From a Black Screen to a Home: Making Sway Work on My Dell XPS 13

Sway · Dell XPS 13 · Fedora 43

From a Black Screen to a Home: Making Sway Work on My Dell XPS 13

I switched from i3 to Sway, logged into the new session for the first time, and got a black screen and a lonely cursor. This is how that void became a desktop I love.

workspace 1 — no bar, no terminal, no wallpaper · just void

I switched from i3 to Sway on my Dell XPS 13 running Fedora 43, logged into the new session for the first time, and was greeted by… nothing. A black screen and a lonely mouse cursor.

My first thought was: great, I’ve broken it already. My second thought, after a lot of digging, was much more interesting. This is the story of how that black screen turned into a desktop I actually love using.


00Log · First boot

The black screen wasn’t broken — it was empty

Diagnosis · empty workspace

Here’s the thing nobody tells you when you come from a “batteries included” desktop: an empty Sway workspace with no wallpaper is just black. That’s not a crash. That’s the default.

My config made it worse. It turned out ~/.config/sway/config had been generated by i3-config-wizard — so it was really an i3 config that Sway was politely running in compatibility mode. It set no wallpaper and auto-launched no windows. Two lines went a long way toward the “is it on?” panic — wallpaper on login, terminal on login:

~/.config/sway/config
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
exec foot
First login on Sway: a black screen with only a mouse cursor
First login on Sway: a black screen with only a mouse cursor

One stubborn detail outlived every other fix here: workspace 1, the one I land on at login, stayed black even after this. I shrugged, made Super+2 my de-facto home, and got on with the list. Hold that thought.

01Log · Tray

The tray that wouldn’t click

Fix · swaybar → waybar

My tray icons — WiFi, Bluetooth, Dropbox, Remmina — showed up, but clicking them did nothing. The culprit was the built-in swaybar: it hosts the tray correctly, but its context menus are notoriously flaky and frequently just never render.

The real fix was to replace the bar. I swapped swaybar for waybar, whose tray actually renders the menus. In the Sway config it’s almost insultingly simple:

~/.config/sway/config
bar {
    swaybar_command waybar
}

A small ~/.config/waybar/config later — workspaces, clock, tray, network, Bluetooth, volume, battery — and I had a bar that didn’t fight me.

02Log · Readings

The bar told me lies (or did it?)

Diagnosis · believe the numbers

With waybar up, two numbers looked wrong. Volume read 3359%. I assumed a display bug. It wasn’t. PipeWire had genuinely let the software gain run away to over thirty times full volume, because my volume-up key added 5% forever with no ceiling. I reset it and capped the key with a -l 1.0 seatbelt:

~/.config/sway/config
bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+

Battery read 100% when my old bar swore it was 70%. This one’s sneaky: the battery was full. The old reading measured charge against the battery’s original design capacity — so that “70%” was really my battery’s health. The cells have worn. Nothing to fix; just a number I now understand.

Believe your status bar. When it said 3359%, it meant 3359%.

03Log · X11 ghosts

Cleaning out the X11 ghosts

Fix · go Wayland-native

The deeper I looked, the more I found config leftovers from the i3 world that needed Xorg to mean anything. The worst offender: screen locking. My config called xss-lock and i3lock, both X11-only. On Wayland they did nothing — my laptop wasn’t locking on suspend or lid-close at all. The native fix:

~/.config/sway/config
exec swayidle -w \
    timeout 300 'swaylock -f -c 000000' \
    timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
    before-sleep 'swaylock -f -c 000000'

Then the smaller ghosts: my launcher was X11 dmenu (→ native wmenu-run), and my logout prompt used i3-nagbar and i3-msg (→ swaynag and swaymsg exit). One by one, I made everything Wayland-native.

04Log · Quality of life

The quality-of-life pass

Build · what was missing

Once the foundation was solid, I went looking for what was missing. This is where it went from “working” to “mine.”

  • Screenshots. grim + slurp + wl-copy were already installed; I just bound Print (whole screen to a file) and Shift+Print (select a region to the clipboard).
  • Brightness keys. brightnessctl bound to the laptop’s brightness keys. Obvious in hindsight.
  • Notifications. I had no notification daemon, so I’d never see anything — including low-battery warnings. Installed and autostarted mako.
  • Night light. redshift was autostarting and silently failing — it only speaks X11 gamma protocols. I switched to wlsunset, which warms the screen the native way (fed it my coordinates — Berlin).
  • Clipboard history. Installed clipman (the Fedora-friendly alternative to cliphist), watching the clipboard and bound to Super+h.
  • Power management. dnf refused power-profiles-daemon — it conflicts with tuned-ppd, which Fedora 43 already ships. I enabled tuned instead and switch profiles with tuned-adm profile balanced. Same outcome, less yak-shaving.
05Log · Papercuts

The last two papercuts

Fix · read the defaults

I switched my terminal to foot (lighter, native Wayland) and immediately complained the font was tiny — despite my screen being at scale 2.0. I was ready to blame HiDPI again. Nope: foot ships with a default 8pt font and I’d given it no config. A one-line foot.ini:

~/.config/foot/foot.ini
font=monospace:size=12

And my clipboard picker — Super+h — was showing entries horizontally, one at a time, with a little > to say “there’s more.” I thought my history was empty. It wasn’t; wmenu just defaults to a horizontal row. Adding -l 10 turned it into a proper vertical list of my last ten clips.

06Log · Result

What I ended up with

Status · Wayland-native
The finished Sway desktop: wallpaper, waybar, a foot terminal and the launcher
The finished Sway desktop: wallpaper, waybar, a foot terminal and the launcher

A Dell XPS 13 running a Sway desktop that is, finally, entirely Wayland-native and entirely mine:

  • A wallpaper and a bar that show up and behave
  • A tray I can actually click
  • Volume that can’t deafen me and a battery reading I understand
  • A laptop that locks itself when I walk away
  • Screenshots, brightness, notifications, night light, clipboard history and power profiles — all working
  • A terminal at a font size my eyes agreed to
07Field notes

What I’d tell past-me

  1. A black screen on Sway is usually an empty workspace, not a crash — but verify, don’t assume. Move the mouse, hit a keybind. And if one workspace stays stubbornly black while the rest behave, run swaymsg -t get_tree and actually look.
  2. A generated i3 config will mostly work on Sway, and that’s the trap. “Mostly” hides a pile of X11-only leftovers — locking, launchers, dialogs — that fail silently. Budget an afternoon to make things native.
  3. Believe your status bar. When it said 3359%, it meant 3359%.
  4. Read the package conflict before forcing past it. tuned-ppd vs power-profiles-daemon could have cost me a working power stack if I’d reached for --allowerasing.
  5. Tiny fonts on HiDPI are usually the app’s default, not your scaling. Check the app’s config before you blame the compositor.

08Postscript

The black screen was never empty

Resolved · workspace 1

Remember the thought I told you to hold? Workspace 1, still black after everything? It was never empty. The very first black screen — the one that made me think I’d broken the machine, the one I’d been dodging with Super+2 this whole time — was a window the whole time. I just never looked.

When I finally ran swaymsg -t get_tree on workspace 1, there it was: my foot terminal, and a second window I’d never knowingly opened — a stray Xwayland Video Bridge. It’s a helper that screen-sharing X11 apps lean on, auto-started at login, supposed to be an invisible 1×1 pixel. Instead it had mapped as a real window and gone fullscreen: a genuine, opaque black rectangle parked on workspace 1 since first boot, sitting on top of the terminal exec foot had been faithfully spawning underneath it all along.

~/.config/sway/config
for_window [class="xwaylandvideobridge"] floating enable, resize set 1 1, move position 0 0, border none, move to scratchpad
no_focus [class="xwaylandvideobridge"]

One window rule finally nails the bridge down — float it, shrink it to a pixel, strip its border, toss it to the scratchpad. Super+1 opens onto my terminal now. The first problem in this post turned out to be the last one I solved: a black screen on Sway is usually an empty workspace — but don’t trust “usually.” Run swaymsg -t get_tree and actually look.

Sometimes the void is a window staring back.

Comments (0)

No comments yet. Be the first!

Write a Comment