You are not logged in.

#1 2024-10-29 14:43:38

Per-Astra-Ad-Deum
Member
Registered: 2024-08-11
Posts: 21

[SOLVED]KDE: How to prevent processes from running on my dGPU (NVIDIA)

Hello there,

there are currently processes running on my dGPU (NVIDA RTX 3060 Ti). These processes prevent me from passing the GPU to my VM in an orderly fashion.

I'm running KDE Plasma on Wayland. I do not need nor want the dGPU to run any processes while not engaged with the VM, the only reason I got the nvidia-open driver installed is power-consumption (the vfio-driver would have the card consume ~25 Watts at idle!)

Here's the output of

nvidia-smi

Screenshot-20241029-153700.png

Simply killing these processes does not work, since they get restarted immediately.

Is there any way to prevent any processes from running on the dGPU?

Thanks in advance!

Last edited by Per-Astra-Ad-Deum (2024-10-30 22:24:22)

Offline

#2 2024-10-30 14:37:00

Per-Astra-Ad-Deum
Member
Registered: 2024-08-11
Posts: 21

Re: [SOLVED]KDE: How to prevent processes from running on my dGPU (NVIDIA)

The Egyptian God of deserts told me to grind topics, so here I am with an update.

1. I've continued my search on this issue and found this Github issue here: https://github.com/Bensikrac/VFIO-Nvidia-dynamic-unbind

From what I understand the author suggests enabling KMS for both Intel and NVIDIA and adding a variable to the /etc/environment config file. With this it should be possible to force KWIN to only use the first GPU (a.k.a. boot GPU) for launching processes.

That's what I tried. First the contents of /etc/mkinitcpio.conf:

Screenshot-20241030-152618.png

Contents of /env/environment

Screenshot-20241030-152750.png


Sadly, this didn't work out. The author suggests using `ls -la /dev/dri/by-path` to check the enumeration of the available GPUs. Sadly, enabling KMS for both GPUs did not result in Intel driver getting loaded first:

Screenshot-20241030-152930.png

Quite the contrary actually. `nvidia-smi` is now showing even more processes (in fact, the whole DE) running on the dGPU:

Screenshot-20241030-153148.png

While this seems like a setback I still believe it is the right way to go. Maybe someone with more experience with drivers/KMS can chime in and tell me the correct way of arranging the drivers?

Thanks in advance.

Offline

#3 2024-10-30 16:03:51

gnox
Member
Registered: 2013-05-18
Posts: 83

Re: [SOLVED]KDE: How to prevent processes from running on my dGPU (NVIDIA)

Offline

#4 2024-10-30 17:09:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,069

Re: [SOLVED]KDE: How to prevent processes from running on my dGPU (NVIDIA)

In addition to the ones mentioned above there's https://invent.kde.org/plasma/kwin/-/wi … rm_devices to tell KWin to explicitly only start on a specific GPU

Online

#5 2024-10-30 19:34:13

Per-Astra-Ad-Deum
Member
Registered: 2024-08-11
Posts: 21

Re: [SOLVED]KDE: How to prevent processes from running on my dGPU (NVIDIA)

Thank you for your suggestions! Here's the content of my current environment file:

Screenshot-20241030-203137.png

With these settings, the list is down to one process left:

Screenshot-20241030-203248.png

Any idea how to get rid of Xorg? I'm pretty much sold on Wayland, so if the solution leaves me without XWayland compatibility, so be it.

Offline

#6 2024-10-30 22:00:05

seth
Member
Registered: 2012-09-03
Posts: 58,184

Re: [SOLVED]KDE: How to prevent processes from running on my dGPU (NVIDIA)

Try /etc/X11/xorg.conf.d/10-server.conf

Section "ServerLayout"
    Identifier  "Layout 1"
    Option "IsolateDevice"  "PCI:0:2:0"
EndSection

Also for the future please don't embed "huge" images (the board has a 250x250px rule) and in general don't post pictures of text, post the text.

Offline

#7 2024-10-30 22:23:06

Per-Astra-Ad-Deum
Member
Registered: 2024-08-11
Posts: 21

Re: [SOLVED]KDE: How to prevent processes from running on my dGPU (NVIDIA)

seth wrote:

Try /etc/X11/xorg.conf.d/10-server.conf

Section "ServerLayout"
    Identifier  "Layout 1"
    Option "IsolateDevice"  "PCI:0:2:0"
EndSection

Also for the future please don't embed "huge" images (the board has a 250x250px rule) and in general don't post pictures of text, post the text.

Thank you for the tip. I've managed to get rid of the last remaining process by changing the following in /etc/X11/xorg.conf:

Section "Device"
	Identifier  "Card1"
	Driver      "intel"
	BusID       "PCI:0:2:0"
EndSection

That did the trick. I was about to report back, but I got caught up in the next issue. :-D

Well, I've surely learned a lot in these last few days.

Thank you all for your help!

Offline

Board footer

Powered by FluxBB