Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laggy scrolling on Wayland #1526

Closed
wmww opened this issue Jun 28, 2017 · 13 comments
Closed

Laggy scrolling on Wayland #1526

wmww opened this issue Jun 28, 2017 · 13 comments
Milestone

Comments

@wmww
Copy link

wmww commented Jun 28, 2017

OS: Arch Linux
version: 1.30.1 gtk3 from Arch's AUR

With GTK3 on Wayland, vertical scrolling is laggy. When scrolling slowly, its fine but as soon as I scroll faster (possibly one line per frame is the threshold) it starts lagging. It immediately comes to the correct position when I stop scrolling, and occasionally updates while I'm scrolling (about 1fps). Everything works if the window is smaller then half the screen (screen resolution is 2560x1600), but there is still high CPU usage while scrolling.

I encounter the problem on Sway and Gnome on Wayland, but there is no issue on XFCE4 with X11.

Based on the high CPU usage and dependence on window size, my guess is that it is CPU rendering and, if more scroll events have come in before it is done rendering, it renders the next frame and keeps going until it has caught up.

@codebrainz
Copy link
Member

As Geany doesn't do anything with the scrolling or rendering, this is almost surely an issue in Scintilla or GTK+. It might also be related to some kind of Xlib compatibility mode in Wayland, unless Geany and Scintilla don't use any Xlib calls, it's probably a kind of emulation or something.

@elextr
Copy link
Member

elextr commented Jun 29, 2017

As @codebrainz said the scrolling is done by the Scintilla editing widget we use. Possibly try the Scite editor which is the reference platform for Scintilla and see if the problem exists there too.

One thought is that IIRC GTK on X11 aggregated mouse moves and scrolls, but maybe that isn't working on Wayland, so Scintilla is responding to every scroll event individually.

Also I thought Scintilla had a smooth scrolling setting, but maybe thats only on its OSX port since I can't see it just now.

[Edit: PS given that its all text, Scintilla rendering is almost certainly CPU only, and if yo have line wrap on its even higher usage]

@elextr
Copy link
Member

elextr commented Jul 1, 2017

@william01110111 note also that AFAIK none of the regular contributors use wayland, so you will probably need to do the search for possible solutions.

@wmww
Copy link
Author

wmww commented Jul 4, 2017

I disabled line wrap and most other features with little to no effect. I don't have a problem when using a normal mouse scroll wheel, only with high precision touch pad scrolling (which presumably sends many more scroll events). I can't find a GTK3 version of Scite, so I can't test that on Wayland.

@elextr
Copy link
Member

elextr commented Jul 4, 2017

Wow, Arch, the bleeding edgest of distros only has GTK2 Scite, but Ubuntu LTS the boring edgest of distros has only GTK3 Scite 😁

I'm afraid I don't know anything about wayland to suggest where to go from here, maybe someone else has ideas?

@wmww
Copy link
Author

wmww commented Jul 4, 2017

Strange there is no GTK3 SciTE in the AUR. I tried to compile SciTE from the latest source, which worked but still gave me GTK2. No instructions on how to build for or run with GTK3. Anyway, this but doesn't make Geany unusable, its just annoying.

@elextr
Copy link
Member

elextr commented Jul 4, 2017

make GTK3=1 or something similar according to the README

@wmww
Copy link
Author

wmww commented Jul 4, 2017

Thanks. Got it running, but something strange is happening. SciTE is not scrolling at all. Everything else works fine.

@elextr
Copy link
Member

elextr commented Jul 4, 2017

Not even with the mouse?

I suspect Scite hasn't been tried much on Wayland either.

@wmww
Copy link
Author

wmww commented Jul 4, 2017

No, mouse works. Just not with scroll wheel.

@wmww
Copy link
Author

wmww commented Jul 4, 2017

Looks like I'm an idiot and cloned an old, non official version of SciTE. I'm running into https://sourceforge.net/p/scintilla/bugs/1901/. I have to go to bed now, but I will try to get newer SciTE up and running and test it out when I have a chance.

@elextr
Copy link
Member

elextr commented Jul 4, 2017

Scintilla uses hg, not Git, so unless you want to use hg just grab the TGZ file off the Scintilla website.

@wmww
Copy link
Author

wmww commented Sep 21, 2017

Update: this problem appears to now be completely resolved. The geany-gtk3 in the AUR (version 1.31-1) still has the problem, but it is fixed when building from source or using geany-gtk3-git.

@wmww wmww closed this as completed Sep 21, 2017
@b4n b4n added this to the 1.32 milestone Sep 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants