#
…

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:36tpw_rulesthere was one time it was only 10% slower, but i can't really explain why
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:39jmr2What was the "new" breakage you recently reported?
03:39tpw_ruleslibunwind 1.6 causes x to crash
03:40jmr2Thanks. Never heard of it.
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:41tpw_rulesi think webkitgtk might also be broken. and of course chromium, but i don't use it
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).
06:26Glanzmannfor the wifi firmare.
07:07jhnsn has quit []
07:19Glanzmannjmr2: I updated all documentation I could find (U-Boot, Debian and my quickstart.txt)
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:07chadmedas it stands theyre all treated identically performance-wise
08:15GlanzmannDoes someone know how I build a non tethered m1n1 boot object to include kernel command line?
08:15GlanzmannSo I'm trying jannaus dcp kernel. I tried with u-boot but that doesn't work.
08:15GlanzmannNow I want to use a non tethered m1n1.
08:16GlanzmannBut include a 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:16chadmedin menuconfig its under Boot options
08:16chadmedbut you can also do that yeah ^
08:16Glanzmannchadmed: No I meant the quick and easy eway.
08:17espomorning
08:17chadmedgood evening :-P
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:51Glanzmannjannau: I'll work the whole week with it and let you know how it went.
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:07mpsand sound is not initialized
09:09mpsahm, sound drivers can't be build as modules, I see
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:40mpskettenis: yes, but I forgot that I saw it earlier in dmesg output
09:40mpsand forgot that I have to build sound drivers in-kernel, not as modules
09:48nsklaus_ has joined #asahi
09:48nsklaus has quit [Read error: Connection reset by peer]
10:02mpsfine, with iommu patch and 4K page size f2fs works
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:21mpstpw_rules: I confirm your speed test with 4K page size, about 25% slowdown
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:40mpsI wonder why some programs are 'limited' to 4K pages
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:42mpss/don't/don't see/
11:43chadmedmps: probably a hard coded page size somewhere in the code. that was the problem with libunwind
11:43chadmedcouldnt find a similar instance in llvm-libunwind though
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:18sven*to slow
12:19svenerm.. *slows actually
12:26kettenisunfortunately OpenBSD doesn't support 16K pages on arm64, so I can't make a comparison
12:26svenpff… slacker ;p
12:28kettenisbetter ASLR with 4K pages ;)
12:34povikwhat's that? 2 bits of additional entropy?
12:38kettenisevery little bit helps!
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:46mpsjannau: make zinstall?
12:47mpslast time I tried Arch alarm was about 3 years ago so I forgot details
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:51jannaunot really impressed on how arch linux (arm) handles kernel packaging
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:55GlanzmannI already tried u-boot with the dtb from the dcp branch, no luck.
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:00Glanzmannjannau: Maybe I do something stupid, but I have not managed.
13:01Glanzmannjannau: With m1n1 tethered or untethered (my current setup), it works.
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:05GlanzmannBecause everything I tried myself, I did not get it to work.
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:21kettenisthat should no longer be necessary if you have an up-to-date m1n1
13:22kettenisbut other stuff will break
13:22ketteniswifi for example and usb too
13:24GlanzmannI see, for me I did not see a picture on the screen for the mini.
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:27kettenisthe right thing for now is to merge changes into the u-boot dts
13:28GlanzmannI see, I'll try it.
13:33jannauGlanzmann: does it boot at all for you?
13:35jannauI get a SError on intialization of one of hte locked darts
13:36kettenisu-boot master might work better
13:37Glanzmannjannau: No, it does not. I don't even see m1n1 output. But that is probably due to the late hdmi initialization.
13:37Glanzmannkettenis: Is it upstream?
13:41off^ has joined #asahi
13:42GlanzmannWow. It appears to be.
13:44kettenisno nvme yet, no spi keyboard yet, no smc (maybe ever)
13:44kettenisbut it does the darts in a different way
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:50jannauthe changes work as expected but u-boot does not work
13:51Glanzmannjannau: I see that I'll just stick with the non tethered m1n1 for now.
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:55kettenisno point in adding smc support to u-boot when the kernels handle turning on the wifi
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?
13:57kettenisjannau: I don't think u-boot master would touch the dcp DART
13:58kettenisnot so sure about the apple-m1-m1n1-nvme branch
14:04jannaukettenis: will it initialize all darts in the devicetree or only used ones?
14:04kettenisonly used ones
14:05jannauthat would explain why adding locked dart handling doesn't change anything
14:07jannaubut the most simple explonation I have for the vanishing framebuffer as soon as u-boot loads is a reconfigured disp0-dart
14:09kettenisif you can point me at the relevant commit that add the nodes I can have a look
14:13___nick___ has quit [Ping timeout: 480 seconds]
14:19jannausigh, I was not testing the right binary
14:21kettenisapplying those diffs to the u-boot dts files works just fine
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:23tpw_rulesi think arch linux arm has libunwind 1.6, does it give you problems jannau?
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:10kettenisjannau: yes both master and the branch work for me
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:12GlanzmannWhat is EBBR?
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:17Glanzmannjannau, chadmed I see, thanks.
15:22jannauGlanzmann: dcp works with u-boot master
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:22Glanzmannjannau: Wow.
15:23Glanzmannjannau: I see, so I can plug a usb stick in my mini and use that for boot?
15:23GlanzmannOr have you rebased the nvme, spi and smc patches on top of master?
15:23jannauyes, as long as nvme is not u-boot master you need the ESP on a USB stick
15:23kettenisor apply the patch sets submitted upstream:
15:24GlanzmannKeyboard will work on the mini, because it is usb.
15:24kettenisoh, no pcie support in the upstream bits either, so no type-A ports
15:25Glanzmannkettenis: But with a usb-c to usb-a hub it will work.
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:25chadmedor we do that yeah, dt is statically provided by a concatenated m1n1 payload
15:25chadmedwhich i _think_ is the plan here
15:25jannaubooting a kernel without dcp driver works however with the dcp devicetree
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:27Glanzmannchadmed: I see and we don't have chainload support.
15:27jannauchadmed: the devicetree has to be provided by m1n1 as it adopts it to dynamic data provided by iboot
15:27Glanzmannchadmed: I mean with m1n1/u-boot/grub you can already swap kernels on the fly.
15:28Glanzmannjannau: I see.
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:29chadmedyeah pretty much
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:32jannauyes, although I did not touch the keyboard
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:44Glanzmannjannau: I see, thank you.
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:49jnlandscape15[m]: ifixit mentions "Winbond Q64JWUU10 – 64 Mb serial flash memory"
17:50jn(64 Mb meaning 64 Mebi-bits, i.e. 8 MiB)
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:31nsklaus_but the problem is that it doesn't seem to list or give access to files.app
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:37nsklaus_maybe there's something else beside libmobiledevice ?
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
…