2023-01-14
00:02cylm has joined #asahi-dev
00:25chadmed_ has quit [Remote host closed the connection]
00:47hertz has joined #asahi-dev
00:50bps2 has quit [Ping timeout: 480 seconds]
00:54hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:08seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:09seeeath has joined #asahi-dev
01:18marcanj`ey: I do pull via github sometimes, if the stars line up and there wasn't a rebase along the way
02:00DragoonAethis has quit [Quit: hej-hej!]
02:00DragoonAethis has joined #asahi-dev
02:19derzahl has quit [Remote host closed the connection]
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
03:18amarioguyi always love reading about the system so it's a good refresher for me in either event
03:22amarioguy> The kernelcache is paired to one - and only one - OS snapshot. You cannot drop in a kernelcache from Filesystem A and boot Filesystem B with it - not the kernelcache that's paired to the snapshot (it *is* paired to the apticket which includes the snapshot hash but that's distinct and part of standard img4 protections)
03:24amarioguyso for all intents and purposes yes it is paired but you can still technically run a 12.4 kc on a 12.3 sealed volume and have it work
03:25nicolas17"On Apple Silicon machines, the SEP generates a Volume Encryption Key and xART for every APFS volume." what is a xART?
03:29chadmedthe goal here is to provide enough info for a user to not need to ask "will apple ban asahi"
03:31amarioguyi would prefer "keybag" but that's apple specific terms so yea you can basically say that
03:31nicolas17like, VEK is not *explained* either but you do expand the acronym the first time, and I can guess what a "Volume Encryption Key" is for, so that's enough
03:35tpw_rulesthat's the thing i don't ultra love about instantaneous enablement, there's no way to actually entirely regenerate the key material
03:36marcantpw_rules: AIUI you can pass in tweak keys per NVMe operation, so if you want that kind of layer you could add it on top and support progressive re-encrypt like LUKS does
03:37marcan(I've been advised not to advocate it for firmware updates for macos-less Asahi installs)
03:38marcanwe should figure out the proper SFR update ramdisk stuff some day, after we have some semblance of APFS and nvram support
03:38tpw_ruleschadmed: i would appreciate adding the point about DFU wipe destroying the disk encryption keys for those interested
03:38nicolas17"kernel_task is a process to protect your computer from over heating. When heat increase drastically, the kernel_task process is launched by MacOS with high priority to decrease decrease heat generated by the CPU." *dies of cringe*
03:39marcanalso if needed you can use recoveryOS to install macOS on an external disk and then use that for further rescue
03:39marcan(we should *also* support full external Asahi installs some day, we just need a Rust xHCI+USBD implementation)
03:40tpw_rulescause it would be dumb not to and you can swap around the m1 studio modules is i guess how you have intuited that
03:40marcanmy assumption has been that the entire NVMe is encrypted at some layer, but I don't know where
03:42amarioguyhttps://support.apple.com/guide/security/protecting-keys-in-alternate-boot-modes-sece49ec4098/web
03:43amarioguy> This is achieved by introducing an additional seed bit whose setting governs the ability to access the media key, which itself is needed to access the metadata (and therefore contents of all files) on the data volume encrypted with Data Protection
03:43nicolas17"When stored, the encrypted file system key is additionally wrapped by an “effaceable key” stored in Effaceable Storage or using a media key-wrapping key, protected by Secure Enclave anti-replay mechanism. This key doesn’t provide additional confidentiality of data. Instead, it’s designed to be quickly erased on demand (by the user with the “Erase All Content and Settings” option"
03:44marcanactually I probably am, because SEPOS is in NVMe and I don't think they'd store that outside SEP?
03:48nicolas17"The basic classes and policies are described in the following sections. Apple silicon-based Mac computers don’t support Class D: No Protection, and a security boundary is established around logging in and out"
03:49amarioguy> NSFileProtectionNone: This class key is protected only with the UID, and is kept in Effaceable Storage.
03:50chadmedyeah the KEK is unwrapped with your account password if im reading apples docs correctly
03:51nicolas17where does my language setting, my user account profile picture, and other stuff seen in the login screen come from? :D
03:53nicolas17I know pre-login stuff on iOS (like the lock screen wallpaper) is exactly what the class D key is for
03:54amarioguyi guess for more security? i mean anything encrypted with D key is for the most part in the clear
03:54mini0n has joined #asahi-dev
03:55nicolas17class F: "The behavior of this protection class is the same as Class D, except the key isnʼt stored in any persistent way. This protection class is suitable for temporary files that arenʼt needed after rebooting the device, such as a virtual machineʼs swap file."
03:58amarioguychadmed: The tooling signs the resultant binary, and tells the SEP that it is allowed to boot it as the kernelcache for our APFS container. - slight revision - it's sep that signs it not bputil itself
03:59chadmed"The SEP signs the resultant binary, and enrolls it as the kernelcache for our APFS container."
04:00derzahl has joined #asahi-dev
04:03marcanalso I just realized the i2c unjam machine was being disabled by the pasemi driver (it's enabled by default but it was clearing that bit...)
04:03marcanenabling that; doesn't explain the i2c failures but explains why they can never recover sometimes
04:05hertz has joined #asahi-dev
04:06chadmedthere were a couple of changes to asoc dpcm/dai code but nothing that _should_ cause what we're hearing
04:12amarioguy_ has joined #asahi-dev
04:14amarioguy_marcan: my bad for making the whole secure boot joke I honestly forgot briefly about the whole licensing issues and how seriously you take them
04:22amarioguy_ has quit [Remote host closed the connection]
04:23marcanwhen you have natural scrolling enabled, the volume icon in KDE turns down when you scroll up, and vice versa
04:24marcanhttps://bugs.kde.org/show_bug.cgi?id=442379 https://bugs.kde.org/show_bug.cgi?id=442789 already reported
04:27amarioguy_ has joined #asahi-dev
04:34amarioguy_ has quit [Remote host closed the connection]
04:51nicolas17I think those things, and tab bars, etc. shouldn't move at all with a trackpad... it makes sense for a scroll wheel
05:04eiln has joined #asahi-dev
05:17mini0n has quit [Quit: Leaving]
05:28eilnverified pretty much all mainstream classification models (resnet*, mobilenet, inception, etc.)
05:31marcandammit and here I thought ANE was going to be on my back burner forever, it's what i've been telling people :p
05:33marcan(meanwhile I hear lina is doing GPU compute today, so maybe that'll cover the training side? :p)
05:35eilnhavent got to benchmark anything yet but i do see it being useful for general linalg passes
05:42marcanyeah, makes sense (though we already have a fancy scaler block for that, once someone figures *that* out)
05:59balor has quit [Quit: balor]
06:00balor has joined #asahi-dev
06:09nicolas17 has quit [Quit: Konversation terminated!]
06:09chadmedelin: congrats! very impressive getting this far in what feels like no time at all really
06:15chadmedeiln: thanks :) as soon as we get that second PCM exposed for V/I readings we can start enabling devices!
06:19eilnmarcan: actually DCT/DST transforms seem very doable, let me see if i can some up with a temporary jpeg/scaler block for the meantime ;)
06:19chadmedmakes sense re efficiency of the ANE. it's mostly used in the iphone for background image processing for things like text search indexing and post processing, neither of which need to be blisteringly fast
06:20chadmedid rather the phone not get hot when its tagging images for "monkey dancing on a bouncy ball"
06:41hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:59eilnthe speed numbers are pretty mediocre, considering they do a repo's worth of surgery on top of their closed-source framework
07:00eilnthey repetitively emphasize power consumption though, "executing on a device that is orders of magnitude more energy-constrained"
07:02chadmedmakes sense to me, its like how they had crap raw perf gains going from Firestorm to Avalanche so for the first time literally ever went "uhh yeah we're faster than qualcomm actually"
07:02eilnCPU layers are fallback for passes their compiler hasn't implemented yet lol not because it's more efficient or whatever
07:02eilne.g. Hardswish function in MobileNetV3 isn't implemented, so it goes NPU --deswizzle--> CPU Hardswish --reswizzle--> NPU, quadrupling the time from MobileNetV2 which is fully NPU
07:19hertz has joined #asahi-dev
07:25balor has quit [Quit: balor]
07:25balor has joined #asahi-dev
07:43SSJ_GZ has joined #asahi-dev
07:53leitao has joined #asahi-dev
07:55leitao has quit []
08:19eiln has quit [Quit: Page closed]
08:23hertz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:55capta1nt0ad has joined #asahi-dev
08:56dottedmagchadmed: Very nice writeup. Is there another place that grounds the terms used in it to the actual bits? I'm looking for something like "per-container boot polices are files this and that on partition foo" and "blessing means creating a signature using this key over hashes of these files and storing it in here"
09:05tim has joined #asahi-dev
09:06tim is now known as Guest1321
09:07capta1nt0ad has quit [Ping timeout: 480 seconds]
09:07chadmeddottedmag: the glossary should have some of that stuff, if theres stuff missing ill add it
09:12kujeger has quit [Ping timeout: 480 seconds]
09:16dottedmagchadmed: To use these examples: blessing is not in glossary, and boot policy is mentioned in SEP article, but not on its own. More important, glossary says "what thing is", not "where do I find it when I look at the system, and what does it contain"
09:26capta1nt0ad has joined #asahi-dev
10:04bps2 has joined #asahi-dev
10:19kujeger has joined #asahi-dev
10:26chadmedanother huge dub for audio quality and efficiency: pipewire has been fixed to accept multiple IRs at multiple sample rates to cut down on resampling, which introduced some really gnarly artefacts (and cost way too much cpu time)
10:27chadmedthe compressor is still an enormous cpu hog but i dont think we really have a way around that if we would like to preserve our speaker cones :/
10:35dsharshakov has joined #asahi-dev
10:36dsharshakovchadmed: glad to be helpful ;)
10:37chadmedi had to revert one of wim's commits to test it, he broke spa arm cpu detection with some bad pointer logic
10:37dsharshakovHow much more efficient is the pipeline on macOS? Maybe the task cannot be more efficient
10:38chadmedso the problem right now is that we dont have a psychoacoustic bass plugin to cut down on how much we need to move the cone
10:38chadmedapple cut out most of the "real" low end and turn it over to funky biquad harmonics, which means they dont need the same ridiculous multiband compression setup i have right now to tame down the low end at high input volumes
10:39dsharshakovRe arm detection: already has an MR. Likely will be pending till Monday. Let's find out who will be the commiter #10000r
10:39dsharshakovUnderstood the compressor thing
10:39dsharshakovWell
10:39chadmedwhen i use just a normal blanket compressor to limit the volume for clipping/safety reasons, the cpu cost is about identical to macos
10:40dsharshakovI might take a look at lv2 host and module loading, maybe something to optimize there or inside lsp itself
10:40chadmedi imagine it would be the plugin itself rather than the host, its just a very costly operation especially with lookahead
10:41dsharshakovWhat does the psycoacoustic bass thing really do? Maybe capture its in/out somehow to understand what is the synonym for it
10:41sventpw_rules: / marcan: ANS can take a aes-xts key for each read/write command in that TCB structure. that key can (must? didn'ttest yet) be entangled by SEP. so you essentially send the encrypted keybag to SEP, SEP authenticates it and then gives you back the entangled volume key that you pass to ANS
10:41sveneach reboot changes that entangling ofc so that you can't just grab the key once and keep using it forever
10:42chadmedwould you believe me if i said i have done this without any macos RE, i just know vaguely what it does :P
10:42dsharshakovI would for sure
10:42dsharshakovMaybe Calf Studio bass enhancer would help?
10:43dsharshakovNot at PC rn, will explore later
10:43jluthra has quit [Remote host closed the connection]
10:44jluthra has joined #asahi-dev
10:44chadmedi dont really want to introduce any more runtime dependencies tbqh. im more than happy with the sound quality without the fake bass (in fact, it sounds better than macos right now), its just the cpu use that kinda blows
10:44dsharshakovchadmed: when possible, please respond to pv on the PipeWire issue about IR resampling quality: maybe some fix could be done there as well (for other use cases)
10:45dsharshakov:+1: thanks
10:45dsharshakov has quit [Remote host closed the connection]
10:55jannausven: is there a reason why the nvme_disable in apple_nvme_reset_work() is done before (re-)starting rtkit?
11:10SSJ_GZ has quit [Read error: No route to host]
11:13landscape15 has joined #asahi-dev
11:14mpschadmed: interesting thing found: with kernel 6.2-rc3 and playing sounds on jack, with alsamixer when switching in headphone playback mux to secondary and back to primary sound distortion disappears
11:16marcanmps: https://joeysturgistones.com/blogs/learn/the-beginners-guide-to-multi-band-processing
11:16chadmedmarcan: sounds (and feels) like they cut down the fundamentals. its what youd normally do with such tiny speakers to stop precisely the issue we're having
11:17chadmedmps: yeah the problem is definitely in the kernel. wouldnt surprise me if its asoc doing something silly with the frontend channels and their relationship to tdm slots in the backend
11:18jannauthe only signigficant difference I see with cs42l84 codec tracing is that PLL_LOCK_STATUS changes from 0x10 to 0x30
11:18mpschadmed: could this in dmesg output be related: 'tas2764 3-003c: Unable to sync registers 0x1-0x4. -6'
11:19chadmedmps: no thats the speaker codecs not suspending properly because of shared gpio nonsense
11:19chadmedmy PR against asahi-wip fixes that for tas2764 but supposedly still doesnt work for tas2770
11:22landscape15_ has joined #asahi-dev
11:24chadmedmps: https://github.com/chadmed/linux/commits/snd-pm-v2 i need to rebase this on the latest asahi-wip but those three commits should apply cleanly to asahi and asahi-wip
11:25landscape15 has quit [Ping timeout: 480 seconds]
11:26landscape15 has joined #asahi-dev
11:27chadmedneed to figure out whats going on with the codec now still but that one might be beyond me atm
11:28mpshm, I noticed that I from time to time have to renew DHPC params from my cable link provider
11:30landscape15_ has quit [Ping timeout: 480 seconds]
11:36landscape15 has quit [Ping timeout: 480 seconds]
11:48chadmedso someone else reported that it still breaks if nothing's been played through the speakers before suspend is attempted too
11:55chadmedthat would mean the only way to fix this consistently is to march back into the shared gpio bike shed
11:56chadmedbut i have a feeling its something that got changed in core asoc code that handles tdm slot allocation on driver initialisation
12:09Guest1321 has quit [Quit: Guest1321]
12:33landscape15 has joined #asahi-dev
12:35landscape15 has left #asahi-dev [#asahi-dev]
12:51chadmed_ has joined #asahi-dev
12:52sah4ez has joined #asahi-dev
12:54SSJ_GZ has joined #asahi-dev
12:58sah4ez has quit [Read error: Connection reset by peer]
13:27mini_ has quit [Quit: ZNC closing...]
13:27mini_ has joined #asahi-dev
13:37landscape15 has joined #asahi-dev
13:42landscape15 has left #asahi-dev [WeeChat 3.8]
13:43landscape15 has joined #asahi-dev
13:56capta1nt0ad has quit [Remote host closed the connection]
14:00landscape15 has left #asahi-dev [WeeChat 3.8]
14:03SSJ_GZ has quit [Remote host closed the connection]
14:04SSJ_GZ has joined #asahi-dev
15:04landscape15 has joined #asahi-dev
15:07tim has joined #asahi-dev
15:07tim is now known as Guest1344
15:10sah4ez has joined #asahi-dev
15:11landscape15 has quit [Quit: WeeChat 3.8]
15:15sah4ez has quit [Remote host closed the connection]
15:32faruk has joined #asahi-dev
15:42derzahl has quit [Remote host closed the connection]
16:12roxfan has quit [Ping timeout: 480 seconds]
16:14flying_sausages has quit [Ping timeout: 480 seconds]
17:00bps2 has quit [Ping timeout: 480 seconds]
17:03c10l has quit [Quit: Bye o/]
17:06c10l has joined #asahi-dev
17:14bps2 has joined #asahi-dev
17:26roxfan has joined #asahi-dev
17:29bps2 has quit [Ping timeout: 480 seconds]
17:34mini0n has joined #asahi-dev
17:52bcrumb has joined #asahi-dev
17:58faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:04bcrumb has quit [Ping timeout: 480 seconds]
18:12povikchadmed: can you give a summary of the jack distortion issue? between which tags it appeared?
18:29jannauonly difference I see in a codec trace is a couple of additional "REG: W.8 CCM_CTRL1 = 0x0 (MCLK_SRC=0(RCO), MCLK_FREQ=0(F_12MHZ))" writes
18:32jannaumps said switching the headphone playback mux to secondary and back to primary fixes the distortion (without pipewire/pulseaudio). on j375 with pipewire running that doesn't fix the distortion
18:35j`eypovik: there's also this i2c-apple 23501c000.i2c: Bus stuck, status 0x13090100, https://pbot.rmdir.de/UppmruSWPIzAMsOUMpCtag
18:38faruk has joined #asahi-dev
18:41systwi has quit []
19:05lewurm`` has quit [Read error: Connection reset by peer]
19:05lewurm has joined #asahi-dev
19:05poviksurprising there isn't any similar issue with the cs42l42 driver since the structure with regards to clocking is roughly the same
19:31WindowPa- has joined #asahi-dev
19:35WindowPain has quit [Ping timeout: 480 seconds]
19:51leitao has joined #asahi-dev
19:52leitao has quit [Remote host closed the connection]
19:59leitao has joined #asahi-dev
19:59leitao has quit [Remote host closed the connection]
20:21c10l has quit [Read error: Connection reset by peer]
20:21c10l has joined #asahi-dev
20:21seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:23seeeath has joined #asahi-dev
20:23faruk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:24seeeath has quit []
20:25faruk has joined #asahi-dev
20:31joske has joined #asahi-dev
20:32joskechadmed: your snd-pm-v2 latest version applies cleanly to asahi-wip and R channel is working after resume!
20:36mkurz has joined #asahi-dev
20:38joske has quit [Quit: Leaving]
20:39seeeath has joined #asahi-dev
21:07seeeath has quit [Quit: Textual IRC Client: www.textualapp.com]
21:09faruk has quit [Quit: Textual IRC Client: www.textualapp.com]
21:26irth has quit [Remote host closed the connection]
21:26irth has joined #asahi-dev
21:26irth has quit [Remote host closed the connection]
21:44amarioguy has quit [Remote host closed the connection]
21:56Guest1344 has quit [Quit: Guest1344]
22:12joske has joined #asahi-dev
22:12joskechadmed: well the base kernel is different. On top of asahi branch it still doesn't work. On top of asahi-wip it does.
22:20joske has quit [Quit: Leaving]
22:25elvishjerricco has joined #asahi-dev
22:29hertz has joined #asahi-dev
23:08flying_sausages has joined #asahi-dev
23:13Droop has quit []
23:13faruk has joined #asahi-dev
23:14Droop has joined #asahi-dev
23:25balor has quit [Quit: balor]
23:25balor has joined #asahi-dev
23:30WindowPa- has quit [Quit: ZNC 1.8.2 - https://znc.in]
23:30WindowPain has joined #asahi-dev
23:33liszt has quit []
23:34liszt has joined #asahi-dev
23:39SSJ_GZ has quit [Ping timeout: 480 seconds]
23:48derzahl has joined #asahi-dev
23:56cy8aer has joined #asahi-dev
23:58cy8aer has quit [Remote host closed the connection]
23:58cy8aer has joined #asahi-dev