You are not logged in.

#1 2024-09-04 17:26:20

why_do_i_need_a_username
Member
Registered: 2024-08-26
Posts: 13

Cursor lag under (virtually) all Wayland compositors, Intel UHD 620

Posted about this beforehand here but felt like that was the wrong place for that issue (because the issue that *did* belong in that forum section and based off of which I put it there had already been solved, partially at least) so posting about it again, not sure if this is against the rules or not

I recently got a used laptop (ThinkPad T480, non-dGPU, Intel UHD 620 iGPU) for running Linux (and also maybe possibly Windows for when something insists on being run on said operating system exclusively), and I've found out that running any wayland-based desktop/WM on here results in unbearable cursor lag when trying to do much of anything. This happens on (basically) *all* the compositors (originally found out about this while trying to daily drive labwc which is based on wlroots, also happens on sway and Wayfire which are both based on that as well, but also seems to happen under `kwin_wayland` (only tested it when running it bare, i.e. not in the "Plasma (Wayland)" session you're supposed to use it with, because I don't like Plasma 6.x because they took away font DPI scaling under Wayland and fractional scaling doesn't quite cooperate well with stuff like Firefox just yet so it's completely out the question for me), and probably mutter as well but it *did* feel less bad there, might have just been me imagining it tho because I only tested it in a Fedora 40 (GNOME, obviously) live image (which itself says it uses Wayland in the settings app thing that GNOME has) and I didn't have an accompanying X11 session to compare against at that specific moment in time so I'd probably need to do more testing), and I'm not quite sure why.

I described this as such in the previous thread:

For reference, this exhibits itself as a... ~0.2s? maybe less, maybe more? (I tried capturing it with my phone's "slow motion" camera mode but that footage looks so bad (washed out colors and insanely low resolution) that I basically regard it as useless, and screen record is not an option because from what I've tried and seen from other people also doing Linux/Wayland screen recording, the cursor specifically gets affected) delay between bringing your finger to and starting to drag it across the touchpad and something actually happening with the cursor on screen. It's *less* noticeable with a dedicated mouse (the one I currently use is wireless so there's an inherent delay but I was kinda able to replicate it with a wired one as well... kinda), but it still didn't feel like the movement was *instantaneous*, necessarily. ... ... ... ... If it *is* the touchpad though, I'd still just use Xorg anyway because I use the touchpad heavily and it feels *borderline insufferable* under all the Wayland stuff I've tried, and for me, that's a big enough reason to just... not bother with it on this machine.

I already tried running both sway and labwc with `WLR_NO_HARDWARE_CURSORS=1` because that can supposedly help with some of these kinds of issues, which didn't help, as expected. Of course it wouldn't have been that easy.

A lot of the stuff I was even able to find about this online seems to mention "atomic modesetting" which seems to cause issues on certain hardware (Nvidia cards and possibly some SBCs too), and this is neither one of those, but it is still older-ish hardware, so... maybe that. There's also the possibility that it's just too old for Intel and/or the kernel devs to care about it, which is definitely possible, but... again, I have no idea what is actually going on here, so I can't say anything about this so far.

Any help would be much appreciated, thanks.

Offline

#2 2024-09-11 15:45:42

why_do_i_need_a_username
Member
Registered: 2024-08-26
Posts: 13

Re: Cursor lag under (virtually) all Wayland compositors, Intel UHD 620

Ok, so it turns out that this thing's touchpad just sucks in general, regardless of what display server you use. If I use it under Linux whatsoever, doesn't matter if it's X11 or Wayland, it'll start off fine, then over time, it'll get progressively laggier over time, and when you move it around a bit, it's suddenly reasonably responsive again. I *though* I could discern a substantial delay when switching between an Xorg (with xf86-input-libinput, not evdev+synaptics or whatever) and a Wayland session (both running at once, switching between them using Ctrl+Alt+F[VT number]), but... no, it'll start sucking under both if you use it for long enough. This might be some hard-/firmware-level pointer acceleration thing that it does internally, which may or may not be controllable in software, not sure about Windows because I don't have it installed here right now. This would also explain why it took me a while to notice this back when daily driving a Wayland (wlroots-based) session, as it'll only get to that point *eventually*. Leaving this open for now.

edit: ...but it *does* feel substantially laggier out of the gate under wayland (labwc, wlroots based). Typing this under said compositor right now.
edit 2: literally just found out about this. Wouldn't have thought that there would be much of a difference between labwc and anything else wlroots-based but apparently there is. Installed wayfire (which is what they compared it against, in addition to X11 which had the lowest cursor latency of all three, though they're talking about Pis and those are... interesting when it comes to graphics stuff like this so I'm not sure this is entirely applicable here) and it does feel better, though not as good as it did on Xorg. Will run X11 for now but might switch to a Wayland compositor of some kind if it has low enough latency. To be clear, my use case for this machine does not at all involve anything needing low latency (i.e. competitive gaming and stuff, I mean it's a T480 for crying out loud), but whatever latency does exist under said compositors can very much be noticed just by using the touchpad for a while. I thought that this was a libinput thing of some kind, though that wouldn't explain why it'd feel fine under Xorg (which I said I am using with `xf86-input-libinput`) but not under Wayland (where libinput is basically the default for everything afaik), but nope, apparently some compositors just suck at this. Wasn't expecting there to be such a substantial difference between different wlroots-based compositors though, I had basically assumed that they all used the exact same rendering code and whatnot but apparently some (wayfire being one of them from what I can tell) have custom stuff on top of it that apparently does make a difference.

Last edited by why_do_i_need_a_username (2024-09-12 16:11:38)

Offline

Board footer

Powered by FluxBB