Tearing on Amd graphic card

Questions about hardware, drivers and peripherals.
In the Original Post please also include the output of inxi -Fzx
FarbrorS
Posts: 7
Joined: 06 Dec 2017 23:16

Tearing on Amd graphic card

Postby FarbrorS » 07 Dec 2017 00:03

When I play games, or watch movies in fullscreen, I get tearing in the middle of the screen.
I run the open source drivers for amd graphics, and from what I understand, from looking around on the net, there is a tearfree option for these drivers.

Most pages I have visited says that in the /usr/share/X11/xorg.conf.d directory, to make or edit a file called 20-radeon.conf (or something similar), to include the, Option "TearFree" "on" (or "true").
In my /usr/share/X11/xorg.conf.d there is a file called 10-amdgpu.conf, that I'm guessing is the same kind of config file?
If I add the, Option "TearFree" "on" , to it and reboot I get a black screen. I edit the file from command promt, and reboot, and the computer starts normally.

Making the file 20-radeon.conf in that directory, and edit it..... same thing happens
Most pages I read are for Ubuntu, but I cant seem to get it to work on SolydX.
Is it the same config file that should be edited, or am I doing something completely wrong here.

I'm a bit of a noob, so if anyone needs some more info ( commandline stuff), please tell me how to get the data
Hope somebody has the answer for this. Thanks in advance

kurotsugi
Posts: 1952
Joined: 09 Jan 2014 00:17

Re: Tearing on Amd graphic card

Postby kurotsugi » 07 Dec 2017 00:20

first, we need to identify what is your device and which driver being used. please run "inxi -Fxz" and tell us the result.

the sympton suggested that you got either bad X config or your hardware doesn't support tearfree option. AFAIK tearfree should be enabled with other option. the correct conf file might looks like this

Code: Select all

Section "Device"
       Identifier "Card0"
       Driver "amdgpu"
       Option "DRI3" "1"
       Option "TearFree" "on"
EndSection
you'll need to replace amdgpu with the driver being used in your device. the tricky part would be finding the correct conf. you'll need to do the research by yourself.

FarbrorS
Posts: 7
Joined: 06 Dec 2017 23:16

Re: Tearing on Amd graphic card

Postby FarbrorS » 07 Dec 2017 00:30

Output from inxi-Fxz

Code: Select all

System:    Host: solydxk Kernel: 4.9.0-4-amd64 x86_64 (64 bit gcc: 6.3.0)
           Desktop: Xfce 4.12.3 (Gtk 2.24.30) Distro: SolydXK
Machine:   Device: desktop Mobo: ASUSTeK model: PRIME X370-PRO v: Rev X.0x
           UEFI [Legacy]: American Megatrends v: 3203 date: 11/09/2017
CPU:       Hexa core AMD Ryzen 5 1600 Six-Core (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 38327
           clock speeds: max: 3200 MHz 1: 3200 MHz 2: 3200 MHz 3: 3200 MHz
           4: 1550 MHz 5: 3200 MHz 6: 3200 MHz 7: 3200 MHz 8: 3200 MHz
           9: 3200 MHz 10: 3200 MHz 11: 3200 MHz 12: 3200 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
           bus-ID: 09:00.0
           Display Server: X.Org 1.19.2 drivers: ati,radeon (unloaded: modesetting,fbdev,vesa)
           Resolution: 1920x1200@59.95hz
           GLX Renderer: Gallium 0.4 on AMD TAHITI (DRM 2.49.0 / 4.9.0-4-amd64, LLVM 3.9.1)
           GLX Version: 3.0 Mesa 13.0.6 Direct Rendering: Yes
Audio:     Card-1 Advanced Micro Devices [AMD] Device 1457
           driver: snd_hda_intel bus-ID: 0b:00.3
           Card-2 Advanced Micro Devices [AMD/ATI] Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970]
           driver: snd_hda_intel bus-ID: 09:00.1
           Sound: Advanced Linux Sound Architecture v: k4.9.0-4-amd64
Network:   Card: Intel I211 Gigabit Network Connection
           driver: igb v: 5.4.0-k port: e000 bus-ID: 07:00.0
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 250.1GB (61.3% used)
           ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB
Partition: ID-1: / size: 219G used: 135G (65%) fs: ext4 dev: /dev/sda2
           ID-2: swap-1 size: 9.44GB used: 0.00GB (0%) fs: swap dev: /dev/sda1
Sensors:   System Temperatures: cpu: N/A mobo: N/A gpu: 30.0
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 267 Uptime: 58 min Memory: 6470.9/16047.4MB
           Init: systemd runlevel: 5 Gcc sys: 6.3.0
           Client: Shell (bash 4.4.121) inxi: 2.3.5

FarbrorS
Posts: 7
Joined: 06 Dec 2017 23:16

Re: Tearing on Amd graphic card

Postby FarbrorS » 07 Dec 2017 01:10

Hmmm. Made a 20-radeon.conf file and copied what was in your post kurotsugi.... rebooted, and now it works? :D

Don't know what was different this time, but thank you very much for the help

What my 20-radeon.conf looks like after I got it working

Code: Select all

Section "Device"
    Identifier "Card0"                           
    Driver "radeon"
    Option "TearFree" "on"
    Option "DRI" "3"
    Option "AccelMethod" "glamor"
EndSection


From what I can understand from reading other webpages, the two later options are enabled by default if you have a somewhat newer gpu.
This is one of the pages that i looked at https://cubethethird.wordpress.com/2016/06/14/eliminate-screen-tearing-with-amd-gpu-on-ubuntu/

What I don't really understand is the "Identifier" and "Driver" lines.
I'm guessing "Card0" means the first card? And from the output I got from inxi-Fxz, the driver that it uses are "ati,radeon".
Please correct me if I'm wrong here.

User avatar
ilu
Posts: 1671
Joined: 09 Oct 2013 12:45

Re: Tearing on Amd graphic card

Postby ilu » 08 Dec 2017 03:42

Tahiti belongs to the Southern Islands series. It can use the amdgpu driver (not to be confused with amdgpu-pro).
Check which one you use with lspci -k | grep -EA3 'VGA|3D|Display' . If it's radeon you can try to switch to amdgpu by blacklisting. I've tried both drivers for my a bit older capeverde GPU and I can't see much difference.

Try to temporarily blacklist radeon during boot by pressing "e" when the grub menu shows up. Add modprobe.blacklist=radeon to GRUB_CMDLINE_LINUX_DEFAULT next to anything that might already be there, such as quiet splash. Press F10 to boot and see what happens.

If things work better you can permanently blacklist radeon: Edit /ect/default/grub with the editor of your choice and add modprobe.blacklist=radeon to GRUB_CMDLINE_LINUX_DEFAULT next to anything that might already be there, such as quiet splash. Then, save the changes and sudo update-grub2 . Reboot and you should be using AMDGPU instead of radeon.

FarbrorS
Posts: 7
Joined: 06 Dec 2017 23:16

Re: Tearing on Amd graphic card

Postby FarbrorS » 08 Dec 2017 17:03

The only difference I can see ( with the "lspci -k | grep -EA3 'VGA|3D|Display'" command) before and after blacklisting are the lines

Code: Select all

Kernel driver in use: radeon
   Kernel modules: radeon

changes to only

Code: Select all

   Kernel modules: radeon

If I look in Synaptic the amdgpu packages are installed. I temporarily removed my 20-radeon.conf file when blacklisting, because the computer wouldn't start the graphical environment with it still active

kurotsugi
Posts: 1952
Joined: 09 Jan 2014 00:17

Re: Tearing on Amd graphic card

Postby kurotsugi » 08 Dec 2017 21:52

it is _supposed_ to be enabled but we are on debian realm where things are a bit conservative. some features are commonly disabled in the name of "compatibility with older hardware". in my experience AMD chips with radeon driver works better with some tweaks enabled. though, I don't know about AMDGPU much since my laptop which has amd chips got stolen. thankfully ilu know it better than me :3

Code: Select all

Section "Device"
    Identifier "Card0"                           
    Driver "radeon"
    Option "TearFree" "on"
    Option "DRI" "3"
    Option "AccelMethod" "glamor"
EndSection

Section "Device" - it means that this part of conf is made for device configuration
Identifier "Card0" - xorg manage every input/ouput device in your system (including touchpad and keyboard). we need to specify which one to configure
Driver "radeon" - AFAIK it's specify which driver should be used by the device. your screen didn't working since radeon got blocked.
Option "TearFree" "on" - theses are the options for the driver.
Option "DRI" "3"
Option "AccelMethod" "glamor"
EndSection - specify where the configuration ends. we need to specify it because x conf could be used for multiple device at once.

FarbrorS
Posts: 7
Joined: 06 Dec 2017 23:16

Re: Tearing on Amd graphic card

Postby FarbrorS » 08 Dec 2017 23:22

Thanks for the explanation.
It's pretty easy to find different solutions to most Linux problems online, but it's often "copy this line of text into your terminal, and then it works".
Really appreciate you guys explaining it in an easy way for a noob like me :D

Does anyone know why the Tearfree option is not on by default? On my system at least, the tearing is very noticeable without it.

User avatar
ilu
Posts: 1671
Joined: 09 Oct 2013 12:45

Re: Tearing on Amd graphic card

Postby ilu » 09 Dec 2017 06:06

Hm, the amdgpu kernel module is not loaded on your system. That's strange if the driver is installed as you say. The output on my system (fresh solydX9) was

Code: Select all

Kernel driver in use: radeon
   Kernel modules: radeon, amdgpu

You don't need to change anything, if it works ok. I was just in an experimental mood, so I blacklisted radeon in favour of amdgpu. When that mood returns I will experiment with the options "DRI" and "AccelMethod". :geek:
Does anyone know why the Tearfree option is not on by default? On my system at least, the tearing is very noticeable without it.

Because of KISS - keep it simple, stupid. Minimal configuration is the best decision if you can't test all kinds of hardware. Debugging a simple configuration is always easier.
Most people here use either nvidia or intel. My AMD systems have no tearing at all and there is no conf.d file at all for radeon and only a minimal one for amdgpu. So not everybody needs it.

FarbrorS
Posts: 7
Joined: 06 Dec 2017 23:16

Re: Tearing on Amd graphic card

Postby FarbrorS » 09 Dec 2017 10:02

Most people here use either nvidia or intel. My AMD systems have no tearing at all and there is no conf.d file at all for radeon and only a minimal one for amdgpu. So not everybody needs it.

Ok, that makes sense. I wonder if it's the monitor I'm using that makes the graphics tear more.
Hm, the amdgpu kernel module is not loaded on your system. That's strange if the driver is installed as you say. The output on my system (fresh solydX9) was

This is on a fresh install also. I built the computer 2 weeks ago, and everything should be mostly default. The only thing I have installed is Steam (and Boinc, just to see if all the cores on the new processor woked) .

The old motherboard/cpu was a Core2Quad system. I had the tearing on that one also, but I thought that it's because it's old. I used to install the Catalyst driver, and enable tearfree in it. But this time I thought that I would stick with the default driver, because of what I've read online, it's almost as fast or even faster than the Catalyst one, and more compatible with most games, and that is mostly what I'm going to use this computer for. And it's working great so far :D
Again, thanks for the help and explanations.

User avatar
ilu
Posts: 1671
Joined: 09 Oct 2013 12:45

Re: Tearing on Amd graphic card

Postby ilu » 09 Dec 2017 16:44

Just fyi: There is no catalyst any more. And radeon and amdgpu are both open drivers - radeon being for old cards and amdgpu for the new ones. Ours are somewhere in the middle and can use both. The proprietary driver is now called amdgpu-pro. AMD put a lot of work into the open drivers and they work fine, for me much better than the old fglrx. That's why I'm sticking with AMD - I try to reward companies that invest into open source.

Does your ryzen work ok? I had to get a newer kernel and ended up using the kernel from liquorix.org. I decided to use it on my other, older system too because of the performance improvements. See https://forums.solydxk.com/viewtopic.php?f=78&t=7058.

By the way, if you want to read up on something, Arch wiki is the way to go, see these pages https://wiki.archlinux.org/index.php/AMDGPU and https://wiki.archlinux.org/index.php/Radeon. In this case also the man pages man radeon and man amdgpu are quite helpful.

You can see from these pages that tearfree is in "auto" mode if it is not explicitly set - that should be the best default. DRI3 and glamor also seem to be default on a stretch system.

FarbrorS
Posts: 7
Joined: 06 Dec 2017 23:16

Re: Tearing on Amd graphic card

Postby FarbrorS » 09 Dec 2017 20:11

Nice links :D
Yeah the Ryzen computer seems to work very well. The biggest problem was getting it to boot off USB. Quite to my surprise the old install of SolydX, from the C2Q, booted fine ( a bit slow and some minor errors )and I actually ran that install for a couple of days. Then I made a new Live USB from inside that system.... and reinstalled.
Haven't gotten any crashes or errors yet. But I did a BIOS update at first boot. From what I read online, there are big stability improvements on AM4 motherboards with new Bioses.
I'm playing Civ 6 at the moment. Runs fine. A little slow in some parts, but then I ain't got the fastest gpu out there.


Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest