netbrain / zwift

Easily zwift on linux
The Unlicense
265 stars 28 forks source link

Fedora 40 with Nvidia - Performance #147

Closed cmuench closed 3 months ago

cmuench commented 4 months 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 4 months ago

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

cmuench commented 4 months ago

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

sHedC commented 4 months 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 4 months 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 4 months 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 months 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 months ago

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

sHedC commented 3 months 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 3 months ago

@sHedC Works on my machine :-)

cmuench commented 3 months ago

@sHedC Thank you very much.