Screen tearing on X11 on AMD A9 APU and issues with 20-amdgpu.conf solution.

Hi. Latest Tumbleweed, KDE, AMD A9 APU with AMD Radeon R4 graphics processor. Tried playing “Extreme Tux Racer” and experienced screen tearing issues.
Tried logging out and and logging in with Wayland and tearing issues disappeared, but I decided to return back X11, and out of curiosity decided to test one frequently suggested solution, that involves creating a “20-amdgpu.conf” configuration file in the “/etc/X11/xorg.conf.d/” directory with the following contents:

Section "Device"
        Identifier      "AMD Graphics"
        Driver          "amdgpu"
        Option          "TearFree" "true"
EndSection

and rebooting.
But after rebooting I was stuck in a CLI environment, and had to login and delete “20-amdgpu.conf” file, only then I was able to boot into graphical environment.

I wonder why that happened?

By the way, should I use Wayland on KDE instead of X11?
FYI, I’m a Linux newbie.

Hi
On X11 I used xrandr to set the tearfree option, for example;


xrandr --listmonitors

xrandr --output HDMI-A-0 --set TearFree on

xrandr --output DP-1 --set TearFree on

I think that’s because your graphics might be too early to work with amdgpu.

Use “lspci -k” to see what kernel gpu driver you’re using. You might need to change the Driver option in 20-amdgpu.conf to “radeon” instead.

Due to the age of your APU your Grub linu line may need either radeon.cik_support=0 amdgpu.cik_support=1 or radeon.si_support=0 amdgpu.si_support=1 to enable running on the amdgpu drivers instead of radeon or modesetting.

I tried “xrandr”

xrandr --listmonitors
Monitors: 2
 0: +*HDMI-1 1920/509x1080/286+0+0  HDMI-1
 1: +eDP-1 1366/344x768/194+197+1080  eDP-1

Then I attempted to --set TearFree on, but got the following error:

xrandr --output HDMI-1 --set TearFree on
X Error of failed request:  **BadName (named color or font does not exist)**
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  11 (RRQueryOutputProperty)
  Serial number of failed request:  29
  Current serial number in output stream:  29

[HR][/HR]

“lspci -k” says I’m using “amdgpu” (so it seems to me), here’s the output:

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Stoney [Radeon R2/R3/R4/R5 Graphics] (rev da)
        Subsystem: Lenovo Device 39f3
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

[HR][/HR]

Linuxreviews wiki says "You can check the X log using grep if you are unsure what driver you are using by:

grep drivers /var/log/Xorg.0.log

"
I tried it, and the output is strange:

    11.242] (II) Scanning /usr/share/X11/xorg_pci_ids directory for additional PCI ID's supported by the drivers
    11.242] (II) Scanning /usr/share/X11/xorg_pci_ids directory for additional PCI ID's supported by the drivers
    11.244] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
    11.245] (II) Loading /usr/lib64/xorg/modules/drivers/fbdev_drv.so
    11.245] (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so

Does this mean I’m not using “amdgpu” drivers?
Someone suggested to install “xf86-video-amdgpu”, should I do it?

[HR][/HR]

And about Wayland. Why X11 is used with KDE on OpenSUSE by default?

An amdgpu_drv.so line would appear if available. You have GCN3 APU from 2016, so amdgpu should be optimal for you. By all means install it with zypper or yast and see if it works better.

And about Wayland. Why X11 is used with KDE on OpenSUSE by default?
It’s not mature enough to work with all software and hardware permutations. For many it’s OK but has drawbacks, a work in progress. For others, it simply not usable.

There may be a BIOS setting re graphics RAM allocation. Raising it from the default, if one exists, might help if the amdgpu driver doesn’t, or even more if it does.

Thanks, Mr Mazda. I resolved the issue.

I installed “xf86-video-amdgpu” through YaST, rebooted. Tearing didn’t disappear.
I used “xrandr --listmonitors” command, and now my monitor connected through HDMI is named just like on “malcolmlewis’” machine - “HDMI-A-0”.
So I used “xrandr --output HDMI-A-0 --set TearFree on”, and tearing disappeared.

“grep drivers /var/log/Xorg.0.lo” command now also lists
11.284] (II) Loading /usr/lib64/xorg/modules/drivers/amdgpu_drv.so

AMD & Intel drivers count from 0, and call DisplayPorts DisplayPort-#.

Nouveau & modesetting drivers count from 1, and call DisplayPorts DP-#.

Apparently you had been using the modesetting. Now that you’re using amdgpu, the 20-amdgpu.conf you tried should work.

Xrandr’s action can’t be expected to stick across X sessions. It should be put in a startup script so that it is run as a WM/DE session is initialized. Globally, for all user logins, /etc/X11/xinit/xinitrc.d/yourXrandrScript will do this. For each user only, it can be triggered via Plasma’s System Settings > Startup.