ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.26k stars 163 forks source link

NVidia drivers on Gnome or GBM based Wayland compositors #1567

Closed msmafra closed 1 day ago

msmafra commented 3 months ago

Describe the bug

Not a really a bug, but a feature that is required by NVIDIA to be enable on Gnome and can cause bugs. I posted it on Bazzite's Github issues some months back, but forgot to post it here. I'm no sure if it's enabled by default on Bluefin.

For XWayland the experimental kms-modifiers feature is needed since driver version 470.42.01 (as far as I could check). https://download.nvidia.com/XFree86/Linux-x86_64/470.42.01/README/xwayland.html https://download.nvidia.com/XFree86/Linux-x86_64/555.58.02/README/xwayland.html Still needed int the current beta https://download.nvidia.com/XFree86/Linux-x86_64/560.28.03/README/xwayland.html

Also for GBM based Wayland compositors since 495.29.05: https://download.nvidia.com/XFree86/Linux-x86_64/495.29.05/README/gbm.html https://download.nvidia.com/XFree86/Linux-x86_64/555.58.02/README/gbm.html Still needed in the current beta https://download.nvidia.com/XFree86/Linux-x86_64/560.28.03/README/gbm.html

It can be checked via terminal with gsettings or via Dconf Editor. Via terminal it will list which of the experimental features are already enabled: gsettings get org.gnome.mutter experimental-features Captura de tela de 2024-08-05 10-23-25

And you can enable with : gsettings set org.gnome.mutter experimental-features [\"kms-modifiers\"] Mind you if there are other experimental features enabled, they will be disabled. You must add each one you want to the command to have all enabled at once: gsettings set org.gnome.mutter experimental-features ['scale-monitor-framebuffer', 'kms-modifiers', 'autoclose-xwayland', 'variable-refresh-rate']

On Dconf Editor search for "experimental" or directly type /org/gnome/mutter/experimental-features

Captura de tela de 2024-08-05 09-36-58

What did you expect to happen?

For the experimental kms-modifiers features to be enabled by default on NVIDIA images

Output of rpm-ostree status

No response

Output of groups

No response

Extra information or context

As I have less and less glitches and bugs with Gnome Wayland, definetly not bug free but allowed me to use it daily, with the kms-modifiers features enabled summed to the updates from both Gnome and NVidia, I imagine that enabling this may really reduce problems and probably would've kept some of the users that tried Gnome on Wayland with NVIDIA (Not specific to Ublue projects, I mean).

bsherman commented 3 weeks ago

This still looks to be relevant in nvidia 565 https://download.nvidia.com/XFree86/Linux-x86_64/565.57.01/README/xwayland.html

bsherman commented 3 weeks ago

My one question on this, what's the impact for optimus laptops, or say a desktop which had an Intel/AMD primary GPU but used the nvidia image only to enable CUDA on the nvidia card, etc.

Will this experimental feature setting in GNOME hurt the Intel/AMD user on GNOME?

bsherman commented 3 weeks ago

I've enabled this on my intel hybrid laptop running the nvidia image as a test.

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer', 'kms-modifiers', 'autoclose-xwayland', 'variable-refresh-rate']"

So, i'll try this out and see if there's any concerns.

msmafra commented 3 weeks ago

I've enabled this on my intel hybrid laptop running the nvidia image as a test.

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer', 'kms-modifiers', 'autoclose-xwayland', 'variable-refresh-rate']"

So, i'll try this out and see if there's any concerns.

Just to clarify that only the kms-modifiers feature is mentioned by NVIDIA. I, by choice, enable all of them. Also, at least on Fedora 41 with Gnome 47, scale-monitor-framebuffer and variable-refresh-rate are enable by default now.

msmafra commented 3 weeks ago

Bazzite 41 already has 'variable-refresh-rate', 'scale-monitor-framebuffer', 'xwayland-native-scaling' enabled by default. KyleGospo at Bazzite will soon enable kms-modifiers by default. I'm not sure if Bluefin and Bazzite share those same settings for Gnome.

NVIDIA still have it on the documentation as must-be-enabled even for the current driver 565.57.01. Image

bsherman commented 3 weeks ago

I've enabled this on my intel hybrid laptop running the nvidia image as a test. gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer', 'kms-modifiers', 'autoclose-xwayland', 'variable-refresh-rate']" So, i'll try this out and see if there's any concerns.

Just to clarify that only the kms-modifiers feature is mentioned by NVIDIA. I, by choice, enable all of them. Also, at least on Fedora 41 with Gnome 47, scale-monitor-framebuffer and variable-refresh-rate are enable by default now.

Yep. Understood.

I chose to install all of them as well, and I haven't seen any issues so far with the hybrid machine ...

msmafra commented 2 weeks ago

Testing Bluefin I have to discard since I had problems after the installation, not being able to use my keyboard in the user creation stage. Had to forcefully shut down my laptop have be able to use it and after it, inside Bluefin 40 Gnome 46 was not feeling well on a dGPU installation. Felt sluggish compared to Bazzite and my Fedora 41 installation even after upgrading to Bluefin 41. I don't think this change https://github.com/rpmfusion/nvidia-kmod/blob/master/make_modeset_default.patch have anything to do with it, since testing last week Fedora Workstation 40 and 41 with NVIDIA drivers with RPMFusion's and Negativo17's I did not notice it.

bsherman commented 2 weeks ago

Regardless, @msmafra thank you for raising the issue.

I plan to add this setting as default for Bluefin nvidia images.