Solved NVIDIA RTX 4090 with driver version 560.35.03: Bad Vulkan/OpenGL performance with dolphin-emu

My FreeBSD version is 14.2-RELEASE.
I am using my GPU with the sway window manager on wayland.
The game in question is Zelda Twilight Princess which is on a ramdisk during execution.
Dolphin-emu and the config files are on a encrypted nvme ssd with a read/write speed of 3.5GB.

During the launch of the game in native resolution: 640x480, OpenGL performs fine, and I get 30 FPS full speed.
If I set the internal resolution up to 4K, the game struggles to maintain 30 FPS.
Vulkan on the other hand performs poorly even with the native resolution all the time.

My guess is that the GPU uses a software renderer, but it could also be something else.
Does someone know how to fix this problem ?
 
Problem solved.

What I did was testing various emulators (yuzu, pcsx2), and even WINE.
Different nvidia-driver versions along their kmods were built, but the performance staid as bad as it was from the beginning.
So, I tried different compositors like wayfire, hikari, and hyprland, but the performance did not improve.

The solution to the problem is rather simple, I switched back to x11 and the performance problems were solved.
Well, my guess seems to be not correct, but it seems that the nvidia drivers still do not perform well enough to consider the switch to wayland.
 
Apparently it is more an issue with nvidia drivers and xwayland. Are you sure that you tested wayland only application ?
(you can build wine-devel with wayland option on, then configure the wineprefix to prefer wayland over x11).
 
Apparently it is more an issue with nvidia drivers and xwayland. Are you sure that you tested wayland only application ?
(you can build wine-devel with wayland option on, then configure the wineprefix to prefer wayland over x11).
I tested wayland only applications like firefox for example, and it is running fine for streaming and other tasks.
On my system wine-devel was not build with the wayland option on so, it was running in xwayland mode.
After inspecting the EGL stream, I found out that it behaves strange with WLR.
I tried switching to GBM, but that did not help.

The last known driver version which worked for me with xwayland on sway 1.9 was 550.51.14 on FreeBSD.
I could successfully launch yuzu with Xenoblade 3, but the flickering due to lack of implicit sync did not make it a very great experience.

Maybe I should not compare here, but I think that the nvidia drivers are ports from linux.
On Void linux I did not get performance problems with xwayland on driver version 555.58.02, but I do not know why I got performance problems on FreeBSD with the same driver version.

Could there be a way to fix xwayland performance on the existing nvidia drivers for FreeBSD ?

I do not have any problems with moving completely back to X11, but I have have one 4K monitor with a refresh rate of 144Hz and one full HD TV screen with a refresh rate of 60Hz.
As I recall X11 does not like such multi-monitor setups with different refresh rates, and due to the refresh rate differences tearing occurs, and FreeSync on the 4K monitor does not work.
Should I really have no other choice, is there some way to get this multi-monitor setup working tear free without enabling ForceCompositionPipeline ?


EDIT:
As my last resort to attempt to get xwayland working with nvidia was to disable the GSP firmware, since some users on archlinux forums report that disabling the GSP firmware would fix the strange xwayland performance bug with nvidia cards.
I tried it out today, but with no luck.
Regarding X11 and multi monitors, I fixed the tearing problem by running i3 + Picom, and setting my screens manually with xrandr.
 
Last edited:
Back
Top