#asahi-dev · 2022-06-21 20:48
VinDuvIf you want to reload the class of an object without re-running a whole script you can also run “obj._reloadme()”#asahi-dev · 2022-06-21 20:43
VinDuvThe trace scripts do that (see for instance https://github.com/AsahiLinux/m1n1/blob/main/proxyclient/hv/trace_gpio.py#L38) so when run_script is called, it will reload the classes if needed#asahi-dev · 2022-06-21 20:42
VinDuvmillenialhacker: The classes in the m1n1 proxy inherit from a special “Reloadable” class that allows them to be reloaded from disk if their source code changes; basically you can do “SomeClass = SomeClass._reloadcls()” after modifying the source code of SomeClass and then SomeClass() will produce objects of the reloaded class.#asahi-dev · 2022-06-07 20:35
VinDuvbtw the beta ipsws can’t currently be restored via idevicerestore: https://github.com/libimobiledevice/idevicerestore/issues/492#asahi-dev · 2022-06-07 20:30
VinDuvpovik: My developer membership is expired but I was able to download the beta ipsw anyway, maybe give it a try? https://developer.apple.com/download/#asahi-dev · 2022-06-07 16:55
VinDuvhttps://developer.apple.com/support/downloads/terms/apple-developer-agreement/Apple-Developer-Agreement-20220606-English.pdf#asahi-dev · 2022-06-07 06:25
VinDuvIt is unfinished and probably not that useful if you go with a separate settings file (which I think would be better), but just in case…#asahi-dev · 2022-06-07 06:25
VinDuvmarcan: I have done some work on the installer to configure the correct resolution/retina in stage2 m1n1, and to allow changing the settings by restarting the installer: https://github.com/AsahiLinux/asahi-installer/compare/main...VinDuv:disp-config#asahi-dev · 2022-05-31 19:58
VinDuv(running a sleep/wake test in macOS I actually see the disconnect delay vary between 1.4 and 6.5 seconds)#asahi-dev · 2022-05-31 19:55
VinDuvThat means that from the point of view of the computer, the delay between setting the mode and the monitor disconnecting is basically random#asahi-dev · 2022-05-31 19:55
VinDuvOn the subject of disconnection delays, I think that one of my monitors doesn’t continuously check for a signal when in sleep mode. Instead, it checks for a signal every 5 seconds or so, and if there is one, it starts waking up (and go through the disconnection/reconnection sequence)#asahi-dev · 2022-05-31 19:42
VinDuvI think I even get a picture a bit faster than with hotplug, which makes sense since the mode is already set when the monitor reconnects#asahi-dev · 2022-05-31 19:39
VinDuvI updated the stage2 m1n1 on my mini to test DCP shutdown on my monitors. It works :) Even when turning off the monitor/switching inputs#asahi-dev · 2022-05-31 06:25
VinDuve window. (of course if you see that the monitor did disconnect, you will need to start up DCP, wait for the monitor to come back, and do it all over again, but that should not happen often)#asahi-dev · 2022-05-31 06:25
VinDuvjannau: I was talking about the “shut down DCP” approach that marcan mentioned. If my understanding is correct, the race condition is that the monitor might disconnect after you set the mode but before you shut down DCP, and in that case the DCP might have seen the monitor disconnecting and reset the mode. I was thinking that checking (once) that the monitor is still connected just before shutting down DCP might give a tighter rac#asahi-dev · 2022-05-30 21:17
VinDuvmaybe after modeset m1n1 should ask the dcp if the monitor is still connected just before shutting it down, to shorten the race window?#asahi-dev · 2022-05-30 21:12
VinDuvFrom what I’ve seen monitor disconnect delays seem to be all over the place, but hopefully the race window is short enough that it’s unlikely to cause problems#asahi-dev · 2022-05-26 19:22
VinDuvBut it’s annoying that so many monitors have different behaviors#asahi-dev · 2022-05-26 19:21
VinDuvjannau: I guess your monitor would work with https://github.com/AsahiLinux/m1n1/pull/183 since it waits between stage1 m1n1 setting the mode and stage2 setting the mode#asahi-dev · 2022-05-26 13:49
VinDuvah I see. Weird that 1080p doesn’t work then#asahi-dev · 2022-05-26 13:44
VinDuvbtw I’m a bit surprised that DCP iBoot only gives you two modes, on my mini I get many modes including some not supported by the monitor (like 4K modes on a 1080p monitor)#asahi-dev · 2022-05-26 13:40
VinDuvso you mean… we can avoid HDMI hotplug issues by intentionally crashing DCP? :D#asahi-dev · 2022-04-17 15:28
VinDuvNo, you install a bare m1n1 and you transfer the kernel using the serial interface#asahi-dev · 2022-04-10 12:53
VinDuv(TIL :) )#asahi-dev · 2022-04-10 12:53
VinDuvYeah it looks like the do delimitates the end of the condition expression, so in your case the condition of the while loop is “[ ! -e foo ]; echo "File not found";” which is equivalent to “echo "File not found";” which is always true#asahi-dev · 2022-04-10 12:47
VinDuv hmm I think you need to put the do before the echo#asahi-dev · 2022-04-10 10:24
VinDuvcu.usbmodem_01 and 03 IIRC#asahi-dev · 2022-03-25 10:37
VinDuvokay, thanks#asahi-dev · 2022-03-25 10:30
VinDuvmarcan: I was wondering, did you manage to get sshd working in macOS recovery? I remember getting it working in 10.15 by adding the sshd user, but on 11.x/12.x it fails to chroot for some reason#asahi-dev · 2022-03-01 19:15
VinDuvMaybe it should be set to a higher value for forward compatibility with future Macs that will require 13.0? I’ve tested setting it to 99 and it works.#asahi-dev · 2022-03-01 19:14
VinDuvmarcan: I have done a bit more testing with the .IAPhysicalMedia file and it looks like ProductBuildVersion can be any value including blank. ProductVersion seems to be checked against the minimal macOS version supported by the Mac; on my mini the icon shows up in the boot menu only if it’s >= 11.3.#asahi-dev · 2022-02-21 16:11
VinDuvah ok#asahi-dev · 2022-02-21 16:10
VinDuvSo if m1n1 displays something at the top of the screen, it will stay visible indefinitely in the booted OS?#asahi-dev · 2022-02-17 07:16
VinDuvI’m pretty sure there isn’t a way to properly order the writes since basically the whole chain is allowed to reorder them#asahi-dev · 2022-02-17 06:25
VinDuvhttps://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html#asahi-dev · 2022-02-17 06:18
VinDuvI though fsync on Linux worked similarly but maybe not?#asahi-dev · 2022-02-17 06:17
VinDuvI may have missed some part of the discussion, but on macOS fsync does not flushes the disk cache; it only writes the data to disk. You have to use fcntl(fd, F_FULLFSYNC) to flush the disk cache.#asahi-dev · 2021-11-01 15:33
VinDuvI bet it’s a code dating back from early Mac OS#asahi-dev · 2021-11-01 15:23
VinDuvFrench: kblang-calibration = [0x0000B6CC42920201, 0x0000000000000000]#asahi-dev · 2021-11-01 13:09
VinDuvI was plugging it on the debug port#asahi-dev · 2021-11-01 13:09
VinDuvoh wait I’m an idiot#asahi-dev · 2021-11-01 13:05
VinDuvHmm, I updated m1n1 on the MBP and can now get the USB-serial working (yay!), but only with a USB-A to USB-C cable. The Thunderbolt cable I use with macvdmtool doesn’t seem to work. Is this expected?#asahi-dev · 2021-10-31 12:38
VinDuvkettenis: ah ok. TIL#asahi-dev · 2021-10-31 06:05
VinDuvMy understanding is that on x86 Mac laptops, the keyboard and trackpad act as USB devices on startup for compatibility with UEFI (and Windows I guess) but they switch to SPI to reduce power consumption. I find it weird that they would keep that on M1 laptops since firmware configuration is done on macOS…#asahi-dev · 2021-05-30 18:55
VinDuvCTRR being per cluster doesn’t means it’s not already enabled on the cluster that contains the boot CPU#asahi-dev · 2021-05-29 16:20
VinDuvso older versions of pyserial don’t reset the input buffer on open?#asahi-dev · 2021-02-20 11:02
VinDuvand it boots in qemu#asahi-dev · 2021-02-20 11:00
VinDuvok, arm64 defconfig seems to cross-compile fine with the sed patch in gen_vdso_offsets.sh, the uuid_t rename in file2alias.c, and homebrew’s openssl#asahi-dev · 2021-02-20 10:04
VinDuvthat’s the only use of \t ?#asahi-dev · 2021-02-20 10:03
VinDuvhmm