netbrain / zwift

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

Fedora 40 with Nvidia - Performance #147

Closed cmuench closed 2 weeks ago

cmuench commented 4 weeks ago

Describe the bug If I start zwift on my Fedora Linux machine the GPU is not used. Maybe a regression bug. I know that the NVIDIA_DRIVER_CAPABILITIES is set in the Dockerfile.

Expected behavior I can use my Nvidia GPU

Additional context If I add -e NVIDIA_DRIVER_CAPABILITIES=all the problem is fixed.

That's my patched file:

#########################
##### RUN CONTAINER #####
CONTAINER=$($CONTAINER_TOOL run ${GENERAL_FLAGS[@]} \
        $ZWIFT_CONFIG_FLAG \
        $ZWIFT_USER_CONFIG_FLAG \
        $VGA_DEVICE_FLAG \
        -e NVIDIA_DRIVER_CAPABILITIES=all \
        ${DBUS_CONFIG_FLAGS[@]} \
        ${WM_FLAGS[@]} \
        ${PODMAN_FLAGS[@]} \
        $IMAGE:$VERSION $@
)
sHedC commented 3 weeks ago

Are you running the nvidia driver or Nouveau? I assume Nvidia?

cmuench commented 3 weeks ago

Proprietary nvidia driver. I am on the 555 which is really fresh.

sHedC commented 3 weeks ago

I'll look into it currently using Nouveau as not got round to setting up the proprietary but have to for another project.

cmuench commented 3 weeks ago

No worry. I am able to fix this issues from my side. I opened this issue for other people with the same problem. I just had a view to the Dockerfile.

The ENV var was introduced there. https://github.com/netbrain/zwift/blob/cf43c78c8fb4e154002f9107be6f30705e9d295b/Dockerfile#L29

In the meantime we have multi step build there. In the last step the ENV var is missing. If we move the env var after the FROM wine-base it may be fixed.

sHedC commented 3 weeks ago

If you can give that a go :) if not I will try it out once I get my driver switched over.

sHedC commented 3 weeks ago

Hi, I switched to the nvidia drivers, after some issues with resiable bar and the /dev/card changing sorted. I don't have this issue but I only have an NVIDIA card in mine no other capable device.

Do you have an intel chip with video?
And do you think it might be related to #21

cmuench commented 3 weeks ago

@sHedC I have a AMD based system (AMD Ryzen 9 7950X) with a NVIDIA 4060 TI.

sHedC commented 2 weeks ago

@cmuench - Can you try with the latest zwift.sh and container, I have moved relevant flags to the correct location so hopfully works.

cmuench commented 2 weeks ago

@sHedC Works on my machine :-)

cmuench commented 2 weeks ago

@sHedC Thank you very much.