2022-10-20
00:37thelounge7571340 has joined #asahi-dev
00:38thelounge7571340 has quit [Remote host closed the connection]
01:49r0ni has quit [Quit: Leaving]
01:56thelounge7571340 has joined #asahi-dev
01:56thelounge7571340 has quit [Remote host closed the connection]
02:15amarioguy has quit [Remote host closed the connection]
02:16al3xtjames1 has joined #asahi-dev
02:16al3xtjames has quit [Read error: Connection reset by peer]
02:16al3xtjames1 is now known as al3xtjames
02:47al3xtjames has quit [Read error: Connection reset by peer]
02:47al3xtjames has joined #asahi-dev
02:58thelounge7571340 has joined #asahi-dev
02:58thelounge7571340 has quit [Remote host closed the connection]
03:20whistlingoat has joined #asahi-dev
03:46whistlingoat has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
04:04thelounge7571340 has joined #asahi-dev
04:04thelounge7571340 has quit [Remote host closed the connection]
04:21rickybobby23 has joined #asahi-dev
04:29rickybobby23 has quit [Ping timeout: 480 seconds]
04:52Etrien_ has quit [Ping timeout: 480 seconds]
05:14thelounge7571340 has joined #asahi-dev
05:15thelounge7571340 has quit [Remote host closed the connection]
05:30DarkShadow44 has quit [Quit: ZNC - https://znc.in]
05:30DarkShadow44 has joined #asahi-dev
05:35ilya has joined #asahi-dev
05:47Etrien has joined #asahi-dev
05:57Etrien_ has joined #asahi-dev
05:57Etrien has quit [Read error: Connection reset by peer]
06:00ricekot has joined #asahi-dev
06:00ricekot has quit []
06:08SSJ_GZ has joined #asahi-dev
06:20thelounge7571340 has joined #asahi-dev
06:20thelounge7571340 has quit [Remote host closed the connection]
07:14MajorBiscuit has joined #asahi-dev
07:25chipxxx has joined #asahi-dev
07:30thelounge7571340 has joined #asahi-dev
07:30thelounge7571340 has quit [Remote host closed the connection]
07:45espo has joined #asahi-dev
08:09MajorBiscuit has quit [Ping timeout: 480 seconds]
08:15ChaosPrincesssome thoughts about supporting both 4k and 16k pages in one kernel binary: arm64 needs to know page and virtual address size super early in the boot process, even before fdt is parsed and can be mapped. it looks like it would be needed to parse the fdt in efi-stub or u-boot, and modify the linux boot protocol to take the page+va size in a register.
08:18marcanfor something so fundamental, it could just be a quirk based on CPU IDs (if apple -> 16K) I suspect
08:20j`eythe 4/16k thing is about having user space support 4k even with a 16k kernel, so I think in that case the kernel would always have a fixed size
08:21ChaosPrincessi was thinking of instead of having PAGE_SHIFT being a constant, it instead being a boot time variable
08:22ChaosPrincessso you can boot the same kernel on 16k arm macs and 4k raspis or whatever
08:22ChaosPrincessthe 4k userspace with 16k kernel is way more difficult than boot-time page_shift, which is already hard
08:26j`eyah right, yeah that is a bit simpler.. at least it would likely all be in arch/arm64 folder
08:27MajorBiscuit has joined #asahi-dev
08:28ChaosPrincesshahahaha, no
08:28ChaosPrincessthere are a lot of places that rely on it being a compile constant
08:29marcanthat's the first thing macOS did, yeah, they turned that into an expression instead of a constant
08:30j`eyanyone remember tccboot? we could just compile the kernel at boot time to set PAGE_SHIFT :P
08:31ChaosPrincessmarcan: if you have time, mind looking at pwm again? i did the whole sign off legalese thing.
08:32ChaosPrincessdistro kernels being capable of shipping the same kernel to all arm machines
08:33ChaosPrincesswell, thats implying distros test all their software :P
08:34ChaosPrincessand real answer - thats the workload on a probably-competent distro packager, not extra mental load on a user that when presented with two page size options will be confused.
08:36thelounge7571340 has joined #asahi-dev
08:36thelounge7571340 has quit [Remote host closed the connection]
08:38ChaosPrincessyou can probably do a bunch of preprocessor abuse to not pay this cost on platforms where there is only page size, or if the user configures the kernel to only support 1
08:40j`eyI already have a bunch of hacks on top of the asahi kernel to disable things at compile time
08:41MajorBiscuit has quit [Ping timeout: 480 seconds]
08:46ChaosPrincessalso, if you have time, mind doing a `hexdump -C | grep nvram` on a nvram dump of a m1 pro machine? i want to check if some offsets are the same as on m1
08:50ilya has quit [Remote host closed the connection]
09:00cy8aer has quit [Remote host closed the connection]
09:52thelounge7571340 has joined #asahi-dev
09:53thelounge7571340 has quit [Remote host closed the connection]
09:56kettenisChaosPrincess: fixing the iommu stuff such that it works with 4K pages is probably easier that intoruding run-time page size configuration
10:40kov has quit [Quit: Coyote finally caught me]
10:54thelounge7571340 has joined #asahi-dev
10:54thelounge7571340 has quit [Remote host closed the connection]
11:04Major_Biscuit has joined #asahi-dev
11:11espo has quit [Quit: espo]
11:13espo has joined #asahi-dev
11:16kov has joined #asahi-dev
11:40gladiac has joined #asahi-dev
11:52Major_Biscuit has quit []
11:57Core5928 has joined #asahi-dev
11:58MajorBiscuit has joined #asahi-dev
12:00thelounge7571340 has joined #asahi-dev
12:00thelounge7571340 has quit [Remote host closed the connection]
12:01Core9066 has quit [Ping timeout: 480 seconds]
12:17Dementor has quit [Remote host closed the connection]
12:18Core5928 has quit [Ping timeout: 480 seconds]
12:20Dementor has joined #asahi-dev
12:24naim has joined #asahi-dev
12:25naim has quit []
12:44mpsj`ey: I tested it by mem two previous night, after 7 hours battery goes from 100% to 57 for this time
12:46espoi thought the same :D and clicked bordly around and was a little suprised when my system went to sleep
12:47naim has joined #asahi-dev
12:49j`eymarkan has talked in the past about closing his laptop and having it hardly drain battery, but maybe that was macOS?
12:51espoif i understood marcan right on his stream the s2idle doesn't save much power it only made it possible to get the system to a sleep state where running apps get suspended but the cpu and the screen still does it thing and "drain" the battery. So it will not save much power beside the additional power needed to drive "running" apps.
12:52_jannau_it seems to be variable, I've seen > 18h of no-dispaly battery run time with the m2 macbook pro (linux), but with sleep >90% bettery charge were lost in ~8h
12:56ketteniswhich isn't surprising since this is something that hasn't received a lot of attention yet
12:58mpsbut thing is that I don't have to power down it at night and boot in morning, all state is preserved which is big bonus already
13:06thelounge7571340 has joined #asahi-dev
13:07thelounge7571340 has quit [Remote host closed the connection]
13:13marcanunless it's an obvious "something eating cpu or poking MMIO" problem (easy to see from HV)
13:14gladiac has quit [Quit: k thx bye]
13:14gladiac has joined #asahi-dev
13:16naim has quit [Quit: naim]
13:17mpsonly warning in dmesg on boot is this 'macsmc-hwmon macsmc-hwmon: JFB: in apple_soc_smc_hwmon_probe. Connected to smc_core(1852 keys)'
13:18j`eymarcan: so the times youve talked about closing the laptop overnight and stuff on twitter (maybe stream too), was when running asahi?
13:21marcan_jannau_: wild guess: something with MTP? the rtkit helper stuff doesn't do suspend yet IIRC, but the dockchannel IRQs would be masked by default in s2idle. that would result in the FIFO filling up with HID events
13:26marcan< j`ey> that doesnt sound great(?) <- half battery in 7 hours matches the ~14h idle runtime so it sounds completely expected (no major savings)
13:27marcanwhat _jannau_ reports is more worrying, and makes me more inclined to believe the MTP theory since that's M2-exclusive
13:28espo has quit [Quit: espo]
13:28espo has joined #asahi-dev
13:29marcanDCP because with a dumb framebuffer they *have* to poll memory so they can't do any PSR/power saving tricks (and it's also uncompressed, so memory bandwidth), so it *has* to be eating significant power relative to everything else idle, plus the panel itself being powered and refreshing
13:31j`eyeven so, it sounds like DCP ASC might still be polling? unless it knows not to when its blanked?
13:32marcanat least with linux s2idle you can know no random software is going to trigger wakeups (mostly because we don't support it :p)
13:33j`eymarcan: isn't that what you meant with 'DCP because with a dumb framebuffer they *have* to poll memory'
13:33marcanI don't know if regular scanout with full DCP will do fun PSR type tricks, but it will definitely stop scanout and shut down the display when told to turn off the output
14:02rmkmarcan: do you have any comments on Petr's review of the vsprintf patch, or shall I just make those changes?
14:07gladiac has quit [Quit: k thx bye]
14:24thelounge7571340 has joined #asahi-dev
14:25thelounge7571340 has quit [Remote host closed the connection]
14:31Gaspare has joined #asahi-dev
14:48Gaspare has quit [Read error: Connection reset by peer]
14:58sven[ 6.531518] dcp_dptxport_call: 271c00000.dcp: AP call 21 (deviceNotResponding) <-- and now ofc atcphy hates whatever I do again
15:11alyssa has joined #asahi-dev
15:14alyssamarcan: I already wrote the DCP suspend/resume patches, it's in _jannau_'s tree, you just need to ship it! ✨
15:18SSJ_GZ has quit [Ping timeout: 480 seconds]
15:27thelounge7571340 has joined #asahi-dev
15:27thelounge7571340 has quit [Remote host closed the connection]
15:37_jannau_DPMS in DCP turns the display (scanout) off as well and should reduce energy use as well
15:45alyssa has quit [Quit: leaving]
15:57SSJ_GZ has joined #asahi-dev
16:02MajorBiscuit has quit [Ping timeout: 480 seconds]
16:04marcanlet's get DCP merged soon, though I won't turn it on in the release Asahi kernel for a while (more reason for that linux-asahi-dev thing)
16:08_jannau_yes, I think it would be a good idea to have linux-asahi-dev, I would have proposed linux-asahi-dcp
16:10_jannau_I think most important missing piece is making the dart page table swap atomic. that one is annoying with the locked TTBR
16:15whistlingoat has joined #asahi-dev
16:17jannauin a completely unsafe way but in practice nothing happens due to caching of the mappings
16:19jannauio-pgtable-dart, memremaps the L1 table and clears the page. later apple-dart restores the mapping based on the DT provided mappings
16:20jannauas long as nothing invalidates the mapping nothing bad happens and scanout/simpledrm work
16:21marcanoof... okay, I can buy that interim solution but it really needs to be fixed at some point
16:30MajorBiscuit has joined #asahi-dev
16:30jannauthe main problem is that io-pgtable-dart currently has no knowledge for which device it initializes the page table. so installing the mappings from the DT there is weird
16:32jannaubut we have to clear the L1 table in io-pgtble-dart since apple-dart can't replace an exisitng mapping
16:32thelounge7571340 has joined #asahi-dev
16:32thelounge7571340 has quit [Remote host closed the connection]
16:39MajorBiscuit has quit [Ping timeout: 480 seconds]
16:39bisko has quit [Remote host closed the connection]
16:40bisko has joined #asahi-dev
16:41zzywysm has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:41zzywysm has joined #asahi-dev
16:47zzywysm has quit [Quit: Textual IRC Client: www.textualapp.com]
16:54marcanso the page table can first be built on an unreferenced, in-memory L1 and then swapped over to the real preallocated L1
17:03gladiac has joined #asahi-dev
17:09sventechnically the iommu api allows you to create a domain, create all mappings in there and only then attach it atomically
17:30thelounge7571340 has joined #asahi-dev
17:31thelounge7571340 has quit [Remote host closed the connection]
17:33___nick___ has joined #asahi-dev
17:34___nick___ has quit []
17:36___nick___ has joined #asahi-dev
17:51cy8aer has joined #asahi-dev
18:09bisko has quit [Read error: Connection reset by peer]
18:11bisko has joined #asahi-dev
18:28Adelphos has joined #asahi-dev
18:32jluthra has quit [Remote host closed the connection]
18:33jluthra has joined #asahi-dev
18:34thelounge7571340 has joined #asahi-dev
18:34thelounge7571340 has quit [Remote host closed the connection]
18:45gladiac has quit [Quit: k thx bye]
19:25Adelphos has quit [Quit: WeeChat 3.7]
19:25whistlingoat has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
19:27whistlingoat has joined #asahi-dev
19:29whistlingoat has quit []
19:37l554 has joined #asahi-dev
19:38l554 has left #asahi-dev [#asahi-dev]
19:39thelounge7571340 has joined #asahi-dev
19:40thelounge7571340 has quit [Remote host closed the connection]
19:50yamii has joined #asahi-dev
19:50yamii_ has quit [Read error: No route to host]
20:00l554 has joined #asahi-dev
20:07___nick___ has quit [Ping timeout: 480 seconds]
20:40thelounge7571340 has joined #asahi-dev
20:40thelounge7571340 has quit [Remote host closed the connection]
20:50l554 has left #asahi-dev [#asahi-dev]
20:53zzywysm has joined #asahi-dev
21:16Etrien has joined #asahi-dev
21:20Etrien_ has quit [Ping timeout: 480 seconds]
21:36Etrien_ has joined #asahi-dev
21:42Etrien has quit [Ping timeout: 480 seconds]
21:47thelounge7571340 has joined #asahi-dev
21:47thelounge7571340 has quit [Remote host closed the connection]
22:07SSJ_GZ has quit [Ping timeout: 480 seconds]
22:38ramenu has joined #asahi-dev
22:39ramenu has quit []
22:39bisko has quit [Read error: Connection reset by peer]
22:40bisko has joined #asahi-dev
22:46roxfan has quit [Ping timeout: 480 seconds]
22:51thelounge7571340 has joined #asahi-dev
22:52thelounge7571340 has quit [Remote host closed the connection]
23:04amarioguy has joined #asahi-dev
23:52thelounge7571340 has joined #asahi-dev
23:52thelounge7571340 has quit [Remote host closed the connection]