Bug 453307 - The display exhibits screen tearing on browsers, videos, or anything moving on the screen, ONLY when the screen is rotated.
Summary: The display exhibits screen tearing on browsers, videos, or anything moving o...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-02 17:18 UTC by cangrejopr
Modified: 2022-05-15 01:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cangrejopr 2022-05-02 17:18:51 UTC
Currently using a HP Elitebook x360 1030 G5. The screen can be flippped and it has a rotating sensor. When going to display and changing the screen rotation, window tearing appears when there is movement in the screen. This won't happen when the screen is in normal position (regular landscape). This issue is present in Kubuntu 20.04 and the newest Kubuntu 22.04.
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Go to settings > Display > Change the screen orientation
2. Move anything on screen like a folder and see the screen tear. Videos also show tearing.
3. Change orientation to no rotation and everything goes back to normal.

OBSERVED RESULT
-Changing different settings with the compositor doesn't seem to make any different.
-I thought this was related to using fractional scaling on 1.25, but it also happens with 100% scaling.
-Rotating the screen also seems to inverse the touchpad and touchscreen touches. 


EXPECTED RESULT
-Sreen tearing on windows, videos, browsers


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  Kubuntu 20.04 + 22.04
(available in About System)
KDE Plasma Version: 5.18.0 and newest versions. 
KDE Frameworks Version:  5.68 and newest
Qt Version:  5.12.8 and newest 

ADDITIONAL INFORMATION
laptop:
-Hp Elitebook x360 1030 G5

-Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.8
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.13.0-40-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i5-8265U CPU @ 1.60GHz
Memory: 7.6 GiB of RAM
Comment 1 Nate Graham 2022-05-03 16:38:48 UTC
Are you using Wayland or X11?

If you're on X11, does the problem go away if you disable compositing?
Comment 2 cangrejopr 2022-05-03 17:04:00 UTC
(In reply to Nate Graham from comment #1)
> Are you using Wayland or X11?
> 
> If you're on X11, does the problem go away if you disable compositing?

I'm currently using X11. Have tried with wayland also. In X11 I tried disabling fractional scaling but did not have any effect. I also tried disabling the compositor which still showed screen tearing when the screen is rotated only. It shows in the bottom half of the screen only. I also tried changing compositor settings like scale method, renderer and tear prevention, to no avail. Same issue is present in Kubuntu 22.04.
Comment 3 Nate Graham 2022-05-04 15:56:39 UTC
Thanks!
Comment 4 Zamundaaa 2022-05-05 16:11:04 UTC
This is a bug in Xorg / the modesetting driver: https://gitlab.freedesktop.org/xorg/xserver/-/issues/996
Comment 5 cangrejopr 2022-05-15 01:03:14 UTC
(In reply to Zamundaaa from comment #4)
> This is a bug in Xorg / the modesetting driver:
> https://gitlab.freedesktop.org/xorg/xserver/-/issues/996

I read all the posts in that link and the links they post. All led to this page  https://gitlab.freedesktop.org/Tuetuopay/xserver/-/commit/257a6792794f8ec7584adf8865c43301175d7733#86611b57ce08b1783cf3147aa74b7eb75c8fc50a

which supposedly has a patch to make tearfree work for rotated displays. Unfortunately I don't really know how to apply this or which file to look for and write this patch since I can't find it using discover. Any ideas?