Peppermint OS Community Forum

Resources => User Submitted Tutorials => Topic started by: PCNetSpec on July 02, 2016, 06:24:40 pm

Title: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on July 02, 2016, 06:24:40 pm
[EDIT]

This fix appears to work only for those where:
Code: [Select]
inxi -G | grep -i driver
reports the driver(s) as radeon or ati,amdgpu

For those people where it reports ati,radeon I'm working on a solution and will add it when tested.

[EDIT 2]

For those where inxi reports ati,radeon and the fix doesn't work, keep reading ... there is now a possible solution later in the topic.



As we all know ATI/AMD are not putting any more work into their proprietary drivers (FGLRX), and because Ubuntu 16.04 (and anything based on it) uses xorg 1.18 the old proprietary fglrx drivers can no longer be installed.

So far I'm not really missing them, I've been mightily impressed with how far the open source radeon drivers have come since I last used them .. in fact once you make the necessary tweak to get steam installed and working:
https://forum.peppermintos.com/index.php/topic,3739.0.html
I haven't noticed any real difference between radeon and fglrx, except for one thing  .. the "Tear Free" option that fglrx used to offer .. I've been suffering screen tearing with desktop effects enabled.

Anyway, here's how I fixed screen tearing on the open source radeon (and ati,amdgpu) drivers in Peppermint 7...
(I can't say this will work for everyone, but it sure works for me)

Open a terminal and run:
Code: [Select]
sudo pluma /usr/share/X11/xorg.conf.d/20-radeon.conf
When a BLANK file opens, make it read
Code: [Select]
Section "Device"
Identifier  "Radeon"
Driver "radeon"
Option "AccelMethod" "glamor"
Option "DRI" "3"
Option "TearFree" "on"
EndSection
SAVE the file, and exit pluma

Reboot.



To UNDO
Code: [Select]
sudo rm -v /usr/share/X11/xorg.conf.d/20-radeon.conf



You might want to check for screen tearing both before and after with this video

https://www.youtube.com/watch?v=5xkNy9gfKOg
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Bigoeuf on July 02, 2016, 11:03:02 pm
Morning Mark - had a look at this because I have:
Code: [Select]
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RS482M [Mobility Radeon Xpress 200]
           Display Server: X.Org 1.18.3 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1280x800@60.96hz
           GLX Renderer: Gallium 0.4 on ATI RS480 GLX Version: 2.1 Mesa 11.2.0
I did the youtube video screen tear test & indeed it was tearing so I tried out your fix & on re-boot it wouldn't reach the login screen (got as far as the black screen with the file system check script).
Had to do a hard-reboot - booted into live USB, removed /usr/share/X11/xorg.conf.d/20-radeon.conf from pepp 7 install, rebooted & back to normal. Like you say Mark 'I can't say this will work for everyone, but it sure works for me', which is fair comment, but I would like if fixed if possible - what do you recon?? (I'm using a Dell Inspiron 1501 - slightly dated I know  ::))
Cheers  :)
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Timo on July 03, 2016, 05:55:55 am
Thanks, worked for me.

Code: [Select]
CPU:       Quad core AMD A8-6410 APU with AMD Radeon R5 Graphics (-MCP-) cache: 8192 KB 
           clock speeds: max: 2000 MHz 1: 1200 MHz 2: 1000 MHz 3: 1400 MHz
           4: 1600 MHz

Graphics:  Card: Advanced Micro Devices [AMD/ATI] Mullins [Radeon R4/R5 Graphics]
           Display Server: X.Org 1.18.3 driver: radeon
           Resolution: 1366x768@59.99hz
           GLX Renderer: Gallium 0.4 on AMD MULLINS (DRM 2.43.0, LLVM 3.8.0)
           GLX Version: 3.0 Mesa 11.2.0

Yep the open source driver now without tearing has anything the proprietary had in Peppermint 6. Even connecting the laptop to a screen works after reboot (not sure if/how it's possible to get it to plug & play and it still breaks the touchscreen until the next reboot).
AMD might have worked on the open source driver I guess, the just released RX 480 had day one support and from what they said their new drivers should be open source anyways.
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: SantaFe on July 03, 2016, 06:00:21 am
Morning Mark - had a look at this because I have:
Code: [Select]
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RS482M [Mobility Radeon Xpress 200]
           Display Server: X.Org 1.18.3 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1280x800@60.96hz
           GLX Renderer: Gallium 0.4 on ATI RS480 GLX Version: 2.1 Mesa 11.2.0
I did the youtube video screen tear test & indeed it was tearing so I tried out your fix & on re-boot it wouldn't reach the login screen (got as far as the black screen with the file system check script).
Had to do a hard-reboot - booted into live USB, removed /usr/share/X11/xorg.conf.d/20-radeon.conf from pepp 7 install, rebooted & back to normal. Like you say Mark 'I can't say this will work for everyone, but it sure works for me', which is fair comment, but I would like if fixed if possible - what do you recon?? (I'm using a Dell Inspiron 1501 - slightly dated I know  ::))
Cheers  :)

That's weird, because my video card is this:
Code: [Select]
Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM] 
And this works fine.  Funny thing is, I tried the solution here: http://ajreissig.com/eliminate-screen-tearing-amd-graphics/ and had the same thing that you had happen to me.  But in my case he had the file saved to /etc/X11/xorg.conf.d/ and also he echoed everything in one line. 
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on July 03, 2016, 06:20:25 am
Code: [Select]
@Bigouef
Try making it just read
Code: [Select]
Section "Device"
Identifier  "Radeon"
Driver "radeon"
        Option "TearFree" "on"
EndSection
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Bigoeuf on July 03, 2016, 07:25:22 am
No joy with that either Mark  :( made it to the login screen which was total distorted & unreadable with what I would describe as horizontal tearing??
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on July 03, 2016, 07:56:53 am
I guess your only option is to disable desktop effects, or if you need compositing say for transparency for a dockbar to use compton as the compositor instead.
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Bigoeuf on July 03, 2016, 08:26:19 am
Hmmm - well turned off desktop effects to see if that would sort the 'screen tearing' - rebooted then ran your youtube video - no difference (still shows the lines distorting) ???
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on July 03, 2016, 09:06:07 am
Can we have your
Code: [Select]
inxi -F
output Bigouef ?
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Bigoeuf on July 03, 2016, 09:15:09 am
You most certainly can:
Spoiler (click here to view / hide)
Code: [Select]
mick@mick-Inspiron-1501 ~ $ inxi -F
System:    Host: mick-Inspiron-1501 Kernel: 4.4.0-28-generic x86_64 (64 bit) Desktop: N/A
           Distro: Peppermint Seven
Machine:   System: Dell product: Inspiron 1501
           Mobo: Dell model: 0UW744 Bios: Dell v: 1.7.0 date: 11/24/2006
CPU:       Single core AMD Turion 64 Mobile MK-36 (-UP-) cache: 512 KB speed/max: 800/2000 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RS482M [Mobility Radeon Xpress 200]
           Display Server: X.Org 1.18.3 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1280x800@60.96hz
           GLX Renderer: Gallium 0.4 on ATI RS480 GLX Version: 2.1 Mesa 11.2.0
Audio:     Card Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.4.0-28-generic
Network:   Card-1: Broadcom BCM4311 802.11b/g WLAN driver: b43-pci-bridge
           IF: wlan0 state: up mac: <filter>
           Card-2: Broadcom BCM4401-B0 100Base-TX driver: b44
           IF: eth0 state: down mac: <filter>
Drives:    HDD Total Size: 62.1GB (19.0% used) ID-1: /dev/sda model: SAMSUNG_HM060HI size: 60.0GB
           ID-2: USB /dev/sdb model: Voyager_GT size: 2.0GB
Partition: ID-1: / size: 9.1G used: 5.9G (69%) fs: ext4 dev: /dev/sda5
           ID-2: swap-1 size: 2.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 47.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 176 Uptime: 57 min Memory: 805.0/1873.1MB Client: Shell (bash) inxi: 2.2.35
mick@mick-Inspiron-1501 ~ $
[close]
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Bigoeuf on July 05, 2016, 07:31:59 am
Dont mean to pester you Mark cos I realise your busy but did my
Code: [Select]
inxi -F
output throw up anything?
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on July 05, 2016, 02:29:53 pm
Yeah, your graphics card is using the "ati" driver not just "radeon", and

yours
GLX Version: 2.1 Mesa 11.2.0

mine
GLX Version: 3.0 Mesa 11.2.0

I'm just not sure how this affects screen tearing and the fix yet .. still looking into it.




Maybe try
Code: [Select]
Section "Device"
Identifier  "Radeon"
Driver "ati"
        Option "DRI" "2"
        Option "TearFree" "on"
EndSection

or maybe

Code: [Select]
Section "Device"
Identifier  "ATI Technologies, Inc. ATI Default Card"
Driver "ati"
        Option "DRI" "2"
        Option "TearFree" "on"
EndSection

Or some combination of the two.

I think I have a system with an ATI R200 somewhere .. I'll see if I install PM7 and figure it out .. but it may be a few days.
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Bigoeuf on July 06, 2016, 05:59:54 pm
Cheers for your response Mark - tried both of those options for the config file & no joy - resulted in making it to the login screen which was total distorted & unreadable with what I would describe as horizontal tearing (like the one in the 03 July 2016, 11:20:25 post).
I tried your original  code minus the
Code: [Select]
Option "AccelMethod" "glamor"
as I had do a little digging & apparently that function isnt available on older graphics cards (which is probably why I never made it to the login screen on my first try) but again that produced the same result as above also tried swapping Radeon with ATI as Device & Identifiern again with the same result.
Regarding your last message Mark its difficult to see how I could further combine the 2 code options you gave as the only viariable is on the 'Identifier' line & you have covered both (unless I combine them???) so I guess I'll leave it with you Mark when you have some free time available if that's ok?  :)
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on July 06, 2016, 08:12:08 pm
Sure, I'll get around to testing on the R200 PC at some point, just a little too busy to clear it off ready for PM7 yet .. it has all the PM6 and PM7 build files on it, so I can't just wipe it ;)
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Bigoeuf on July 07, 2016, 03:17:57 am
Okey Dokey - cheers Mark  ;)
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: jjoyceiv on September 07, 2016, 08:50:08 pm
Bloody incredible, this. Thank you @PCNetSpec!

I'm not a Peppermint user, but I did install a fresh copy of Linux Mint 18 MATE today on a client's old laptop after a family member of his failed to get a working copy of Ubuntu 14.04 on. This old beast has a Mobility Radeon X1600 in it, and it flickered like the devil at native res - until I ran some updates, then it didn't. Then I updated the kernel, and... there it went again. I tried a number of solutions before finding something that worked, and this was a major contributor.

What solved the ridiculous flicker - I can't yet speak to mild tearing, this was considerably worse - was creating 20-radeon.conf without the DRI line - cheers @Bigeouf, this card is about the same vintage as yours so skipping that step saved me some time. I believe disabling 10-amdgpu.conf, which contained:

Code: [Select]
Section  "OutputClass"
     Identifier "AMDgpu"
     MatchDriver "amdgpu"
     Driver "amdgpu"
EndSection

also contributed. Like @Bigeouf, my inxi -F output also listed "ati,radeon" - now, with the flicker gone and fix in place, it only shows "radeon". I don't know for a fact that disabling 10-amdgpu.conf did it, but seeing as this GPU is definitely not supported by amdgpu, my client isn't going to experience any breakage without it.
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on September 08, 2016, 11:36:57 am
Great stuff, thanks for that jjoyceiv I'll know what to suggest to people with "ati, readeon" next time :)

For completeness is there any chance you can add your
Code: [Select]
inxi -F
output ? .. no worries if you've already given the PC back to your client ;)
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Timo on February 25, 2017, 06:25:00 pm
This appears to only work for those where
Code: [Select]
inxi -G | grep -i driver
shows the ONLY driver as radeon.

For those people where it shows both ati,radeon I'm working on a solution and will add it when tested.

Works for those where
Code: [Select]
inxi -G | grep -i driver
shows the driver as ati,amdgpu as well.



The GPU tested:
Code: [Select]
~ $ inxi -G
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Fiji [Radeon R9 FURY / NANO Series]
           Display Server: X.Org 1.18.4 drivers: ati,amdgpu (unloaded: fbdev,vesa,radeon)
           Resolution: 2560x1080@59.98hz, 1920x1080@60.00hz
           GLX Renderer: Gallium 0.4 on AMD FIJI (DRM 3.1.0 / 4.4.0-64-generic, LLVM 3.8.0)
           GLX Version: 3.0 Mesa 12.0.6
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on February 25, 2017, 07:21:12 pm
Thanks for the additional info Timo .. it all helps build the knowledge base :)
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Timo on February 25, 2017, 07:43:30 pm
We've a little missunderstanding here, I think.

ati,amdgpu works like radeon and doesn't require any extra steps.

Only ati,radeon does require extra steps.


Although the drivername might suggest something different ... But who understands how the naming on AMD/ATI/Radeon actually works, I don't :-\
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: PCNetSpec on February 25, 2017, 07:46:15 pm
No I understood you my mate, the fix works without any other steps necessary if inxi reports ati,amdgpu .. which is great to know :)
Title: Re: Peppermint 7 - Screen tearing on the ATI open source radeon drivers
Post by: Timo on February 25, 2017, 08:03:03 pm
Ok, thanks for the edit in the first post.

it all helps build the knowledge base :)
Yeah it's always great if you type something in the Searchfunction and get the solution ;)