Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to fix tearing with FVWM/AMD/picom? [SOLVED]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 30, 2021 11:34 am    Post subject: how to fix tearing with FVWM/AMD/picom? [SOLVED] Reply with quote

I have xorg, FVWM, an AMD Radeon FX 5700, with picom installed. I have some obnoxious tearing issues in all cases: scrolling, moving video, gaming, etc. Can anybody give me advice for how to tweak my system to fix this? My xorg.conf file is blank, so it's just using default settings.

Thanks for the help,

EE


Last edited by ExecutorElassus on Sat Oct 30, 2021 7:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54305
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 11:51 am    Post subject: Reply with quote

ExecutorElassus,

Tearing is a video artefact cased by updating the pixel buffer at the same time as its being used to refresh the image on the screen.
Its unsightly but harmless.

Its normally addressed by using two (or more) separate pixel buffers so that one is used to refresh the screen while the other is updated with the next image.
The buffers are switched during the frame blanking.

There are a few arrangements where this is not possible.
You only have one frame time to draw the next image. That's 16.6ms at 60Hz. What happens when the next frame is not ready?
Normally, the old frame is displayed again and you get frame dropping.

In the case of Optimus and the like, the two GPUs need to cooperate here and in Linux, that's not always very good.

Share your Xorg.0.log on a pastebin, so we can see what's happening.

Xorg uses double buffering by default unless there is not enough video RAM but that's not been a problem for many years now.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 30, 2021 1:57 pm    Post subject: Reply with quote

Hi Neddy,

when I said the file was blank, what I really mean is that the file /etc/X11/xorg.conf doesn't exist. So the xorg-server isn't getting any settings at all. Is this a valid pastebin link for you?

https://paste.c-net.org/PlumbingBadmouth

Thanks for the help,

EE
(and yes, I realize that mostly it's just ugly, but for gaming it's really bothersome)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54305
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 2:51 pm    Post subject: Reply with quote

ExecutorElassus,

Code:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data


Try wgetpaste. That just works.

The default Xorg setup plus the autoblackmagic should provide a correctly working single display, together with a USA qwerty keyboard and right handed mouse.
In short, one display should work for everyone but you might not like the input arrangements.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 30, 2021 3:26 pm    Post subject: Reply with quote

Hi Neddy,

better pastebin: https://dpaste.com/BBZ67KVM2

I have two monitors, each with a resolution of 1920x1200.

But you should be able to see it from the pastebin.

Thanks for your help,

EE
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54305
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 5:41 pm    Post subject: Reply with quote

ExecutorElassus,

Code:
[ 39434.793] (II) Initializing extension DOUBLE-BUFFER
was what I wanted to see. Its there.

See
Code:
man amdgpu
Is it as simple as
Code:
       Option "TearFree" "boolean"
              Set the default value of  the  per-output  'TearFree'  property,
              which  controls tearing prevention using the hardware page flip‐
              ping mechanism. TearFree is on for any CRTC associated with  one
              or  more  outputs with TearFree on. Two separate scanout buffers
              need to be allocated for each CRTC with TearFree on. If this op‐
              tion  is set, the default value of the property is 'on' or 'off'
              accordingly. If this option isn't set, the default value of  the
              property  is  auto,  which means that TearFree is on for rotated
              outputs, outputs with RandR transforms applied and for RandR 1.4
              secondary outputs, otherwise off.
?

Surely it can't just be that but you need to try.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 30, 2021 5:52 pm    Post subject: Reply with quote

does that need to be in xorg.conf? If so, since that file does not exist, is there anything else I need to put in that file besides that to get it to work?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54305
Location: 56N 3W

PostPosted: Sat Oct 30, 2021 6:28 pm    Post subject: Reply with quote

ExecutorElassus,

xorg.conf and xorg.conf.d/* are merged. Normally xorg.conf.d/ contains xorg.conf fragments.
Either way works. Mix and match works too.

You need a
Code:
       Section "Device"
         Identifier "devname"
         Driver "amdgpu"
         ...
       EndSection
fragment that contains at least
Code:
Option "TearFree" "on"


The line
Code:
Identifier "devname"
is required and must be unique in all of your Section "Device" fragments.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sat Oct 30, 2021 6:48 pm    Post subject: Reply with quote

So, I created the file "/etc/X11/xorg.conf.d/10-devices.conf", containing only:
Code:

          Section "Device"
         Identifier "display-0"
         Driver "amdgpu"
         Option "TearFree" "on"
       EndSection


And restarted the X server. And holy crap, it looks like the tearing is gone. I tried doing the thing in my game that caused it the most, and couldn't detect any.

So I guess it really does seem to have been that simple.

Amazing.

Thanks so much! Marking [SOLVED].

EE
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum