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:53tpw_rulesmarcan: has the ESP property made it into a released version of m1n1 yet? i don't see it on my system
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:24marcantoday is the deadline, but it looks like they'll extend it due to the overload... which has apparently been going on since yesterday
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: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: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: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:04firefox317j`ey, is it? its not in marcan s blockers list :)
09:07firefox317okay, well as long as it is known its good.
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:19chadmedgrub appends BOOT_IMAGE to the kernel command line, and other userspace stuff sometimes make use of the kernel command line too
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:29Major_Biscuit has joined #asahi-dev
09:29chadmedtheyd be even larger if i left them unconstrained or if the card supported a higher native sample rate
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: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: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: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: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: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: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:48chadmedand at that point your only issue would be hiding access to the "real" sink for cases where it's warranted, like ours
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
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:15chadmednope ive been running on povik's branch because linux-asahi wont build with clang now (something about movz/q)
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: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:26shenki has joined #asahi-dev
11:29hizon has quit [Remote host closed the connection]
11:33povikchadmed: looks good! only put there more realistic card name like "Macbook Pro J314/6 Audio" in place of "j314s-macaudio"
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:40chadmedpovik: pipewire treats them as independent nodes. what we'd be "hiding" is a pipewire node, not the entire hardware device
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:45marcanhttps://github.com/archlinuxarm/PKGBUILDs/commit/ef561cb0102aa8f0c788dfd73fee34808780f8cf wonder if that had anything to do with it
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: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: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
12:06kettenisin OpenBSD we call these private malloc implementations "vulneravility mitigation countermeasures" ;)
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: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: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:43marcancan someone running a 4K kernel try building this: https://github.com/AsahiLinux/alarm-PKGBUILDs/commit/c2459a0ae6fc04b7fe98bb04f10795248eca949b
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: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"
13:21_jannau_marcan: re xkb did you see https://who-t.blogspot.com/2020/09/no-user-specific-xkb-configuration-in-x.html
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: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:02yuyichao has joined #asahi-dev
14:06kettenisbut maybe there is someone with a german or french keyboard here running linux who can check the country code in sysfs?
14:11marcanhttps://gist.github.com/ThomasKaiser/24a88bec8e6749bbc723cd6f6e78a3ab has kblang-calibration as german but country as ISO
14:12marcanhttps://raw.githubusercontent.com/ThomasKaiser/Knowledge/master/media/ioreg-MacBookAir10.txt says bopomofo, but country is set to ANSI
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
15:50ChaosPrincesskettenis isn't it the other way around? i thought pmuch every laptop had kb attached to usb bus
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: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: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:15bluetail[m]look
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:19bluetail[m]I havent seen a single gen 2x2 device though except for pcie cards
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:23svenJamie[m]1: huh, and that thing is just 20 eur. i would've expected these things to be more expensive
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: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: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: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: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: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: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:40LuigyLeon[m]nice :)
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: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:48marcanthat's very weird though because obviously the ADT gets passed through or everything would explode
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:53marcanlikely something clobbers the bootargs between when m1n1 loads and the python stuff loads
16:59mpshmm, got blank screen on mbp with latest merges to asahi kernel, probably have to upgrade u-boot also
17:19svenI guess I’ll trace everything and connect a display and then some thunderbolt thing to see what requires more magic pokes
17:21the_lanetly_052 has joined #asahi-dev
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:26Major_Biscuit has quit []
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:29marcanwhich basically means, as far as PIPE is concerned, usb2 means "null", usb3 means "usb3 PHY", and usb4 means "tunnel through TB"
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: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: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: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:39sveni guess that reset messes up something inside dwc3 which then messes up the pipe part or something
17:43marcanI really want a nice die shot of these things, but that's... a lot of money to spend on it :p
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"
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: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: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: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]