I had the same problem on my system with
- AMD Ryzen 5 7600
- NVIDIA GeForce RTX 3060
I solved the it by first following Secure Boot Instructions - Bazzite Documentation to enroll the NVIDIA driver & KMOD signing key for secure boot and then creating the following configuration file in my home directory.
~/.config/environment.d/nvidia.conf
:
__NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia
Now logout and log back in and run the following command to confirm that the NVIDIA GPU is being used:
glxinfo | grep "OpenGL renderer"
A bit late to the party, but I hope this helps out someone!