Closed NaevaTheCat closed 6 months ago
What graphics card are you using?
Most likely you are missing the correct graphics driver in the container itself. Im guessing this works on zwift version 1.60.0? i.e
VERSION=1.60.0 zwift
Could you also try to see if glxgears would spin up in the container?
This will run the container interactively
podman run -it --rm --privileged -e DISPLAY=:1 -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse -v zwift-naeva:/home/user/Zwift --userns=keep-id --device /dev/dri:/dev/dri --entrypoint=bash docker.io/netbrain/zwift:latest
glxgears
Apparently I am a bad user who fails at copy paste.
GPU: GPU: Intel WhiskeyLake-U GT2 [UHD Graphics 620]
Downloading zwift 1.60.0 and running (I had not used any previous versions) it I get:
Apr 11 17:52:20 bark zwift[51353]: 0138:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Foundation.Diagnostics.AsyncCausalityTracer"
Apr 11 17:52:21 bark zwift[51353]: 0138:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
Apr 11 17:52:21 bark zwift[51353]: 0138:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."
which seems like the same thing.
Running those 2 commands I get:
user@4287b882a301:~$ glxgears
bash: glxgears: command not found
glxgears works fine outside the container though, if that's relevant /shrug
sorry, please do a sudo apt update && sudo apt install mesa-utils
before trying to run glxgears
also show me the output of glxinfo
Ah, see now that you actually have it working in X? but not wayland? correct? In that case i'ts probably something with how podman / wayland interacts.
But, if you can get a container with glxgears to run under wayland, then zwift should work aswell. A good starting point would be this:
https://github.com/netbrain/zwift/issues/80#issuecomment-2039116156
And then try to tweak podman flags in order to allow the container to use your graphics device.
I had a similar issue (also on Arch Linux with Wayland) and removing the if-statement around xhost in zwift.sh (so that it runs even if Wayland is in use) fixed it for me, if I remember correctly.
Thanks for your patience with this.
Yes, it does work if I log in to an X session vs a wayland session.
Installing mesa-utils and running glxgears I get:
user@a6b42aa4eff8:~$ glxinfo
Authorization required, but no authorization protocol specified
Error: unable to open display :1
Baffling, since I'm not running X
However if I do xhost +
and then run the container it works.
So it looks like stuff is being forced through xhost or something? I'm not entirely sure.
As a result doing what sebstrand says works.
Baffling! Idk if you want to leave this open to fix in a future release or consider it closed, it's probably worth documenting though?
Im running wayland myself, but i don't need to do xhost in order to get zwift running. So not sure why you have to. guess it comes down to how wayland is configured? or myabe Xwayland.
Another alternative thing you could try is to use the experimental wayland feature in wine (see WINE_EXPERIMENTAL_WAYLAND in README). but in that case i think you need to forward other environment variables aswell and set DISPLAY to an empty string. @quietvoid might now a thing or two about this as i'm pretty sure he has tested out wine with wayland support.
I have not tested the current image but I'll try to later today or on the weekend.
The Wine Wayland driver can't be used for Zwift until version 9.4 (OpenGL basic support), so if the image is actually on 9.0 it's not possible to use it. It would be a different error though.
So here it just seems like a misconfiguration that makes it not find the X display.
I just tested the latest netbrain/zwift
image and it works fine for me.
Might be a podman
specific issue.
I just updated to latest fedora (40) which will be released tomorrow.
Fedora 40 comes with Wayland only. I have the same issues as described above.
It's only starting with xhost +
before docker run
.
Wayland on Fedora 40 works for me without the xhost + using 1.62.0
Using 1.63.0 with Podman now gives me a permissions error on groupmod -o -g
I just updated to latest fedora (40) which will be released tomorrow. Fedora 40 comes with Wayland only. I have the same issues as described above. It's only starting with
xhost +
beforedocker run
.
Just found a post on this one, someone said they put this in their bash script on startup
xhost +si:localuser:$USER
This is what made my zwift work on wayland fedora 40 without modifying the zwift script maybe this can be added to the zwift script?
This is for 1.62.0, still have an issue that two new commands in 1.63.0 don't work with podman rootless.
This really bugged me, for the latest podman is working fine but not displaying under wayland. Under X works but requires running xhost + or xhost +si:localuser:$USER first.
In short, under Fedora 40 Wayland this worked for me, still needed xhost +
Doing this worked
podman run -it --rm --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse -v zwift-naeva:/home/user/Zwift --userns=keep-id --device /dev/dri:/dev/dri --entrypoint=bash docker.io/netbrain/zwift:latest
wine notepad
But doing this, which is how the latest runs, gave me more information (removing the --userns=keep-id)
podman run -it --rm --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse -v zwift-naeva:/home/user/Zwift --device /dev/dri:/dev/dri --entrypoint=bash docker.io/netbrain/zwift:latest
wine notepad
gosu user:user wine notepad
The first works the second does not.
Further investigation when you gosu or su or sudo to a user you loose the access to the X11 server. There are some things online about this but I couldn't get any working.
In the end I found a post that said just put --net host and it works, so the solution to change NETWORKING=host worked for me under wayland.
Still trying to figure out how to get the container to see my graphics card (AMD). I can't really install anything within that container because the user podman creates for me does not have sudo permission and, trying to run sudo --user=[ME] doesn't seem to work either.
It's running, but it appears to be running off my CPU and not the GPU. This is true in both X and Wayland.
Still trying to figure out how to get the container to see my graphics card (AMD). I can't really install anything within that container because the user podman creates for me does not have sudo permission and, trying to run sudo --user=[ME] doesn't seem to work either.
It's running, but it appears to be running off my CPU and not the GPU. This is true in both X and Wayland.
Assuming your CPU is an intel and your primary display is the intel iGPU then not sure how you can get it to pick up the Radeon, the app uses /dev/dri for Intel/ AMD and it is picking up the first capable card.
You could try passing DRI_PRIME=1 as an environment variable, adding -e DRI_PRIME=1 to the zwift startup.
My setup is all AMD. Ryzen 7 5800X CPU and Radeon RX6700XT graphics. Motherboard has no onboard graphics.
I also run openRGB setup to give me color scale indications of CPU, GPU, and memory temperature. It works pretty well in giving me an indication as to what's being loaded. When I run Zwift, the CPU fan color shows it's warming up, but the window in front of the graphics card is staying blue, indicating it's not really becoming active.
similar to mine mine is an AMD 5700G with RX6700XT, I am running in proxmox so have setup just with the RX using Fedora 40 under Wayland. (currently accessing over RDP can try without during the week direct with the RX.
Install zwift xhost + start radeontop zwift
in my case radeontop shows activity once zwift started.
ls -la /dev/dri shows render128 as crw, rw, rw
Inside the container, starting as root:
podman run -it --rm --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /run/user/1000/pulse:/run/user/1000/pulse -v zwift-naeva:/home/user/Zwift --device /dev/dri:/dev/dri --entrypoint=bash docker.io/netbrain/zwift:latest
apt update
apt install mesa-utils
glxgears -info
Shows that the RX is being used and RadeonTop shows activity ls -la /dev/dir shows render128 as crw,rw,rw
Ok, radeontop does confirm the graphics card is active. I should have thought to run that to cross-check OpenRGB.
Curious though, the argb CPU cooler fan is changing color to show the CPU is getting warm, but the window in front of the graphics card stays blue. Just launched Borderlands 3 just to verify it's working and, the window changed color as expected when the game's graphic engine came online.
It may be as simple as Zwift just doesn't load my graphics card that much. Next time I run it, I'll try cranking up the graphics settings and see if that doesn't wake it up a bit.
That being said, it appears to be working after all, and I don't even seem to need xhost +.
UPDATE: Ok, "Jurrasic Coast" was just enough graphics load to make the temperature monitor color just start to transition from blue to green. No doubt it's working correctly now. It just doesn't load my card that much.
Hi, can you re-try. Re-install the latest zwift program and you probably have to remove the volume.
podman volume rm zwift-xxxxx
Where xxxx is your userid, then re-try. Latest should just work with Wayland and X11 under podman and docker.
Not working under Wayland, will work under X11 if I run "xhost +" first. Also, when I listed my podman volumes, I got
zwift-jkmooney zwift-naeva
The former is my username, don't know what the latter is.
Not working under Wayland, will work under X11 if I run "xhost +" first. Also, when I listed my podman volumes, I got
zwift-jkmooney zwift-naeva
The former is my username, don't know what the latter is.
Hi, please delete both, the naeva was something I noticed to when I started testing to fix, not sure where it came from but delete it it should not appear anymore.
Ok just to confirm you re-updated the latest zwift script from git hub using Curl? It downloaded the latest
in the zwift you can compare what you have in /usr/local/bin with the zwift.sh in the repo to make sure you are up to date.
What do you see did it open then crash after update? I saw this once but after it was stable.
What OK I think Fedora and Gnome What Card (I can't test Intel but have Nvidia/ AMD dGPU and iGPU and Virt IO GL and SPice etc so can easliy test) If Nvidia what drivers Noveau or Nvidia.
Sorry also podman/ docker and what environment variables.
Thanks
I did reinstall zwift using curl. I'm currently on business travel so it will be middle of next week before I can try again.
On Mon, May 13, 2024, 2:58 AM Richard Holmes @.***> wrote:
Not working under Wayland, will work under X11 if I run "xhost +" first. Also, when I listed my podman volumes, I got
zwift-jkmooney zwift-naeva
The former is my username, don't know what the latter is.
Hi, please delete both, the naeva was something I noticed to when I started testing to fix, not sure where it came from but delete it it should not appear anymore.
Ok just to confirm you re-updated the latest zwift script from git hub using Curl? It downloaded the latest
in the zwift you can compare what you have in /usr/local/bin with the zwift.sh in the repo to make sure you are up to date.
What do you see did it open then crash after update? I saw this once but after it was stable.
What OK I think Fedora and Gnome What Card (I can't test Intel but have Nvidia/ AMD dGPU and iGPU and Virt IO GL and SPice etc so can easliy test) If Nvidia what drivers Noveau or Nvidia.
Thanks
— Reply to this email directly, view it on GitHub https://github.com/netbrain/zwift/issues/88#issuecomment-2106794686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA76BALFN2F3NDLPHBWBAN3ZCBQB7AVCNFSM6AAAAABGBMEWC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWG44TINRYGY . You are receiving this because you commented.Message ID: @.***>
Hi, I read ealier your setup forgot we already discussed, I see that in some cases the XAuthority does not seem to work, when you get back can you check what XAUTHORITY contains on your host please.
@joekm - Have updated to always use the xhost +local.... for both X11 and XWayland, hopfully this works on all distributions.
Under Wayland: echo $XAUTHORITY comes up blank. Similarly ~/.Xauthority exists, but is an empty file.
Under X11: echo $XAUTHORITY gives me a cookie file in the /tmp directory.
With latest update to Zwift.sh, X11 is working fine but Wayland fails to launch with the following message:
Error: host directory cannot be empty
Anything in the log before, that line is saying that the container failed to run, can you post what the container command is too please :)
CONTAINER=$($podman .....) for example.
I'll dive more into it when I have some time but it kind of looks like it's not getting something to assign to CONTAINER...
Its the XAUTHROITY bit, its blank which is not good, did you say which distro you are on, seems XAuthority is not used.
I think for your case we need to add a check for XAUTHORITY and if blank probably enable xhost, I assume you have xhost installed.
I'm running EndeavourOS (pretty close to Arch). The window manager is Hyprland. I've tried launching this on Hyprland by running "xhost +" first but it still doesn't work. (I do have xhost installed). . The other desktop I have installed is XFCE (which is X11) and this runs just fine on that.
Never tried EndevourOS will spin it up, also not yet tried hyperland but interested to see what it would offer me.
poking around, this looks like it may impact both Hyprland and Sway desktops on Arch.
I have hyperland installed and see the same error, its down to xauthority not sure what yet.
Can you edit the /usr/local/bin/zwift and comment out the line -v $XAUTHORITY:$(echo $XAUTHORITY | sed 's/'$UID'/'$ZWIFT_UID'/')
as shown below.
Hyperland doesn't need XAUTHORITY to release the window, I will put an update in the latest updates I have ongoing.
# Setup Wayland Usage.
if [[ ! -z $WAYLAND_DISPLAY ]]
then
if [[ ! -z $WINE_EXPERIMENTAL_WAYLAND ]]
then
# Using Experimental Wayland, setup required parameters
# To force wayland DISPLAY must be blank.
WAYLAND_FLAGS=(
-e XDG_RUNTIME_DIR=/run/user/$ZWIFT_UID
-e PULSE_SERVER=/run/user/$ZWIFT_UID/pulse/native
-e WINE_EXPERIMENTAL_WAYLAND=1
)
else
WAYLAND_FLAGS=(
--hostname $HOSTNAME
-e PULSE_SERVER=/run/user/$ZWIFT_UID/pulse/native
# -v $XAUTHORITY:$(echo $XAUTHORITY | sed 's/'$UID'/'$ZWIFT_UID'/')
)
fi
else
X11_FLAGS=(
--hostname $HOSTNAME
-v $XAUTHORITY:$(echo $XAUTHORITY | sed 's/'$UID'/'$ZWIFT_UID'/')
)
fi
Yes so hyprland is not using XAUTHORITY however xhost by default allows local user to run X Programs so commenting this out should work.
I have updated the script in the latest pull request.
That seems to have fixed it on Hyprland, thanks :). From what I was reading this morning, it's possible Sway may have the same issue (or maybe any Wayland Compositor/Window Manager).
possibly, I don't know sway either. Basically the current preferred way is to use Xauthority, in these cases default is disable access and Xauthority gives access.
However I was reading some compositors and WM's don't use xauthority, in Hyperlands case when starting it automatically adds xhost +SI:localhost:
If neither xauthority or xhost access is set then no x applications would work so I think it might be safe to assume its going to be one or the other.
So I updated the latest pull to check for xauthority first then if not there assume access is defined by xhost rules and we can see if we get other issues. Would be easier to figure out:
I'll close this thread once we have the merges reviewed/ updated and merged.
Latest is released, please re-install zwift from following instructions in the README.
When I ran it complained about an existing container which I remeoved using podman container rm zwift-xxxxx
but that could just be because I have been messing and left it around.
Can confirm it's working on both Hyprland (Wayland) and XFCE (X11). Thanks again and ride on :)
Describe the bug Running the container closes almost immediately, checking the journal I see:
stdout is:
Without authentication I just see this:
So I think that's likely the salient stuff.
To Reproduce Load plasma on wayland, run /usr/local/bin/zwift
Additional context If I load plasma on X and run it (after installing xhost) it works fine. It seems to be some wayland problem? This is the first time I've used wayland/a desktop environment in more than a decade so I am pretty clueless at what to troubleshoot.
System information: