Struggling with amdgpu in Wayland: OpenGL Renderer switches to llvmpipe on wake-from-suspend

Preface:
I am facing the exact problem, on similar hardware, as these posts…
https://forum.manjaro.org/t/extreme-screen-tearing-in-manjaro-xfce/65176
https://forum.manjaro.org/t/screen-tearing-in-manajro-xfce/66417
https://forum.manjaro.org/t/strange-screen-tearing-in-manjaro-xfce/59282

There are other posts as well, but the hardware differs.

Problem:
Extreme screen tearing / completely corrupted display output after wake-from-suspend.

Example:

Likely cause:
OpenGL Renderer switches to llvmpipe instead of amdgpu.

## I ran inxi -Ga in a while loop & output to a file, then I let the laptop crash as in the picture above.

# Before sleep
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Lucienne vendor: ASUSTeK driver: amdgpu v: kernel bus-ID: 03:00.0 
           chip-ID: 1002:164c class-ID: 0300 
           Device-2: Quanta USB2.0 HD UVC WebCam type: USB driver: uvcvideo bus-ID: 3-3:4 chip-ID: 0408:30d0 class-ID: 0e02 
           serial: 0x0001 
           Display: wayland server: X.org 1.20.13 compositor: gnome-shell v: 40.4 driver: loaded: amdgpu 
           note: n/a (using device driver) - try sudo/root unloaded: amdgpu display-ID: 0 resolution: <missing: xdpyinfo> 
           OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.10.60-1-MANJARO LLVM 12.0.1) v: 4.6 Mesa 21.2.1 direct render: Yes 

# After wake
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Lucienne vendor: ASUSTeK driver: amdgpu v: kernel bus-ID: 03:00.0 
           chip-ID: 1002:164c class-ID: 0300 
           Device-2: Quanta USB2.0 HD UVC WebCam type: USB driver: uvcvideo bus-ID: 3-3:4 chip-ID: 0408:30d0 class-ID: 0e02 
           serial: 0x0001 
           Display: wayland server: X.org 1.20.13 compositor: gnome-shell v: 40.4 driver: loaded: amdgpu 
           note: n/a (using device driver) - try sudo/root unloaded: amdgpu display-ID: 0 resolution: <missing: xdpyinfo> 
           OpenGL: renderer: llvmpipe (LLVM 12.0.1 256 bits) v: 4.5 Mesa 21.2.1 compat-v: 3.1 direct render: Yes 

Attempted solutions:

  1. Enable acpid.service ( found this recommeded somewhere - didn’t save source )
  2. Added “amdpgu” to Modules in mkinitcpio.conf, rebuilt initramfs & updated GRUB
  3. Configured /etc/X11/xorg.conf.d/20-amdgpu.conf according to this Arch Wiki - yes I am on Wayland, it doesn’t hurt to try.
  4. Installed packages xf86-video-amdgpu amdvlk lib32-amdvlk mesa-vdpau lib32-mesa-vdpau opencl-mesa lib32-opencl-mesa
❯ inxi --admin --verbosity=7 --filter --no-host --width
System:
  Kernel: 5.10.60-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/vmlinuz-5.10-x86_64 
  root=UUID=a14d58a1-87c6-4d29-b283-5277c13e696e rw rootflags=subvol=@ quiet 
  cryptdevice=UUID=f5fa10f3-1f4a-4bd5-a863-6bc65b60a90c:cr_root 
  root=/dev/mapper/cr_root udev.log_priority=3 acpi_backlight=vendor 
  resume=/dev/mapper/cr_swap 
  Desktop: GNOME 40.4 tk: GTK 3.24.30 wm: gnome-shell dm: GDM 40.1 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: ASUSTeK product: VivoBook_ASUSLaptop X421UAY_KM413UA 
  v: 1.0 serial: <filter> 
  Mobo: ASUSTeK model: X421UAY v: 1.0 serial: <filter> 
  UEFI: American Megatrends LLC. v: X421UAY.303 date: 03/10/2021 
Battery:
  ID-1: BAT0 charge: 14.5 Wh (34.2%) condition: 42.4/42.1 Wh (100.8%) 
  volts: 11.8 min: 11.8 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A 
  status: Charging cycles: 16 
Memory:
  RAM: total: 7.24 GiB used: 2.18 GiB (30.1%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 8-Core model: AMD Ryzen 7 5700U with Radeon Graphics bits: 64 
  type: MT MCP arch: Zen 2 family: 17 (23) model-id: 68 (104) stepping: 1 
  microcode: 8608103 cache: L2: 4 MiB bogomips: 57519 
  Speed: 1399 MHz min/max: 1400/1800 MHz boost: enabled Core speeds (MHz): 
  1: 1399 2: 1397 3: 1398 4: 1396 5: 1397 6: 1397 7: 1391 8: 1397 9: 1399 
  10: 1388 11: 1397 12: 1397 13: 1397 14: 1396 15: 1397 16: 1397 
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1 
  bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy 
  constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc 
  cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid 
  fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibrs ibs irperf lahf_lm 
  lbrv lm mba mca mce misalignsse mmx mmxext monitor movbe msr mtrr mwaitx 
  nonstop_tsc nopl npt nrip_save nx osvw overflow_recov pae pat pausefilter 
  pclmulqdq pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni 
  popcnt pse pse36 rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni 
  skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor 
  svm svm_lock syscall tce topoext tsc tsc_scale umip v_vmsave_vmload vgif 
  vmcb_clean vme vmmcall wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr xsaveopt 
  xsaves 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, IBRS_FW, 
  STIBP: conditional, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: AMD Lucienne vendor: ASUSTeK driver: amdgpu v: kernel 
  bus-ID: 03:00.0 chip-ID: 1002:164c class-ID: 0300 
  Device-2: Quanta USB2.0 HD UVC WebCam type: USB driver: uvcvideo 
  bus-ID: 3-3:4 chip-ID: 0408:30d0 class-ID: 0e02 serial: <filter> 
  Display: wayland server: X.org 1.20.13 compositor: gnome-shell driver: 
  loaded: amdgpu note: n/a (using device driver) - try sudo/root 
  unloaded: amdgpu display-ID: 0 resolution: <missing: xdpyinfo> 
  OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.10.60-1-MANJARO LLVM 12.0.1) 
  v: 4.6 Mesa 21.2.1 direct render: Yes 
Audio:
  Device-1: AMD driver: snd_hda_intel v: kernel bus-ID: 03:00.1 
  chip-ID: 1002:1637 class-ID: 0403 
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: ASUSTeK 
  driver: N/A alternate: snd_pci_acp3x, snd_rn_pci_acp3x bus-ID: 03:00.5 
  chip-ID: 1022:15e2 class-ID: 0480 
  Device-3: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel 
  v: kernel bus-ID: 03:00.6 chip-ID: 1022:15e3 class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.60-1-MANJARO running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 15.0 running: yes 
  Sound Server-4: PipeWire v: 0.3.33 running: no 
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 01:00.0 
  chip-ID: 8086:2723 class-ID: 0280 
  IF: wlp1s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-2:3 
  chip-ID: 8087:0029 class-ID: e001 
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends 
Logical:
  Message: No logical block device data found. 
  Device-1: cr_root maj-min: 254:0 type: LUKS dm: dm-0 size: 44.7 GiB 
  Components: 
  p-1: nvme0n1p6 maj-min: 259:6 size: 44.7 GiB 
  Device-2: cr_home maj-min: 254:2 type: LUKS dm: dm-2 size: 304.61 GiB 
  Components: 
  p-1: nvme0n1p7 maj-min: 259:7 size: 304.62 GiB 
  Device-3: cr_swap maj-min: 254:1 type: LUKS dm: dm-1 size: 7.43 GiB 
  Components: 
  p-1: nvme0n1p8 maj-min: 259:8 size: 7.45 GiB 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 476.94 GiB used: 63.56 GiB (13.3%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVLQ512HALU-00000 
  size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 type: SSD serial: <filter> rev: FXV7101Q temp: 32.9 C scheme: GPT 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 44.7 GiB size: 44.7 GiB (100.00%) used: 11.86 GiB (26.5%) 
  fs: btrfs dev: /dev/dm-0 maj-min: 254:0 mapped: cr_root label: N/A uuid: N/A 
  ID-2: /boot raw-size: 488 MiB size: 447.1 MiB (91.62%) 
  used: 104.1 MiB (23.3%) fs: ext4 dev: /dev/nvme0n1p5 maj-min: 259:5 
  label: manjaro-boot uuid: d6731e71-2380-4839-a80f-876b4d21ca9d 
  ID-3: /boot/efi raw-size: 488 MiB size: 487 MiB (99.80%) 
  used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A 
  uuid: DCC9-D541 
  ID-4: /home raw-size: 304.61 GiB size: 304.61 GiB (100.00%) 
  used: 51.6 GiB (16.9%) fs: f2fs dev: /dev/dm-2 maj-min: 254:2 
  mapped: cr_home label: N/A uuid: N/A 
  ID-5: /var/cache raw-size: 44.7 GiB size: 44.7 GiB (100.00%) 
  used: 11.86 GiB (26.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0 
  mapped: cr_root label: N/A uuid: N/A 
  ID-6: /var/log raw-size: 44.7 GiB size: 44.7 GiB (100.00%) 
  used: 11.86 GiB (26.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0 
  mapped: cr_root label: N/A uuid: N/A 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 7.43 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/dm-1 maj-min: 254:1 mapped: cr_swap label: N/A 
  uuid: 65716df4-03ed-4bbe-843f-6a44329f0898 
Unmounted:
  ID-1: /dev/nvme0n1p2 maj-min: 259:2 size: 16 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 118.66 GiB fs: ntfs label: N/A 
  uuid: 78FECB15FECACA98 
  ID-3: /dev/nvme0n1p4 maj-min: 259:4 size: 543 MiB fs: ntfs label: N/A 
  uuid: FE709AFA709AB93B 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 3-1:2 info: Elan Micro ELAN:Fingerprint type: <vendor specific> 
  driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA 
  chip-ID: 04f3:0903 class-ID: 0000 
  Device-2: 3-2:3 info: Intel AX200 Bluetooth type: Bluetooth driver: btusb 
  interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0029 
  class-ID: e001 
  Device-3: 3-3:4 info: Quanta USB2.0 HD UVC WebCam type: Video 
  driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA 
  chip-ID: 0408:30d0 class-ID: 0e02 serial: <filter> 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 50.1 C mobo: 50.0 C gpu: amdgpu temp: 44.0 C 
  Fan Speeds (RPM): cpu: 0 
Info:
  Processes: 410 Uptime: 11m wakeups: 1350 Init: systemd v: 248 
  tool: systemctl Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: pacman: 1126 
  lib: 309 Shell: Zsh v: 5.8 running-in: gnome-terminal inxi: 3.3.06 

Switching to the 5.13 kernel fixed the display problem.

But now the Function Lock on the keyboard doesn’t work (again after resume, works fine on fresh boot).

https://bbs.archlinux.org/viewtopic.php?pid=1979473#p1979473

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