Laptop:
AMD A8-7410 APU Radeon R5 GCN 1.2 (Spectre)
HP 15-AF109AX
symptom: Screen flickering continuously at some interval time
Dmesg error:
[ 3806.507278] radeon 0000:00:01.0: ring 2 stalled for more than 29348msec
[ 3806.507310] radeon 0000:00:01.0: GPU lockup (current fence id 0x000000000000038f last fence id 0x0000000000000390 on ring 2)
Which non free firmware? These are generation AMD Graphics Processor
Use radeon for older then GCN and RDNA
Use amdgpu for Graphic Core Next/GCN generation
- GCN 1.0 Radion HD 7000
- GCN 2.0 Radeon 200
- GCN 3.0 Radeon 300
- GCN 4.0 Radeon 400/500/600
- GCN 5.0 Radeon RX Vega, Radeon VII
Use ROCm for RDNA
- RDNA 1 Radeon RX 5000
- RDNA 2 Radeon RX 6000
- RDNA 3 Radeon RX 7000
- RDNA 4 Radeon RX 8000
Install firmware, you need add non-free repository
# apt-get install firmware-amd-graphics
Check firmware loaded
# lspci -k | grep -A 3 VGA
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] (rev 45)
Subsystem: Hewlett-Packard Company Device 80cc
Kernel driver in use: radeon
Kernel modules: radeon, amdgpu
or
# lspci -nn | grep VGA
The Mullins Accelerated Processing Units (APUs), which include the Radeon R4/R5 Graphics, use the GCN 1.1 architecture. Googling for yours if necessary. Create/Edit /etc/X11/xorg.conf.d/20-radeon.conf
Section "Device"
Identifier "AMD Graphics"
Driver "amdgpu"
Option "TearFree" "true"
EndSection
If your card is GCN 1.0 and 1.2 ("Southern Islands" or "Sea Islands" cards) , for potentially better performance and Vulkan support, you need to add kernel parameter. Edit /etc/default/grub and add parameter
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.cik_support=0 amdgpu.cik_support=1"
update grub
# update-grub
update-grub
Example old AMD Graphic
- Wrestler [Radeon HD 6310]
google-chrome use gpu acceleration, this can also causing ring 2 stalled. Disabling google-chrome gpu accelerated.
$ google-chrome-stable --disable-gpu --disable-software-rasterizer
Create script to run start_chrome.sh
#!/bin/bash
google-chrome-stable --disable-gpu --disable-software-rasterizer "$@" &
Make it runnable
$ chmod 764 ./start_chrome.sh