Plasma/Wayland/Nvidia: Difference between revisions

From KDE Community Wiki
(manually setting an env var is no longer needed as of Plasma 5.20.2 (released this morning))
(Restore a limitation, I was wrong when I removed it)
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Running Nvidia Wayland
Here's how to run with the '''proprietary''' Nvidia driver on Wayland:


=== Pre-requisites ===
=== Prerequisites ===
* Ensure that you are using Plasma 5.20.2 or later.
* You need a very up-to-date Qt. Make sure you have >= Qt5.15.0 or [https://code.qt.io/cgit/qt/qtwayland.git/commit/?id=4bd13402f0293e85b8dfdf92254e250ac28094c7 4bd13402f0293e85b8dfdf92254e250ac28094c7] cherry-picked.
* Make sure to have the Nvidia egl library installed. For example on Ubuntu and Neon the relevant package is called <code>libnvidia-egl-wayland1</code>


=== Mode setting===
To use the Plasma Wayland session:


Check our driver is running in modesettings mode
* Ensure that you are using Plasma 5.20.2 or later — preferably the latest stable release.
* Ensure the NVIDIA driver is not older than version 495.44 — KWin is no longer compatible with previous versions.
* You need an up-to-date Qt. Make sure you have >= Qt5.15.0 or [https://code.qt.io/cgit/qt/qtwayland.git/commit/?id=4bd13402f0293e85b8dfdf92254e250ac28094c7 4bd13402f0293e85b8dfdf92254e250ac28094c7] cherry-picked.
* Make sure to have the Nvidia EGL library installed. For example on Ubuntu and Neon the relevant package is called <code>libnvidia-egl-wayland1</code>
 
To use the Plasma Wayland session with hardware acceleration on XWayland apps, you need:
 
* Xorg 1.20.12 or later.
* XWayland 21.1.2 or later.
* libxcb 1.1.7 or later.
 
=== Use the modesetting driver===
Check our driver is running in modesettings mode:


<code>cat /sys/module/nvidia_drm/parameters/modeset</code>
<code>cat /sys/module/nvidia_drm/parameters/modeset</code>


It should print "Y"
It should print "Y". If not, modify your kernel command line and add the line <code>nvidia_drm.modeset=1</code>.
Search for "kernel parameters" in your distribution; https://wiki.archlinux.org/index.php/Kernel_parameters is a good starting point.


If not, modify your kernel command line and add the line <code>nvidia-drm.modeset=1</code>.
It is also possible to pass the parameter via module configuration:
Search for "kernel parameters" in your distribution  
 
https://wiki.archlinux.org/index.php/Kernel_parameters is a good starting point
<code>echo options nvidia_drm modeset=1 | sudo tee /etc/modprobe.d/nvidia_drm.conf</code>
 
You need to regenerate the initramfs in case your distribution provides the graphics drivers in initramfs (e.g. <code>sudo update-initramfs -u</code>)


=== Login ===
=== Login ===
* Select "Plasma (wayland)" from your login manager
* Select "Plasma (wayland)" from your login manager
* Enjoy your beautiful super-fast accelerated wayland desktop!


* Enjoy your beautiful super-fast accelerated wayland desktop!
=== Known Limitations ===
* Night Color is not applied to the mouse cursor: https://bugs.kde.org/show_bug.cgi?id=479889
* Poor performance on external screens on hybrid GPU setups when using NVIDIA GPU as a secondary GPU because it requires CPU copying from the primary GPU to the secondary GPU (see https://invent.kde.org/plasma/kwin/-/merge_requests/1031, https://bugs.kde.org/show_bug.cgi?id=452219)

Latest revision as of 23:07, 26 February 2024

Here's how to run with the proprietary Nvidia driver on Wayland:

Prerequisites

To use the Plasma Wayland session:

  • Ensure that you are using Plasma 5.20.2 or later — preferably the latest stable release.
  • Ensure the NVIDIA driver is not older than version 495.44 — KWin is no longer compatible with previous versions.
  • You need an up-to-date Qt. Make sure you have >= Qt5.15.0 or 4bd13402f0293e85b8dfdf92254e250ac28094c7 cherry-picked.
  • Make sure to have the Nvidia EGL library installed. For example on Ubuntu and Neon the relevant package is called libnvidia-egl-wayland1

To use the Plasma Wayland session with hardware acceleration on XWayland apps, you need:

  • Xorg 1.20.12 or later.
  • XWayland 21.1.2 or later.
  • libxcb 1.1.7 or later.

Use the modesetting driver

Check our driver is running in modesettings mode:

cat /sys/module/nvidia_drm/parameters/modeset

It should print "Y". If not, modify your kernel command line and add the line nvidia_drm.modeset=1. Search for "kernel parameters" in your distribution; https://wiki.archlinux.org/index.php/Kernel_parameters is a good starting point.

It is also possible to pass the parameter via module configuration:

echo options nvidia_drm modeset=1 | sudo tee /etc/modprobe.d/nvidia_drm.conf

You need to regenerate the initramfs in case your distribution provides the graphics drivers in initramfs (e.g. sudo update-initramfs -u)

Login

  • Select "Plasma (wayland)" from your login manager
  • Enjoy your beautiful super-fast accelerated wayland desktop!

Known Limitations