Raspbian on a compute module 3, output of uname -a
Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux
vc4-kms-v3d
a custom DSI panel that starts in 800x1280 mode
rotated display to landscape (1280x800) with xrandr --output DSI-1 --rotate left
I tried this with several different setups, it behaves the same.
For example, xfc4 and lxde.
vsync is working fine when the screen is not rotated, but once it's rotated, windows tearing occurs, very visible if dragging the window or scrolling.
It's compton, the one it's obtained on raspbian with apt install compton.
Trying compton --diagnostics says this:
compton: unrecognized option '--diagnostics'
compton (0.1~beta2+20150922)
usage: compton [options]
followed by the available options.
compton --backend glx --vsync opengl-swc --config /dev/null
But I tried a lot of other options with the same (or worse) results.
xfce4 comes with its own compositor, but that one does the same, so I switched to compton, hoping that it will work better.
No tearing, as in the non rotated case.
Youtube video:
https://youtu.be/e4KI9Xr45q8
Sorry for the bad focus, but the effect is visible nevertheless.
Apparently the issue does not exist if using Wayland/Weston. But that option has some other issues so it might not be so good.
You are not using picom.
No, I'm not.
But I understand that Compton development ceased and this is where the development effort moved. I was hoping that somebody would be kind enough try to rotate the screen and confirm or infirm this issue for picom. Especially one that has it compiled for Raspbian.
@aromanro You can try picom and see if it helps. Building instructions are listed in the README.
Probably I'll do that, but I was hoping somebody already knows about such behavior.
Thank you!
picom exhibits the same issue.
It took me a while, since I needed to cross compile it, but I have it working now.
I'll do more tests and provide more info later.
I'll add only the things different from the first comment here:
Output of picom --diagnostics is:
**Version:** vgit-def63
### Extensions:
* Shape: Yes
* XRandR: Yes
* Present: Present
### Misc:
* Use Overlay: Yes
* Config file used: None
### Drivers (inaccurate):
modesetting
Currently is:
/usr/local/bin/picom --backend glx --vsync
But I tried various flags, with similar issues. For example, I tried --experimental-backends, also not only the glx backend but xrender, too. I also tried --no-use-damage but it does not seem to help.
Does vsync work when the screen is not rotated?
Yes.
I suspect this is not an issue in picom, but something originating somewhere else in xorg.
Does it work ok on other platforms, when the screen is rotated?
Same problem on Intel :(
what picom does is simply ask OpenGL to do vsync, when it broke, it's almost always the drivers' fault, and there is nothing much picom can do. It's better to report this bug upstream.
I'm not sure that would explain why wayland does not exhibit the same issue, though. Isn't it using the same video driver and opengl lib?
@aromanro I was more talking about the driver in Xorg, instead of the underlying kernel video driver.
Yes, they are using the same underlying kernel drm driver, but there are code in Xorg that talks to the drm driver, which can also be considered a driver (the xf86-video-* stuff).
As for opengl, the higher level stuff is the same, but the platform dependent part (EGL, GLX) is different
I would suggest opening a bug report against xserver, as I assume you are using the modesetting driver? I can see the same problem with the modesetting driver on Intel graphics as well. (the problem could also be in mesa, but less likely)
I think I also see the issue in Ubuntu with gnome, although it's not so bad since the difference in speed is huge, but I perceive a difference between the 'normal' and rotated screen. I also suspected something in xorg but I cannot pinpoint it. I have a feeling that it might be something to do with something using the wrong display dimensions when the display is rotated. And it wouldn't be the first time, either, here is a patch that solved several issues related with using the wrong dimensions: https://git.xfce.org/xfce/xfwm4/commit?id=27aa2c7a6f978b2b4485b3241daa3580eb2edd63 This is in the window manager, but something similar could exist in some other part of x. Possibly indeed it's the modesetting.
I think you should just go ahead a report the bug to xorg.
After you've done reporting this problem to xorg, please remember to link to it here.
Done: https://gitlab.freedesktop.org/xorg/xserver/issues/996
Let's hope they'll figure it out and fix it.
A maintainer confirmed it in modesetting.