Skip to content

[BUG] No SteamVR UI on wlroots-based wayland compositors (sway, hyprland, ...) with workaround #637

Closed

Description

@Danielduel

(latest everything, beta steam, beta steamvr, arch, amdgpu, liquorix kernel, but in my opinion it doesn't matter in this case, I use hyprland)

Error from Steam trying to launch SteamVR (output in terminal, not a popup):

This application failed to start because it could not find or load the Qt platform plugin "wayland".

Available platform plugins are: xcb.

Note - only the UI part of SteamVR crashes (desktop UI and vr UI (dashboard?)), if I did few restarts like I was doing on KDE plasma (wayland) - core functionality of steamvr works in the background.

Workaround

Adding QT_QPA_PLATFORM=xcb to SteamVR launch flags fixes the issue.
So, those are my current flags: RADV_DEBUG=zerovram QT_QPA_PLATFORM=xcb %command%

Change request

(I lack fundamental understanding on how qt works, but I will go for few assumptions...)
I understand the error message as SteamVR UI supports xcb backend and in result it uses xwayland's xcb on platforms like kde's wayland.
Wlroots-based compositors tend to default that QT_QPA_PLATFORM env to wayland, so I think it will be beneficial to do the workaround on SteamVR launch script level.

To vrstartup.sh I've added following lines:

if [ "$QT_QPA_PLATFORM" = "wayland" ]; then
	log "WARNING: QT5 wayland plugin is not supported, defaulting to xcb"
	export QT_QPA_PLATFORM="xcb"
fi;

Can we go this way until SteamVR will support a wayland directly?

Full vrstartup.sh:

#!/bin/bash

# verbose
#set -x

set -o pipefail
shopt -s failglob
set -u

BASENAME="$(basename "$0")"

export STEAMVR_SETUP_LOG="${STEAMVR_SETUP_LOG:-/tmp/SteamVRLauncherSetup.log}"

log () {
	( echo "${BASENAME}[$$]: $*" | tee -a "${STEAMVR_SETUP_LOG}" >&2 ) || :
}

if [ -z "${_SKIP_DATE-}" ]; then
	log "=== $(date) ==="
	# so we only log this once through the vrenv.sh execs etc.
	export _SKIP_DATE=1
fi

if [ -n "${PRESSURE_VESSEL_RUNTIME-}" ]; then
	log "Steam Linux Runtime: ${PRESSURE_VESSEL_RUNTIME}"
elif [ -n "${STEAM_RUNTIME-}" ]; then
	log "WARNING: launching in legacy LDLP scout, please use sniper SLR"
else
	log "ERROR: no steam runtime environment set, please use sniper SLR"
	exit 1
fi

VRBINDIR="$(cd "$(dirname "$0")" && echo $PWD)"

# here first avoids doing it twice in vrsetup.sh, then vrstartup-helper.sh
if [ -z "${STEAMVR_VRENV-}" ]; then
	log exec "$VRBINDIR/vrenv.sh" "$0" "$@"
	exec "$VRBINDIR/vrenv.sh" "$0" "$@"
	# unreachable
fi

if [ "$QT_QPA_PLATFORM" = "wayland" ]; then
	log "WARNING: QT5 wayland plugin is not supported, defaulting to xcb"
	export QT_QPA_PLATFORM="xcb"
fi;

log call "$VRBINDIR/vrsetup.sh"
"$VRBINDIR/vrsetup.sh"

log exec "$VRBINDIR/vrstartup-helper.sh"
exec "$VRBINDIR/vrstartup-helper.sh"

Activity

  1. changed the title [-][BUG] SteamVR on wlroots-based wayland compositors (sway, hyprland, ...) with workaround[/-] [+][BUG] SteamVR UI on wlroots-based wayland compositors (sway, hyprland, ...) with workaround[/+] on Nov 11, 2023
  2. changed the title [-][BUG] SteamVR UI on wlroots-based wayland compositors (sway, hyprland, ...) with workaround[/-] [+][BUG] No SteamVR UI on wlroots-based wayland compositors (sway, hyprland, ...) with workaround[/+] on Nov 11, 2023
  3. kit-katkittycat commented on Nov 18, 2024

    @kit-katkittycat

    Appears to work now without workaround. Just started ALVR and it worked flawlessly on Hyprland.

  4. Danielduel commented on Nov 18, 2024

    @Danielduel
    Author

    I'm unable to retest it, I'm no longer using SteamVR directly and I don't want to experiment with it.
    If others can provide feedback or maintainers want to close it - feel welcome.
    @kisak-valve

  5. Vettezr113 commented on Dec 24, 2024

    @Vettezr113

    to test this, i just need to add the QT_QPA part to the vrmontior.sh text?
    if so i can test this. I'm on hyprland and alvr is refusing to work

  6. kisak-valve commented on Jan 24, 2025

    @kisak-valve
    Member

    Closing per the last handful of comments.

  7. Serverator commented on Feb 10, 2026

    @Serverator

    Still does not work without the QT_QPA_PLATFORM=xcb argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions