netbrain / zwift

Easily zwift on linux
The Unlicense
238 stars 27 forks source link

Zwift not GPU accelerated without change to VGA_DEVICE_FLAG #76

Closed dmccombs closed 5 months ago

dmccombs commented 6 months ago

Describe the bug With the zwift.sh script as it currently is, running Zwift in podman works, but is an unaccelerated slideshow with recent versions of nvidia kernel drivers/podman/libnvidia-container-tools.

The fix is the same as #45 - changing VGA_DEVICE_FLAG="--gpus all" to VGA_DEVICE_FLAG="--device=nvidia.com/gpu=all" in zwift.sh runs Zwift with GPU acceleration correctly.

To Reproduce Run zwift.sh with versions similar to: podman 4.9.2 linux kernel 6.7.4 nvidia-dkms 545.29.06 libnvidia-container-tools 1.13.5

Zwift will run without error, but is running extremely slowly.

Expected behavior Zwift should run using GPU acceleration, which it does after changing VGA_DEVICE_FLAG="--gpus all" to VGA_DEVICE_FLAG="--device=nvidia.com/gpu=all" in zwift.sh.

Additional context I don't have a good sense of which version of a dependency is potentially causing this, as I only started using this recently and never had it working correctly in the past. I'm not sure if the described VGA_DEVICE_FLAG change to fix this causes problems with any older versions of anything.

It's worth noting that even manually adding the -e NVIDIA_DRIVER_CAPABILITIES=all from #53 to zwift.sh does not fix it in the case of using podman rather than docker (though Zwift is accelerated correctly in docker on the same machine).