tildearrow / kwin-lowlatency

archived - X11 full-screen unredirection and lots'a settings for KWin
373 stars 10 forks source link

KWin does not allow setting which monitor to synchronize with #117

Closed zaqxs123456 closed 2 years ago

zaqxs123456 commented 2 years ago

Hi, I am new to Linux, I am using a laptop and connected to a external monitor, however by doing the UFO test (https://www.testufo.com/) I found that the external monitor micro-stutter for every ~2 sec, turn off the compositor then it's working fine again. I googled it and found this repo. But after installation, the compositor seems doesn't work anymore (no any visual effect appear, the two additional option do appear on the setting menu, but the "Apply" button stay gray went they are selected. I had restart the computer) How to fix it? It seems no error on the make, build, and install. What information should I provide to get help?

Operating System: Kubuntu 21.10
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-21-generic (64-bit)
Graphics Platform: X11
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:        21.10
Codename:       impish
tildearrow commented 2 years ago

I haven't tested KWin-lowlatency on Ubuntu... I really hope that the build process and/or library paths have not changed during the years i've been absent on this project...

It's odd that the options don't work (this should not be the case). Let me backport the fixes real quick!

tildearrow commented 2 years ago

Done! Please open a terminal, cd to where you cloned the repository and then type:

git pull

Then recompile and re-install and hope it will work.

(by the way, make sure you are on the Plasma/5.22 branch!)

zaqxs123456 commented 2 years ago

I tried to recompile the Plasma/5.22 branch, but I can't build:

[ 25%] Building CXX object src/CMakeFiles/kwin.dir/kwin_autogen/mocs_compilation.cpp.o
In file included from /home/badaeib/Workings/PublicRepos/kwin-lowlatency/kwin-5.22.5/build/src/kwin_autogen/EWIEGA46WW/moc_waylandoutputdevice.cpp:10,
                 from /home/badaeib/Workings/PublicRepos/kwin-lowlatency/kwin-5.22.5/build/src/kwin_autogen/mocs_compilation.cpp:95:
/home/badaeib/Workings/PublicRepos/kwin-lowlatency/kwin-5.22.5/build/src/kwin_autogen/EWIEGA46WW/../../../../src/waylandoutputdevice.h:11:10: fatal error: KWaylandServer/outputdevice_interface.h: No such file or directory
   11 | #include <KWaylandServer/outputdevice_interface.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/kwin.dir/build.make:227:src/CMakeFiles/kwin.dir/kwin_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:6367:src/CMakeFiles/kwin.dir/all] Error 2
make: *** [Makefile:149:all] Error 2

Maybe because my Plasma is on 5.23?

Then I retried the Plasma/5.23 branch, the compositor work, the two option now is selectable, and all the visual effect appear again, but it don't solve my external monitor micro-stutter for every ~2 sec problem... maybe the compositor is not the root cause?

Anyway, thank you so much.

tildearrow commented 2 years ago

Oh! You are on 5.23... Got it. Yep, the issue is multi-monitor support isn't complete and very impractical to do on X11. Laptop displays tend to not be a perfect 60Hz and usually will be slightly lower or higher, and KWin synchronizes to the lowest refresh rate. Wait for KWin-lowlatency 5.23.3-3, which should add an option to change the VSync mechanism to SGI video sync/OML sync control and eventually allow you to move the "dummy" sync window so that it synchronizes with another monitor.

zaqxs123456 commented 2 years ago

Thank you very much! I will wait for the new version and try it out!

tildearrow commented 2 years ago

Done with 5.23.3-3. See VSync pixel position setting.

Note that multi-monitor support is very preliminary and may present some stuttering problems.

zaqxs123456 commented 2 years ago

There is no kwin-lowlatency-5.23.3-3.patch on https://tildearrow.org/storage/kwin-lowlatency/

tildearrow commented 2 years ago

I just added it right now :p

zaqxs123456 commented 2 years ago

Thank you!

tildearrow commented 2 years ago

No problem!