#
…

2026-03-10

00:12mixi has quit [Ping timeout: 480 seconds]
00:21john-cabaj has joined #asahi-dev
00:22mixi has joined #asahi-dev
00:32john-cabaj has quit [Ping timeout: 480 seconds]
00:37fumnanya has quit [Ping timeout: 480 seconds]
00:46fumnanya has joined #asahi-dev
00:54fumnanya has quit [Ping timeout: 480 seconds]
00:59hdbngr has joined #asahi-dev
01:03pb17 has quit [Ping timeout: 480 seconds]
01:04truita_ has joined #asahi-dev
01:08hdbngr has quit [Ping timeout: 480 seconds]
01:10truita has quit [Ping timeout: 480 seconds]
01:13truita_ is now known as truita
01:19pb17 has joined #asahi-dev
02:57ipatch has quit [Read error: Connection reset by peer]
02:57ipatch has joined #asahi-dev
03:08tobhe_ has joined #asahi-dev
03:14hexdump01 has joined #asahi-dev
03:14tobhe has quit [Ping timeout: 480 seconds]
03:16hexdump02 has quit [Ping timeout: 480 seconds]
04:05fumnanya has joined #asahi-dev
04:13fumnanya has quit [Ping timeout: 480 seconds]
04:24Graypup_ has quit [Quit: meow]
04:24Graypup_ has joined #asahi-dev
04:25Graypup_ has quit []
04:25Graypup_ has joined #asahi-dev
04:29eluks has quit [Remote host closed the connection]
04:30eluks has joined #asahi-dev
05:00nora has joined #asahi-dev
05:02nora_ has quit [Ping timeout: 480 seconds]
05:49tobhe has joined #asahi-dev
05:51tobhe_ has quit [Ping timeout: 480 seconds]
06:01KongrooParadox has joined #asahi-dev
06:03[KongrooParadox] has quit [Ping timeout: 480 seconds]
06:07[KongrooParadox] has joined #asahi-dev
06:10KongrooParadox has quit [Ping timeout: 480 seconds]
06:15KongrooParadox has joined #asahi-dev
06:18[KongrooParadox] has quit [Ping timeout: 480 seconds]
06:32fumnanya has joined #asahi-dev
06:40blu0jay has quit [Read error: Connection reset by peer]
06:43blu0jay has joined #asahi-dev
07:00[KongrooParadox] has joined #asahi-dev
07:02KongrooParadox has quit [Ping timeout: 480 seconds]
07:07KongrooParadox has joined #asahi-dev
07:10[KongrooParadox] has quit [Ping timeout: 480 seconds]
07:16tobhe_ has joined #asahi-dev
07:21tobhe has quit [Ping timeout: 480 seconds]
07:25[KongrooParadox] has joined #asahi-dev
07:28KongrooParadox has quit [Ping timeout: 480 seconds]
07:32rockosov has joined #asahi-dev
07:36KongrooParadox has joined #asahi-dev
07:38voidah has quit [Read error: Connection reset by peer]
07:38voidah has joined #asahi-dev
07:38[KongrooParadox] has quit [Ping timeout: 480 seconds]
07:49[KongrooParadox] has joined #asahi-dev
07:51dinomug has quit [Remote host closed the connection]
07:52KongrooParadox has quit [Ping timeout: 480 seconds]
08:05ravikant_ has joined #asahi-dev
08:29chadmedhuh i thought the busted sleep state was deep wfi, is there a deeper state we're missing?
08:29chadmedcpuidle-apple already does deep wfi it seems
08:34yukaI think completely shutting the core so that it would boot back up at RVBAR
08:34sventhere’s a deeper state that we don’t fully understand
08:34svenyeah, that one
08:36chadmedyeah i was looking into what would have to change in m1n1, i dont think its _that_ much (put a trampoline at the entry point, reserve the range, resume table for the cpuidle driver to write to?)
08:36chadmedbut if we dont actually understand how it works fully theres no point
08:38chadmedas in, coming out of the state seems standard enough but do we know how to actually get into it properly
08:43sveni think there's code in m1n1 that does it (the shutdown secondary core stuff)
08:43nickchanisn't that just the smp_stop_secondary code
08:43svenbut i don't think anyone ever tried it for e.g. _all_ cores at the same time
08:44sventhat's why I said we don't fully understand it
08:44svenchadmed: and yeah, something like that hack would work downstream I think
08:44pb17 has quit [Ping timeout: 480 seconds]
08:44svenwe also don't know if we need to re-apply chickens, etc. or if that persists across full shutdown
08:46nickchanif IRQs are not masked during shutdown in CYC_OVRD then the core would come up again when IRQ's received
08:46pb17 has joined #asahi-dev
08:46svenin theory, yes. but has anyone tried that?
08:46nickchani think that's what happened when the cpuidle driver tried to run on A7-A11
08:47svenwhich doesn't matter for us, what matters is what happens on M1+
08:47nickchanit tries to CPU idle in linux then on uart i immediately see m1n1 output until some spinlock exploded and rebooted
08:48chadmedshould we have printfs in that hot path
08:48nickchanbehavior on a11 should be close enough if wfi retention bit is unset but it's probably best to verify on m1
08:48svenif we need to re-apply chickens we need a bit more of m1n1 to stay resident once linux runs but we'll need that anyway if we ever get to psci-via-efi or whatever
08:48svenand if the downstream hack actually saves significant idle power maybe that's enough motivation for someone to look into that psci mess ;)
08:50chadmedm1n1 is what, ~600 kB? no ones gonna miss that, lets just reserved-memory the whole image :P
08:50svenfair enough :D
08:50sventhese things have at least 8GB ram anyway
08:50nickchanit's actually over 1 MB in size
08:50sveni honestly wouldn't care even if it's 10MB
08:50chadmedSEPFW and DCP firmware say hello :P
08:51svencan always add "optimize resident m1n1 footprint" to that yaks worth shaving pages
08:51nickchantried a fresh build on upstream "1097728 bytes"
08:51svenwe'll have to be careful with any allocated buffers etc. from code called after linux is running though
08:52nickchanfor the longest time the secondary stack isn't reserved in m1n1
08:53nickchanthen i added logic into smp_secondary_entry() and wondered why things started exploding left and right
08:55nickchanfor iodev i think it would be sufficient to disable all of them
09:22ravikant_ has quit [Ping timeout: 480 seconds]
09:32ravikant_ has joined #asahi-dev
10:03lukeleppan has quit [Quit: Ping timeout (120 seconds)]
10:03lukeleppan has joined #asahi-dev
10:03lukeleppan has quit []
10:08lukeleppan has joined #asahi-dev
10:28lukeleppan has quit [Ping timeout: 480 seconds]
10:35nothoughtsleft has joined #asahi-dev
10:35nothoughtsleft has quit []
10:57pb17 has quit [Ping timeout: 480 seconds]
10:58pb17 has joined #asahi-dev
11:04wildblue has quit [Read error: Connection reset by peer]
11:04wildblue has joined #asahi-dev
11:43fumnanya has quit [Ping timeout: 480 seconds]
11:52fumnanya has joined #asahi-dev
12:00fumnanya has quit [Ping timeout: 480 seconds]
12:05fumnanya has joined #asahi-dev
12:09jnn has quit [Ping timeout: 480 seconds]
12:09tjemke has quit [Ping timeout: 480 seconds]
13:04pb17 has quit [Ping timeout: 480 seconds]
13:11pb17 has joined #asahi-dev
14:08john-cabaj has joined #asahi-dev
14:11Robert[m]1 has joined #asahi-dev
14:20Robert[m]1Hi, so I just built the m1n1 on macos following the readme instructions. After installing llvm build stuff and rust via brew I ran make which failed because the core crate was not available.... (full message at <https://matrix.org/oftc/media/v1/media/download/AQe2yXwuvE8zZJsIV1Gt-yeuA7zFdq0zyTEUiGRynQnB6b7mpR6eYE01JFe6xy7bWNKzVj8cb4v4-ElPDa6EVHBCedIDhQGgAG1hdHJpeC5vcmcvWVFVaVdXUmFMcktWdmF4VXZFWllBUkR5>)
14:28gargantu1 has joined #asahi-dev
14:28jgoyvaerts8 has joined #asahi-dev
14:30gargantua has quit [Ping timeout: 480 seconds]
14:34jgoyvaerts has quit [Ping timeout: 480 seconds]
14:34jgoyvaerts8 is now known as jgoyvaerts
15:10pb17 has quit [Ping timeout: 480 seconds]
15:12pb17 has joined #asahi-dev
15:20fl0_idRobert[m]1 it seems like you are mixing rust environments, I would just pick one. Just don't install via brew but rustup and you won't have this issue
15:33dinomug has joined #asahi-dev
15:40tjemke has joined #asahi-dev
16:08pounce has joined #asahi-dev
16:25tobhe has joined #asahi-dev
16:27rzhikharevich has joined #asahi-dev
16:30tobhe_ has quit [Ping timeout: 480 seconds]
16:39rzhikharevich has quit [Ping timeout: 480 seconds]
16:42ravikant_ has quit [Ping timeout: 480 seconds]
16:51ravikant_ has joined #asahi-dev
16:55pb17 has quit [Ping timeout: 480 seconds]
17:02Gue___________________________ has joined #asahi-dev
17:09ravikant_ has quit [Remote host closed the connection]
17:09Gue___________________________ has quit [Quit: Textual IRC Client: www.textualapp.com]
17:10ravikant_ has joined #asahi-dev
17:22pb17 has joined #asahi-dev
17:45ravikant_ has quit [Remote host closed the connection]
17:46ravikant_ has joined #asahi-dev
17:47tobhe_ has joined #asahi-dev
17:53tobhe has quit [Ping timeout: 480 seconds]
18:01ravikant_ has quit []
18:04Rock has joined #asahi-dev
18:05Rock is now known as Guest4786
18:07Guest4701 has quit [Remote host closed the connection]
18:12nicolas17sven: IIRC old Apple SoCs waking from deep sleep would start all the way from the bootrom, which would notice it's actually waking from sleep and reinitialize some stuff and jump back to the kernel, newer ones have a hardware "recfg engine" to do that instead
18:13svenyeah, i've talked to siguza about that years ago
18:13nicolas17I was about to say Siguza would be the expert on that :p
18:14sventhis deeper sleep needs some research to figure out some details
18:14sveni pers
18:14sven*i personally don't care much what happens behind the scenes (i.e. is it bootrom? is it reconfig engine?) but what we can actually observe
18:14sveni.e. what's the state of the core once it ends up back at RVBAR from deep sleep?
18:15nicolas17well, idk if the recfg engine is transparent or if the kernel has to tell it what to do
18:15sveniirc siguza told me it's setup and locked down by iboot already
18:16nicolas17oh hm interesting
18:18svenif i were to look into this i'd try and setup a timer interrupt, make sure it's not masked in that override register and then shutdown the first core and see if it comes back up
18:18sveni kinda expect we need to apply chickens again, but would be interesting to check that as well then
18:24svenand then the next step would be to see how much power this actually saves and if it's worthwhile to actually implement this with some downstream cpuidle hack
18:31nicolas17"This paper proposes Rectified Classifier-Free Guidance (ReCFG) for diffusion models"
18:31nicolas17ugh, AI polluting search results again /j
19:11oliveri hacked a small patch for gnome to add 32px of padding to the cursor and to move it onto an overlay plane: hardware cursors for everyone! https://files.narf.zone/3ebbf38c23b4aea2/0001-backend-native-move-cursor-to-overlay-plane-49.4.patch
19:44d3fus has quit []
19:58voidah has quit [Ping timeout: 480 seconds]
20:06voidah has joined #asahi-dev
20:15voidah has quit [Ping timeout: 480 seconds]
20:23voidah has joined #asahi-dev
20:35voidah has quit [Ping timeout: 480 seconds]
20:35KongrooParadox has joined #asahi-dev
20:36tobhe has joined #asahi-dev
20:38[KongrooParadox] has quit [Ping timeout: 480 seconds]
20:41voidah has joined #asahi-dev
20:42pb17 has quit [Ping timeout: 480 seconds]
20:43tobhe_ has quit [Ping timeout: 480 seconds]
20:49pb17 has joined #asahi-dev
21:07[KongrooParadox] has joined #asahi-dev
21:09KongrooParadox has quit [Ping timeout: 480 seconds]
21:11jsk has quit [Read error: No route to host]
21:11jsk has joined #asahi-dev
21:17rubano has joined #asahi-dev
21:25voidah has quit [Ping timeout: 480 seconds]
21:27leiooliver: if you can enable it via some quirk system (I see something exists for cogl, though can't spot anything for outside it) and make sure it works with any cursor size, it might be upstreamable; maybe a good starting point for discussion in a draft MR as-is too
21:31oliverI'll look into that!
21:32KongrooParadox has joined #asahi-dev
21:34leiojadahl wasn't really opposed to something like this, but looking deeper, I'm not sure how that approach is going to work
21:34leioI think cursors just need to be able to be drawn on overlay planes proper in mutter
21:35[KongrooParadox] has quit [Ping timeout: 480 seconds]
21:36leioand I'm pretty sure mutter uses overlay planes extensively
21:38rubano has quit [Read error: Connection reset by peer]
21:39leiooh, nvm, maybe not; GTK is going via dmabuf itself instead
21:41JamesCalligeros[m]Wasnt there some issue with cursur latency
21:42leioI think the patch is doing the extending and shifting trick inside that low-latency thread?
21:42leiothe problem is that it needs to decide whether to use HW or SW cursor before that due to that, but if you make HW work, then that's not an issue
21:42Extern has joined #asahi-dev
21:44fumnanya has quit [Ping timeout: 480 seconds]
21:44leio(because if it needs to go SW, it needs to be drawn different to include in the scene graph or whatever together with the rest? while with hardware it's placed at the most up to date pointer position instead, closer to the scanout time than the rest of the non-cursor screen damage)
21:45JamesCalligeros[m]Yeah but… we are still going to need to fall back to sw at some point unless we mangle the framebuffer
21:45JamesCalligeros[m]The cursor rectangle cannot leave screenspace
21:45leiothat's what olive_r's patch does
21:46leio(I think)
21:47JamesCalligeros[m]We did try this and it still crashed dcp multiple times
21:47JamesCalligeros[m]But that was in the kernel
21:48JamesCalligeros[m]Maybe ill try again now that the plane stuff is more cleanly separated out
21:48JamesCalligeros[m]And we can mangle the surface metadata before it is committed
21:49rubano has joined #asahi-dev
21:50[KongrooParadox] has joined #asahi-dev
21:52fumnanya has joined #asahi-dev
21:52KongrooParadox has quit [Ping timeout: 480 seconds]
21:53leiooliver: 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
21:53leiothough if something can be done to hide all of this from userspace now, that might be best
22:00pthariensflame has joined #asahi-dev
22:00fumnanya has quit [Ping timeout: 480 seconds]
22:01pthariensflame has quit []
22:01KongrooParadox has joined #asahi-dev
22:02oliverJamesCalligeros[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
22:02oliverdriver rejecting the commit, freezing the screen until I moved the cursor away.
22:04[KongrooParadox] has quit [Ping timeout: 480 seconds]
22:04oliverI didn't observe any lag but I wasn't looking for it either. With 120hz it might not be too noticeable anyways.
22:07lukeleppan has joined #asahi-dev
22:08john-cabaj has quit [Ping timeout: 480 seconds]
22:08lukeleppan has quit []
22:09pb17 has quit [Ping timeout: 480 seconds]
22:13lukeleppan has joined #asahi-dev
22:15fumnanya has joined #asahi-dev
22:23fumnanya has quit [Ping timeout: 480 seconds]
22:23JamesCalligeros[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
22:23pb17 has joined #asahi-dev
22:24JamesCalligeros[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
22:25Extern has quit [Quit: WeeChat 4.8.1]
22:26oliverYou mean that's why you can't expose it as a cursor plane?
22:32oliverYea I know that
22:33oliverAnd I think Kwins solution is good. Would be nice if gnome had that, but that's a lot of work, I bet.
22:33leioI'm now utterly confused about the (GTK) graphics offload work vs overlay planes now from looking into your patch and mutter code
22:34leiomutter 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
22:35rubano has quit [Quit: Textual IRC Client: www.textualapp.com]
22:36JamesCalligeros[m]Yeah its taken kwin a few years to get to this point
22:36JamesCalligeros[m]Mind you, thats partially because its really only xaver working on it solo :p
22:37oliverI highly doubt that gtk has anything to do with drm planes.
22:38oliverwhy do the mutter guys say their approach it is better than kwins?
22:38leiowhere 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
22:38JamesCalligeros[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
22:40JamesCalligeros[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
22:40JamesCalligeros[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
22:41chaos_princesswrt previous sleep discussion - i threw this together https://pastebin.com/1xUScPRw and once it runs, it doesn't seem to exit sleep
22:43leiothus 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
22:43AnthonyHofmeister[m] has joined #asahi-dev
22:44voidah has joined #asahi-dev
22:45oliverYea 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
22:45leiohttps://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
22:45JamesCalligeros[m]yeah, and given how display controllers used to work i dont really begrudge the approach mutter uses for doign cursor updates
22:46JamesCalligeros[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
22:47leiofor 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
22:47leioI don't think that's anything more than "it's hard to do, please help"
22:49JamesCalligeros[m]chaos_princess: the cpu doesnt even hit rvbar?
22:49chaos_princessno serial output, seems to be stuck
22:49chaos_princessand serial console times out
22:52oliverWell, but I am still pretty happy now with the extend and shift trick as leio called it.
22:52leioyou didn't do the shift part, it looks like :)
22:52voidah has quit [Ping timeout: 480 seconds]
22:52leioI thought that would have been necessary, but apparently not then
22:53leiooh, yeah, to account for the padding
22:53leioto me shift was for a logic of only padding when the size is less than 32x32 and then shifting accordingly to compensate
22:54leiobut you seem to get away with just always padding and shifting
22:54leiomaybe that's a problem if the cursor is the size of the whole primary plane? :D
22:55oliverExactly, it also happens only once when the cursor is prepared, not on each frame.
22:55oliverNope, I limit this with the fakes cursor size hints
22:55leioeven 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?
22:55oliverMutter will switch to a software cursor when the size is exceeded.
22:56oliverCorrect. You can almost think of it as preprocessing your cursor images to include more transparent pixels.
22:57oliver(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.
22:57leiogreat, I thought we might need to do all of that in the input KMS thread each frame it gets near the edge
22:57JamesCalligeros[m]nah just when the image is allocated
22:58leioon hindsight should have realized that and tackled it that way for myself 2 years ago
22:59JamesCalligeros[m]if we can get something similar to work in the kernel we can just do it there and allocate surface 3 as a cursor plane and not break anyone or anything
23:00JamesCalligeros[m]im not testing xorg though someone else can do that
23:01oliverI don't think you can do that easily in the kernel. :/
23:06leioIn an ideal world I still like the aspect of compositors being able to use more overlay planes for other things than the cursor, being able to opt to render cursor via SW (or maybe it's disabled overall due to being on top of a video)
23:08leiobut now I'm just still confused how all of these things relate to eachother wrt dmabuf surfaces as supposedly used by modern GTK video players vs universal planes vs compositors vs DCP
23:31jn has joined #asahi-dev
23:50voidah has joined #asahi-dev
23:58voidah has quit [Ping timeout: 480 seconds]
23:59oliverI can imagine that a gtk app can tell the compositor: hey I have actually two surfaces. Here is one fully opaque in yuv (that I got from the video decoder) and here is a transparent one. Both are passed via dmabuf fb to the wayland compositor.. The compositor can then put them onto planes and pass them to the dcp (or hardware compositor) if possible, or compose them on the gpu if not.
…