#
…

2022-03-12

00:07kovrkjnsn, there is a patch for that already, using 4k pages
00:07kovrkjnsn, the thing is there is a huge 16-25% performance hit
00:42g3blv[m] has joined #asahi
00:48g3blv[m]Will it be possible to boot Linux on iPads with the M1 processor once Asahi has been merged into mainline Linux?
00:53Dcow[m]1the bootloader on iPads is locked
00:55g3blv[m]OK and there is now way of unlocking the bootloader?
00:55g3blv[m]* OK and there is no know way of unlocking the bootloader?
00:55chadmed has quit [Quit: Konversation terminated!]
00:56g3blv[m]* OK and there is no known way of unlocking the bootloader?
01:08chadmed has joined #asahi
01:11milek7"ioctl(KVM_CREATE_VM) failed: 22 Invalid argument"
01:11milek7can I tell why exactly it doesn't like it?
01:21chadmed has quit [Remote host closed the connection]
01:23chadmed has joined #asahi
01:24hizonxx has joined #asahi
01:26hizonxx has quit []
01:28dsrt^ has joined #asahi
01:44dsrt^ has quit [Ping timeout: 480 seconds]
01:45dsrt^ has joined #asahi
01:48yuyichao has joined #asahi
01:55opticronhmm....now how to get rid of the old chunks I installed
02:04riker77_ has joined #asahi
02:09riker77 has quit [Ping timeout: 480 seconds]
02:09riker77_ is now known as riker77
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi
03:02riker77_ has joined #asahi
03:06riker77 has quit [Ping timeout: 480 seconds]
03:06riker77_ is now known as riker77
03:13opticronwelp, got that figured out, apparently you do things to partitions, but deleting one is eraseVolume
03:16rkjnsnkov, are you referring to sven's patch? My understanding is that is to support accessing hardware behind a 16k IOMMU while running a 4k kernel on the CPU's 4k page mode. The bootlin patch I linked is to allow running a 16k kernel on a CPU without hardware 16k page support by backing each kernel page with 4 4k hardware pages, which is what I understood agraf to be asking about.
03:21rkjnsn(I gather the idea would then be to get distros to standardize on 16k-page kernels to avoid the 4k performance hit, and on CPUs without hardware 16k support, the kernel would fall back to using 4 4k hardware kernel pages per kernel page? That wouldn't help with things that need 4k pages like FEX though.)
03:23PhilippvK has joined #asahi
03:26phiologe has quit [Ping timeout: 480 seconds]
03:27PaterTemporalis has quit [Ping timeout: 480 seconds]
03:50kov has quit [Quit: Coyote finally caught me]
04:10marvin24_ has joined #asahi
04:10zamadatix has joined #asahi
04:10zamadatix has quit []
04:12linearcannon has quit [Quit: Textual IRC Client: www.textualapp.com]
04:13marvin24 has quit [Ping timeout: 480 seconds]
04:25sorear"portable 16k-page kernels" wouldn't work, because the kernel needs to know the page table fanout at compile time and that's different between native and emulated 16k pages
04:26sorearrunning an emulated-16k kernel on M1 could provide interesting information (is the observed 16k speedup due to TLB/cache issues alone, or do kernel algorithms and fewer page faults also have a large impact?)
05:17nepeat has quit [Remote host closed the connection]
05:17nepeat has joined #asahi
05:18ave3 has quit []
05:18bpye has quit [Quit: Ping timeout (120 seconds)]
05:18linuxgemini has quit [Quit: Ping timeout (120 seconds)]
05:18kode54 has quit [Quit: Ping timeout (120 seconds)]
05:18KDDLB has quit [Quit: Ping timeout (120 seconds)]
05:19kode54 has joined #asahi
05:19bpye has joined #asahi
05:19eric_engestrom has quit [Read error: Connection reset by peer]
05:19nkaretnikov has quit [Read error: Connection reset by peer]
05:19linuxgemini has joined #asahi
05:19robher has quit [Remote host closed the connection]
05:19sorear has quit [Remote host closed the connection]
05:19WindowPain has quit [Remote host closed the connection]
05:19vx has quit [Quit: G-line: User has been permanently banned from this network.]
05:19Hotswap has quit [Remote host closed the connection]
05:20skipwich has quit [Quit: DISCONNECT]
05:20sorear has joined #asahi
05:20Hotswap has joined #asahi
05:20tardyp has quit [Read error: Connection reset by peer]
05:20eric_engestrom has joined #asahi
05:20vx has joined #asahi
05:20KDDLB has joined #asahi
05:20skipwich has joined #asahi
05:20tardyp has joined #asahi
05:20nkaretnikov has joined #asahi
05:20erincandescent has quit [Quit: No Ping reply in 180 seconds.]
05:20robher has joined #asahi
05:20WindowPain has joined #asahi
05:21ave3 has joined #asahi
05:21erincandescent has joined #asahi
05:24KDDLB has quit []
05:24WindowPain has quit []
05:25KDDLB has joined #asahi
05:25WindowPain has joined #asahi
06:20darkapex1 is now known as darkapex
06:20arndrkjnsn: the only thing that old patch does is to get around the 32-bit pgoff_t restrictions to allow larger disk partitions on arm32 Nas systems
06:21arndWe never merged that since the better fix would be to use a 64-bit pgoff_t like Annapurna Labs did in their NAS kernels
06:22arndThe larger pages are the workaround that Marvell originally put into their kernels
06:26rkjnsnI know that was the motivation for it, but I thought it increased the page size across the board, not just for storage? I can't say I understand this stuff all that well.
06:28rkjnsn64-bit pgoff_t would indeed be super useful for my 32-bit NAS, I seem to recall the problem there is it would require changing XArray to be 64-bit on 32-bit platforms, which would be a much wider-reaching change?
06:28rkjnsnUnless only the bottom 32-bits of the pgoff_t were used for indexing the XArray as chaining or something was used for the rare case of pages exactly 4GiB apart needing to be cached at the same time? As I say, I'm not really familiar with this stuff.
06:37dsrt^ has quit [Remote host closed the connection]
06:46arndI thought we had a "probably working" patch for 64-bit off_t at the time, but gclement's customer preferred the 64k page approach because it kept the performance characteristics of their older vendor kernel
06:48arndMaybe that was before xarray though
06:56rkjnsnI know there's https://sourceforge.net/projects/dsgpl/files/Synology%20NAS%20GPL%20Source/25426branch/alpine-source/linux-3.10.x-bsp.txz/download (heh, looks like you're the one who dug it up last year, when I was struggling with btrfs on my NAS), but it sounded like it was pretty much an unusable mess of vendor code with lots of unrelevant whitespace, etc. changes.
06:56rkjnsnirrelevant*
07:10marcanthe question is how hard would it be to pull a macOS and actually have mixed 4K/16K mode userspace :)
07:11marcan(pipe dream, but it'd solve ~all problems of course)
07:11marcanIIRC macOS just stuck all the PTE management behind an ops structure so they can have two versions and choose at process creation time/exec
07:12marcanbut then of course you're still going to have "interesting" things going on at the userspace<->kernel interface, no idea how macOS handles that
07:24gladiac has joined #asahi
07:32bluetail[m]is the usb 3.x port of the mac mini as fast as the lightning port? I think they are sitting on the same bus, right?
07:38jannauno, the thunderbolt ports (USB-C connectors) are directly on the SoC and the USB-A ports are PCIe USB controller. The USB-C ports are currently running at usb 2.0 speeds so the USB-A ports are faster
07:41bluetail[m]jannau: does that only apply to Asahi Linux or is that generally even in default state like you say?
07:44jannauI don't understand the question. This not true on macos as macos has proper USB 4/Thunderbolt 3 drivers for the usb-c port
07:44marcanthat they aren't the same applies to everything; that the TB ports only run at 2.0 applies to Asahi
07:45marcanhopefully once sven is done with the PHY drivers Asahi will have better type C support than macOS though ;)
07:45bluetail[m]Thanks. I was just wondering why I'm getting "only" 320 megabytes per second on a USB A Port right now. Cables are thick enough...
07:46marcan320 mega *bytes*?
07:46marcanthat sounds about right for USB 3.0
07:47bluetail[m]lindy says its usb 3.0
07:49bluetail[m]yea, it sounds right, but I should have ~ 200 MB/s more
07:50marcando you get 200 MB/s more in macOS?
07:50bluetail[m]No, I am not comparing to Asahi. I'm getting 320MB/s on macOS.
07:51bluetail[m]But the capability is up to 540MB/s
07:51marcanthat depends on a lot of factors
07:51marcanUSB 3.0 performance can vary widely between controllers
07:52bluetail[m]I see. That's interesting.
08:00marcansame chip, marketing says 380MB/s, so that sounds about right
08:10tanty has quit [Remote host closed the connection]
08:11tanty has joined #asahi
08:19tanty has quit []
08:23tanty has joined #asahi
09:00apg has joined #asahi
09:07amarioguy has joined #asahi
09:30ChaosPrincess has joined #asahi
09:46kajiryoji has quit []
09:51PaterTemporalis has joined #asahi
09:53chadmed has quit [Read error: Connection reset by peer]
09:53chadmed has joined #asahi
10:13arndmarcan: mixed page table formats per task are much more realistic, the two major problems I'd expect we'd have to solve for this are
10:14arnda) change linux/arch/arm64 to actually use separate page tables for kernel and user space. I forget how the separate is today, but as the kernel normally has access to user pages, they are at least sometimes visible together
10:16arndb) rework all the accessors for page tables to have separate kernel vs user logic. Some architectures (at least s390, possibly others) already do per-task page table levels, so a 32-bit task can use two levels, while a 64-bit task can use three, four or five levels depending on how much it uses
10:18marcanarnd: there's two top level page tables, one for kernel and for userspace, and in principle you'd set only the user/lower one to 4K/16K and keep the kernel one at 16K always (that's how macOS does it)
10:19marcan(the CPU does support mixing 4K/16K this way, simultaneously)
10:19marcanhowever, the weirdness will happen when the kernel has to access userspace pages, yes, since a lot of things will probably assume a 1:1 mapping between page sizes for kernel/userspace
10:20marcanand there's horrible corner cases like what happens when a 4K process tries to mmap memory that a 16K process has mapped, or worse, vice versa
10:20arndand then there is the page cache itself, since all memory is managed in units of kernel pages, having 16KB kernel page tables would likely mean that user space can only map memory in that unit as well, even if the TLB uses smaller pages
10:20marcanyeah, but that defeats the entire purposes
10:20marcan*purpose
10:20marcanthe point of 4K pages is so that mmap() on a 4K granularity actually works
10:21arndif the kernel uses 4KB pages, it would be a little easier, user space could be treated as using 16KB "huge" pages with the 16KB page table format, while kernel and other tasks use 4K pages or the normal huge pages
10:21marcanOTOH 4K processes mapping chunks of 16K page cache pages isn't necessarily a problem
10:21marcanyeah, that would be easier
10:21marcanwith memory folios
10:21marcanbut then we still run into the IOMMU issues
10:23marcanin principle I want to say 4K processes working as a layer on top of a native-16K kernel should *work* in that you can just treat each 16K page as 4 4K pages that can be mapped independencly by 4K processes, though you'd need accounting for that kind of splitting
10:23ciggi has joined #asahi
10:24marcanit'd complicate anonymous memory allocation though, how do you keep track of how much of a 16K page is actually in use and hand out the rest?
10:24arndright, that doesn't sound realistic either. What is the actual requirement for processes that want 4KB pages?
10:25arndare there applications that work on 4K and 64K but not on 16K pages?
10:25marcanno, the 4K story is basically for x86 compat
10:26marcanmmap() needs to work with 4K alignment, and 4K pages need to have independent protection status
10:26marcanthat's most of it
10:26arndah, because x86 applications are built with 4K section alignment in binutils?
10:26marcanyeah, and because x86 applications can and do assume they can just mmap stuff at random 4K aligned vaddrs
10:26marcanalso emulators for other 4K native systems of course
10:27arndwe had the same problem on 32-bit arm applications that initially didn't work on arm64 kernels with 64K
10:27marcanwe still do, chromium/jemalloc/WebKit/Emacs and I think a few others were broken on asahi, some of those have landed fixes, some haven't
10:27marcanthe emacs problem was assuming the build-time page size == the run-time page size
10:27arndthat is mostly fixed these days, but it doesn't help for existing binaries, and there is much less incentive for x86 applications to care about a random other architecture emulating theirs than there was for arm32 vs arm64
10:28marcanand yeah, for x86 the target is stuff like games
10:28marcanso no chance of recompiling those
10:28marcanif you're running x86 code in the first place it's because it's not open source
10:28marcanotherwise you'd have built it for arm64
10:30arndIIRC there are also still assumptions about page size in Android
10:30marcanyes, that's just the building for 4K alignment problem etc
10:40mpsI've got mail answer from f2fs developers about 16K page problem, one of them is interested to make it work with 16K pages but that will take time
10:42mpsquote from Chao Yu `I'm interest in supporting 16KB page in f2fs, but it looks this feature needs a big change. I'd like to investigate how to handle 4KB block read/write request through 16KB page cache first.`
10:45kov has joined #asahi
10:46kovrkjnsn, oh interesting
10:47OwOwA has joined #asahi
10:49kovbut yeah I think that is not a big problem for distros, there is already a history of providing various kernel packages and installing the most appropriate one (686 686-pae amd64 etc)
10:53OwOwA has quit [Quit: WeeChat 3.4]
11:10OwOwA has joined #asahi
11:14OwOwAThis might be a stupid question, but would it make sense for a package manager to include the special instructions from x86 used to speed up Rosetta 2 when compiling packages, or is it as stupid as it might sound?
11:23sventhat wouldn’t make any sense, no
11:23sventhat special flag is only helpful if you are emulating x86 code
11:24kode54what is this flag and what does it get passed to?
11:25svenit enables TSO ordering and it’s a bit in a sysreg
11:25sven-ordering actually :D
11:26kode54yeah, TSO doesn't benefit native ARM code
11:27kode54it only benefits a recompiler of architectures that expect strict memory ordering so that they can just recompile the code directly without having to make sure things are correctly synchronized
11:28kode54native ARM code doesn't need this step
11:28kode54or rather, the compiler already deals with memory ordering behavior
11:31mpspovik: I tried to merge your for-marcan-merge branch but got conflicts https://tpaste.us/RxrY
11:33OwOwAThat makes a lot of sense, thanks!
11:35amarioguy has quit [Remote host closed the connection]
11:41marcanthere's some other stuff about SSE flags
11:41marcanalso not relevant for anything but x86 emu
11:49ciggi_ has joined #asahi
11:52ciggi has quit [Ping timeout: 480 seconds]
11:55marcanpovik: j313 doesn't have the speakers disabled?
11:56marcanI'll add that in for safety
11:56povikmarcan: that's an oversight if not disabled
11:56povikyou are merging it?
11:56poviki hoped few people will test it before you do
11:56povik(as i said, don't have the hardware by me)
11:57povikmps: for-marcan-merge is where i have done the merge for you
11:57marcanwell, I want to test it :)
11:57povikgood :)
11:58mpspovik: but why I can't merge it then
11:58povikyou can't merge it with 'asahi', because 'asahi' has the old audio commits
11:58mpspovik: i.o.w. how can I merge it on top on asahi branch
11:58povikyou can't easily now
11:58povikyou should just pull for-marcan-merged and build that
11:59povikor wait until it gets into new 'asahi'
11:59mpspovik: ah, so I have to git pull --depth=1 it in separate dir
11:59povikthat would be fine
11:59OwOwA has quit [Quit: WeeChat 3.4]
11:59mpspovik: ok, thnaks
12:00mpsoh wait, is it for-marcan-merged or for-marcan-merge?
12:00povikah, -merge probably
12:00mpsyes, looks like, thanks
12:10marcan 0 [a ]: snd-soc-apple-m - MacBook Pro J314/6 integrated a
12:10marcanlooks like we should change the name, there are some length issues :-)
12:12OwOwA has joined #asahi
12:14marcanpovik: so I set everything to 50 and speaker-test only gives me 5 speakers, and it sounds like the left tweeter is quieter than the right one?
12:14OwOwA has quit []
12:14povikdoes it give you 5 speakers or 6 and one is dead?
12:14marcan6 and one is dead
12:15marcan0 is dead
12:15marcan("side left" according to speaker-test)
12:15povikleft tweeter being quiter than right is weird, doesn't happen for me
12:15poviki suspect we need to do some more configuration of the speaker amp chips
12:15chadmedspeaker-test -c 6 -D hw:0,0 -t wav
12:15povikin fields undocumented in tas2764
12:15OwOwA has joined #asahi
12:15chadmedthe speakers are mapped weirdly so you need to tell alsa explicitly to poke the hw device and that it has 6 real channels
12:15marcanyeah, I do
12:16chadmedyeah one of the left woofers will randomly drop out sometimes too heh
12:16chadmedpovik's being working on it
12:16marcanyup, that's the one I'm missing
12:16marcanit's totally dead for me
12:16chadmedit should come back if you reboot
12:16marcanbut yeah, the left tweeter does seem subtly quieter
12:16marcan(unless my ears are hosed
12:16marcanlet me check with a mic
12:18povikthe question is what's so special about left woofer
12:18povikif you swap left/right in DT, it's still the actual left woofer that drops out
12:19povikthe only idea i had is that some voltages or temperature are different there
12:19marcan"uninitialized memory", right
12:19chadmedcrazy apple-like silliness, could it be why they have ISENSE/VSENSE enabled? i.e. detect when the woofer goes dark and then kick the amp into reset?
12:20chadmedseems utterly stupid that theyd let that happen in production machines though
12:21povikchadmed: nah, i think it will be simpler
12:21povikwhen i get to it i will try applying the exact same configuration apple does, see if that fixes things
12:22povikI/V sense is enabled everywhere, even on the older models
12:24marcanoh yeah, the right tweeter is like 9 dB louder according to this
12:24chadmedhuh, mine are almost exactly the same volume
12:29marcanpretty obvious in the video too
12:30marcanthe two matched woofers that work are within 1dB though
12:31chadmedthats rough yeesh
12:36marcanah, figured it out
12:36poviklistening
12:36marcanit doesn't readback the amp gain setting on init, but does reset the codec
12:36marcanI had touched left tweeter
12:37marcanthat ends up being lower than reset state
12:37marcanso they both said 11dB, but for right, that was a lie
12:37poviki knew there's some issues there, didn't think that was it
12:37povikthe defaults for tas2764 don't apply hre
12:38marcanalso, I think the default is louder than 21dB
12:38marcanso it goes even higher
12:40chadmedbtw povik for the asoc driver name for things, i suggest just "Apple XXXX", where XXXX is the model of the machine
12:40marcanah, it seems to be doing it wrong
12:40OwOwA has quit [Ping timeout: 480 seconds]
12:40marcanthe value is supposed to be <<1 according to the datasheet
12:40chadmedwe can give each machine a more descriptive and user friendly name via config files
12:40marcanthe default *is* 21dB
12:40marcanbut what the driver says is 21 dB is a lie
12:40marcansounds like a bug
12:41j`eyliterally
12:41marcanalso the tas2764 default is correct
12:41povikdoesn't surprise me in the least, had to fix couple other things in the driver
12:50OwOwA has joined #asahi
12:50povikhey NCO got into clk-next!
12:50povikshame i didn't send the module building fix already
12:50povikanyway, will be easy enough to send on its own
12:50mpspovik: I got this https://tpaste.us/9byl when compiling your for-marcan-merge branch
12:51mpsso I will wait till marcan merges this and then test
12:51povikmps: unrelated
12:51j`eypovik: congrats!
12:51povikgot the surprise email after all :)
12:51mpspovik: yes, it is unrelated but will not try to find cause for now
12:52povikyou don't need to, that's just a warning
12:52povikif it stops the build disable WERROR
12:53mpspovik: I got also this `work/asahi-linux/src/for-marcan-merge/sound/soc/apple/macaudio.c:59: undefined reference to `asoc_simple_parse_routing'`
12:53povikyeah, that's more severe
12:53povikhm, how can you get that
12:54povikmarcan would have shouted if he ran into the same :-p
12:54povikalso it builds for me
12:54povikmissing dependence, of course!
12:54povikmps: thanks for reporting it, enable SIMPLE_CARD or similarly named option
12:54mpspovik: excerpt from build log https://tpaste.us/nVZ4
12:55mpsI have SIMPLE_CARD enabled I think
12:55mps SND_SIMPLE_CARD=m
12:56povikah, try =y, seems like some linkage issue
12:57mpspovik: heh, it pass now
12:57mpspovik: do I have to update dtbs in m1n1 to test this kernel
12:58mpsI think yes
12:58povikyou need to. remove the diable line if you want to experiment with speakers
12:58povik(knowing the risk)
12:58povikalthough i know you did experiment already :p
12:59mpspovik: where is this line?
13:00povikin the dts file for your model there will be a status="disabled" line for the speakers
13:02mpsbellow this comment `* DANGER ZONE: You can blow your speakers!`
13:04mpslets test, if I don't come here again means I put mbp in melting pot ;)
13:21mpspovik: no luck, I got blank console with this kernel
13:22povikwouldn't know why
13:23mpsok, np
13:24mpstoday and tomorrow I will try to upgrade macos to 12.1, will be easier to test different changes and features
13:25mps(sunny saturday is outside, would be better to go out and walk)
13:37apg has quit [Ping timeout: 480 seconds]
13:40apg has joined #asahi
14:07eroux has joined #asahi
14:26OwOwA has quit [Ping timeout: 480 seconds]
14:28memoryleak has quit [Ping timeout: 480 seconds]
14:36Dcow[m]1mps: 12.3 release scheduled for next week
14:40mpsDcow[m]1: thanks for info, but I will upgrade to 12.1 or 12.2 (if exists) not risking with new and untested one
14:42nitchi[m] has joined #asahi
14:44nitchi[m] has left #asahi [#asahi]
14:45mpsand looks like I will not upgrade soon, have problems with booting from usb
14:46jannausupported firmware is 12.1 for now. not a problem if you use the installer to install a stub partition
14:46memoryleak has joined #asahi
14:47mpsI will try 'from the scratch' install, i.e. reset macos to default and then with installer to the step before it install distro
14:47jannaubut we will have to update to 12.3 for mac studio
14:48marcanI tried 12.3 system firmware and nothing went wrong fwiw
14:49mpsmarcan: you are tempting me ;)
14:49eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:50jannauI wouldn't expect problems from dcp either given that there were no breaking changes from 12.0 beta to 12.2
14:52OwOwA has joined #asahi
14:56kov_ has joined #asahi
14:58kov_ has quit []
15:00OwOwA has quit [Ping timeout: 480 seconds]
15:06clrwf0x80 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
15:09eroux has joined #asahi
15:10eroux has quit []
15:11smartmobili has joined #asahi
15:12smartmobili has left #asahi [#asahi]
15:20zvdo I need to consider anything before I do 'make deb-pkg' in debian and replace the kernel (configured as 16K pagesize) remotely? nothing else to change?
15:22ciggi has joined #asahi
15:25ciggi_ has quit [Ping timeout: 480 seconds]
15:29OwOwA has joined #asahi
15:33mpszv: I think it should work, though long time passed when I used deb-pkg
15:33mpszv: if you need 4K page size you need to apply patch for it
15:37apg has quit [Ping timeout: 480 seconds]
15:37OwOwA has quit [Ping timeout: 480 seconds]
15:48creechy has joined #asahi
15:50j`eyI found the two places that are causing the 'buggy firmware' warning from the kernel (inside U-boot)
15:56nametable[m] has joined #asahi
15:59nametable[m]Hello y'all, i am interested in helping with Asahi. Is the best hardware to get specifically the M1 Mac Mini?
16:00nametable[m]I do not have any Mac as of yet but I am an active Linux user and computer science student.
16:01nametable[m]Also, does it matter what matrix client i use. right now im on Syphon on mobile
16:01j`eyI dont think any hardware is the 'best', the project aims to have all models working well!
16:02nametable[m]So if I wanted to work on the go, maybe even a M1 Macbook Air would be good?
16:02tpw_rulesimho mac mini is very slightly worse because some monitors are incompatible with it at this time. with the laptops you get a monitor that's guaranteed to work
16:04nametable[m]Is this the case even with a HDMI to VGA adapter?
16:07nametable[m]Along with a Mac, is there a specific device needed for Serial debugging? if i understand right, the serial port can be accessed through one of the usb c ports
16:08tpw_rulesa usb A to C cable
16:08tpw_ruleswell, that's with m1n1's hypervisor mode. but it's pretty good
16:08nametable[m]So is there no need for the more low level serial interface?
16:08tpw_rulesnot really
16:10nametable[m]Any suggestions on where to find the cheapest mac possible? I know i saw an m1 air on ebay for 575 a few days ago, and minis seem to be going for 500
16:10j`eyfacebook? craiglist type things?
16:10nametable[m]That's true I haven't checked Facebook marketplace yet
16:16___nick___ has joined #asahi
16:17___nick___ has quit []
16:18___nick___ has joined #asahi
16:21creechy has quit [Ping timeout: 480 seconds]
16:35ciggi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
16:40LuigyLeon[m]tpw_rules: nice! just ran into your nixos configs after I had already gone with Debian to test. Will try it out later today or tmw :)
16:41OwOwA has joined #asahi
16:43memoryleak_ has joined #asahi
16:46memoryleak has quit [Ping timeout: 480 seconds]
16:47tpw_rulesLuigyLeon[m]: cool! i'm excited to get more people to try nixos. i'm going to release prebuilt ISOs shortly
16:50creechy has joined #asahi
16:51OwOwA has quit [Ping timeout: 480 seconds]
16:53tpw_ruleshow does the installer choose which device tree to install? is it possible to have multiple ones concatenated and m1n1 picks the right one?
16:55OwOwA has joined #asahi
16:56matthewayers[m]What command do I run to get the latest version of asahi-next?
16:56j`eytpw_rules: the installer doesnt pick one
16:56j`eyIm assuming that yes was to your own question?
16:57tpw_rulesj`ey: yeah, i just found how the installer m1n1 bin was built
16:57tpw_rulesit just concatenates all the device trees on which means m1n1 must know how to find the right one for that specific machine
16:58creechy has quit [Ping timeout: 480 seconds]
16:59j`eymatthewayers[m]: if youre running the reference distro it will be via pacman -Syu
17:03matthewayers[m]I'm not completely sure if I have the reference distro or not
17:03OwOwA has quit [Ping timeout: 480 seconds]
17:03tpw_rulesno, that's Glanzmann's
17:04tpw_rulesthe reference distro is installing ALARM using the menu option in the asahi linux installer
17:04matthewayers[m]Yeah, I used Glanzmann's installer
17:04tpw_rulesi don't know how to update it though
17:04OwOwA has joined #asahi
17:06matthewayers[m]Yeah that's the only unknown I have as of right now
17:11memoryleak__ has joined #asahi
17:13OwOwA has quit [Ping timeout: 480 seconds]
17:15memoryleak_ has quit [Ping timeout: 480 seconds]
17:20memoryleak__ has quit [Ping timeout: 480 seconds]
17:24balrog has quit [Quit: Bye]
17:25balrog has joined #asahi
17:27Glanzmannmatthewayers[m]: You want to update the kernel?
17:28Glanzmannmatthewayers[m]: Do you already have the version with the chainloading rust.
17:28Glanzmannzv: Should I build a tested kernel for the mini with 16k?
17:29Glanzmannzv: When you use the current asahi branch the dtb has changed, so you need to update the 'boot.bin' and the kernel: Like that. But I probably just build a kernel, test it locally on my mini and send you the instructions.
17:30Glanzmannmatthewayers[m]: To update the kernel to the newest asahi branch you need to run as root: curl -sL tg.st/u/ksh | bash
17:32gabuscus has quit [Ping timeout: 480 seconds]
17:37mpsstarted upgrade macos to 12.2.1
17:44Glanzmannzv: Execute this as root: https://pbot.rmdir.de/yjN2_z1Bir9I1t52fySgUg and reboot for 16k kernel with the curren asahi tree and device tree. I tested this on my mini: https://pbot.rmdir.de/u/fao2DLLMIwrXNOkqIblVTg
17:47Glanzmannzv: If you want to build for yourself, I used this script to build the deb and the u-boot.bin: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/blob/68d9f4415c93e076e1dcc824ba0acea077ac57ae:/bootstrap.sh
17:47j`eyGlanzmann: if you have time/etc can you test https://github.com/AsahiLinux/u-boot/commit/75ad0c233c8a0cb5d29b96aa8633bbc1e7b9b29d it fixed an issue I was having, but someone using grub+linux should test it
17:48Glanzmannj`ey: Testing right now on air and mini.
17:49zvGlanzmann: thanks; so the u-boot update is a one-time thing for now?
17:49j`eyGlanzmann: thanks, just one of them should be fine!
17:52Glanzmannzv: Yes, because the kernel you have is different from the asahi tree.
17:52Glanzmannzv: So with the kernel update you do two things, you switch from 4k to 16k, but at the same time you use the lastest rebase from marcan. As a result the device tree changes.
17:53Glanzmannzv: Since asahi is actively developed expect a device tree change with every new kernel. Most of them will be backward compatible and forward compatible, but to be on the safe site you really want to update the device tree (which is in u-boot.bin) along with the kernel.
17:53tohatsu[m]I'm unable to boot from USB. Is it because of my usb is Fat32?
17:54tohatsu[m]Mac OS can't format to vfat
17:54j`eyGlanzmann: great thanks!
17:54Glanzmanntohatsu[m]: What excatly did you do?
17:55tohatsu[m]Glanzmann: with usb?
17:55tpw_rulesfat32 is vfat
17:55tpw_rulesbut u-boot will not read the fat partition unless its GUID is the ESP type
17:55mpstohatsu[m]: looks like your extlinux.conf is correct
17:56Glanzmanntohatsu[m]: No, more context.
17:56mpsu-boot reads even ext4 partition
17:56Glanzmanntohatsu[m]: So what did you do and what is your goal?
17:56espo has quit [Quit: Leaving]
17:57tohatsu[m]Glanzmann: the goal is to boot Debian from USB. And make it not persistent if possible
17:57mpstohatsu[m]: I can post script which creates usb bootable disk when finish macos upgrade
17:57tohatsu[m]Glanzmann: i followed this tutorial on Livesystem section https://github.com/AsahiLinux/docs/wiki/Debian
17:57Glanzmanntohatsu[m]: Where did you create the usb stick on macos or Linux?
17:58mps(time for macos upgrade is more than I need to build alpine base)
17:58tohatsu[m]Glanzmann: mac os with disk utility
17:59GlanzmannOkay, so I'm trying to reproduce your issue, give me 5 minutes
17:59j`eytpw_rules: try, in u-boot: ls usb 0:1 /
18:00tpw_rulesj`ey: i guess to clarify u-boot's EFI subsystem will not read non-ESP FAT32 partitions
18:01j`eytpw_rules: I meant that at tohatsu[m] anyway :P
18:01tohatsu[m]j`ey: just a sec, need to reboot
18:01mpsj`ey: I tested boot from usb and it works with ext4
18:02mpsat least worked when I tested it
18:03mpsj`ey: iirc I posted script to you
18:03tohatsu[m]j`ey: 0 file(s), 0 dir(d)
18:03tpw_ruleshm i'm trying to set up wifi and getting a lot of "timeout on response for query command" from the brcmfmac driver. is this what other people have been complaining about
18:03j`eymps: Im just trying to help tohatsu[m] :)
18:03j`eytpw_rules: no that sounds new
18:04mpsj`ey: ok :)
18:05tpw_ruleshm, i reloaded the driver and now it seems to work okay. weird
18:05tohatsu[m]j`ey: bad partition specification usb 0:1/ Couldn't find partiotion on usb 0:1/
18:05balrog has quit [Quit: Bye]
18:06tohatsu[m]i will try ext4
18:07j`eytohatsu[m]: you missed a space after the 1
18:07tohatsu[m]0 file(s), 0 dir(s)
18:08Glanzmanntohatsu[m]: I created the livestick like that: In the graphical diskutil from macos right-click and say erase and than put that: https://tg.st/u/Screenshot_2022-03-12_at_19.06.13.png on the terminal I did: https://pbot.rmdir.de/4faY6zui2bD4yLYpJESgRA
18:09j`eytohatsu[m]: can you read it on another machine / from recovery mode?
18:09Glanzmanntohatsu[m]: My assumption is that you by accident extracted the tar archive not on the usb stick but somewhere else. I also think that the instructions in the wiki are bad, I'll improve them right now.
18:09Glanzmanntohatsu[m]: Let me test the usb stick
18:10mavericks has quit [Quit: The Lounge - https://thelounge.chat]
18:10ciggi has joined #asahi
18:11tohatsu[m]Glanzmann: ah, i set GUID partition table
18:11mavericks has joined #asahi
18:11tohatsu[m]Glanzmann: after untar usb contained 2 filed and 1 dir
18:12balrog has joined #asahi
18:12Glanzmanntohatsu[m]: So with the instructions I send you above it works, I just tested it on the air. Can you try to reproduce, I update in the meanwhile the wiki article.
18:15creechy has joined #asahi
18:18Glanzmanntohatsu[m]: I improved the instructions in the wiki: https://github.com/AsahiLinux/docs/wiki/Debian#livesystem
18:20tohatsu[m]Glanzmann: the thing is now i don't have third option to choose Master Boot Record
18:20tohatsu[m]tried several times
18:20Glanzmanntohatsu[m]: That is really strange.
18:21Glanzmanntohatsu[m]: You're up for a quick zoom session?
18:21mpsGlanzmann: you told me that I can use `(diskutil apfs deleteContainer), use the asahi installer to install m1n1 and than you do the usual dance.
18:21tohatsu[m]Glanzmann: need to install something?
18:21Glanzmanntohatsu[m]: Probably not.
18:22mpsGlanzmann: how do I know which container to delete
18:22mpsor I could use macos gui tool for this
18:22Glanzmannmps: The one with the 80 GB.
18:23Glanzmannmps: Paste me the output of diskutil list again.
18:23mpsGlanzmann: I can't, I don't have tool to paste in macos
18:23Glanzmanntohatsu[m]: Send you link via msg.
18:23Glanzmannmps: tg.st/p
18:24GlanzmannSelect in the terminal commad + c and than go to the webpage and do comand + v and click on paste.
18:24GlanzmannTell me when pasted.
18:24mpsI see with 'diskutil list' /dev/disk4 is 80GB
18:24Glanzmannmps: That is the wrong.
18:25mpsdisk0s3 is 80GB
18:26GlanzmannThat's it.
18:27Glanzmanntohatsu[m]: I'm in the meeting, can you join?
18:27mpsok, deleted
18:28tohatsu[m]Glanzmann: I pasted to rmdir.de
18:28tohatsu[m]i'm in browser element.io
18:29Glanzmanntohatsu[m]: Can you join the zoom?
18:30Glanzmanntohatsu[m]: So the issue is that you have an gpt partition table on the usb stick, but you need a msdos partition table.
18:30Glanzmannfor the others: pbot.rmdir.de/uWx2GBd8OoZjaxPz1OHDig
18:30tohatsu[m]Glanzmann: I don't have zoom. You want to debug for wiki? I can just format it on windows PC
18:31Glanzmanntohatsu[m]: YOu can just click on the link and it should allow to join the session in the browser.
18:31GlanzmannBut if you don't want that, than yes do it on windows or another Linux.
18:31mpsGlanzmann: I got to point when asking me 'f: Install ans OS into free space', do I have to quit if I don't want to install asahi distro or continue with 'f' if i want macos on stub partition
18:32Glanzmanntohatsu[m]: Also you have to partitions on your usb stick, but you need one partition and the data needs to be on the first partition.
18:32tpw_rulesmps: hit `f` and select the free space, selecting what you want to install is another option
18:32GlanzmannIt will ask you later what you want to install.
18:32mpsGlanzmann: I see
18:32tohatsu[m]Glanzmann: send link
18:32GlanzmannWhen it asks you you choose the last option 3.
18:33mpsI will select 2: UEFI
18:33Glanzmanntohatsu[m]: It is still the same link.
18:34mpsGlanzmann: it is fine and intuitive, thanks
18:45sarah[m]I see so many people explaining stuff in text. Hopefully someone can someday just make a video tutorial that we can follow.
18:45j`eysarah[m]: Glanzmann has
18:49Glanzmanntohatsu[m]: Use this script to wipe the installer: tg.st/u/wipe-linux.sh
18:50GlanzmannSo the problem for tohatsu[m] was he had an esp and msdos parition on the usb stick.
18:50GlanzmannAs soon as we delete the partition he could change the partitioning.
18:51Glanzmannfrom gpt to msdos. But the problem was probably that he had two paritions and the files were on the second.
18:54mpsso, in 12.1 on stub partition we can't use macho m1n1?
18:59vmeson has quit [Quit: Konversation terminated!]
19:00vmeson has joined #asahi
19:00tohatsu[m]now i can't start wifi
19:00matthewayers[m]Was povik the one with a sound patch?
19:00mpsohm, u-boot in installer couldn't load compressed kernel I think
19:01j`eymatthewayers[m]: the audio jack should work on your kerne
19:01matthewayers[m]Thanks Glanzmann, I was able to update the kernel successfully to 20220310
19:02mpsuhm, it can
19:03tohatsu[m]tohatsu[m]: wif fimware tar is on USB. On what step it should be untared and installed?
19:11Glanzmanntohatsu[m]: Does 'ip link show' show you the wifi device?
19:11Glanzmannmps: Did everything work?
19:12mpsGlanzmann: I can boot from usb
19:12Glanzmannmps: Can you also boot your usual boot chain?
19:12mpsnow trying to fix boot from nvme
19:12tohatsu[m]Glanzmann: only loopback and ether
19:12Glanzmanntohatsu[m]: Okay than the firmware extraction thing went wrong.
19:12Glanzmanntohatsu[m]: You said you have the firmware tar put on the usb?
19:13GlanzmannIf that is the case do the following: mount /dev/sda1 /mnt; tar -C /usr/lib/firmware -xf /mnt/linux-firmware.tar
19:13tohatsu[m]Glanzmann: nevermind, i forgot that i rewrote usb, so firmware is gon
19:14GlanzmannThan do the following dance: https://tg.st/u/wifi.pl
19:14Glanzmanntohatsu[m]: But the firmware should also be on the efi parition that I saw.
19:15jannauGlanzmann: how slow was dcp for you? slow as in the mouse pointer jumps 1-2 centimeter on the screen (14" display)? I hit bug today which resulted in that behavior after switching the display's refresh rate
19:15Glanzmanntohatsu[m]: do a 'lsblk' or 'blkid'.
19:15Glanzmannjannau: Yes, like that.
19:16Glanzmannjannau: I see. I always ran 'xrandr to switch my resolution and also tried rotate'. As a result probably I also screwed the refresh rate.
19:17Glanzmanntohatsu[m]: Identify your 'esp' partition on the nvme and mount that and search there for the vendorfw/firmware.tar
19:17jannauok, looks reproducible on my end. I'll notify you after I've fixed it
19:17GlanzmannBut to be honest, my script should have done that.
19:17Glanzmannjannau: Perfect, once you did I will switch to it on the air and mini and work a few days with it and give you feedback.
19:18mpsGlanzmann: oh, didn't noticed that the installer moved up for one number my rootFS partition :)
19:18mpsnow I'm typing from it
19:18Glanzmannmps: Yes, you had one parition before your root, now you have two, because previosuly you did not have an esp and now you might have.
19:18Glanzmannmps: Perfect. :-)
19:19mpsI had ESP and now I have two ;)
19:19GlanzmannPerfect, you can never have to many esp partitions ...
19:19mpsGlanzmann: here they are https://tpaste.us/Z4Vl
19:20Glanzmannmps: Btw. if you want you can boot the debian live thingy from usb and use parted or gparted to ~77.5GB unused disk space.
19:21Glanzmannapt update; apt install xinit blackbox gparted xterm; startx
19:21mpsGlanzmann: I have alpine on usb from day one for rescue
19:22mpsGlanzmann: anyway thank you for your help and effort to get asahi so good
19:23GlanzmannI just kept asking questions and wrote it to a shell script. :-) You have to thank marcan, alyssa, jannau, kettenis, marcan, sven, j`ey and yourself :-)
19:25tohatsu[m]Glanzmann: /vendorfw/firmware.tar is present
19:25tohatsu[m]after untar to /usr/lib/firmware nothing changed
19:28tohatsu[m]but actually i don't need internet. Can i download needed deb packages with all dependencies to usb and make it being installed automatically on boot?
19:28nepeat has quit [Quit: ZNC 1.8.2 - https://znc.in]
19:29nepeat has joined #asahi
19:29nepeat has quit [Remote host closed the connection]
19:30nepeat has joined #asahi
19:30Glanzmanntohatsu[m]:
19:31Glanzmanntohatsu[m]: So the easiest way is probably to modify the livesystem how you want it and than create a initrd out of it.
19:32Glanzmanntohatsu[m]: Do you know if the file was untared before?
19:32Glanzmanntohatsu[m]: Which device (air, pro 14", pro 15") do you have?
19:33tohatsu[m]i didn't untar it before
19:34Glanzmanntohatsu[m]: cat /etc/rc.local
19:35GlanzmannThere is a script which runs on boot which searches for the wifi firmware and extracts it, so it probably was already extracted.
19:35GlanzmannI'm also on the air.
19:35Glanzmanntohatsu[m]: Can you run 'lspci' and let us know if you see the two broadcom devices?
19:36tohatsu[m]lspci command not found
19:37Glanzmanntohatsu[m]: If you have an ethernet donlge, you can instlal it:
19:37Glanzmannsudo apt update; sudo apt install -y pciutils
19:39tohatsu[m]Glanzmann: sh /etc/rc.local should execute without errors?
19:40tohatsu[m]don't have an adapter
19:40tohatsu[m]oh, it's perl
19:43GlanzmannYes, it should.
19:44creechy has quit [Ping timeout: 480 seconds]
19:44Glanzmanntohatsu[m]: When you execute it, does your wifi show up?
19:48mpsGlanzmann: re: live system, didn't I told that is how I installed linux first time, i.e. first booting was on usb ssd and when everything worked good then created FS on nvme and rsynced rootFs from usb
19:48tohatsu[m]Glanzmann:
19:50Glanzmanntohatsu[m]: That worked.
19:50GlanzmannLast thing is your wifi interface.
19:50Glanzmannvi /etc/wpa/wpa_supplicant.conf
19:50Glanzmannor nano /etc/wpa/wpa_supplicant.conf if you like that better.
19:51Glanzmannput your ssid and psk in the file, safe it and do a 'ifup wlp1s0f0'
19:51GlanzmannIf this interface was there all along, than it worked from the beginning without intervention how it should work ...
19:52Glanzmannmps: Yes, I remember that. You we're one of the first who used it as a desktop even before ther was nvme.
19:53GlanzmannI need to redo the live video.
19:53tohatsu[m]yes it worked
19:57creechy has joined #asahi
19:59mpsGlanzmann: right I used it as desktop from ssd usb, but I'm not first I think. tmlind was probably first but I think not with asahi kernel and with kexec instead of u-boot
19:59GlanzmannMaybe I should add a script that lets you modify the live system and write it back to the initrd on the usb stick.
20:00tohatsu[m]Glanzmann: that would be perfect
20:01Glanzmanntohatsu[m]: So if you want to safe the state of your initrd, you can do this with the following script executed as root in / : cd /; find . -xdev | cpio --quiet -H newc -o | pigz -9 > ../live-stick/initrd.gz
20:01mpsI usually resync all my working machines with usb disk for archiving and use as rescue if I need them
20:01GlanzmannYou might need to apt-get install -y pigz cpio
20:02Glanzmanntohatsu[m]: And of course you need to mount /dev/sda1 /mnt
20:02Glanzmannand the script needs to be: cd /; find . -xdev | cpio --quiet -H newc -o | pigz -9 > /mnt/initrd.gz
20:03Glanzmannmps: I see, I never do that and once I was really pissed at myself, because I reinstalled it for fun and did not get touchpad up and running but than you and jannau came and rescued me.
20:03tohatsu[m]will try it
20:04Glanzmanntohatsu[m]: Let me know, if it work, if it doesn't also let me know, than I'll try to reproduce, but I assume it works. and the initrd is created like that. I just added the '-xdev' parameter to find so that it does not decent into mountpoints but keeps the mountpoints itself.
20:15creechy has quit [Ping timeout: 480 seconds]
20:16Glanzmanntohatsu[m]: I had to try that initrd repack think from live. It works like charm. I would recommend that you delete /etc/rc.local and uncomment the allow-hotplug in /etc/network/interface so that the network comes up fast.
20:18milek7is "nvme0: Admin Cmd(0x6), I/O Error (sct 0x0 / sc 0xb)" during boot expected?
20:19Glanzmannmilek7: I have it, too. So I assume yes.
20:20Glanzmannmilek7: I think it tried to run a command which is not supported by apple nvme and gets an error, but it is not criticial and just carries on.
20:21clrwf0x80 has joined #asahi
20:21creechy has joined #asahi
20:29creechy has quit [Ping timeout: 480 seconds]
20:30creechy has joined #asahi
20:31milek7is kvm supposed to work? (on kernel from asahi branch)
20:31j`eymilek7: yes
20:32j`eymilek7: not sure what config/build you are using though, check it has CONFIG_KVM?
20:34tohatsu[m]I installed and started Gnome. Now it prompts for user/pass. root is not working
20:34tohatsu[m]and can't go back to terminal to view /etc/passwd
20:38creechy has quit [Ping timeout: 480 seconds]
20:40milek7j`ey: it does
20:40milek7but I'm getting "ioctl(KVM_CREATE_VM) failed: 22 Invalid argument"
20:40j`eyrunning qemu or?
20:41milek7qemu 6.2.0
20:43j`eymilek7: is that from source then?
20:43tohatsu[m]<tohatsu[m]> "I installed and started Gnome..." <- had to create new user
20:44axboej`ey: running 6.2.50 here and it's fine, use it all the time
20:44axboeeh that was for milek7
20:45j`eyIm not sure of anything in particular in qemu apart from https://github.com/qemu/qemu/commit/d26f2f93c1853810fad7da7faa2fa1d590c1017b that was needed. and thats in 6.2.0
20:46milek7maybe it requires some specific machine type? I'm trying with eg. raspi3b
20:47j`eymaybe that's 32-bit?
20:47j`eytry with -M virt
20:48j`eymilek7: what kernel/image are you running in the guest?
20:48milek7virt complains about IPA size
20:48milek7no image, it doesn't get to that point
20:49j`ey-M virt,highmem=off, but I thought the patch above meant you didn't need highmem=off anymore.
20:50milek7I will try with qemu from source
20:57zvwhat is the expected bandwidth on any usb-c port to, say, a usb 3.2 nvme adapter? full speed?
20:57j`eyzv: USB2 speeds for now
20:58creechy has joined #asahi
21:04mpsmilek7: sure, you need these patches
21:04mpsand highmem=off is not needed
21:05gladiac has quit [Quit: k thx bye]
21:05mpsmilek7: here is how I start it `qemu-system-aarch64 -bios QEMU_EFI.fd -machine virt -m 1G -cpu host -smp cores=4 -accel kvm -nographic -cdrom alpine-standard-3.15.0-aarch64.iso`
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:22milek7ok, with qemu 6.2.50 virt machine does work
21:27j`eymilek7: great
21:28mpsextracted m1n1.bin from installer.tar.gz doesn't work, looks like it doesn't try to find m1n1/boot.bin
21:31jannaumps: you probably need to append the esp partuuid and the chainload path as arguments
21:32clrwf0x80 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
21:33mpsjannau: I think something like this, but 'strings m1n1.bin' don't give me any hint
21:35mpstpw_rules: I see
21:39mpshmm, that chainload params must be given during build?
21:39mpsor the UUID set by installer
21:41j`eynot at build, you can do: cat m1n1.bin <(echo 'chainload=<your-uuid>;m1n1/boot.bin') > m1n1-chainload.bin
21:41mpsj`ey: thank you
21:44milek7fresh kernel still does hang sometimes :/
22:07creechy has quit [Ping timeout: 480 seconds]
22:12snnw[m] has joined #asahi
22:14creechy has joined #asahi
22:23zvhuh http://ix.io/3S4t disk errors
22:25shenki has quit [Remote host closed the connection]
22:25mpszv: bad cables or connectors, happened few times to me
22:26zvweird. rebooted and it came up again. hopefully it doesn't turn into a recurring issue.
22:27mpsI have these 'things' with some cables and usb to sata adapters
22:36Raito_Bezarius has quit [Ping timeout: 480 seconds]
22:41tfl^ has joined #asahi
22:43Raito_Bezarius has joined #asahi
23:01ChaosPrincess has quit [Remote host closed the connection]
23:26creechy has quit [Ping timeout: 480 seconds]
23:27creechy has joined #asahi
23:28axboe has quit [Remote host closed the connection]
23:29axboe has joined #asahi
23:29sheepgoose has quit [Remote host closed the connection]
23:32sheepgoose has joined #asahi
…