Help with setting up "Headless In-Home Steam stream Server" using Xwayland

I currently have a setup working following the guide from 2016, but I’m trying to come up with a different way of doing it that doesn’t involve editing /etc/X11/Xwrapper.conf and setting allowed_users=anybody.

here’s what I’m trying to use:

running xwfb-run -c cage -- steam (and the equivalent with gnome-kiosk) sort of works, however it’s

  1. black bars on both sides
  2. zoomed in to the point that I’m only seeing 1/4 of the application window

but I can launch games, I have audio, they are just unplayable due to the above.

Any idea, what the issue is?

Things I tried

I tried toggling the steam remote play settings on the remote system to match the local resolution , but it didn’t make a difference either way.


Tried setting or manipulating the resolution for the dummy plug with env WLR_BACKENDS=headless wlr-randr. I get

failed to connect to display

I tried specifying the dimensions of the output using the virtual desktop flag for gnome-kiosk, ala

xwfb-run -c gnome-kiosk  -z virtual-monitor=1920x1080 -- steam

however it launches with the same issue, no difference.

I’m not certain on the facts, but I think you need to running in X11 mode, not wayland for Steam to work.

I see work by Valve being upstreamed to GPU drivers, Mesa and Wine to enable Steam to work on Wayland, but I think its still a work-in-progress.

Steam is currently x11 only, but cage and gnome-kiosk support running X11 apps via xwayland.

Like i mentioned in the post, it works, it just unplayable due to the mismatch between the screen and the window size. I’m just not sure what environment variable or config file to modify to make the remote window behave as expected

I will be interested to see if you get this going.
I have been under the impression that going via xwayland will introduce latency and performance issues.

Hmmm, I haven’t needed to go to X11 to use steam on my laptop. It might be using XWayland, but I didn’t do anything special to set it up to use that.

I am running Counter-Strike 2 in Steam on Wayland.

$ dnf list steam
Fedora 39 - x86_64 - Updates 3.0 kB/s | 5.9 kB 00:01
Last metadata expiration check: 0:00:01 ago on Thursday, 08 February, 2024 07:48:26 AM.
Installed Packages
steam.i686 1.0.0.78-2.fc39 @rpmfusion-nonfree-steam

image

I am not sure though if OP just prefers running it on XWayland or is forced to run it on XWayland.

Anybody who hasn’t been running gnome under an X session should have been playing it in Xwayland. Right now steam doesn’t support wayland(nor does wine but that’s coming later the year), so Xwayland has been what everyone is using for steam.

I agree with @memeticcontagion
It does not matter whether using the wayland or the x11 DE, the backend is xwayland…
This can easily be seen in the display segment of inxi -Gxx regardless of the DE in use.

steam is currently X only, and until the last bit of wine-wayland fixes make it into proton so are most of the games you can play. This would be a lot less complicated if that wasn’t the case.

If you don’t believe me, an easy way to check is to launch xorg-xeyes. it can only follow the mouse inside X apps.

To clarify a few things:
Xwayland implements (parts of ) an X11 server running as an app within a wayland compositor so that X11 apps (clients) can run.
Steam is X11 only. So, whether you run steam in a wayland session (DE) or an X11 session, it runs as an X11 app.
Xwayland is used only within a wayland session, not within an X11 session.

That being said: Are you using fractional scaling by any chance?
xwfb-run runs Xwayland within a headless compositor, so I’m surprised it display anything at all :wink:
Anyway, you can specify both weston an X11 options for xwfb, in particular geometry and such. Have you experimented with them already?

xwfb-run runs Xwayland within a headless compositor, so I’m surprised it display anything at all :wink:
Anyway, you can specify both weston an X11 options for xwfb, in particular geometry and such. Have you experimented with them already?

I just found the geometry option in the Xwayland man page, but specifying it causes the error message Xwayland failed to start! looking through the source code, I’m wondering if the args are being passed properly (starting an arg with - following -sor -z leads to an error saying it’s the wrong number of arguments, so I have no idea if this failing because of formatting or an improper argument

xwfb-run -c gnome-kiosk  -z "\--virtual-monitor=1920x1080" -s \-geometry\ 1920x1080  -- steam

I GOT IT WORKING.

I missed some of the examples in the readme. This launches steam and works

xwfb-run -c gnome-kiosk  -z \\--virtual-monitor=1920x1080 -s \\-geometry -s 1920x1080  -- steam

I changed the title, as it was slightly misleading.