How to kill all processes/restart kde if display driver crashes?

Inxi

System:
Kernel: 6.3.4-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=c1b022fd-810c-44a6-916b-f1e5336edd99 rw rootflags=subvol=@
rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.5 tk: Qt v: 5.15.9 wm: kwin_wayland dm: SDDM
Distro: Garuda Linux base: Arch Linux
Machine:
Type: Server System: Supermicro product: M12SWA-TF v: 123456789
serial: <filter> Chassis: type: 17 v: 0123456789 serial: <filter>
Mobo: Supermicro model: M12SWA-TF v: 1.01 serial: <filter> UEFI: American
Megatrends LLC. v: 2.0a date: 03/18/2022
CPU:
Info: model: AMD Ryzen Threadripper PRO 5975WX s socket: SP3 bits: 64
type: MT MCP arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
process: TSMC n7 (7nm) family: 0x19 (25) model-id: 8 stepping: 2
microcode: 0xA008204
Topology: cpus: 1x cores: 32 tpc: 2 threads: 64 smt: enabled cache:
L1: 2 MiB desc: d-32x32 KiB; i-32x32 KiB L2: 16 MiB desc: 32x512 KiB
L3: 128 MiB desc: 4x32 MiB
Speed (MHz): avg: 3600 min/max: 1800/7007 boost: enabled
base/boost: 3600/4550 scaling: driver: acpi-cpufreq governor: performance
volts: 1.1 V ext-clock: 100 MHz cores: 1: 3600 2: 3600 3: 3600 4: 3600
5: 3600 6: 3600 7: 3600 8: 3600 9: 3600 10: 3600 11: 3600 12: 3600
13: 3600 14: 3600 15: 3600 16: 3600 17: 3600 18: 3600 19: 3600 20: 3600
21: 3600 22: 3600 23: 3600 24: 3600 25: 3600 26: 3600 27: 3600 28: 3600
29: 3600 30: 3600 31: 3600 32: 3600 33: 3600 34: 3600 35: 3600 36: 3600
37: 3600 38: 3600 39: 3600 40: 3600 41: 3600 42: 3600 43: 3600 44: 3600
45: 3600 46: 3600 47: 3600 48: 3600 49: 3600 50: 3600 51: 3600 52: 3600
53: 3600 54: 3600 55: 3600 56: 3600 57: 3600 58: 3600 59: 3600 60: 3600
61: 3600 62: 3600 63: 3600 64: 3600 bogomips: 459983
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities: <filter>
Graphics:
Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX] vendor: Sapphire NITRO+
driver: amdgpu v: kernel arch: RDNA-3 code: Navi-3x process: TSMC n5 (5nm)
built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16 ports: active: DP-1,
DP-2, HDMI-A-1, HDMI-A-2 empty: none bus-ID: 23:00.0 chip-ID: 1002:744c
class-ID: 0300
Device-2: ASPEED Graphics Family driver: ast v: kernel ports: active: none
off: DVI-I-1 empty: none bus-ID: 68:00.0 chip-ID: 1a03:2000 class-ID: 0300
Display: server: X.Org v: 23.1.1 with: Xwayland v: 23.1.1
compositor: kwin_wayland driver: X: loaded: amdgpu,modesetting
unloaded: radeon alternate: fbdev,vesa dri: radeonsi gpu: amdgpu,ast
display-ID: :1 screens: 1
Screen-1: 0 s-res: 8720x2560 s-dpi: 96 s-size: 2307x677mm (90.83x26.65")
s-diag: 2404mm (94.66")
Monitor-1: DP-1 pos: primary,2-2 res: 3440x1440 hz: 165 dpi: 109
size: 800x340mm (31.5x13.39") diag: 869mm (34.22") modes: N/A
Monitor-2: DP-2 pos: 2-1 res: 1920x1080 hz: 120 dpi: 81
size: 600x340mm (23.62x13.39") diag: 690mm (27.15") modes: N/A
Monitor-3: HDMI-A-1 pos: 1-3 res: 1440x2560 hz: 120 dpi: 108
size: 340x600mm (13.39x23.62") diag: 690mm (27.15") modes: N/A
Monitor-4: HDMI-A-2 pos: 2-4 res: 1920x1080 hz: 60 dpi: 30
size: 1600x900mm (62.99x35.43") diag: 1836mm (72.27") modes: N/A
API: OpenGL v: 4.6 Mesa 23.1.0 renderer: AMD Radeon RX 7900 XTX (gfx1100
LLVM 15.0.7 DRM 3.52 6.3.4-zen1-1-zen) direct-render: Yes
Audio:
Device-1: AMD driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s
lanes: 16 bus-ID: 23:00.1 chip-ID: 1002:ab30 class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio driver: snd_hda_intel v: kernel
pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 25:00.4 chip-ID: 1022:1487
class-ID: 0403
Device-3: SAVITECH SA9023 audio controller
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
lanes: 1 mode: 1.1 bus-ID: 1-1.2:7 chip-ID: 262a:9023 class-ID: 0102
Device-4: Blue Microphones Yeti Stereo Microphone
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
lanes: 1 mode: 1.1 bus-ID: 1-2.1:6 chip-ID: b58e:9e84 class-ID: 0300
serial: <filter>
Device-5: Trust B.V. USB Audio driver: hid-generic,snd-usb-audio,usbhid
type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-6:8
chip-ID: 15d9:1c1c class-ID: 0300
API: ALSA v: k6.3.4-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 0.3.71 status: n/a (root, process) with:
1: pipewire-pulse status: active 2: wireplumber status: active
3: pipewire-alsa type: plugin 4: pw-jack type: plugin
tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel I210 Gigabit Network vendor: Super Micro driver: igb
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 66:00.0
chip-ID: 8086:1533 class-ID: 0200
IF: eno1 state: down mac: <filter>
Device-2: Aquantia vendor: Super Micro driver: atlantic v: kernel pcie:
gen: 3 speed: 8 GT/s lanes: 2 port: N/A bus-ID: 69:00.0 chip-ID: 1d6a:14c0
class-ID: 0200 temp: 61.0 C
IF: eth2 state: up speed: 10000 Mbps duplex: full mac: <filter>
IF-ID-1: enp37s0f3u2u2c2 state: unknown speed: -1 duplex: half
mac: <filter>
IF-ID-2: vmnet1 state: unknown speed: N/A duplex: N/A mac: <filter>
IF-ID-3: vmnet8 state: unknown speed: N/A duplex: N/A mac: <filter>
Bluetooth:
Device-1: Insyde RNDIS/Ethernet Gadget driver: rndis_host v: kernel
type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 7-2.2:4
chip-ID: 0b1f:03ee class-ID: 0a00
Report: bt-service: enabled,stopped note: tool can't run
Drives:
Local Storage: total: 1.75 TiB used: 798.74 GiB (44.7%)
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPE21D960GA
size: 894.25 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 tech: SSD serial: <filter> fw-rev: E2010603 temp: 57.9 C
scheme: GPT
SMART: yes health: PASSED on: 165d 4h cycles: 420
read-units: 41,775,586 [21.3 TB] written-units: 35,930,478 [18.3 TB]
ID-2: /dev/nvme1n1 maj-min: 259:1 vendor: Intel model: SSDPE21D960GA
size: 894.25 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 tech: SSD serial: <filter> fw-rev: E2010603 temp: 60.9 C
scheme: GPT
SMART: yes health: PASSED on: 162d 12h cycles: 369
read-units: 87,188,230 [44.6 TB] written-units: 76,252,021 [39.0 TB]
Partition:
ID-1: / raw-size: 893.96 GiB size: 893.96 GiB (100.00%)
used: 384.25 GiB (43.0%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
maj-min: 259:4
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 580 KiB (0.2%) fs: vfat block-size: 512 B dev: /dev/nvme1n1p1
maj-min: 259:2
ID-3: /home raw-size: 893.96 GiB size: 893.96 GiB (100.00%)
used: 384.25 GiB (43.0%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
maj-min: 259:4
ID-4: /var/log raw-size: 893.96 GiB size: 893.96 GiB (100.00%)
used: 384.25 GiB (43.0%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
maj-min: 259:4
ID-5: /var/tmp raw-size: 893.96 GiB size: 893.96 GiB (100.00%)
used: 384.25 GiB (43.0%) fs: btrfs block-size: 4096 B dev: /dev/nvme1n1p2
maj-min: 259:4
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 125.63 GiB used: 119 MiB (0.1%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 44.6 C mobo: N/A gpu: amdgpu temp: 59.0 C
mem: 70.0 C
Fan Speeds (RPM): N/A gpu: amdgpu fan: 598
Info:
Processes: 764 Uptime: 1h 16m wakeups: 0 Memory: available: 125.63 GiB
used: 8.27 GiB (6.6%) Init: systemd v: 253 default: graphical
tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7 Packages: pm: pacman
pkgs: 1933 libs: 547 tools: octopi,paru Shell: garuda-inxi (sudo)
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.27
Garuda (2.6.16-1):
System install date:     2023-03-22
Last full system update: 2023-05-27
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Yes
Failed units:

Been attempting to play a bit of warhammer inquisitor martyr lately, and while the game is barely stable on windows on my machine, it absolutely hates linux. The interesting thing though is that when it crashes, it does so in a way that makes it seem like only the display driver has crashed.

What i mean is that the picture on all of my monitors will freeze, however sound and inputs are still semi respected. Using a controller i can still walk around and press buttons and hear sounds that correlate to the attacks i would have performed, as well as continue to be able to talk to/hear people on discord until i force a reboot. It's as if everything is working as usual, except the display is completely frozen.

Using wayland plasma at the moment but the exact same behavior occurs in X11. Tried a myriad of things and largely concluded the game just doesn't like my hardware.

That's fine, but ultimately for the future my question being, is there a way to effectively kill the display server and restart it without performing an unclean reboot? I seem to be able to access tty via ctrl+alt+f3 so i'm assuming there's a way to do so.

And if so, could i effectively write this into a bash script i could merely execute whenever things go wrong without needing to memorize a ton of commands?

Thanks.

Try

kquitapp5 plasmashell && kstart5 plasmashell

Or even better

plasmashell --replace &
5 Likes

Since the op is asking for killing the display server you can look for Xorg server pid with

ps -H -t /dev/tty1

and then kill it with

kill -SIGKILL <pid-obtained>

to restart the server

startx

this would bring up the sddm login screen. However this isn't what you probably need as simply restarting the plasmashell or kwin should do the job.

You should start testing with the less destructive plasmashell replace. you can set this command as a keyboard shortcut since you mentioned your keyboard works during the issue and work your way to the kwin

for plasmashell:

killall plasmashell; kstart5 plasmashell

and for kwin

setsid kwin_x11 --replace &

PS: sorry I accidentally replied to filo and now I can't change it. :sweat:

4 Likes

@filo

I'll see if it helps in the future, thanks. Although i've tried using systemd versions of similar commands and they didn't do much.

@NaN

I use wayland mostly, only revert to X11 if i run into issues, so the X11 stuff likely wouldn't help unfortunately unless it's the same with wayland. Anything specific to wayland you know of? I'll keep the plasmashell stuff in mind though, thanks.

Don't worry

ps -H -t /dev/tty1

Would still give you the display server's pid which you can kill with the command provided however I don't know how to restart the wayland display server after that. So you would have to look into that.

My advice though would still remain the same. Try with less destructive plasmashell first and move to kwin if it doesn't work.

Since you too are using kde plasma the plasmashell command should remain same. Just the kwin one should change to.

setsid kwin_wayland --replace &
2 Likes

Alright thanks all. For those in the future, tty1 is actually the login screen which always runs xorg. You want to use tty2 in the above command to find the pid for wayland.

I'll keep these handy for the next time stuff goes south.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.