Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Danielduel opened this issue Nov 11, 2023 · 0 comments
Labels

Comments

@Danielduel
Copy link

Danielduel commented Nov 11, 2023

(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"
@Danielduel Danielduel added the bug label Nov 11, 2023
@Danielduel Danielduel 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 Nov 11, 2023
@Danielduel Danielduel 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 Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant