zwift: Container crashes on wayland. Works on X: err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.

Describe the bug Running the container closes almost immediately, checking the journal I see:

Apr 11 10:34:04 bark zwift[25964]: 01a4:err:ole:CoGetContextToken apartment not initialised
Apr 11 10:34:04 bark zwift[25964]: 0184:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Foundation.Diagnostics.AsyncCausalityTracer"
Apr 11 10:34:05 bark zwift[25964]: 0184:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
Apr 11 10:34:05 bark zwift[25964]: 0184:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
Apr 11 10:34:05 bark zwift[25964]: + wine start /exec /bin/runfromprocess-rs.exe 384 ZwiftApp.exe '--token={"access_token":"<redacted>","expires_in":21600,"refresh_expires_in":691200,"refresh_token":"<redacted>","scope":"openid"}'
Apr 11 10:34:05 bark zwift[25964]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { code: HRESULT(0x80070057), message: "Invalid parameter." }', src/main.rs:38:73
Apr 11 10:34:05 bark zwift[25964]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Apr 11 10:34:05 bark zwift[25964]: 01e0:err:seh:NtRaiseException Unhandled exception code c0000409 flags 1 addr 0x1400347f6

stdout is:

+ IMAGE=docker.io/netbrain/zwift
+ VERSION=latest
+ [[ ! -n '' ]]
++ command -v podman
+ [[ -x /usr/bin/podman ]]
+ CONTAINER_TOOL=podman
+ [[ ! -n '' ]]
+ podman pull docker.io/netbrain/zwift:latest
Trying to pull docker.io/netbrain/zwift:latest...
Getting image source signatures
Copying blob c12bfc3fd135 skipped: already exists
<SNIP>
bb153ec22d63b7bd628ba5b929b5bab98946ca8b121020fc98e59f3bfded184b
+ [[ -f /proc/driver/nvidia/version ]]
+ VGA_DEVICE_FLAG='--device /dev/dri:/dev/dri'
+++ '[' podman = podman ']'
+++ echo --userns=keep-id
++ podman run -d --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 docker.io/netbrain/zwift:latest
+ CONTAINER=ab12285132782d872399f8865e86713f0bfd472c2c8426e8a964dd5be2772040
+ [[ -z wayland-0 ]]

Without authentication I just see this:

Apr 11 08:41:00 bark zwift[8761]: 01c0:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
Apr 11 08:41:00 bark zwift[8761]: 01c0:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
Apr 11 08:41:01 bark zwift[8761]: + pgrep -f ZwiftApp.exe
Apr 11 08:41:01 bark zwift[8761]: Killing uneccesary applications

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:

OS: Arch Linux x86_64 
Host: 20QGS1DB00 ThinkPad X1 Yoga 4th 
Kernel: 6.8.4-arch1-1 
Uptime: 12 hours, 54 mins 
Packages: 1503 (pacman) 
Shell: bash 5.2.26 
Resolution: 1920x1080 
DE: Plasma 6.0.3 
WM: kwin 
Theme: [Plasma], Breeze-Dark [GTK2], Breeze [GTK3] 
Icons: [Plasma], breeze-dark [GTK2/3] 
Terminal: konsole 
Terminal Font: MesloLGS NF 14 
CPU: Intel i5-8365U (8) @ 4.100GHz 

About this issue

  • Original URL
  • State: open
  • Created 3 months ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

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 +.

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.