You are not logged in.

#1 2023-11-17 18:43:39

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Is it possible to swap GPU drivers without rebooting?

Im having a lot of bugs with amdgpu. So i decided to just use radeon.

However, I still need amdgpu when I play games (and radeon for everything else). However, swapping kernel parameters and rebooting takes a pretty time. Is there a way to do it without rebooting?


I already tried using modprobe for this: "modprobe --remove-dependencies radeon && modprobe -rf radeon", but this doesn't work. It seems like radeon is still in use (modprobe: FATAL: Module radeon is in use.) even though Im running the command on a tty. Also, if I run "lsof | grep radeon", the output is empty.

How could I use modprobe to remove radeon, and then use modprobe again to load amdgpu?

Last edited by Sempiternal-Futility (2023-11-17 18:46:31)

Offline

#2 2023-11-17 20:37:29

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: Is it possible to swap GPU drivers without rebooting?

Effectively "not" - if that's your only GPU.
(Certainly not w/o restarting your GUI session which likely is the brunt of the "rebooting" hassle anyway?)

Im having a lot of bugs with amdgpu. So i decided to just use radeon.

Some recent posts where actually more the other round.
What kind of "bugs with amdgpu"? Maybe it's easier to straighten those.

Offline

#3 2023-11-17 21:03:38

xerxes_
Member
Registered: 2018-04-29
Posts: 820

Re: Is it possible to swap GPU drivers without rebooting?

You would have to end all graphical sessions: end X server/Wayland session(s), get away from graphical.target to multi-user.target: 'systemctl isolate multi-user.target', change amdgpu module to radeon or vice versa and return back to graphical.target, start graphical session...
You could try if that work but as day to day solution would it be comfortable?

Offline

#4 2023-11-17 21:08:24

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: Is it possible to swap GPU drivers without rebooting?

Even in the multi-user.target the console is gonna claim the device for KMS, https://unix.stackexchange.com/question … -rebooting

Offline

#5 2023-11-20 19:54:00

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Re: Is it possible to swap GPU drivers without rebooting?

Ok, So I just wrote a script to:

1- edit /etc/default/grub
2- run grub-mkconfig
3- reboot

It does all of these 3 steps automatically, so it's pretty quick

Last edited by Sempiternal-Futility (2023-11-20 19:55:58)

Offline

#6 2023-11-20 19:55:21

Sempiternal-Futility
Member
Registered: 2023-09-10
Posts: 18

Re: Is it possible to swap GPU drivers without rebooting?

Now, how do I mark this post as [SOLVED] or close it?

Offline

#7 2023-11-20 21:53:46

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

Re: Is it possible to swap GPU drivers without rebooting?

Edit the title in the first post (might have to shorten a little)

Offline

#8 2023-11-26 23:47:33

walkingstickfan
Member
From: USA
Registered: 2021-05-10
Posts: 107

Re: Is it possible to swap GPU drivers without rebooting?

Sempiternal-Futility wrote:

Ok, So I just wrote a script to:

1- edit /etc/default/grub
2- run grub-mkconfig
3- reboot

It does all of these 3 steps automatically, so it's pretty quick

Thank you for sharing your solution. So, I'm assuming that this just refreshes the GUI/desktop to recognize the GPU driver switch. How are you switching the GPU drivers? Are you using modprobe?


Arch Linux with Openbox & Tint2

Offline

#9 2023-11-27 07:18:41

seth
Member
Registered: 2012-09-03
Posts: 60,378

Re: Is it possible to swap GPU drivers without rebooting?

Fwwy, you could also have two different bootloader entries with the desired amdgpu/radeon parameters to steer the selection and call them "Archlinux/amdgpu" and "Archlinux/radeon" respectively, so you can skip the grub-mkconfig part. You just reboot and select what you want.

Edit: maybe even use https://wiki.archlinux.org/title/GRUB/T … _only_once

Last edited by seth (2023-11-27 07:20:21)

Offline

Board footer

Powered by FluxBB