#
…

2021-10-18

00:10rohin2 has quit [Ping timeout: 480 seconds]
00:11rohin2 has joined #asahi-dev
01:10rohin2 has quit [Ping timeout: 480 seconds]
02:18PhilippvK has joined #asahi-dev
02:22phiologe has quit [Ping timeout: 480 seconds]
02:30rohin has quit [Quit: Konversation terminated!]
02:33rohin2 has joined #asahi-dev
03:35kov has quit [Quit: Coyote finally caught me]
03:36kov has joined #asahi-dev
04:14phire has quit [Ping timeout: 480 seconds]
05:08rohin2 has quit [Ping timeout: 480 seconds]
06:23bps has joined #asahi-dev
06:52gabuscus_ has joined #asahi-dev
06:56gabuscus has quit [Ping timeout: 480 seconds]
07:18DarkShadow44 has quit [Quit: ZNC - https://znc.in]
07:19DarkShadow44 has joined #asahi-dev
08:10aleasto has joined #asahi-dev
10:00bps has quit [Ping timeout: 480 seconds]
10:10bps has joined #asahi-dev
10:23bps has quit [Remote host closed the connection]
10:24bps has joined #asahi-dev
12:21bps has quit [Ping timeout: 480 seconds]
14:37bps has joined #asahi-dev
14:46bps has quit [Ping timeout: 480 seconds]
15:05alyssa has quit [Remote host closed the connection]
15:06alyssa_ has joined #asahi-dev
15:10alyssa_arnd: haven't looked too much at the SPMI stuff, not sure what the MFD shim was for
15:10alyssa_ is now known as alyssa
15:15maz has joined #asahi-dev
15:31Glanzmann has joined #asahi-dev
15:33Glanzmann has quit [Quit: leaving]
16:39___nick___ has joined #asahi-dev
16:44rohin has joined #asahi-dev
16:56yuyichao has quit [Ping timeout: 480 seconds]
17:12yuyichao has joined #asahi-dev
17:18phire has joined #asahi-dev
17:31phire_ has joined #asahi-dev
17:31doggkruse has joined #asahi-dev
18:10___nick___ has quit []
18:23___nick___ has joined #asahi-dev
18:24phire_ has quit [Ping timeout: 480 seconds]
18:31___nick___ has quit []
18:33___nick___ has joined #asahi-dev
18:46doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:51___nick___ has quit [Ping timeout: 480 seconds]
19:22bps has joined #asahi-dev
19:24doggkruse has joined #asahi-dev
19:26doggkruse has quit []
19:38kettenisarnd, alyssa: the spmi driver can be fairly simple
19:39kettenisthe pmu may need a little bit more thought as it seems to do many things (besides being the rtc)
20:28bps has quit [Ping timeout: 480 seconds]
20:29jmr2_ has joined #asahi-dev
20:31jmr2_alyssa: Success :-D
20:32jmr2_Patches required to get DCP to start on the Air: dummy values for display width/heigth, trampolines for D211 (nop), D406 (nop) and D582 (true).
20:34jmr2_Details will follow (and I need to add a mouse - X's not fun without!)
20:38alyssajmr2_: woo!!!
20:38alyssaI love problems that "solve" themselves ;-p
20:39jmr2_magic ;-D
20:58jmr2_ has quit [Remote host closed the connection]
21:00bps has joined #asahi-dev
21:05jmr2 has joined #asahi-dev
21:06jmr2dmesg from the 11.4 stub, but it also boots successfully with the 11.5.2 one
21:07jmr2weston also starts successfully.
21:25jmr2 has quit [Quit: Page closed]
21:30bps has quit [Ping timeout: 480 seconds]
21:32jacoxon has joined #asahi-dev
21:35alyssagood to know 11.5.2 works, I guess :)
21:40alyssa[ 23.978491] ieee80211 phy0: brcmf_p2p_set_firmware: failed to update device address ret -52
21:40alyssa[ 23.985825] ieee80211 phy0: brcmf_p2p_create_p2pdev: set p2p_disc error
21:40alyssa[ 23.992104] ieee80211 phy0: brcmf_cfg80211_add_iface: add iface p2p-dev-wlan0 type 10 failed: err=-52
21:40alyssaI see this on the mini too, not sure what this is about
21:41alyssa(fundamental difference in the apple wifi hw compared to non-apple broadcom wifi? or just buggy corellium code?)
21:42alyssajmr2: one more thing to try btw, if you delete the fake width/height_cm assignments, and just also delete the check/einval, does everything still work?
21:43alyssaProjectors report 0mm x 0mm so it should still be ok, and that avoids me committing a hack :)
21:43alyssa(i.e.: the trampolines you added + the rm.patch I sent)
21:43svenhrm, could also just be missing additional patches to the wifi driver
21:54jacoxon has quit []
22:04jmr2 has joined #asahi-dev
22:05jmr2alyssa: confirmed - 0x0 works too, on both 11.4 and 11.5.2.
22:06aleasto has quit [Quit: Konversation terminated!]
22:07jmr2 has quit []
22:09jmr2 has joined #asahi-dev
22:23jmr2Oh, and for completeness: I just tried NOP'ing D117 - the one I see as the last line before "system halted" when shutting down. It turns off the display, but the backlight (and I assume, the rest of the computer) stays on. Probably better to leave that one untouched for now. Again, same on 11.4 and 11.5.2.
22:23alyssajmr2: cool, going with that then :)
22:23alyssajmr2: D117 should be FALSE
22:24jmr2Oh crap... OK, retrying...
22:24alyssashutting off the display but not the backlight is deliberate
22:24alyssawell. it's more like shutting off the backlight requires more code that I haven't typed out because I don't have an Air
22:24alyssamarcan: have M1 Air prices dropped with the Pro announcements?
22:25j_eydont think so
22:26alyssaBoo. I'll keep waiting then :-p
22:26j_eyat least on on the apple store, maybe 2nd hand
22:26alyssa(Looking for a used one, capitalize on hoards of fanboys dumping their 2020 machines for 2021 models)
22:27j_eybut i dont think ppl would be dump an air for a new mbp
22:32jmr2alyssa: looks like FALSE on D117 turns off both the display and the backlight, but not the computer.
22:33jmr2... because when I press power for 10s, I still get my monitor to flash "no signal", like it does for both NOP and no handler.
22:41jmr2 has quit [Quit: Page closed]
22:43alyssaShut down support is missing in mu-one/linux (and mainline)
22:43alyssaCorellium has patches for it but not in a state I can cherry-pick.
22:43alyssaPressing power for 10s after doing a Linux shutdown is the workaround for now
22:45jmr2 has joined #asahi-dev
22:47alyssajmr2: Okay, I just pushed a 20211018 branch which fixes the issues you reported
22:47jmr2Understood. But I'd rather have the screen stays on if the computer isn't truly shutting down, so I know it's not off. And once the real shutdown is implemented, it won't matter if the display gets turned off before.
22:48alyssajmr2: Okay, in that case apply https://rosenzweig.io/hack.diff
22:51jmr2Thanks. It's your code, so your call, but I really think that should be like that for everyone. Otherwise, something goes wrong, put computer in bag, come back to a dead battery, customer not happy.
22:58alyssawhat customer
22:59alyssaRealistically shutdown support should hit upstream before DCP anyway, it's a /lot/ less code.
23:03alyssaadmittedly still a lot of code though
23:04jmr2My point is that nothing stays perfect forever. If for any reason, the shutdown code does't work, the user should be able to see that the shutdown didn't happen. Currently, there's no way to see it.
23:04yuyichao has quit [Ping timeout: 480 seconds]
23:04jmr2( and I don't see what we gain in shutting down the screen anyway)
23:05jmr2So I see a con, and no pro.
23:05alyssaOmitting the DCP shutdown causes the DCP to crash when you shutdown the machine.
23:05alyssaOn the Mini at least, this is visible as a brief green screen-of-death.
23:06alyssaOmitting the call is incorrect.
23:07jmr2So why didn't you have the handler for D117 previously? Is it this handler that fixed that geen flash for you ?
23:07jmr2*greed
23:07jmr2*green ... wow
23:08alyssaD117 isn't used on the Mini as far as I know.
23:08jmr2OK. So leave the shutdown unabled, and remove the D117 handler. Or maybe it should be true - keep everything on.
23:08jmr2*enabled
23:09jmr2I should try that.
23:09alyssaOmitting any handler that the DCP tries to use is wrong.
23:09alyssaIf we don't have a handler, we don't ack the call, and then the DCP just hangs forever.
23:09jmr2So you're holding the info that I brought against me LOL
23:10jmr2Let me try TRUE
23:10alyssaI'm explaining why the DCP driver needs to handle everything and make the shutdown callback; omitting either would be incorrect
23:10alyssaproxyclient/hv/trace_dcp.py: "D117": "bool UnifiedPipeline2::is_dark_boot()",
23:11alyssaso TRUE tells the DCP you want dark boot, whatever that is
23:12jmr2So if we don't know what that is, what makes FALSE more correct than TRUE ?
23:12alyssaA priori either FALSE or TRUE is fine.
23:13alyssaBut failing to handle it at all would be wrong
23:13alyssaCONFIG_DARKBOOT is a thing in the open source XNU release
23:15alyssasome flag backed by NVRAM
23:15jmr2TRUE has the same behavior as NOP - backlight stays on, display is off.
23:16alyssajmr2: Just to make sure you're following -- NOP is wrong because the return value of D117 is a bool and NOP returns a void. So the results will be unreliable, since the DCP will read garbage memory and will behave like TRUE if the garbage was nonzero and like FALSE if the garbage was zero.
23:17alyssaBut it sounds like you're in favour of handling D117 as true to keep the backlight on and then we can stop bickering about the shutdown code? :)
23:17alyssa(I am good with that solution.)
23:17jmr2Understood on NOP.
23:18jmr2My vote would be to keep it unhandled until power management is ready - and until we know how reliable that code will be.
23:18amw has joined #asahi-dev
23:18jmr2I agree that it's incorrect, but I think it's an acceptable compromise.
23:18alyssaWhat's wrong with "backlight stays on, display is off."?
23:18alyssaIf the backlight is on, you know shutdown didn't happen..?
23:18jmr2It's so dim that it's pretty much unnoticeable until you're in a very dark room.
23:19jmr2And battery drains faster :-D
23:20jmr2I expect a few people to try your tree on Airs in the next few days/weeks. Given that reboot works, it won't be obvious that shutdown doesn't. At least for now, we need to make it obvious.
23:21jmr2And while I agree that it's the technically correct thing to do to handle it, I don't see side effect in not doing so.
23:22alyssaDxxx callbacks can come from the firmware at any time for any reason.
23:22alyssaWhat happens if the firmware decides to query dark boot at some other time?
23:22alyssaIf you handle it, all is well.
23:22alyssaIf you don't handle it, the display stack hangs.
23:22jmr2True. But I'm the only one that saw that so far, didn't I ?
23:23jmr2That's all that I'm asking.
23:23alyssamarcan: ^^ Not sure if you have thoughts on the above.
23:23alyssaI suppose the real answer is to get rock solid power management ahead of people trying to daily drive asahi on MacBooks :0
23:24jmr2Ah. Possibly from the iphones - white ones boot black logo on white background, dark ones the opposite.
23:25jmr2Right. But for best or for worst, your tree is turning into the default one for early adopters, due to its completeness.
23:26jmr2Anyway - thanks for debating with me :-)
23:28alyssaAh, I did not know that about the iPhones. Yep, that'd be it :-)
23:28alyssaNice one 👍
23:28alyssaNo idea what that has to do with backlight on shutdown though.
23:30jmr2Might be the backlight intensity, not a full on/off.
23:30yuyichao has joined #asahi-dev
23:32alyssaI'd believe it
23:32alyssaI guess I need to go turn on and off an iPhone now for... research
23:33jmr2At least a white and a dark one!
23:36alyssayou're telling me I need to buy *2* iPhones? :-p
23:36alyssawell, 3, and also a screw driver
23:36alyssaOk, this is interesting--
23:36alyssaDark iPhone, with the "Invert colours" accessibility feature,
23:37alyssaThe boot starts as white-on-black and towards the end flips to black-on-white
23:37alyssaThe handoff between the early and late framebuffers (which is supposed to be seamless and invisible) is suddenly noticeable.
23:37jmr2Not buy, borrow :-D
23:37* alyssaknocks at every tenant and asks for the colour of their phone
23:38alyssaRelatedly, when shutting down the dark phone with inversion, a white screen persists for quite a while after the phone allegedly shut off.
23:39alyssaHere we poke behind the curtain at another bit of Apple stage magic... turn off the backlight first in shutdown, and then the user thinks the phone is shutdown
23:39alyssaIn reality shut down is not instant, but if you turn off the backlight immediately and do the rest of shutdown "in the dark", the user *thinks* it's instant.
23:39alyssaApple has a lot of stage magic like this...
23:39alyssaAnother classic is the M1 MacBooks that switch resolution "instantly"
23:40alyssaActually, they have only a single resolution, full stop. Different modes in "Displays" are just software scaling ("Looks like 1920x1080")
23:40alyssa"Sure, whatever," you say. "Surely they can't do that for external displays?"
23:41alyssaThey can and do. Unless you force a mode set -- and they try hard on recent macOS to keep you from doing so, guarding real mode sets behind an option key or something in "Displays" -- it'll just software scale.
23:41yuyichao has quit [Quit: Konversation terminated!]
23:42alyssa(Re iPhone shut down time -- it's about 7 seconds.)
23:43yuyichao has joined #asahi-dev
23:46TellowKrinkle[m]<alyssa> "Here we poke behind the curtain..." <- Works great until you're trying to reboot your phone
23:46TellowKrinkle[m]Then you definitely notice when it doesn't restart right away and you have to keep trying blindly until it does
23:48alyssado normies reboot their phones?
23:48alyssa---or shut them off for that matter
23:49minican't remember the last time I did
23:51TellowKrinkle[m]Reboot? Probably not
23:51TellowKrinkle[m]Shut down? Involuntarily, if you run it out of battery
23:51TellowKrinkle[m]And when you start it back up you realize the second issue with the early boot process, they don't track display brightness from when you shut it down so if you do it at night you get blinded by a ridiculously bright Apple logo until it finishes booting up
23:53alyssaDelightful
…