sudo prime-select nvidia
nvidia catched
nvidia driver already in use!
It also shows me in the “About this system” settings on Wayland: Graphics card - Mesa Intel® UHD Graphics 620, When on X11, it shows me my Nvidia MX150.
Do I understand correctly that in a Wayland session my laptop uses only an Intel card even for games? If so, how do I switch to Nvidia? My goal is to have all applications use the NVIDIA card under the Wayland so that I don’t have to run every single application through prime-run.
You can use switcheroo-control alongside PRIME (PRIME not required), enable it though systemd, and enable dGPU for .desktop files or applications entries.
sudo zypper in switcheroo-control
sudo systemctl enable --now switcheroo-control
Then right-click your application entry or .desktop file > Edit application… > Application > Advanced options > and mark “Run using dedicated graphics card”
Well, your option helps to run individual applications through NVIDIA, but is it possible for the entire system to use an NVIDIA video card instead of Intel as in an X11 session?
I guess you can do so by using PRIME (command given by malcolmlewis), but to what chip the output is connected to also matters. Many modern laptops with dedicated GPUs use a muxless connection in which the output goes to the iGPU and the dGPU can be used to render graphics, then the dGPU sends the rendered content to the iGPU which will output the buffer to the display, this way, rendering the entire system on the dGPU would only increase delay a bit and would also put more stress on it. There could be a exception if you got a external video output connected on the dGPU like on my case.
Both are VGA, which means my dGPU got a direct output.
I got a Thunderbolt video output, which is connected to the AMD Radeon iGPU (as the built-in display), and a HDMI that’s connected to the NVIDIA GPU. By default, Wayland manages it by rendering the HDMI output on the dGPU and the Thunderbolt and built-in display output on the iGPU.
Anyways. ¿Why would you want to use the NVIDIA GPU for the system? I would recommend keeping it on Intel UHD for battery life and for the durability of your dGPU, also to save resources on it so the dGPU can focus on high-demanding activities like gaming, and also as the NVIDIA driver is kinda buggy and you would suffer from it.
The battery of my laptop is already 50 per cent worn out, so I only use it when it’s charging. So I would like to use the full power of the laptop, even at the OS level, without considering the battery.
Your hardware is designed to send NVIDIA buffer to the Intel GPU so the integrated graphics will send it to the display, there’s no video output connected on the NVIDIA GPU. So even if you’re rendering the desktop environment on the NVIDIA, you’ll still use the Intel. Again, offloading the NVIDIA GPU is the best setting as your hardware is designed to work this way, and also as GeForce MX150 is not a strong one and you would like to free resources on it for higher demanding graphics. Intel UHD 620 is more than enough to render Plasma very well (trust me).
But anyways, you can switch Plasma to use the discrete graphics on Wayland by creating a file “nvidia-plasma.sh” on /etc/profile.d/
KWIN_DRM_DEVICES=/dev/dri/cardX # Where X is the number of your discrete graphics (probably 1)
Using PRIME doesn’t seems to really affect Wayland on my tests.
You can also disable the Intel UHD Graphics 620 from modprobe. But i think it will not work on your hardware design (the display will most likely not display anything).
I first tried the first option with KWIN_DRM_DEVICES=/dev/dri/by-path/pci-0000:01:00.0-card and KWIN_DRM_DEVICES=/dev/dri/cardX (with 1 and 0), but it didn’t change anything.
Then I added Intel to the blacklist, but as you said, the system just stopped displaying anything after the restart, so I had to delete this file through Recovery mode. So no progress so far (although I’m still using your method above to run some programs through NVIDIA, but I’m still wondering if it’s possible to run KDE + Wayland through NVIDIA in my case)
@JabaTheFrog what is you expectation for running the Nvidia GPU, any application can be started to use the Nvidia GPU, some these days will automatically use Prime Render Offload GPU, browsers, terminal applications, LibreOffice etc.
You can probably set up GUC/HUC for your Intel GPU (If not already running) as well.
Disable and uninstall switcheroo-control, it was meant to give Optimus d-bus for applications, since you want to use NVIDIA almost exclusively (you’re still going to need Intel to output graphics for the display) you’ll not need it anymore. And, ¿i guess that’s conflicting with that configuration? Uninstall it and try.
I’ve also tried with card0. Both gives results, the GPU fan speeds up, but it gets stuck in a black screen and i can’t use CTRL to change TTY. No error is log in journal. ¿So it’s working in the half, i guess? lol
It may work in your system, must be a setting (probably power management settings made it break), give it a try.
The thing is that in the X11 session, KDE already runs on NVIDIA, and only under Wayland it switches to Intel, so I wanted this result under Wayland as well, because gestures and shortcuts don’t work under X11 in my case.
@JabaTheFrog So when on Xorg, is there a configuration file under /etc/X11/ or /etc/X11/xorg.conf.d/?
When running Xorg, what does the output from xrandr --listproviders and xrandr --listmonitors show?