2022-01-30
00:31chadmedits interesting that it doesnt power up at all. maybe it was a last minute decision to remove its functionality so they just fuse enough of it off so that it doesn't turn on?
00:32chadmeddepending on where in the design cycle they decided not to use it, and tsmc's yields it wouldnt make financial sense to spin a new silicon rev just to get rid of it. the validation costs alone would be ridiculous
00:46jmr2 has joined #asahi
00:46jmr2Glanzmann: thanks for your various documents. I just tether-booted the whole chain for the first time, and it's quite fun to watch.
00:46jmr2Two comments: 1) instead of deleting fbaa64.efi (I still have it without ill effects), you can uninstall grub-efi-arm64-signed and its dependencies.
00:47jmr22) I couldn't get dpkg-reconfigure grub-efi-arm64 to install grub. I ended up using mps's --efi-directory instead of your --removable, since it uses a path instead of a device - less risky.
00:47jmr2In the end, installing grub is three commands: apt-get install grub-efi grub-efi-arm64-signed- ; grub-install --target=arm64-efi --efi-directory=/boot/efi --removable ; update-grub
01:19g8rfx9wozue0e9pa3n[m] has joined #asahi
01:22skipwich has quit [Ping timeout: 480 seconds]
01:23skipwich has joined #asahi
01:26chengsun has quit [Quit: Quit]
01:27chengsun has joined #asahi
02:04chadmed has quit [Quit: Konversation terminated!]
02:09chadmed has joined #asahi
02:19djk121[m] has joined #asahi
02:26chengsun_ has joined #asahi
02:30chengsun has quit [Ping timeout: 480 seconds]
02:46skipwich has quit [Ping timeout: 480 seconds]
02:49akemin_dayo has quit [Ping timeout: 480 seconds]
03:00chengsun_ has quit [Quit: Quit]
03:01chengsun has joined #asahi
03:08PhilippvK has joined #asahi
03:14jhnsn has joined #asahi
03:16jx0 has quit [Ping timeout: 480 seconds]
03:36tpw_rulesso i don't proclaim to have the best experimental setup, but i did put in some reasonable effort, and found that compiling an arbitrary linux kernel in a ramdisk is about 25% slower with 4K pages as opposed to 16K (1539 vs 1218 seconds)
03:36* jmr2feels like I'm doing the LinuxFromScratch install that I always wanted to do but never found the time to :-D
03:37tpw_rulesdoes the linux scheduler know the difference between the power and efficiency cores? maybe one of them is worse at 4K pages
03:39jmr2I think you're just seeing less memory alloc/dealloc, and possibly better cache performance.
03:39tpw_rulesregardless i think i'm going to switch nixos over to 4k just so i can avoid all the 16k breakage
03:40tpw_ruleshttps://github.com/mongodb-forks/libunwind/commit/8e357e280cf5b2bd76520c5b8a96b8d8599986f8 someone already made a patch for it but applying it causes very mass rebuilds which i can't be bothered with
03:59tpw_rulesa combined and slightly tweaked version of sven's 4k iommu patches: https://github.com/tpwrules/nixos-m1/blob/main/nix/kernel/sven-iommu-4k.patch
04:04refi64 has quit [Quit: Ping timeout (120 seconds)]
04:05kov has quit [Quit: Coyote finally caught me]
04:05refi64 has joined #asahi
04:05kov has joined #asahi
04:11jmr2 has quit [Quit: Page closed]
04:26espo has quit [Ping timeout: 480 seconds]
04:42refi64 has quit [Quit: The Lounge - https://thelounge.chat]
04:45refi64 has joined #asahi
04:45the_lanetly_052__ has joined #asahi
05:12leo60228- has joined #asahi
05:15leo60228 has quit [Ping timeout: 480 seconds]
05:27tpw_rulesso it seems it's faster the first test after a reboot but otherwise it settles down to that 25% number with every subsequent test
06:14Glanzmanntpw_rules: I did not put the iommu.patch in my git because I thought it is outdated and just an experiment. I try to stay as close as possible to the asahi branch.
06:17Glanzmannjmr2: Thank you, I put that in the wiki instead. Also what I thought about is using the cat trick for the initrd (you can apparantly concat two initrd.gz cpio archives and the kernel extracts both into memory).
07:07jhnsn has quit []
07:26GlanzmannBtw. with Macos 12.2 comes new wifi firmware. It works for me on the mini and the air.
07:52m6wiq has joined #asahi
07:59GlanzmannWith Macos 12.2 and 12.1 stub the hdmi seems sometimes not initialize after reboot. Am I the only one seeing this?
08:03espo has joined #asahi
08:06chadmedtwp_rules: the scheduler knows they are different but since the cpufreq driver is on hold and the dmips/mhz info in the DT was part of that commit, it cant effectively schedule between them
08:15GlanzmannDoes someone know how I build a non tethered m1n1 boot object to include kernel command line?
08:16GlanzmannI found it in my own documentation .... cat build/m1n1.macho <(echo 'boot-args=net.ifnames=0 rw root=UUID=FE9C5AC8-EDF4-442E-A09E-E0451606898E rootwait rootfstype=ext4') Image.gz t8103-j274.dtb > m1.macho
08:33Glanzmannjannau: A little bit late, but I just tried the dcp branch and it works well for me. I don't get u-boot with the dtb to work, but m1n1 chainloading works. hotplug works, putting a monitor with a smaller output on it and than putting the bigger one back also works. Mouse is fast. Scrolling in xterm is much slower than simpledrm. I can make a video if you want. Here is the dmesg:
08:34Glanzmannjannau: So I just verfied 'running' dmesg in tmux is dogslow but in a plain xterm is very fast. But I saw tmux being slow in other setups when a lot of output is out, but here it seems particular slow.
08:36espo_ has joined #asahi
08:36chadmed has quit [Ping timeout: 480 seconds]
08:39Glanzmannjannau: Modesetting and rotation also works. I'm using fbdev at the moment. I'll try modesetting xorg driver.
08:43espo has quit [Ping timeout: 480 seconds]
08:44espo_ is now known as espo
08:52GlanzmannI also noticed that I use on the air no longer modesetting but fbdev. So For now I'll stay on the modesetting on the mini.
09:07mpsI got this in dmesg when added iommu.patch `1.376072] cs42l42 2-0048: CS42L42 Device ID (42A83). Expected 42A42`
09:21chadmed has joined #asahi
09:32kettenismps: that message is normal (and povik should probably change the driver such that it doesn't print the "Expected 42A42" bit)
09:48nsklaus_ has joined #asahi
09:48nsklaus has quit [Read error: Connection reset by peer]
10:31akemin_dayo has joined #asahi
10:43m6wiq1 has joined #asahi
10:46gabuscus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
10:46gabuscus has joined #asahi
10:49m6wiq has quit [Ping timeout: 480 seconds]
10:58m6wiq2 has joined #asahi
10:59m6wiq1 has quit [Read error: Connection reset by peer]
11:36svenwouldn’t surprise me if the cores are optimized for 16k and 4K was just added as a hack to allow 4K pages in userspace
11:42mpsin meantime I tested build some of my crystal lang programs with 4K and 16K pages and don't speed differences, maybe 1-3%
11:43chadmedmps: probably a hard coded page size somewhere in the code. that was the problem with libunwind
11:44chadmed4K support (at least in userspace on macos) makes sense for as long as Apple intends to support their DTK/Rosetta stack
11:47jannauGlanzmann: good to hear. I'm a little surprised that the crash fix made it work. no need to make a video show speed differences. I haven't looked at that at all, still running dcp with hv and tracing
12:13___nick___ has joined #asahi
12:13kettenisI have a hard time believing the 25% hit is because of Apple's implementation when Rosetta2 clearly is an important feature for the processor architecture transition
12:13___nick___ has quit []
12:15___nick___ has joined #asahi
12:18svencould also be that the 4K iommu patch does something weird which slowly everything down, but that would also surprise me
12:39jannaugrub doens't seem to be thing used on arch linux arm. The kerenl packages I looked at install the kernel image as as "Image" and "Image.gz" which is not detected as kernel from the arch linux grub-mkconfig
12:41jannauthe compressed Image.gz is useless since mkinitcpio can only handle x86 style compressed kernel images with built-in decompression
12:44jannauI fixed that in https://github.com/jannau/AsahiLinux-PKGBUILD - my mac minis now boots via m1n1 + u-boot and grub into arch linux arm
12:49mpsI've built alpine kernel pkg (APKBUILD) and it boots fine with grub, also creates initramfs on install
12:50jannauI did that the x86 kernel PKGBUILD does 'install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"' which is only marginally better than copying "Image" from the well known location
12:52mpsyes, also I have this `cp arch/$KARCH/boot/Image.gz $pkgdir/boot/vmlinuz-$kver` in some custom scripts to build arm64 kernels
12:54mpsiirc Arch alarm have somewhat complicated PKGBUILD for kernels because they build chromebooks kernels also
12:54Glanzmannjannau: Are you able to boot the dcp branch via u-boot, because when I try that I always get a black screen.
12:56Glanzmannjannau: With Debian it work pretty well. Biggest problem is the signed shim and that u-boot expects the efi boot binary in the removable media and my default grub on Debian tries to update nvram variables, but this can be disabled, but apparantly not from the Debian installer, maybe I have to talk to them and it is possible but I just don't know how.
12:56m6wiq2 has quit [Quit: Leaving]
12:57* jannauis only doing this because arch linux arm since marcan wants to offer that in the asahi installer
13:00akemin_dayo has quit [Ping timeout: 480 seconds]
13:00jannauGlanzmann: I haven't tried booting a kernel with dcp through u-boot? I don't see why that shouldn't work assuming the correct dtb is embedded in the m1n1+u-boot binary
13:04nicooo is now known as nicoo
13:04Glanzmannkettenis: Regarding u-boot, can I simply use the dtb of a kernel, or do I have to add anything special for it to work with u-boot?
13:18Glanzmannjannau: I think u-boot adds that to the device tree: https://tg.st/u/t8103-u-boot.dtsi. So I probably need to copy the dts from the dcp branch to u-boot and than build u-boot again and than it will work. I'll try that.
13:24Glanzmannkettenis: But the right way is to copy the dts from the kernel to u-boot and than rebuild u-boot isn't it?
13:37Glanzmannjannau: No, it does not. I don't even see m1n1 output. But that is probably due to the late hdmi initialization.
13:41off^ has joined #asahi
13:46Glanzmannkettenis: Btw. have you already look at the pro/max for u-boot? I don't have any pro/max devices but was wondering about u-boot support.
13:47jannaukettenis: no change for me with u-boot master but problems are expected if u-boot does anything with disp0/dcp dart
13:52Glanzmannkettenis: About the no smc maybe ever in u-boot, is this a problem, or will smc just move to the smc kernel driver in OpenBSD?
13:57GlanzmannBtw. I tested macbook air with my hotspot on the mobile phone which did not work before, but now does. But I assume that marcan has fixed it?
14:07jannaubut the most simple explonation I have for the vanishing framebuffer as soon as u-boot loads is a reconfigured disp0-dart
14:13___nick___ has quit [Ping timeout: 480 seconds]
14:13jannaukettenis: https://github.com/jannau/linux/commit/f9753ef3e94eb416dbe017c88f8939d2fc3f0f28 and https://github.com/jannau/linux/commit/02468d323e6fc040f4b12346c8ae97209e195939
14:22tpw_rulessven: for the record i still had the 4k patch applied when doing 16k tests, it just had a 16k kernel configured.
14:29jannaukettenis: in both u-boot master and apple-m1-m1n1-nvme? master probably works for me, testing is inconvenient due to the missing nvme support
14:34jannautpw_rules: I haven't noticed anything so far except for a not working as expected gdb (haven't looked into it yet)
14:47chadmedjannau: i think for the mid term the sanest way to handle asahi support in ALARM would be to have an AUR repo with our own PKGBUILD that sanely installs a kernel and efi bootloader. since their whole schtick is providing a barebones rootfs for power users/embedded, i cant see them rushing to actually provide a sane distro kernel and way of installing it
15:00m6wiq has joined #asahi
15:05jannauI believe that is the plan, fork ALARM to provide something useable and while doing so work with upstream to integrate things back in
15:08Glanzmannjannau: I'm curious what the first version of the installer will look like. Will alarm be the only planned distribution or are any others planned?
15:12chadmedhopefully we will eventually be able to add ALARM (and its forks) to the list of distros that support EBBR. will make things a lot easier to maintain and install
15:14chadmedArm's "embedded" boot specification, which we are (coincidentally?) following pretty closely
15:17chadmedqrd is distros are able to assume a uefi environment, PSCI and optionally a device tree and thus focus their boot tooling on that, rather than have to try and cater to the existing approximately eleventy grillion different embedded boot procedures
15:22Glanzmannchadmed / jannau: I have not understood how we will propagate the dtb to m1n1. So lets assume I have to kernels: one with dcp and one without, both have different device trees, so how will that be communicated to m1n1? Because m1n1 needs to load the dtb before grub, but only once I picked the kernel in grub, you know which device tree I need.
15:25jannauGlanzmann: the devicetree is statically embedded in m1n1 + u-boot payload and can not change dependent on the kernel
15:25chadmedm1n1 does not need to know about the devicetree in an EBBR environment since it's just chainloading u-boot, which is then chainloading grub, which is what will pass the dt to the kernel
15:26Glanzmannjannau: I see. But in the end we need to get a stable device tree and if it changes, we just need to chainload m1n1 with the new device tree embedded or reinstall it in 1tr.
15:26chadmedand also which is why we arent anywhere near ready for end users to jump on board, even if we had a sane environment where kernels can be swapped out on the fly, we're still at a point where the dt is unstable
15:27jannauchadmed: the devicetree has to be provided by m1n1 as it adopts it to dynamic data provided by iboot
15:28chadmedyeah we can swap kernels, but since m1n1 is providing the dt in this instance if the dt changes youd still need to get into 1tr and build a new boot payload
15:29chadmedhonestly it wont be an issue once the DT is stable since its not like the machines can magically just change on us
15:29GlanzmannYep. And I was wondering how that will work out in the end, but it is clear, device trees will stabilize and m1n1 takes care of them.
15:30chadmedat that point we will have an (almost) EBBR compliant boot environment on these machines, and almost compliant is compliant enough for a generic EBBR-capable distro to install an efi bootloader
15:30kettenisand it is good for security as it won't be possible to put malicious stuff in the device tree without going through 1TR
15:30Glanzmannjannau: How did you try u-boot master? Did you use a usb stick and a usb keyboard via a usb-c hub?
15:41Glanzmannjannau: And the device tree you got by copying the the device tree from the kernel to u-boot and said 'make'?
15:42GlanzmannI'll also try to rebase kettenis missing patches on top of master u-boot and see if that works.
15:44jannauby applying the changes from f9753ef3e94eb416dbe017c88f8939d2fc3f0f28 and 02468d323e6fc040f4b12346c8ae97209e195939 manually to the .dtsi files in u-boot
15:56the_lanetly_052___ has joined #asahi
16:02the_lanetly_052__ has quit [Ping timeout: 480 seconds]
16:16akemin_dayo has joined #asahi
16:49skipwich has joined #asahi
17:20jx0 has joined #asahi
17:25jx0 has quit []
17:40MajorBiscuit has joined #asahi
17:43landscape15[m]Does anyone know the exact model of M1 NOR flash memory? Just curious
17:50landscape15[m]jn: thanks. I didn’t watch there. I’ll search for more docs
17:51landscape15[m]btw it’s the same brand of old MBA :D
17:55espo_ has joined #asahi
18:03espo has quit [Ping timeout: 480 seconds]
18:10the_lanetly_052___ has quit [Ping timeout: 480 seconds]
18:33espo_ has quit [Quit: Leaving]
18:40MajorBiscuit has quit [Quit: WeeChat 3.3]
19:03jmr has joined #asahi
19:03jmr has left #asahi [#asahi]
19:03jmr2 has joined #asahi
19:05jmr2landscape15[m]: you could probably just copy the DT nodes from the T6000 to the T8103 and read the info from dmesg... but that's definitely not risk-free.
19:06pavan has joined #asahi
19:09jmr2 has quit [Remote host closed the connection]
19:19Raito_Bezarius has left #asahi [upgrading cluster]
19:27popo__ has joined #asahi
19:30nsklaus_a little bit offtopic but, once asahi is installed and primary OS, how do i copy files to iphone ? (specificaly to the apple's "files.app")
19:31nsklaus_i see there is libimobiledevice, as shown in articles like this one: https://opensource.com/article/21/8/libimobiledevice-iphone-linux
19:33popo_ has quit [Ping timeout: 480 seconds]
19:34jx0 has joined #asahi
19:34nsklaus_from what i see libmobiledevice give a very limited access to the iphone filesystem, the most important point to be able to copy & delete files on and off iphone is to get access to files.app space on iphone
19:36nsklaus_would be nice to figure a way to be able to performs tasks like this directly from asahi instead of having to reboot to macos just to have proper access to ios devices
19:48Raito_Bezarius has joined #asahi
20:02Raito_Bezarius has left #asahi [upgrading ram and disk now]
20:04m6wiq1 has joined #asahi
20:05m6wiq1 has quit []
20:11m6wiq has quit [Ping timeout: 480 seconds]
20:24zopieux has quit [Ping timeout: 480 seconds]
20:26zopieux has joined #asahi
20:43jeffmiw has joined #asahi
20:49akemin_dayo has quit [Ping timeout: 480 seconds]
20:49trouter has joined #asahi
21:00Raito_Bezarius has joined #asahi
21:35landscape15[m]@_oftc_jmr2:matrix.org: yeah I guess it’s not so safe. What about reading from m1n1 payload? Is there a way to?
21:46m6wiq has joined #asahi
21:58m6wiq has quit [Quit: Leaving]
22:12ciggi has joined #asahi
22:39roxfan has quit [Remote host closed the connection]
22:55jx0 has quit [Ping timeout: 480 seconds]
22:58jx0 has joined #asahi
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi
23:14aead has quit [Ping timeout: 480 seconds]
23:34ciggi_ has joined #asahi
23:37ciggi has quit [Ping timeout: 480 seconds]
23:53ciggi_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:54ciggi has joined #asahi