amdgpu has a recovery mechanism built in that can be triggered using sudocat /sys/kernel/debug/dri/N/amdgpu_gpu_recover where N is the number of the DRI device in question. You could bind a shortcut to doing that I presume.
I have an AMDGPU machine - a hateful HP laptop with a Vega 6 chipset - and the display regularly goes garbled when I switch VTs. I too am looking for a way to “reset the graphics card” and cat /sys/kernel/debug/dri/N/amdgpu_gpu_recover ain’t it: it resets it alright, but after that you get a frozen image and X is dead.
Maybe Wayland survives that but Xorg definitely doesn’t.
The only reliable graphics card reset solution I’ve every found was to close then reopen the laptop to force the machine to go to sleep, then wake up and go through the restart rigmarole cleanly. I wish there was a way to do that sleep-wakeup routing with a keyboard shortcut, but I haven’t found one.
I think the real solution is to buy a decent replacement laptop though.
Yeah, Xorg (and the apps) will likely die. There is a wayland protocol in the works to be able to gracefully handle driver resets but I’m not sure on its implementation status.
amdgpu
has a recovery mechanism built in that can be triggered usingsudo cat /sys/kernel/debug/dri/N/amdgpu_gpu_recover
where N is the number of the DRI device in question. You could bind a shortcut to doing that I presume.Hmm I have AMD but I’m getting
No such file or directory
Which part of the path does not exist?
Is it the correct GPU number?
I have an AMDGPU machine - a hateful HP laptop with a Vega 6 chipset - and the display regularly goes garbled when I switch VTs. I too am looking for a way to “reset the graphics card”
and cat /sys/kernel/debug/dri/N/amdgpu_gpu_recover
ain’t it: it resets it alright, but after that you get a frozen image and X is dead.Maybe Wayland survives that but Xorg definitely doesn’t.
The only reliable graphics card reset solution I’ve every found was to close then reopen the laptop to force the machine to go to sleep, then wake up and go through the restart rigmarole cleanly. I wish there was a way to do that sleep-wakeup routing with a keyboard shortcut, but I haven’t found one.
I think the real solution is to buy a decent replacement laptop though.
Yeah, Xorg (and the apps) will likely die. There is a wayland protocol in the works to be able to gracefully handle driver resets but I’m not sure on its implementation status.