#
…

2022-03-15

00:07mrkajetanp has quit [Ping timeout: 480 seconds]
00:10yuyichao has quit [Ping timeout: 480 seconds]
00:16al3xtjames has quit [Read error: Connection reset by peer]
00:16al3xtjames has joined #asahi-dev
01:13mrkajetanp has joined #asahi-dev
01:59hizon has joined #asahi-dev
02:19yuyichao has joined #asahi-dev
03:00riker77_ has joined #asahi-dev
03:02riker77 has quit [Ping timeout: 480 seconds]
03:02riker77_ is now known as riker77
03:20phiologe has joined #asahi-dev
03:23PhilippvK has quit [Ping timeout: 480 seconds]
04:05kov has quit [Quit: Coyote finally caught me]
04:05kov has joined #asahi-dev
04:37marcanso this is a thing GitHub can do these days: https://github.com/orgs/AsahiLinux/projects/1/views/1
04:37marcan^^ first release checklist
04:38marcanI'm going to go ahead and say I want to release on the 17th :-)
04:38marcanlet's see if I can make it
04:38marcan... first I need to do my taxes today though
04:53tpw_rulesmarcan: has the ESP property made it into a released version of m1n1 yet? i don't see it on my system
04:55tpw_rules(also it would be cool if it were lower case)
04:56marcanI just merged that
04:56marcanit's not released though[
04:57tpw_rulesokay, cool
05:58gladiac has joined #asahi-dev
06:13the_lanetly_052 has joined #asahi-dev
06:34the_lanetly_052 has quit [Ping timeout: 480 seconds]
07:15marcan... server is overloaded and I can't file by e-tax. never change, japan...
07:15marcanat least I got my accounting in order though
07:18psykoseone pentium box per city
07:24marcantoday is the deadline, but it looks like they'll extend it due to the overload... which has apparently been going on since yesterday
07:24marcanback to asahi then I guess
08:01MajorBiscuit has joined #asahi-dev
08:46ChaosPrincess has joined #asahi-dev
08:51firefox317marcan: I found some issues with the current hosted installer installing the asahi base image on a j313. It seems like the 5G partition is not auto-sized after first boot (is this intentional?), and the wifi doesnt come up (seems like some pcie issue)
08:52povikwhoa it's march already
08:52* povikshould think about his taxes too
08:53chadmedfirefox317: yes and yes, it is a pcie problem
08:54marcanfirefox317: this is known
08:56chadmedseems like my issues with wireplumber arent related to it, but something else. i duplicated my j314s config on another of my machines with an almost identical userspace setup and it works fine - wireplumber connects the output of the filter chain to the hardware device as expected and plasma lets me route all audio via the filter
08:57chadmedso im thinking its something to do with these machines in particular somehow
08:58chadmedwhich if thats the case, means the only feature wireplumber/pipewire needs to have for what im envisioning is the ability to "hide" sinks but still have them be accessible on the back end
09:01chadmedsince pipewire already implements the infrastructure required to do these transforms internally, all youd really need to implement to solve DSP in for all of linux is a utility to automate the setting up of pipewire (like what ive already done but more generalised) and a database to store IRs and configurations for retrieval by the utility
09:01poviki feel like we should crash #pipewire
09:01firefox317marcan, the pcie issue is different than the one mentioned in the GH issue. Im getting a pcie-apple 690000000.pcie: /soc/pcie@690000000/pci@0,0 link didn't come up
09:02chadmedpovik: i asked about it a couple of days ago and the response was just "pipewire doesnt do that"
09:03chadmedi would 100% try implementing such functionality myself but i do not know enough about pipewires internals and am not that good with C, and right now i simply do not have the time to learn either to a level where i could do something like that at all, let alone well enough to get it upstreamed
09:03j`eyfirefox317: also known
09:04firefox317j`ey, is it? its not in marcan s blockers list :)
09:06j`eyfirefox317: yeah its one of the 2 ways wifi fails
09:07firefox317okay, well as long as it is known its good.
09:10* marcanforks xkeyboard-config
09:10svenlol, i hate atcphy. right now either usb3 hotplug *OR* usb2 hotplug works
09:10marcansven: lol
09:11svenand ofc usb3 -> usb2 -> usb3 hotplug also doesn't work
09:11svenbecause that makes sense!
09:17bluetail[m]USB is significantly cheaper than thunderbolt right? A DAS with TB costs easily 4 times as much in my case…
09:18bluetail[m]TB is PCIe backed though. Higher bandwidth
09:18firefox317marcan, just for reference, but there is the journalctl of the first boot: https://pastebin.com/Xv4k5AqA It looks like there are some more minor issues, like the EFI firmware being unaligned and a unknown kernel command line argument BOOT_IMAGE
09:18chadmed"unknown" only means unknown to the kernel
09:19marcanthe unaligned firmware is a u-boot thing and should already be fixed I think
09:19marcan(right kettenis?)
09:19chadmedgrub appends BOOT_IMAGE to the kernel command line, and other userspace stuff sometimes make use of the kernel command line too
09:19marcaneither way it can be ignored even if not
09:19j`eyno the u-boot issue requires more fixes
09:19chadmedgood example is plymouth, which will only start if you have "splash" in the kernel command line (the kernel does nothing with that flag)
09:21firefox317chadmed, ah grub puts it there, okay wasnt aware of that. thanks :)
09:22firefox317I was just mentioning these, because people will also report these issues probably when we release a first version
09:27povikchadmed: re: pipewire, i won't shy away from writing something if we can get an agreement as to what it's supposed to be -- both here and with pipewire people
09:27povikas to the universal solution, instead of configuration utility i would expect all projects to directly read from the database, something like how pulseaudio reads UCM files AIUI
09:28chadmedthe problem with that is convincing distros to package and ship potentially thousands of IR samples and configuration files
09:28povikyeah, that
09:28chadmeddepending on the sample rate and bit depth, they can be upwards of a megabyte each
09:28povikthey already package UCM files for every supported card though
09:29chadmedeven more if youre packing them with 0s to add delay/reverb
09:29povikhmm? a megabyte each? i would doubt that
09:29Major_Biscuit has joined #asahi-dev
09:29chadmedwell the ones i ship just for the j314s are 512KiB each
09:29chadmedand theyre extremely basic EQ filters
09:29chadmedwith a time-domain window applied to shrink them
09:29chadmedtheyd be even larger if i left them unconstrained or if the card supported a higher native sample rate
09:30povik(the card should support 96 or maybe even 192 btw)
09:30povik(depends on the codec)
09:30chadmedyeah im working off the assumption of 96kHz, thats what the IRs are
09:30povikok, good
09:30chadmedi think i tried 192 and it all came crashing down
09:30povikah, not so good
09:31chadmedmacos only supports 24/96 on this machine too
09:31povikshould either politely refuse the high sample rate or work :-p
09:32chadmedbut yeah my thinking was something like a small graphical utility and a JSON data format. the utility reads a json file provided to it from a remote database with a list of speakers/machines the database has IRs for
09:32povikanyway it goes against my intuition that the IRs are that large, maybe i will take a look whether something can be done
09:32chadmedkind of like the printer driver list the plasma system settings module shows you
09:32povikuh, don't like how complicated that is
09:34povikwell in the short term, can pipewire be configured so that we ship IRs for couple of macbooks, and it picks up the right ones?
09:34chadmedthe short answer is no it cant, you need to specifically tell it which ones to use via config
09:35MajorBiscuit has quit [Ping timeout: 480 seconds]
09:35chadmedwhich is why i built that quick and nasty "installer" today
09:35povikand the config can't be conditioned on card name?
09:35chadmedno thats a session manager scripting thing, which means pipewire would have to spawn filter chains for all cards at all times and then have the session manager pick which one to actually route
09:36chadmedbut again the problem with that is pipewire cant hide devices, so youd end up with a list of x virtual sinks, x being however many machines are supported
09:37chadmedand even still, the user has to select it themselves via their DE. wireplumber is only responsible for sending the virtual sink's output to the hardware device. it wont transparently select that virtual sink as the user's default
09:39povikso the two issues are we can't spawn filter chain specific to a card, and another to make that the default sink
09:39poviki don't know if we need to hide the physical sink as long as it's not the default
09:39chadmedwell three issues, we cant hide the "real" sink from the user
09:40chadmedits not necessary sure, but i think it would be pretty essential to a seamless desktop experience
09:40chadmeddepending on how a user has {mis}configured their DE, you can make it swap to the hardware device by default, which signals the pipewire session manager to tear down the filter chain's link to the hardware
09:40chadmedand the only way to get it back is reloading the pipewire config by killing pipewire
09:41povikwell i meant there could be some use to the real sink for the user
09:41povikbut i suppose not really when it's not any standardised channel set
09:42chadmedyeah i struggle to see who would want to listen to the real sink when the quality is roughly adjacent to Alexander Graham Bell's first telephone conversation
09:42povikpoint made :-p
09:44chadmedbut yeah i think just with the way pw/wp have been designed, it would be pretty infeasible to ship IRs for every single machine with them and implement some sort of matching logic in either
09:44chadmedi kind of like the printer driver model just because it doesnt burden pipewire with the maintenance of a huge database of IRs and configurations for random niche sound devices, distros can package these databases up just like they do with PPDs
09:45poviksure, that gets the IRs to your disk, but how does pipewire load the ones?
09:45povik*right ones
09:47chadmedwell youd ship precomposed pipewire config fragments in the database corresponding with those IRs, similar to how ive done it in my github repo
09:47chadmedwhen you select your device in the utility it would shift the related config fragment over to /etc/pipewire/pipewire.conf.d/ or even the user's local one (could be a toggle) and then restart pipewire
09:48chadmedthat part all happens seamlessly for the user
09:48chadmedand at that point your only issue would be hiding access to the "real" sink for cases where it's warranted, like ours
09:48povikthat's not the printer model though. the user has to pick the right ones and only those
09:49povikwhile in the printer model people can download as many drivers as they want, the system picks the right one if it's available
09:49povikwe should have that too i think to solve it properly
09:49chadmedyeah thats true, but cups has the logic to do that
09:53chadmedi guess we could put together a feature request and see what happens?
09:54poviki support that
10:08kameks has joined #asahi-dev
10:42chadmed has quit [Ping timeout: 480 seconds]
10:52chadmed has joined #asahi-dev
11:08chadmedmarcan, povik: https://gist.github.com/chadmed/51428670bb7fda92a2ef9c879ac1c678 <- a first draft of a feature request for PipeWire, do you think anything should change from what ive described?
11:10marcanchadmed: sounds good, but maybe also mention the safety/volume limit issue?
11:11chadmedoh yeah thats a good idea
11:13marcanhm, when did firefox break for me?
11:14chadmedbroke for me with the second-to-last update
11:14chadmeddoesnt work with x11 or wayland
11:14marcanyeah, same here
11:14marcankernel update?
11:14j`eyI ran ff yesterday on wayland
11:14j`eyon latest asahi branch
11:15chadmednope ive been running on povik's branch because linux-asahi wont build with clang now (something about movz/q)
11:15chadmedmust be a firefox thing
11:15marcanhm, that's not good :/
11:16j`eychadmed: you can switch to asahi and apply https://lore.kernel.org/linux-arm-kernel/20220309191633.2307110-1-nathan@kernel.org/ .. but you want the speakers anyway
11:16j`eymarcan: what ff version? Im on 98
11:17chadmedyeah it stopped working for me on 98. updated to 98.0.1 today and still doesnt work
11:18marcanj`ey: arch? what ff version/kernel?
11:19j`eyAlpine, ff 98.0.1 kernel a90a4472ece3167409168aab7c5010fe0eba8bb9
11:19j`ey(aka latest asahu branch)
11:23PaterTemporalis has joined #asahi-dev
11:24marcanfirefox also doesn't work via X forwarding, so I think we can rule out display related shenanigans
11:24marcanit's either a kernel problem unrelated to graphics, or a firefox problem, or ???
11:25j`eymarcan: try on the nvme/suspend branch?
11:26chadmedyep broken with waypipe too :/
11:26shenki has joined #asahi-dev
11:27marcanj`ey: trying
11:27j`eyit might be a good idea to tag the rebases too, to aid in this kinda thing
11:29mpsalso for me FF 98.0.1 works fine on latest asahi kernel
11:29hizon has quit [Remote host closed the connection]
11:30mpsno pipewire no pulseaudio
11:30marcannope, nvme/suspend does not fix it
11:30marcanmps: what config?
11:31mpsmarcan: kernel config?
11:32mps^ personal config tweaked with jannaus for Arch
11:33mpsoh, and added my personal terminus fonts patch
11:33povikchadmed: looks good! only put there more realistic card name like "Macbook Pro J314/6 Audio" in place of "j314s-macaudio"
11:34mpsbut this is irrelevant for anything working or not in kernel
11:34povikalso just realized there will be jack and microphone on that ALSA device in future, which need to be exposed even if speakers are hidden
11:34povikdon't know if alsa's hw:0,0 and hw:0,1 are different sinks in pipewire's model
11:34marcanj`ey: 4K or 16K?
11:35mpsmarcan: I mostly use 4K
11:35mpssometimes also test with 16K
11:36jannau vert.active -= 74;
11:36j`eymarcan: 16K
11:36mpsactually thinking to convert all my disks from f2fs to ext4 and use only 16K
11:37j`eyjannau: is ff broken for you too?
11:37jannauI think the arch firefox-98.0-1 update broke for me, without kernel changes
11:39jannauI noticed it was not restored after login after the update but didn't investigate
11:39jannauconfirming right now
11:39mpsoh, I didn't upgraded FF from 98.0 to 98.0.1 on m1, did on another machine
11:40chadmedpovik: pipewire treats them as independent nodes. what we'd be "hiding" is a pipewire node, not the entire hardware device
11:40marcanyeah, 97.0.1-1 works
11:40marcanyay for not cleaning up my pkg cache
11:41marcan98.0 is broken too
11:42mpsjust upgraded 98.0.1, works
11:43psykose.1 only changed some default search providers
11:43mpspsykose: yes
11:43mpsbut wanted to test upgrade anyway
11:44jannauit's half broken for me, when starting from a terminal line I get ALSA errors and a black window with a "close Firefox" title after quite a while
11:45marcanyeah, I get a transparent window
11:47psykosethose are armv7 only
11:47psykose(inside the if block)
11:47marcanah, yeah
11:49jannaufirefox (97.0.1-1 -> 98.0-1) broke it for me
11:49psykoseguess they did some funny stuff in 98
11:50psykoseon alpine smoosh didn't even build anymore, so i assume they broke a bunch of things randomly
11:50jannaurecompiling firefox on arch will be annoying since you have to rebuild rust first without jemalloc
11:52povikmarcan: what safety limits would you see implemented at pipewire level?
11:52marcanahaha, amazing
11:52marcan 0:03.90 checking for cargo... /usr/bin/cargo
11:52marcan 0:04.07 DEBUG: Executing: `rustup which rustc`
11:52marcan 0:04.07 DEBUG: The command returned non-zero exit status -6.
11:52marcan 0:04.07 DEBUG: Its error output was:
11:52marcan 0:04.07 DEBUG: | <jemalloc>: Unsupported system page size
11:52marcan 0:04.07 DEBUG: | <jemalloc>: Unsupported system page size
11:52marcanso I can't *build* firefox because rust is busted on 16K
11:52poviki expect to find a maximal amp gain setting from macos and that's that
11:53Jamie[m]1would mozregression (bisecting on nightly build artifacts) be useful here?
11:53marcanonly if those official nightly builds actually crash
11:54chadmedpovik: that doesnt solve the problem for other machines. like marcan said, this is a problem that goes beyond just macs and its really about time someone got the ball rolling on standardising this stuff. and all it took was a trillion dollar company's attempt at a paradigm shift in desktop computing
11:54marcanI don't see ARM64 official betas
11:54jannauhuh, rust from rustup was working for me, the arch rust package one not
11:55marcanand the arch one is the one the PKGBUILD wants to use
11:56marcanugh, jemalloc is compiled into rustc?
11:56mpsearlier I would advice everyone to use alpine but nowadays I'm not sure
11:56psykoseif you can run the pkgbuild yourself and it just uses your existing root you can delete the rust part from the pkgbuild and that should be fine
11:57psykoseshould just use the PATH rustup rust then
11:57psykosebut i forget if pkgbuilds build in chroots or something
11:57jannaumarcan: yes, arch PKGBUILD works with https://paste.debian.net/1234240/
12:00marcanrust has a circular dep on itself?
12:01marcanthat's... another problem now, heh
12:01marcanjannau: do you have a pkg built with that?
12:02marcanoh, rustup, sure
12:02jannaumarcan: only 1.58.1
12:02marcanjannau: should be enough to bootstrap
12:06kettenisin OpenBSD we call these private malloc implementations "vulneravility mitigation countermeasures" ;)
12:07svenaaand with some more horribly hacks now both usb2 and usb3 hotplug works :>
12:08sventl;dr: using the PORT_RESET workaround completely breaks the usb3 phy no matter what so we're back to "tear dwc3 down completely and reinit it"
12:10Jamie[m]1lmao kettenis
12:11Jamie[m]1(fwiw it apparently provides an 8-10% perf improvement for rustc, at least on x86-64)
12:12kettenisyes, by throwing security features out of the window
12:12chadmedyeah malloc is quite slow apparently, its why games almost invariably ship with tcalloc
12:14Jamie[m]1rustc also throws out other security features that are enabled by default in normal rust programs, in exchange for big perf gains (e.g. DoS-resistant hash tables)
12:14Jamie[m]1which makes sense in a compiler context but not many other places :)
12:19marcanlooks like JEMALLOC_SYS_WITH_LG_PAGE=16 might work
12:20kettenisto be honest, we disable PIE for llvm on OpenBSD as well to make things run a bit faster
12:23jn has quit [Read error: Connection reset by peer]
12:24jn has joined #asahi-dev
12:43marcanand see if it still runs on 16K (or just send me the package)?
12:50svenTiming O_DIRECT cached reads: 148 MB in 2.02 seconds = 73.15 MB/sec <-- hrm... i wonder if this usb stick just sucks immensely or if I'm still missing some magic pokes
12:51ketteniswell that is more than usb 2.0 could give you
12:52mpsmarcan: you need this with glibc, not musl I guess?
12:53svenlooks like it's just that stick, same model (from the same order even...): 402 MB in 2.01 seconds = 200.11 MB/sec
12:53_jannau_sven: sandisk extreme USB 3.0 stick on my intel laptop: "Timing O_DIRECT cached reads: 402 MB in 2.00 seconds = 200.66 MB/sec"
12:56sveni still only do half of what macos does but i guess that's enough for usb 3 gen 1 at least
12:56j`eysven: looks like you bloody well did it!
13:13kettenishmm, so one of the openbsd users has an mba with hungarian keyboard layout
13:13kettenisbut the country code it reports is 13 "International (ISO)"
13:18j`eymarcan: fingers crossed for 98.0.2
13:22_jannau_kettenis: do you know if the keyboard config in the ADT is less wrong?
13:26marcanshould be, I'd hope
13:30kettenisI don't remember which bit of kblang-calibration we suspected of enciding the language
13:32marcansecond byte
13:40marcanfirefox-98.0.1-1.1-aarch64 pushed to the asahi repo for the time being, fixes the problem
13:42yuyichao has quit [Ping timeout: 480 seconds]
13:42marcanalso pushed the fixed rust
13:44tpw_rulesmarcan: i never had problems with rust on my 16k kernel
13:44marcanyou are presumably not on arch then
13:45marcanjemalloc is a build option
13:46mpshmm, I don't see any reference to jemalloc in rust package on alpine
13:55kettenisso I strongly suspect that the country code exposed by the driver will always be 13 (ISO), 15 (Japanese) or 33 (ANSI)
13:59kameks has quit [Ping timeout: 480 seconds]
14:00ketteniswhich would mean we need the language in the device tree after all..
14:01_jannau_I fear that too
14:02yuyichao has joined #asahi-dev
14:05kettenisnot sure if I can get my hungarian friend to extract the adt
14:06kettenisbut maybe there is someone with a german or french keyboard here running linux who can check the country code in sysfs?
14:06j`eypovik has the czech one right?
14:08marcanI had a feeling that's how it woul be
14:11povikhe does
14:12povikkettenis: in my case the ADT value agreed too (czech)
14:12povikcan look at the sysfs country code later if you are curious
14:13marcanso yeah, looks like we can't use bCountryCode
14:14povikoh i can use ioreg, let me do that right now
14:14povikwhat's the command?
14:15Jamie[m]1ioreg -l -f according to the gist title :)
14:15Jamie[m]1or is it -I -f
14:16povik"bCountryCode" = 13 on a
14:16povik'Keyboard / Boot' node
14:17marcanyup, no good then
14:45arndare there any (x86) laptops that correctly set bCountryCode in a way that distros make use of? I always assumed this required user input anyway
14:50kettenisvery few x86 laptops use a usb keyboard
14:52_jannau_I suspect the T2 macbooks with USB keyboards report the same 3 country codes
15:23marcanvery few keyboards in general set this properly
15:50ChaosPrincesskettenis isn't it the other way around? i thought pmuch every laptop had kb attached to usb bus
15:54kettenisno, most x86 laptops still use an (emulated) PC/AT keyboard controller
15:55kettenisalthough HID-over-I2C is getting popular on ultraportables
16:07svendoes anyone have a usb 3 gen 2 devices (i.e. something that uses both lanes here) and can also run macos in the hv?
16:07sven*device
16:12Jamie[m]1that would be gen 2x2, no?
16:13Jamie[m]1gen 2 i believe is 10gbps over a single lane
16:14bluetail[m]<sven> "does anyone have a usb 3 gen 2..." <- No. I dont. I only have normal usb3 gen2
16:14bluetail[m]You would need as Jamie said gen2x2
16:15svenah, yes, that
16:15sventhough i guess usb 3 gen 2 might be interesting as well just to confirm it's the same sequence as usb 3 gen 1
16:15bluetail[m]well it is I guess
16:17svenhave you macos under the m1n1 hypervisor before?
16:18bluetail[m]No. I got the question as whether usb 3.2 gen 2 works under 3.1 which it does
16:18bluetail[m]cause its still usb 3.1
16:19sveni guess? the 3.1 is probably just a hardcoded name somewhere
16:19sventhe bus certainly supports up to gen 2x2
16:19bluetail[m]I havent seen a single gen 2x2 device though except for pcie cards
16:20tpw_rulesi might have one, how can i double check under linux?
16:20Jamie[m]1apparently there's an orico nvme adapter which uses 2x2, seems useful to have so I might buy one lol
16:21bluetail[m]yea, those are all nvme if anything
16:22sventpw_rules: i think dmesg will show something like "new device SuperSpeed Gen 2x2"
16:23svenJamie[m]1: huh, and that thing is just 20 eur. i would've expected these things to be more expensive
16:24svenah, the 20 gbit which is 2x2 is actually 60 eur
16:24bluetail[m]sven: How hot does it get? I read somewhere those nvme enclosures run hot
16:24Jamie[m]1orico cranks out an absurdly large number of quite cheap variations on the "external drive enclosure" concept
16:25Jamie[m]1my local computer store has like 2 shelves dedicated to redundant-purpose orico products lol
16:25milek7does m1 actually have 2x2? apple specs say "USB 4 (up to 40Gb/s); USB 3.1 Gen 2 (up to 10Gb/s)"
16:25Jamie[m]1bluetail: well apparently it has a fan...
16:26Jamie[m]1ah, that would be a no then milek7
16:26Jamie[m]1did it change in pro/max?
16:26svenmilek7: hrm, interesting. i assumed it was up to 2x2 because there seems to be a code path in the typec phy that configures both lanes to be USB
16:26svenand a separate path for usb4
16:32bluetail[m]<Jamie[m]1> "bluetail: well apparently it has..." <- which specific model? Having a spare SanDisk Extreme Pro here. And it gets warmer than I'd like it to
16:33bluetail[m]Its actually 2x2
16:33Jamie[m]1sven: apparently there's also something called usb 3.2 gen 1x2, which is dual 5gbps
16:33svenah, ofc there is.
16:33Jamie[m]1not to be confused with 3.2 gen 2x1 (aka 3.1 gen 2)
16:33sven<3 usb
16:33svenso far i've only seen macos configure the lanes to be USB/DP though but i assumed that was because I don't have any device that uses two lanes
16:33svenbut maybe that just doesn't work?
16:34bluetail[m]Do you want me to check speeds with my usb 3.2 gen2x2 device?
16:35bluetail[m]I mean, I wouldnt have to, there are benchmarks done on macOS too and its as good
16:35marcangoing to give up on s2idle because pci, not sure if I can sanely make the pci cores not sleep and either way brcmfmac seems like it might need actual dev work to make sleep work, since I think macOS uses an entirely different mechanism and that other android driver hints at another mechanism even
16:35marcanso no s2idle for the alpha release, we'll look at that later
16:35marcanI did merge the nvme/usb support stuff though, so that will work in the asahi branch once I push it if you disable PCI
16:38j`eymarcan: and serial?
16:39marcaneh, I'll just push it now
16:39marcanpushed :)
16:39marcanthis also has the new audio stuff from povik, plus a few fixes I made on top to the speaker amp (still disabled by default though)
16:40mpsmarcan: nice
16:41marcan(no asahi package yet, I'll figure that out tomorrow)
16:41mpsdo we need upgraded u-boot for this to test
16:42marcanyou need the aic2 devicetrees, that should've already been in the previous push
16:42marcannothing changed since then IIRC
16:42mpsok, lets build it and test
16:43marcanhowever the chainloading (top-level m1n1) did get a few changes to how it handles the GPT UUID which will be used in u-boot in the future
16:43marcanso now is probably a good time to upgrade that anyway, let me at least rebuild the installer
16:44marcanah sorry, not m1n1 per se, just the installer
16:44mpsgood, thanks
16:44tpw_rulesmarcan: i ran into an issue yesterday where an m1n1 chainloaded from disk could not access the ADT from the hypervisor run_guest script; the size was reported as 0. can you test that? it would be good to have fixed before lots of people stick an m1n1 in with kmutil that's broken
16:46mpspovik: marcan: `/work/asahi-linux/src/linux/sound/soc/apple/macaudio.c:59: undefined reference to `asoc_simple_parse_routing'` this is not yet fixed
16:46mpssnd-simple must be in-kernel, not module for now
16:47marcantpw_rules: you mean kmutil m1n1 -> gpt m1n1 -> hv?
16:47tpw_rulesyes. the m1n1 on gpt did not have any payloads
16:47marcanmps: ah yeah, need to fix that
16:48tpw_rules(and the kmutil m1n1 was installed with the installer's UEFI environment option)
16:48marcanthat's very weird though because obviously the ADT gets passed through or everything would explode
16:48kettenisI did push a new u-boot to the asahi branch earlier today
16:49kettenisbasically a rebase because jannau's logo color fix made it upstream
16:49marcantpw_rules: do you have logs?
16:49tpw_rulesyes. i also noticed that the on-disk m1n1 printed the correct size on screen
16:50tpw_ruleshttps://pastebin.com/MFatUiiz that's all i saved, just that the run_guest script read a size of 0. not sure if the bootargs struct is being read from the wrong place or what
16:51marcanthat looks like bootargs isn't properly passed through
16:51marcanwhich is weird
16:51marcanohhh wait
16:51marcannot that
16:51tpw_rulesalso the same m1n1 binary that was on disk worked fine when installed via kmutil
16:53marcanI think I have an idea of what it must be
16:53marcanlikely something clobbers the bootargs between when m1n1 loads and the python stuff loads
16:53tpw_rulesi mean it should be straightforward to reproduce?
16:55marcanyeah found it
16:55marcanI wasn't reserving memory for bootargs/etc
16:55marcanthat's actually kinda bad so yeah
16:55marcanworkaroundable downstream though
16:56marcanthanks for catching this :)
16:59mpshmm, got blank screen on mbp with latest merges to asahi kernel, probably have to upgrade u-boot also
17:00marcanif you are on t6000 and you did not upgrade back when the AIC2 binding changed then yes
17:11marcantpw_rules: pushed new installer & m1n1
17:11mpsno, I'm on t8103
17:13svenhmmm…. DisplayPort or thunderbolt now? :>
17:14Dcow[m]1display over thunderbolt?
17:15Dcow[m]1pretty please xD
17:15sventhat’s the final stage I guess :D
17:15mazsven: TB. you know you want it.
17:16marcansven: displayport first
17:16Dcow[m]1is it TB or USB4 btw?
17:16marcan(being nice here)
17:16maz(nobody needs a display, everyone needs a bunch of PCIe cards).
17:16marcanmaz: TB *includes* display!
17:16svennot sure tbh, there’s lots of references to a dpphy in the kexts that scare me
17:16marcanand you think atcphy will be easier? :p
17:17mazmarcan: let be rephrase that: PCIe over a long, thin wire.
17:17svenI mean… I can already switch the lanes to thunderbolt mode at this point
17:17marcanwhy not a long, fat wire?
17:18svenit’s “just” that their cio coprocessor and the pcie parts aren’t up
17:19svenI guess I’ll trace everything and connect a display and then some thunderbolt thing to see what requires more magic pokes
17:21marcansven: all the actual DP PHY stuff should be done by DCP
17:21the_lanetly_052 has joined #asahi-dev
17:21marcanlike the training etc
17:21marcankeep in mind there are kexts that are dupes of DCP functionality
17:22marcansince for some reason all the code to do it without DCP is also there
17:22svengood point
17:22svenlet’s what macOS does, maybe it’s really just setting up this DisplayPort crossbar thing
17:24svenatcphy itself is also fairly high level fwiw, most of what I needed to do was essentially enables some clocks, configure the lane modes, apply those tunables and switch what they call “PIPE handler” to the correct mode
17:24svenand sync that all to the correct place inside dwc3 ofc
17:25marcanyou mean for usb4 comms?
17:26marcanoh you mean 3
17:26sveneven for usb3, dwc3 and atcphy are interconnected
17:26svenpart of the atcphy regs are inside the dwc3 node e.g.
17:26Major_Biscuit has quit []
17:26sven(In the adt)
17:26marcanPIPE is the term for the back end of the USB3 PHY IIRC
17:26marcanit's like that ULPI thing for USB2
17:27marcanheh, right
17:27svenPIPE also contains the dwc3 reset bits and that final mux thing that decides usb2/3/4
17:27marcanwait usb*2* is muxed?
17:27svenapparently…
17:27marcanhow does that work?
17:27marcanit's a dedicated lane...
17:28svenI need to switch a register xnu calls something like “pipe handler mux mode” from what works for usb2 to what works for usb3 :/
17:28marcanbut both need to work at the same time...
17:28svenand I think usb4 is another setting there
17:28marcanotherwise hubs wouldn't work
17:28svenI know
17:28svenIt’s probably just mislabeled
17:29marcanmaybe usb2 is just 2-only, usb3 is both, and usb4 is 2+4-over-thunderbolt?
17:29marcanwhich basically means, as far as PIPE is concerned, usb2 means "null", usb3 means "usb3 PHY", and usb4 means "tunnel through TB"
17:30svencould be, there are strings about "cioTunnelMode" nearby
17:30marcanthat would make sense for a "pipe mux"
17:30svenyeah, that makes sense then
17:31sventhere's also a string about a "dummy PHY" related to usb2, so that would also fit
17:31svenone less "// TODO: WTF does this do" comment :D
17:31marcanso that's the digital mux in front of the USB3 host/device core
17:32marcanDcow[m]1: this answers your question, it's USB4, because that setting in that mux is precisely what USB4 is (that TB isn't)
17:33marcan(we knew it was USB4 already but this is the specifics)
17:35svenalso makes sense that it's tightly coupled to dwc3 then
17:35svenyou can't e.g. switch that mux when dwc3 is in softreset
17:35marcanit's literally in front of it so yeah
17:36marcanI do wonder if atcphy is a pure apple design, sounds like it might be
17:36marcanwhich is pretty cool if so (their PCIe stuff isn't)
17:36marcanbut I don't think anyone else other than intel has done a TB PHY so...
17:37sventhe exact sequence you have to do is "bring up usb2 phy (because dwc3 will never clear the softreset otherwise", "bring up dwc3", "bring up atcphy", "switch mux to usb3"
17:37marcanof all the phy-ish crap, I'm guessing Apple would have the most interest in NIHing this one
17:37marcanand yeah, the USB2 PHY is definitely something they licensed
17:38marcanit's the same silicon block copied and pasted in front of everything and it probably hasn't changed since like the iphone, modulo process changes
17:38marcansame thing's in front of the debug-usb too
17:38svenit's certainly all very interconnected. i can e.g. break the atcphy/pipehandler paer by issuing a port reset for the usb2 phy only
17:39sven(break as in requires a PMGR reset of atcphy and dwc3 to work again)
17:39sveni guess that reset messes up something inside dwc3 which then messes up the pipe part or something
17:40marcanSS/TB is probably the "atcphy" proper and ATC probably includes the TB/CIO/DWC3 bits
17:40marcanI also wonder about that unused USB3 2x1 core
17:41svenhm... weird
17:41marcan(it's in the schematics too)
17:41marcansame PHY too, which is interesting
17:41marcanprobably also atcphy then but just without using the non-USB modes?
17:41marcanthen again APCIE also looks the same, so I dunno
17:41marcananalog eludes me
17:42marcanwell, not quite the same, but similar
17:43marcanI really want a nice die shot of these things, but that's... a lot of money to spend on it :p
17:43ketteniswell, isn't PIPE supposed to be a converged USB3 and PCIe PHY?
17:44sven"The PHY Interface for the PCI Express*, SATA*, and USB* Architectures (PIPE) "
17:44marcanah right, it's converged, yeah
17:44marcanI thought it also reminded me of PCIe
17:47mpsanyone have kernel config with latest asahi branch where display and sound works
17:52j`eynot sure what happened with display, nothing should have changed there
17:56svenso just from skimming the code that three mode thing makes sense. the third one I didn't use yet seems to be related to some "cio tunnel"
17:57svenso i guess there's "connect dwc3 to dummy super-speed PHY" aka usb2-only, "connect dwc3 to USB3 phy" and "tunnel it all over USB4"
17:57mpsj`ey: it works for you?
18:00svenand those two lines here https://github.com/AsahiLinux/m1n1/blob/main/src/usb.c#L128 actually set up what probably is that "usb2-only" mode :)
18:02svenand https://github.com/AsahiLinux/m1n1/blob/main/src/usb.c#L131 really only wants to enable that "dummy PHY"
18:02m6wiq has joined #asahi-dev
18:09marcansven: is the 22 thing two lanes?
18:11marcanfirst it sets it to 2 then 22
18:11sventhe low 2 is some clock enable, the high 2 selects the mode (or the other way around)
18:11marcanah, fair
18:11svenand it really hates you if you do both at the same time :D
18:11marcanwonder if the lanes are done at a lower layer then or what. I guess it depends on how that 2x2 bonding thing works
18:12marcanalso shouldn't there be delays in there if timing really matters? or maybe it just has to have a trivial delay?
18:12sventwo strs just after another work fwiw
18:12marcanheh, fair
18:12svenxnu also doesn’t have an additional delay in between
18:13sventhe lanes are configured inside atcphy
18:13svenpart of that is tunables, and then there are two or three registers
18:13marcanI guess aggregation happens inside the PHY then
18:13marcananyway, I should sleep
18:14marcanlet's see if I can tick off a bunch of things off that TODO list tomorrow
18:14marcanI want to release on the 17th :p
18:14svenGoodnight!
18:14svenThat’s still plenty of time :P
18:14marcanabout 45h if I want to make it in time for JST :p
18:15svenyou’ll probably also need a blog post or something to go along with it!
18:47___nick___ has joined #asahi-dev
18:52the_lanetly_052 has quit [Ping timeout: 480 seconds]
19:59gladiac has quit [Quit: k thx bye]
20:34svenalright, the atcphy stuff still needs some more cleanup but i'll push it tomorrow. if someone is bored and wants to help until then: I still need to track down the fuse locations for the other t8103 and the nodes+fuses for all t6000 phys.
20:35sventhey are in AppleT8103TypeCPhy::performEFuseProgramming. just guessing them from HV+serial output is going to be hard since they are just bits inside a u32. here's how the one phy I have looks like https://f.svpe.de/178c18c473b504077492d9bdc7acfa70224467c1dd13c3698945ee0484cde7f5_t8103-atcphy.txt
20:35sventhe other phys all don't need the cio3pll_dll_start_capcode_workaround
20:36svenbedtime for me as well then!
20:44m6wiq1 has joined #asahi-dev
20:45m6wiq has quit [Ping timeout: 480 seconds]
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:21Mary has quit [Quit: The Lounge - https://thelounge.chat]
21:21Mary has joined #asahi-dev
21:23m6wiq1 has quit []
21:24Mary has quit []
21:27Mary has joined #asahi-dev
23:43ChaosPrincess has quit [Remote host closed the connection]
…