#asahi-dev · 2026-03-10 22:58
leioon hindsight should have realized that and tackled it that way for myself 2 years ago#asahi-dev · 2026-03-10 22:57
JamesCalligeros[m]nah just when the image is allocated#asahi-dev · 2026-03-10 22:57
leiogreat, I thought we might need to do all of that in the input KMS thread each frame it gets near the edge#asahi-dev · 2026-03-10 22:57
oliver(I just realized that I could even reduce the number of transparent pixels by just ensuring we have at least 32 pixel around the hotpoint. Maybe tomorrow.#asahi-dev · 2026-03-10 22:56
oliverCorrect. You can almost think of it as preprocessing your cursor images to include more transparent pixels. #asahi-dev · 2026-03-10 22:55
oliverMutter will switch to a software cursor when the size is exceeded. #asahi-dev · 2026-03-10 22:55
leioeven better, so you aren't even really affecting the performance critical input thread KMS commit bits that might have a problem if taking too long?#asahi-dev · 2026-03-10 22:55
oliverNope, I limit this with the fakes cursor size hints #asahi-dev · 2026-03-10 22:55
oliverExactly, it also happens only once when the cursor is prepared, not on each frame. #asahi-dev · 2026-03-10 22:54
leiomaybe that's a problem if the cursor is the size of the whole primary plane? :D#asahi-dev · 2026-03-10 22:54
leiobut you seem to get away with just always padding and shifting#asahi-dev · 2026-03-10 22:53
leioto me shift was for a logic of only padding when the size is less than 32x32 and then shifting accordingly to compensate#asahi-dev · 2026-03-10 22:53
leiooh, yeah, to account for the padding#asahi-dev · 2026-03-10 22:52
oliverI do#asahi-dev · 2026-03-10 22:52
leioI thought that would have been necessary, but apparently not then#asahi-dev · 2026-03-10 22:52
leioyou didn't do the shift part, it looks like :)#asahi-dev · 2026-03-10 22:52
oliverWell, but I am still pretty happy now with the extend and shift trick as leio called it. #asahi-dev · 2026-03-10 22:49
chaos_princessand serial console times out#asahi-dev · 2026-03-10 22:49
chaos_princessno serial output, seems to be stuck#asahi-dev · 2026-03-10 22:49
JamesCalligeros[m]chaos_princess: the cpu doesnt even hit rvbar? #asahi-dev · 2026-03-10 22:47
leioI don't think that's anything more than "it's hard to do, please help"#asahi-dev · 2026-03-10 22:47
leiofor mouse cursor you want to know where your click will go to if you click it, not where you were for the rest of the rendering for the use cases where this kind of input latency matters#asahi-dev · 2026-03-10 22:46
JamesCalligeros[m]i do have an issue with not wanting to support kms universal planes "properly" because "this is just what we've always done" though#asahi-dev · 2026-03-10 22:45
JamesCalligeros[m]yeah, and given how display controllers used to work i dont really begrudge the approach mutter uses for doign cursor updates#asahi-dev · 2026-03-10 22:45
leiohttps://blogs.gnome.org/shell-dev/2021/01/21/threaded-input-adventures/ describes some of that; the problem for asahi comes from the first "what it does not bring yet" point being implemented by now#asahi-dev · 2026-03-10 22:45
oliverYea I get it. you would need to take the cursor position at the beginning of paint. Which also makes more sense, that's the cursor position that was actually "used" for that frame. But that's probably bot going to happen #asahi-dev · 2026-03-10 22:43
leiothus at the point of time it needs to decide to fallback to SW cursor for the next frame, it doesn't yet have the final position of the mouse cursor if HW were used, thus a atomic commit test to figure out if cursor plane will work can't be reliably done as that might change for the position it's at that time and when it's actually going to be KMS commited#asahi-dev · 2026-03-10 22:41
chaos_princesswrt previous sleep discussion - i threw this together https://pastebin.com/1xUScPRw and once it runs, it doesn't seem to exit sleep#asahi-dev · 2026-03-10 22:40
JamesCalligeros[m]Its probably a nontrivial amount of work to get mutter to support doing so anyway so i understand why no one wants to actually do it#asahi-dev · 2026-03-10 22:40
JamesCalligeros[m]oliver: mutter does cursor updates asynchronously to minimise latency. falling back to software and compositing the cursor into the scene introduces a very very very imperceptible amount of latency but when have gnome ever been afraid of letting perfect be the enemy of good#asahi-dev · 2026-03-10 22:38
JamesCalligeros[m]Intel’s display controller behaves similarly to ours (immutable zpos, primary at the bottom) so im hoping once https://invent.kde.org/plasma/kwin/-/merge_requests/8076 is merged then we can do some more reliable testing#asahi-dev · 2026-03-10 22:38
leiowhere I'm confused as per above is how is GTK GraphicsOffload stuff as per https://blogs.gnome.org/gtk/2023/11/15/introducing-graphics-offload/ giving zero-copy path when that isn't dealing with overlay planes in the compositor side#asahi-dev · 2026-03-10 22:38
oliverwhy do the mutter guys say their approach it is better than kwins? #asahi-dev · 2026-03-10 22:37
oliverI highly doubt that gtk has anything to do with drm planes. #asahi-dev · 2026-03-10 22:36
JamesCalligeros[m]Mind you, thats partially because its really only xaver working on it solo :p#asahi-dev · 2026-03-10 22:36
JamesCalligeros[m]Yeah its taken kwin a few years to get to this point#asahi-dev · 2026-03-10 22:34
leiomutter does cursor rendering in what they believe is better, so they can't fallback like that; making use of overlay planes is another big work, it seems like#asahi-dev · 2026-03-10 22:33
leioI'm now utterly confused about the (GTK) graphics offload work vs overlay planes now from looking into your patch and mutter code#asahi-dev · 2026-03-10 22:33
oliverAnd I think Kwins solution is good. Would be nice if gnome had that, but that's a lot of work, I bet. #asahi-dev · 2026-03-10 22:32
oliverYea I know that #asahi-dev · 2026-03-10 22:30
leioyes#asahi-dev · 2026-03-10 22:26
oliverYou mean that's why you can't expose it as a cursor plane? #asahi-dev · 2026-03-10 22:24
JamesCalligeros[m]we could allow it on kwin because any rejected commit immediately recomposites the scene in software. Other compositors such as mutter and weston just lock up. Xorg used to just immediately crash#asahi-dev · 2026-03-10 22:23
JamesCalligeros[m]That is exactly why we cant expose this though otherwise i would just reject cursor plane swaps that would crash dcp like we do with overlays#asahi-dev · 2026-03-10 22:04
oliverI didn't observe any lag but I wasn't looking for it either. With 120hz it might not be too noticeable anyways. #asahi-dev · 2026-03-10 22:02
oliverdriver rejecting the commit, freezing the screen until I moved the cursor away. #asahi-dev · 2026-03-10 22:02
oliverJamesCalligeros[m]: according to the check in atomic check the overlay plane just needs to intersect at least 32x32px with the primary plane. My patch does that by adding 32px of padding on each side of the cursor, so that it always intersects the required amount, even if it touches the screen edge. Thsz way nothing crashes. No need to fall back to software rendering either. Also during testing the worst thing that happened was the dcp #asahi-dev · 2026-03-10 21:53
leiothough if something can be done to hide all of this from userspace now, that might be best#asahi-dev · 2026-03-10 21:53
leiooliver: fwiw, gnome-shell chat is on matrix, but jadahl (who we talked about this before iirc) is one of the few mutter devs still on libera #gnome-shell on IRC side too#asahi-dev · 2026-03-10 21:48
JamesCalligeros[m]And we can mangle the surface metadata before it is committed