You are not logged in.

#1 2025-07-23 18:24:20

Lancisman
Member
Registered: 2025-07-23
Posts: 8

GPU changing from GPU1 to GPU2 and vice versa.

I have a widget on my taskbar, specifically "System Monitor Sensor", which shows my GPU temp. However, seemingly with no pattern, it changes from GPU1 to GPU2 and vice versa. Meaning I have to quite often manually change it. I am using an Nvidia RTX 3060 Ti, and a Ryzen 7 5800x, meaning I have no iGPU. With an up-to date system.

Last edited by Lancisman (2025-07-23 18:25:55)

Offline

#2 2025-07-23 19:55:15

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,670

Re: GPU changing from GPU1 to GPU2 and vice versa.

What "taskbar"? What "widget"? We don't event know what desktop environment this is.

lspci
nvidia-smi

Offline

#3 2025-07-23 21:00:55

Lancisman
Member
Registered: 2025-07-23
Posts: 8

Re: GPU changing from GPU1 to GPU2 and vice versa.

I am using KDE Plasma. When trying to select the GPU within the configuration menu on the widget, sometimes it says GPU 2, other times it says GPU 1. After it changes the widget becomes blank.

Offline

#4 2025-07-24 05:11:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,670

Re: GPU changing from GPU1 to GPU2 and vice versa.

seth wrote:
lspci
nvidia-smi

In doubt it might be the simplydumb device - try to add "nvidia_drm.modeset=1" to your https://wiki.archlinux.org/title/Kernel_parameters (not! some modprobe.conf! only the kernel parameter will for now block the simpledrm device, everything else would apply too late)

Offline

#5 2025-07-30 10:54:24

mennede
Member
Registered: 2025-07-30
Posts: 5

Re: GPU changing from GPU1 to GPU2 and vice versa.

I have exactly the same problem. I noticed this issue around April 2025 (but can't put my finger on the exact date).
The change from GPU1 to GPU2 appears (seemingly randomly) after kernel updates. If the change happens and I switch from the main kernel branch to the current RC kernel, then it switches back (GPU2 → GPU1). In this way, I hop every other week from RC to Main, and back big_smile... Looking forward to a fix.

Hardware: Two different laptops with AMD 7840U (with internal GPU). Both using KDE Plasma.

Last edited by mennede (2025-07-30 11:42:27)

Offline

#6 2025-07-30 13:51:03

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,670

Re: GPU changing from GPU1 to GPU2 and vice versa.

And did you try to block the simpledrm device?

Offline

#7 2025-07-31 13:30:40

mennede
Member
Registered: 2025-07-30
Posts: 5

Re: GPU changing from GPU1 to GPU2 and vice versa.

Thanks, Seth.

I've set it and changed the kernel back; it works for now. Let's see.

Since this is the newbie corner, here's a tutorial for others:

0. Your main goal is to deactivate the simpledrm driver, which is a basic Direct Rendering Manager (DRM) driver. Sometimes it loads before your GPU driver and snatches the "GPU1" spot, forcing your GPU to take the "GPU2" spot. This leads to errors if you try to read stats of GPU1, for example, in your system monitor.
1. To deactivate the simpledrm driver, you need to add a kernel parameter. How to add a kernel parameter depends on your boot loader (e.g., GRUB, systemd-boot, rEFInd, etc.). Check out the page https://wiki.archlinux.org/title/Kernel_parameters and find your boot loader.
2. Open the corresponding file with a text editor and add the following (no matter if you have an AMD, nVidia or Intel GPU): nvidia_drm.modeset=1
2.1. If you have an NVIDIA card, add: nvidia_drm.modeset=1
2.2. If you have an AMD card, add: amdgpu.modeset=1
3. Save and reboot.

Cheers

EDIT: Updated the tutorial following seth's remarks.

Last edited by mennede (2025-08-02 14:44:48)

Offline

#8 2025-07-31 15:00:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,670

Re: GPU changing from GPU1 to GPU2 and vice versa.

If you have an AMD card, add: amdgpu.modeset=1

No.
ONLY "nvidia_drm.modeset=1" blocks the simpledrm device (for now - it's a complete hack because there's no official way to toggle this PoS w/o recompiling the kernel - nvidia_drm.modeset=1 was added because before nvidia_drm.fbdev, older nvidia drivers could not even theoretically take over from the simpledrm device)

Offline

#9 2025-08-02 09:24:06

mennede
Member
Registered: 2025-07-30
Posts: 5

Re: GPU changing from GPU1 to GPU2 and vice versa.

seth, a naive question: does nvidia_drm.modeset=1 work with amd GPUs (and does it achieve the same result)?

Offline

#10 2025-08-02 09:30:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,670

Re: GPU changing from GPU1 to GPU2 and vice versa.

It does achieve the result of blocking the simpledrm device, yes.
Otherwise it'll just do nothing as you'll never load an nvidia_drm  module, but that's ok. We only care about the simpledrm device and it can (for now) only be deactivated by this hack.

Offline

#11 2025-08-02 14:46:00

mennede
Member
Registered: 2025-07-30
Posts: 5

Re: GPU changing from GPU1 to GPU2 and vice versa.

Thanks for the clarification.
Cheers

Offline

#12 2025-10-23 13:07:11

mennede
Member
Registered: 2025-07-30
Posts: 5

Re: GPU changing from GPU1 to GPU2 and vice versa.

Well, it happened again... (despite "nvidia_drm.modeset=1")

Some digging in

journalctl -b | grep -i "drm"

revealed that first, simpledrm takes GPU1, then it's handed over to amdxdna_accel_driver, and GPU2 is assigned to amdgpu.
amdxdna_accel_driver corresponds to the NPU, as far as I know.

Any ideas on how to manually force amdgpu to take the GPU1 slot ("minor 0")?

Last edited by mennede (2025-10-23 13:11:09)

Offline

#13 2025-10-23 15:35:00

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 72,670

Re: GPU changing from GPU1 to GPU2 and vice versa.

The "nvidia_drm.modeset=1"to block the simpledrm hack was removed.

Try "module_blacklist=simpledrm initcall_blacklist=simpledrm_platform_driver_init"
Alternatively, moving amdgpu but not amdxdna into the initramfs shall allow amdgpu to take over from simpledrm, but I suspect that's not what's actually going on here (and that amdgpu actually loads first, becomes card1 and then amdxdna takes the freed card0?)

Offline

Board footer

Powered by FluxBB