If you experience any difficulty in accessing content on our website, please contact us at 1-866-333-8917 or email us at support@chicagovps.net and we will make every effort to assist you.

By
January 13, 2025

Switching Your Primary GPU to NVIDIA on Wayland for KDE Plasma and GNOME: A Step-by-Step Guide

Most Linux distributions default to using the integrated GPU (typically an AMD or Intel graphics card) on laptops and desktops. If you want to switch your primary GPU to an NVIDIA card while using Wayland, here’s a quick guide based on the GNOME and KDE Plasma desktop environments, which are popular among Linux users.

Pre-requisites

This tutorial specifically caters to users operating under Wayland. For those using an X11/Xorg session, an alternative guide can be found in the article about connecting Linux laptops to external monitors.

Check Your Current GPU

Start by checking which GPU is currently in use on your system. Open your terminal and run:

glxinfo | egrep "OpenGL vendor|OpenGL renderer"

Switching the Primary GPU on GNOME

  1. Create a new udev rules file by executing the following command in your terminal:

    sudo nano /usr/lib/udev/rules.d/61-mutter-primary-gpu.rules
  2. In the opened file, paste the following rule to set your NVIDIA GPU as the primary device:

    ENV{DEVNAME}=="/dev/dri/card0", TAG+="mutter-device-preferred-primary"
  3. You’ll want to confirm which GPU corresponds to /dev/dri/card0. Use these commands to identify your GPU’s PCI number:

    ls -l /dev/dri/by-path/lspci -k | grep -EA3 'VGA|3D|Display'

Switching the Primary GPU on KDE Plasma

  1. For KDE Plasma, create a configuration directory and file as follows:

    mkdir -p ~/.config/environment.d/nano ~/.config/environment.d/90-nvidia.conf
  2. Paste the following lines into the 90-nvidia.conf file:

    __NV_PRIME_RENDER_OFFLOAD=1__GLX_VENDOR_LIBRARY_NAME=nvidia__VK_LAYER_NV_optimus=NVIDIA_only

Final Steps

After saving your changes, reboot your computer to activate the new settings. Verify that the NVIDIA graphics card is designated as the default GPU, either by using command-line tools or checking the System Settings application.

This process should effectively switch your primary GPU to NVIDIA when operating under Wayland, allowing you to leverage the performance benefits of your dedicated graphics card.


ChicagoVPS is your gateway to unparalleled hosting solutions. Our state-of-the-art datacenters and powerful network ensures lightning-fast speeds and uninterrupted connectivity for your websites and applications. Whether you’re a startup looking for scalable resources or an enterprise in need of enterprise-grade hosting, our range of plans and customizable solutions guarantee a perfect fit. Trust in ChicagoVPS to deliver excellence, combining unmatched reliability and top-tier support.

For Inquiries or to receive a personalized quote, please reach out to us through our contact form here or email us at sales@chicagovps.net.

Subscribe Email

Top