marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | Not ready for end users / self contained install yet. Soon. | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-stream #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
joske has quit [Remote host closed the connection]
jbowen has quit [Ping timeout: 480 seconds]
aleasto has quit [Quit: Konversation terminated!]
<povik> yeah, that's right, i meant MIXER knob on the low-level audio card
<povik> anyway i may have found where the i2c issues lie
andi-[m] has left #asahi [#asahi]
<j`ey> povik: ooh
<povik> hm?
<povik> oh, the i2c issues
yuyichao_ has quit [Ping timeout: 480 seconds]
<povik> the codec may be upset because it transitions to an external MCLK clock before it
<povik> * it's ready
<povik> (the clock)
<povik> reading the datasheet it looks like that can spill over to failed register accesses
<povik> patch here: https://tpaste.us/5nly
<povik> maybe this helps
<povik> i should really let it go for today
jbowen has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
yuyichao_ has joined #asahi
skipwich has quit [Quit: DISCONNECT]
skipwich has joined #asahi
phiologe has joined #asahi
PhilippvK has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
kov has quit [Quit: Coyote finally caught me]
kov has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
marvin24 has joined #asahi
marvin24_ has quit [Ping timeout: 480 seconds]
qeeg_ has joined #asahi
qeeg has quit [Ping timeout: 480 seconds]
user982492 has joined #asahi
kenzie35 has joined #asahi
vx^ has joined #asahi
bpye6 has joined #asahi
yuyichao has joined #asahi
al3xtjames1 has joined #asahi
al3xtjames has quit [Quit: Ping timeout (120 seconds)]
aead has quit [Quit: ZNC - https://znc.in]
kenzie3 has quit []
al3xtjames1 is now known as al3xtjames
vx has quit [Quit: :)~]
bpye has quit [Quit: Ping timeout (120 seconds)]
aead has joined #asahi
yuyichao_ has quit [Remote host closed the connection]
bpye6 is now known as bpye
jbowen has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
<Glanzmann> rkjnsn[m]: Thank you. Did not notice,
<Glanzmann> povik: I try your patch now.
<Glanzmann> povik: Without the patch and rkjnsn[m] it works. I switched the sound card and plaed on the 'knob': https://tg.st/u/screenshot-air-2022-01-20-08_03_03.png
<Glanzmann> Now I try your patch.
<Glanzmann> povik: With the patch the system feels faster, I had the feeling that it was hanging before. Sound works. Here is the dmesg: https://pbot.rmdir.de/yvxoM7hZr_BQ8_H_ezhhfg
<Glanzmann> The sound was working without modifying the knob after the reboot and it was a little bit loud. So I had move the volume down. The volume and mute keys work.
<Glanzmann> povik: Thank you for your patch and sound support.
<Glanzmann> Updated https://tg.st/u/asahi.txt if that is still someone using.
joske has joined #asahi
<joske> Glanzmann: which machine?
<Glanzmann> joske: Sound support works for me with this patch from povik: curl https://tg.st/u/5nly | patch -p1
<Glanzmann> joske: m1 air.
<joske> for me the patch doesn't work (well, I hear no audio)
<Glanzmann> joske: I had to start alsamixer, press f6 select the second card from top.
<Glanzmann> and moved the first two controls all the way up.
<joske> ah let's try that
<Glanzmann> joske: I tested with mpv via pulseaudio and an mp3. I heard for several mintues.
<joske> I used the pulseaudio mixer
<Glanzmann> joske: I did this at first, too. After the reboot sound was working out of the box. But I think the first time you have to move these two.
<Glanzmann> joske: First knob is enough. Documented that under tripwires.
<joske> after setting the volume, reboot?
<joske> because I still hear nothing
<Glanzmann> joske: Nope.
<Glanzmann> joske: Do you see this control: https://tg.st/u/screenshot-air-2022-01-20-08_03_03.png ?
<joske> yes
<Glanzmann> and you moved the first control up?
<joske> yes
<Glanzmann> also check pavucontrol that the right card is selected.
<joske> the 2 first, the others don't move
<Glanzmann> and use mpv to play a sound or so.
<joske> gotta go help get the kids ready for school brb
<mps> Glanzmann: that is why I don't use such things like pulseaudio/pipewore/systemd and other 'smart' solutions. these are not solutions but are the problem
<mps> I use plain alsa fpr audio
<mps> (perfection is not when you don't have anything more to add but when you don't have anything more to remove - ascribed to Leonardo da Vinchi)
<joske> mps: you're the one that uses fvwm? ;-)
<mps> Glanzmann: would you mind to post your kernel config to me, I would like to compare or build straight with your config
<mps> joske: no, this one is Glanzmann, I use awesome wm (similar window managers to some degree)
marvin24_ has joined #asahi
<joske> well if you use debian it makes sense that you use some ancient WM ;-)
<mps> joske: no, I use alpine linux
<joske> I meant Glanzmann
<joske> alpine linux user are also a special bunch I'd say
<mps> joske: :-)
<joske> I used to run gentoo, but that got tiring very quickly
<mps> joske: what then are your thoughts about alpine developers ;)
<joske> well, I think they are a knowledgable bunch, alpine fills a specific need very well
<joske> but it's not a desktop OS
<joske> very useful for docker
marvin24 has quit [Ping timeout: 480 seconds]
<mps> joske: I use it as desktop for more than 3 years (also my daughter use it as desktop) and there are a lot of other people
<joske> yes, like I used fvwm in 1996 ;-)
<joske> you *can*
<mps> joske: postmarketOS is is distro for phones and tablets and it is based on alpine
<joske> I only ever ran it in containers, never actually installed it on hardware
<joske> mps: sure, it's a lite base OS
<mps> joske: nowadays it has kde, gnome and other similar things, which I don't like to have on alpine repo but I lost this batle where I was fighting against adding these
<joske> povik: My system seemed to freeze during playing with alsamixer
<joske> povik: and there are errors related to sound in dmesg: https://paste.debian.net/1227763/
<joske> mps: hahaha, not everyone is comfortable using tiling window managers
<mps> joske: what says `cat /proc/asound/cards` on your machine
<joske> mps: [jos@air ~]$ cat /proc/asound/cards
<joske> 0 [audio ]: simple-card - MacBook integrated audio
<joske> MacBook integrated audio
<mps> joske: and do you use air or pro
<joske> air
<mps> joske: and this is only with povik patch on top of latest asahi kernel?
<joske> yes (and the input patch, otherwise no keyboard/mouse)
<mps> yes, already added this one
<mps> going to rebuild with povik patche on pro
<joske> let me try a reboot
joske has quit [Remote host closed the connection]
joske has joined #asahi
<joske> hmm, now alsamixer first channel always falls back to 26
<joske> and second one stays put at 192
<mps> hmm, no luck with patch
<mps> still no card activated
jbowen has joined #asahi
<mps> joske: could you post your kernel config to me, please
<joske> sure
<mps> probably I made mistake somewhere
<mps> joske: thanks
jbowen has quit [Ping timeout: 480 seconds]
joske has quit [Remote host closed the connection]
joske has joined #asahi
<joske> disabled pulseaudio and reboot and now I have sound via audio jack :-)
<mps> joske: heh nice (I told pulseaudio is problem not a solution :-) )
<joske> well I haven't had any problem with it until now
<marcan> pulseaudio is kind of required for a smooth audio experience these days (e.g. automatic jack/speaker switching) and we're going to have to build something around that for speaker EQ... but there's also PipeWire which I very much look forward to using
<marcan> so maybe I'll focus on PW first :)
<joske> marcan: for me there is only 1 thing stopping me from using asahi as daily driver: 4k pages support so I can use vs code
<joske> battery indicator and sleep would be nice though ;-)
<marcan> battery indicator I might make work in a stream starting in a few minutes, after I finish eating a snack ;)
<marcan> sleep... that's a much longer term problem :p
<joske> marcan: yay :-D
<joske> sleep not such a big deal, it boots fast enough
<joske> shutdown would be nicer I'd say
<marcan> shutdown should be easy
<joske> :-)
<marcan> also, I'd like to hear about what kind of battery drain rate people get with an up, but idle system, especially with no userspace processes waking things up (powertop etc)
<marcan> macOS can do insanely well there
<marcan> and I want us to be the same, but that will take some polishing
<joske> well with Xorg taking 50% cpu all the time...
<marcan> all the time? even when not doing anything?
<joske> yes
<ChaosPrincess> joske: boots fast if you set asahi as primary, but otherwise the stock macos boot picker is super slow
<marcan> that sounds like a bug
<marcan> like some app is rendering something at full blast or something
<joske> can try to kill firefox
<marcan> that's another big thing: getting battery life to be as good as macOS, partially, means policing userspace and fixing that kind of nonsense
<marcan> I want to build per-process power stats stuff like macOS has some day
<marcan> ideally display-off idle should be not much worse power consumption than true sleep mode
<joske> yes still 50% on 1 core, with just hexchat and a few terminals open
<marcan> on macOS I get like 1% battery drain per hour with the OS up and an active SSH session printing stuff every minute
<marcan> which is excellent
<marcan> (I don't think any intel system can do that)
<marcan> but that's only ever going to work if the userspace UI isn't doing dumb things
<joske> the battery life is quite nice despite the 50% xorg
<marcan> yeah
<marcan> also consider you're running at 2GHz right now, still need to rewrite the cpufreq patches
<joske> but as there's no battery indicator I can't really say
<marcan> pcores can go up to 3.2GHz
<joske> I think I'm running with 3GHz
<marcan> ah, you changed something?
<joske> can I check that?
<joske> I used a patch posted here
<marcan> if you're using stock m1n1 and nothing special in the kernel, everything is at 2GHz
<marcan> if you patched m1n1 it can be 3, yes
<povik> joske: in the dmesg it looks like your system tries to suspend. that could be the freeze and hopefully that's not related to audio stuff
<joske> povik: it's working now
<povik> as to why you had to disable pulseaudio, i don't know
<marcan> I just picked 2GHz as a nice "faster than low, but not full blast" point, that also happens to make the e-cores and p-cores about ~equal in frequency
<joske> well it's still early days
<marcan> but that shouldn't matter much once cpufreq is done
<povik> my hunch is that it was the reboot that helped, and communication with cs42l83 is simply still not reliable
<j`ey> marcan: stream 3 days in a row :o
<marcan> j`ey: I spent >2 weeks without one!
<marcan> gotta catch up!
<j`ey> marcan: :-)
<Glanzmann> joske: Yes, I use fvwm Since 1994 or so. https://tg.st/u/.fvwm2rc
<joske> marcan: I had yesterday's stream all day in the background during work :-)
<marcan> nice :)
<marcan> hopefully today should be a bit more productive, that GPIO reversing was much more of a rabbit hole than I expected
<joske> I was hoping for battery/sleep/shutdown :-)
<marcan> leave it to apple to have weird half-broken API abstractions :p
<j`ey> battery should be a lot simpler, just reading some integer keys hopefully
<marcan> yeah
<marcan> also I should add a debugfs for this to just read keys
<joske> I am co-maintainer of btop (like top), so the SMC stuff interests me
<joske> I thought there was no SMC on m1
<marcan> it's embedded
<marcan> I imagine you're also interested in PMP?
<marcan> that's the in-SoC power monitor coprocessor
<joske> my code that reads the SMC for temperature doesn't work (macOS)
<marcan> SMC deals more with out-of-SoC measurements
<joske> so I resorted to CoreFoundation to read the temperature
<joske> which is totally nuts, the keys don't seem to match
<joske> and there are dies with negative temperature
<marcan> https://mrcn.st/p/Vqx8k9YF here's a dump from the m1pro mbp, fwiw
<marcan> do note that some keys are endian-reversed for who knows what reason
<joske> aha the TC keys are there
<joske> when I use the SMC api on m1 (macOS) it just doesn't return any value for those
<joske> never tried other keys so I assumed there just wasn't any SMC
<joske> ah but they are slightly different
<j`ey> SBAS = (flt , 0x85) 100.0
<j`ey> 100% charged!
<marcan> it's plugged in since yesterday ;)
<joske> on intel macs, it's TC0c for temp of cpu 0
<marcan> joske: there is some key-meaning mapping in a dylib somewhere
<marcan> not complete though
<joske> I'd be very interested in that
<marcan> let me take a quick look, see if I can dump it
<joske> marcan: that would be great, thx!
<j`ey> VBUS = (ui32, 0x94) 1
<joske> If I can use SMC API on m1 too would be better that this CF mess
<joske> you never know which things you have to CFRelease etc
<marcan> heh, foiled by 7-zip dmg extraction issues... sec
<marcan> libSMC is in the update/restore ramdisks at least
<joske> marcan: how many cores does this mac pro have?
<marcan> 10
<marcan> 2x4P 1x2E
<joske> trying to make sense of the temp values
<j`ey> marcan: jealous ;_;
<joske> TC10 could be temp of cpu 0 in cluster 1?
<joske> but then there are 12 of those
<marcan> yeah, it's a bit weird
<joske> 10-13 20-23 and 30-33
<joske> I've already struggled so much with this temp stuff on macos
<marcan> I also love just how fine-grained all this stuff is because we're going to be one of the platforms with the most junk in sysfs out there :D
<marcan> people think `sensors` gives you fun output on some motherboards... wait until they see an M1
<marcan> this thing has a gazillion sensors, internal and external
<joske> it's crazy the amount of temperature sensors you get back from CoreFoundation on M1
<joske> but you have no idea to what it all maps
<joske> and some are negative as said
<joske> in the end we gave up on per core, and just averaged all with Tdie into one T reading
<marcan> joske: doesn't help that macos doesn't let you exercise individual cores I guess
<marcan> on linux we can easily peg a core and see what temperature goes up first
<marcan> ah, this library looks like it has per-device info, but only for some things, seems related to accumulation? and I don't see the M1 Macs...
<joske> also seems impossible to get the CPU freq on macOS
<joske> the syscall just returns nothing
<joske> apparently you're not allowed to know ;-)
<FireFox317> or they just didnt implement it yet? wouldnt be supprised by that either
<joske> marcan: if it takes too long, I'd rather you work on SMC ;-)
<joske> this dump is already very interesting
<joske> I'll see if I can use those keys with SMC API on M1
<joske> rebooting to macOS :-)
joske has quit [Remote host closed the connection]
joske has joined #asahi
* marcan digs around a bit more...
MajorBiscuit has joined #asahi
<marcan> I just had an idea...
<mps> Glanzmann: thanks
<kettenis> aplsmc0.power1 6.87 W system
<kettenis> that is my j293 idling in OpenBSD
<marcan> heh
<marcan> screen on?
<kettenis> yes, with the screen on (but not running X)
<kettenis> this is with the P-cores cranked up to max though
<kettenis> input power is roughly the same
jbowen has joined #asahi
<kettenis> unless the battery is charging; then input power is higher than system power
<kettenis> I use PDTR as input power and PSTR as system power
<mps> `10:58:27 up 2:01, 0 users, load average: 0.05, 0.35, 0.32` my uptime with firefox few terminals and few ssh connections
___nick___ has joined #asahi
___nick___ has quit []
___nick___ has joined #asahi
<kettenis> that is the list of sensor keys that I currently use on OpenBSD
<kettenis> I'm reasonably confident that these are all right
<kettenis> note that for the external sensors the board schematics seem to list the sensor keys
FireFox317 has quit [Ping timeout: 480 seconds]
<mps> povik: audio now works on mb pro \o/ thanks
<joske> kettenis: thx
<kettenis> that's a useful resource too
<povik> \o/
<povik> still needs some ironing out
jbowen has quit [Ping timeout: 480 seconds]
<marcan> "You are not allowed to use the contents of this document unless you openly publish
<marcan> all the new information found with a single exception of having NDA with Apple."
<marcan> not that "what SMC keys do" is copyrightable, but that statement sets off my legally dubious license detector
aleasto has joined #asahi
<joske> kettenis: I knew that already (I hackintosh also ;-))
<sven> lol
<kettenis> legally totally unenforcable
<kettenis> and I openly publish my source code ;)
<landscape15[m]> joske: I guess everyone here has ever built an Hackintosh :) but I can’t understand how virtualSMC can help.
<nico_32> mapping a keyname to something readable
bisko has joined #asahi
<kettenis> I noticed there is a whole cottage industry of closed source Mac Apps that display temperatures and let you tweak fans
<povik> haha, i guess one can make a living off that
<kettenis> I bet that notice is just a misguided attempt by the VirtualSMC guy to have those folks rip him off
<kettenis> I ran across one of those guys using the github issue tracker for hist closed source app
<nico_32> that's Microsoft approved since they do it for windows component
<nico_32> i wonder if vmware is going to port their ESXi-arm to the m1
<landscape15[m]> nico_32: m1n1 is already an hypervisor. The porting shouldn’t need too much effort for vmware
<maz> nico_32: there are no technical obstacle to it.
<kettenis> my understanding was that ESXi requires ACPI though
<maz> that's something they could work around (though shoehorning AIC and DART into ACPI could be... fun...)
FireFox317 has joined #asahi
<nico_32> they want the platform to be ServerReady compliant so uefi, acpi, etc ...
<maz> schaha! wrong platform then.
<maz> it isn't even ARM architecture compliant, so forget about everything else.
<nico_32> so no more pile of mac mini running esxi for macOS CI :(
<maz> well, not if they only want to support standard HW.
<ChaosPrincess> aic and dart are the difficult parts
<ChaosPrincess> uefi and acpi can be done in software
<maz> but I wouldn't put it past ARM to create a special ServerReady category just for the M1. that's what they do for every broken HW implementation out there.
<maz> ChaosPrincess: you can't fit AIC or dart in ACPI without a major revision of the spec.
<kettenis> I don't think there is any platform that actually meets the spec
<maz> there are. the Ampere stuff is reasonably correct, for example.
<nico_32> this thing exists https://github.com/ARM-software/arm-enterprise-acs so I hope it pass on some platform
<maz> a handful of machines, and mostly software models.
<maz> and ARM will hand out exemptions for each and every broken system anyway.
<maz> to the point where ServerReady doesn't mean anything.
<kettenis> eMAG still had PCIe quirks in the Linux kernel, but those may have been for things outside the spec
<maz> they got an exemtion for it. I think Altra is sort of OK in that respect (I booted fairly old kernels on it without any extra patch).
<maz> (although their IORT table is... interesting...)
<kettenis> the _DMA properties also don't make much sense
<kettenis> OpenBSD runs on eMAG without any PCIe-related quirks, but we largely ignore all the fancy new stuff, so that probably helps
<kettenis> but yes, ServerReady is mostly just marketing bullshit ;)
<maz> the fun begins when people use the SR argument to justify adding terrible quirks to support ACPI on HW that really shouldn't use that.
<kettenis> the raspberry pi was an interesting experiment, but ACPI is still a bad idea on a SoC like that
<maz> exactly.
<maz> lx2160a is the poster child of such madness.
<mjg59> ACPI suffers hugely from being a spec intended to solve a specific problem ("How do we provide some sort of abstraction layer for x86 that isn't int calls") that got kind of out of control
<mjg59> I'm still confused how Toshiba ended up involved in 1.0
<maz> that's the core of the problem: instead of an abstraction layer, people want to use it as a quirk description mechanism.
<kettenis> mjg59: to move japan away from pc-98?
<marcan> joske: well you did manage to send me down a rabbit hole instead of streaming today... but I just got somewhere
<marcan> let's see if this yields anything :-)
<mjg59> Taking an ecosystem that thrives on low-level differentiation and trying to re-model it on an ecosystem that has spent decades trying to be 100% compatible with a computer released in 1981 turns out to be hard
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joske has quit [Remote host closed the connection]
kgarrington has joined #asahi
kgarrington has quit [Remote host closed the connection]
joske_ has joined #asahi
<joske_> marcan: :-(
joske_ has quit []
joske has joined #asahi
Genbuchan[m] is now known as GenbuchanPS5[m]
<mps> hmm, replugging usb stopped to work for me, dmesg says `dwc3 502280000.usb: Configuration mismatch. dr_mode forced to host`
<Glanzmann> mps: I'll try later today and let you know if it works for me.
<mps> Glanzmann: thanks in advance
joske has quit [Remote host closed the connection]
joske has joined #asahi
joske has quit [Ping timeout: 480 seconds]
joske has joined #asahi
joske has quit [Ping timeout: 480 seconds]
joske has joined #asahi
joske has quit [Ping timeout: 480 seconds]
<marcan> and so instead of streaming SMC here's the rabbit hole I ended up in: https://twitter.com/marcan42/status/1484155015585742857
<nico_32> oops
<nico_32> someone forgot to cleanup the release image ;)
<kettenis> you're supposed to finish the gpio stuff such that I can push my u-boot version that isn't based on a 1-year old branch ;)
joske has joined #asahi
joske has quit [Remote host closed the connection]
joske has joined #asahi
<joske> marcan: I'd be interested in that json file ;-)
malvo has joined #asahi
<as400[m]> marcan: cool :)
yuyichao has quit [Ping timeout: 480 seconds]
joske has quit [Remote host closed the connection]
joske has joined #asahi
gladiac is now known as Guest1168
gladiac has joined #asahi
joske has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
Guest1168 has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
<mps> Glanzmann: usb hotplug works, I booted wrong kernel in which it didn't worked, heh
jbowen has joined #asahi
jbowen has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
<Mary> Interesting finding
<ChaosPrincess> tried to run the new audio patch on a 13inch mbp. no sound, card does not even get detected by alsa
<mps> ChaosPrincess: you build drivers in-kernel or as modules?
<ChaosPrincess> in-kernel
<mps> cat /proc/asound/cards
<ChaosPrincess> nothing
<mps> hmm, it works for me after latest patch povik posted
<ChaosPrincess> applied that on asahi branch, card is not detected
<j`ey> ChaosPrincess: get any of the mca dmesg output?
<ChaosPrincess> this is the dmesg
<FireFox317> ChaosPrincess, maybe its missing the nodes in the devicetree?
<Glanzmann> mps: I was just checking IRC, if you have fixed it and than wanted to reproduce.
<mps> Glanzmann: no, everything is ok now (well, more or less in current state of kernel)
<mps> Glanzmann: as wrote, booted wrong kernel
<j`ey> ChaosPrincess: unrelated, but not good that youre getting that early warning about efi
<kettenis> I believe upstream fixed that not too long ago
<ChaosPrincess> im running this tree for efi https://github.com/kettenis/u-boot/tree/apple-m1-m1n1-nvme/
<kettenis> which is based on upstream code that is almost a year old
<ChaosPrincess> well, upstream can't boot from nvme and raw linux can't enable pci-e
<j`ey> must be another fix
<Glanzmann> ChaosPrincess: Can you pase your kernel config, do you have CONFIG_APPLE_ADMAC=y and CONFIG_SND_SOC_APPLE_MCA=y ?
<Glanzmann> ChaosPrincess: You can boot using u-boot?
<kettenis> I don't think that warning really matters
<ChaosPrincess> Glanzmann: i am booting from u-boot
<Glanzmann> ChaosPrincess: Kernelconfig looks good for me, Do you want to try my kernel?
<Glanzmann> But I'm also just using asahi + jannau spi patch + povik sound patch from this very early morning.
<Glanzmann> The device tree I took from kettenis u-boot.
<Glanzmann> ChaosPrincess: If you use u-boot you can also use my debian live and try this one. But I need to update the kernel.
<ChaosPrincess> thats exactly what im using too, asahi + cherry-picked keyboard fix from jannau + fix from today
<Glanzmann> I see. Than I can only offer you my config. I'm not getting this big fat efi warning though.
<Glanzmann> ChaosPrincess: What m1 device do you have?
<ChaosPrincess> 13inch mbp
<Glanzmann> So same as mps and for him it works.
<Glanzmann> ChaosPrincess: Did you try to reboot, povik said it might be just that.
<ChaosPrincess> multiple boots
<ChaosPrincess> also, did y'all boot with headphones plugged in or not, and does it even matter
<Glanzmann> And you have the latest macos firmware, latest asahi installer version and have packged u-boot like that: https://tg.st/u/asahi-uboot-quickstart.txt ?
<Glanzmann> ChaosPrincess: Do you hear clicks in the hadphone when you boot?
<Glanzmann> head*
<ChaosPrincess> 12.0.1 firmware, asahi installer of version that i no longer remember, and u-boot that looks close enough to what is in that guide
<ChaosPrincess> no clicks, i think
<Glanzmann> But you use the device tree that ships with u-boot from kettenis?
<ChaosPrincess> yes
<Glanzmann> Strange than I have no idea. If you want, I can incorporate the latest kernel in the debian live image. And test if I get sound withthat, if I do, you can try.
<Glanzmann> You can also try my u-boot which is here: https://tg.st/u/u-boot.macho
<Glanzmann> It is built as written in the guide with a very recent m1n1.
ghishadow[m] has left #asahi [#asahi]
<povik> ChaosPrincess: you are missing CONFIG_SND_SOC_CS42L42
<kettenis> seriously guys, what's up with this Kconfig disaster
<Glanzmann> I updated https://tg.st/u/asahi-debian-live.txt to include the latest kernel, m1n1, iwd, and alsa-utils.
<Glanzmann> kettenis: The issue is that we don't have a config that enabled everything.
<Glanzmann> kettenis: I tried once to use the debian arm64 kernel config and enable everything that asahi needs and it did not boot.
<j`ey> kettenis: c u s t o m i s a t i o n
<Glanzmann> Now I took jannaus config and adopted if I miss every other option.
<Glanzmann> I would prefer if we would have just a kernel config where is everything on that could be one, ccache takes care of the rest.
<kettenis> j`ey: c u s t o m i s a t i o n is bad
<kettenis> over here we say "only n00bs push knobs" ;)
<j`ey> kettenis: :'(
<ChaosPrincess> povik: added, didnt help
<povik> at least we can get to know each other over checking each other's .config options
<povik> ChaosPrincess: send dmesg
<mps> I like to tweak kernels for different systems and different use cases
<Glanzmann> mps: I like when I can install Debian standard kernel and it just works(tm). :-)
<mps> I don't like any standard kernel, even ones I maintain for alpine
<mps> Glanzmann: this is compromise I made because users wants/needs options which doesn't makes sense to me
<povik> of course, CONFIG_SND_SIMPLE_CARD
<povik> don't tell kettenis
<mps> ChaosPrincess: I could post my config if you want
<ChaosPrincess> won't help much
<mps> cat /proc/asound/card0/pcm0p/info | tpaste => https://tpaste.us/DXlq
<kettenis> I don't see any i2c in that kernel dmesg either
<povik> [ 0.661505] cs42l42 2-0048: CS42L42 Device ID (42A83). Expected 42A42
<povik> there's ^ in the second dmesg, so we are reaching the codec
<povik> but the card doesn't get initialized, because we need CONFIG_SND_SIMPLE_CARD
<mps> povik: right, I had to enable it
MajorBiscuit has quit [Ping timeout: 480 seconds]
<mps> CONFIG_SND_SIMPLE_CARD_UTILS=m
<mps> CONFIG_SND_SIMPLE_CARD=m
<ChaosPrincess> see the card now, what did you have to enable in alsamixer to make it work?
<mps> CONFIG_SND_SOC_CS42L42=m
<povik> MIXER knob, make sure you switch out of a pulseaudio virtual device, if there's any (use F6)
<ChaosPrincess> yep, works now
<Glanzmann> ChaosPrincess: - In order to use sound, start alsamixer, press f6, select the card 'Macbook integrated audio' and move the first controls all the way to the top.
<mps> povik: knob or just increase level in MIXER
<ChaosPrincess> well, it was noise since i tried to play a mp3 with aplay, but at least it something
<povik> great, i will do something about that MIXER business soon, i promise
<povik> mps: increase level on the knob
<mps> yes
<mps> there is no mute switch
<Glanzmann> mps: I use pulse audio on top of it, and it works just like on any other deivce.
<ChaosPrincess> and as i can see it does not detect if headphones are not plugged, just assumes they are there
<Glanzmann> Btw. I documented the sound stuff here: https://tg.st/u/asahi.txt
<mps> povik: it works fine, thank you
<povik> great :)
<Glanzmann> ChaosPrincess: From the backlog I can tell you that is very hard to get the speakers working and also the risk of destroying them while trying ...
<povik> hm? i wouldn't say that's true
<ChaosPrincess> well, at least mute if there is nothing plugged in
<mps> Glanzmann: I think event interface is not yet added to it, because this there is no detect options
<Glanzmann> povik: Okay, some people in here mentioned that they blow there speaker on other arm devices.
<povik> ah, i think we may be past that phase, and my mini came out unharmed
<Glanzmann> mps: I use that: https://tg.st/u/volkey and it works.
<Glanzmann> povik: I see. And than I heard that there are 6? speakers and you can hook them up differently.
<Glanzmann> And every speaker has its own chip?
<ChaosPrincess> i think thats on 14+inch pro
<povik> the other day i visited #alsa-soc and i think i know what needs to be done for plug events to reach userspace
<kettenis> 13" has 4
<mps> Glanzmann: I made small lua script for awesome and control it with hotkeys and have text status bar widget to show volume
<Glanzmann> mps: I had one with text status as well, but it was to much code complexity so that I killed it and now use this one and I now it just works (tm).
<povik> Glanzmann: that's right, every speaker has its own chip, and we need to orchestrate that, there's just some work, wouldn't say it's very hard
<povik> at least to get to baseline with 2 speakers as left/right
MajorBiscuit has joined #asahi
<povik> once we want to have different stream for >2 speakers, there's yet more work
<kettenis> hardest bit is to come up with an appropriate device tree binding ;)
<povik> haha, may be
<ChaosPrincess> anyone here running kde+wayland?
<Glanzmann> ChaosPrincess: Nope. I have fvwm2 + xorg, and my system is idle (no burning cpu).
<Glanzmann> ChaosPrincess: But I tried it a few times.
<Glanzmann> But only for a minute or so.
<Glanzmann> povik: Nice. I look forward to it.
<Glanzmann> But if I watch a movie with 1920x960 xorg burns 30% and mpv 70% CPU.
<Glanzmann> I'm running at 2 GHZ.
MajorBiscuit has quit [Ping timeout: 480 seconds]
<mps> heh, I build kde when it is released first time and debian pkg didn't existed to try it, deleted it few days later and never tried again
<mps> similar was the gnome fate on my system, though I was xfce user for nearly full one year
<ChaosPrincess> its way better than whatever the folks over at gnome are doing, but the wayland support is not it's strongest point
<Glanzmann> mps: I was only trying gnome and kde because they supported wlan and wanted to compare the video performance to the xorg. In the beginning (when we did not have the modesetting) it was better, but now I use xorg and don't look back.
<Glanzmann> s/wlan/wayland/g
<mps> Glanzmann: I do nearly same
<mps> povik: current audio status is quite fine for me because I mostly listen audio with headphones
* Glanzmann too.
<mps> now what is missing for me is battery status, backlight control and maybe RTC (though NTP works fine)
<mps> but not so important things machine is quite usable now
<Glanzmann> mps: Yes, backlight control would be nice. Also the camera, mic and gpu accelerated graphics. But if I work, I'm already faster than on macos.
<Glanzmann> NTP, I don't notice because the lock is already set when I open a terminal.
<mps> camera, mic and gpu are not things I need
<Glanzmann> mps: I do a lot of online trainings, so with Linux I can't do that at the moment. But if I work on things, I already have everything that I need.
<povik> i actually do not know where the mics on macbooks are hooked to, chip-wise
<povik> also so far i assumed the mini doesn't have an embedded mic, but that may not be true
<povik> let's see some schematics
<Glanzmann> povik: I looked at an dissaemble video of the mini and do not recall seeing a mic.
joske has joined #asahi
<povik> i opened the voice recorder app in macos and it didn't do anything :)
<povik> oh no, i smell AOP is involved in this, which makes sense
gladiac is now known as Guest1180
gladiac has joined #asahi
<povik> what's that you said? you don't need a mic?
<mps> povik: I don't need it, never use it
<j`ey> povik: no mic needed, i can see what you type :D
<mps> j`ey: :)
joske_ has joined #asahi
joske has quit [Ping timeout: 480 seconds]
Guest1180 has quit [Ping timeout: 480 seconds]
<povik> i have it on good authority that AOP has an MCA block of its own, and that seems to be where the mic is hooked to
<povik> there's also an external FPGA sitting on the mic data lines
<Glanzmann> povik: What is the fpga for?
joske_ has quit [Ping timeout: 480 seconds]
<povik> i don't know, low-power keyword/voice detection maybe, or some part of it and AOP doing the other part
<Glanzmann> I see.
<povik> or microphone beamforming? shrug
<povik> of course, on mini /arm-io/admac-aop-audio is unused
<povik> but on macbooks that's where you get the mic samples from
<povik> one mystery solved
qm3ster[m] has joined #asahi
<qm3ster[m]> 🐴
joske has joined #asahi
joske has quit [Ping timeout: 480 seconds]
<marcan> https://mrcn.st/p/jcpn0idA well that's pretty much all the voltages/currents for j314 (and other info I could gather)
<marcan> mostly process of elimination matching up SMC symbols with known sensors in the schematic...
<marcan> kettenis: probably would make sense to figure out a way to stuff these names in the device tree
<dottedmag> "Air Intake Temp" so this thing can also double as a room thermometer
jmr2 has joined #asahi
<kettenis> marcan: not sure about that
<kettenis> different OSes may have a different opinion about what sensors are worth showing
<kettenis> or what description to attach to the different sensors
<marcan> duplicating this knowledge in every OS seems... suboptimal
<kettenis> an OS is of course always free to ignore the information
<jmr2> Question regarding the installer... When selecting the (newly created) boot disk, are you supposed to click on "restart", or just wait?
<marcan> you click
<jmr2> Thanks :-)
jmr2 has quit [Quit: Page closed]
jmr2 has joined #asahi
<marcan> povik/Glanzmann: the FPGA is just a tiny thing that's just used to disable the mic when the lid is closed
<marcan> (and a few other security-related things)
<jmr2> (FWIW, I did almost all my installs so far from MacOS, not from RecoveryOS. In that context, you can just relock the lock and wait ~10s, without clicking on restart, and the installer detects the change. Might be a way to avoid the race condition in recoveryOS.)
<marcan> it's one of the smallest FPGAs you can get (MachXO2), basically a CPLD
<marcan> and it is not hooked up to be reprogrammable on purpose
<j`ey> marcan: they probably picked the chip because the name matches the macOS kernel :P
<marcan> it's a privacy thing
<marcan> j`ey: I was going to say they probably watched the Smockie MachXO2 ad, but it seems it's been scrubbed from the internet :<
jmr2 has quit [Quit: Page closed]
raiaq has quit [Remote host closed the connection]
raiaq has joined #asahi
user982492 has joined #asahi
darkapex2 is now known as darkapex
<Glanzmann> marcan: Wow, lots of sensors.
<Glanzmann> marcan: Thank you for the fpga explanation.
<VinDuv> okay, I figured out why my monitor doesn’t work in m1n1: it looks like it briefly disconnects itself while going out of sleep mode
<VinDuv> If I call dcp_ib_get_hpd in a loop after dcp_ib_swap_begin I can see connected going back to 0 then to 1. DCP syslog also says “display HPD removed” then “display HPD asserted”
<VinDuv> and I can “fix” it by waiting 2 seconds after dcp_ib_swap_begin and calling dcp_ib_set_mode again.
<povik> marcan: makes sense. i like that they did that (re: fpga)
<povik> is AOP running after handoff from iboot, or do we have to start it?
<sven> iirc we have to start it
<sven> it’s also a bit of a misleading name since I think that SMC is more “always on” than AOP
<sven> only special case might be some of the deeper sleep modes
<jannau> I guess it's called always-on because it implments the always-on feature. the device acts as if it is always-on even when it is sleeping
<j`ey> fridtjof[m]: lolwtf is this
<sven> :D
<fridtjof[m]> I also have the power manager one,
<fridtjof[m]> (oh, i just noticed the video id in the file name doesn't even match up, so it's probably not the one you meant)
joske has joined #asahi
___nick___ has quit [Ping timeout: 480 seconds]
joske has quit []
jbowen has quit [Quit: leaving]
joske has joined #asahi
joske has quit [Remote host closed the connection]
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
flying_sausages has quit [Ping timeout: 480 seconds]
flying_sausages has joined #asahi
user982492 has joined #asahi
aleasto has quit [Quit: Konversation terminated!]
aleasto has joined #asahi
user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user982492 has joined #asahi
aleasto has quit [Remote host closed the connection]
aleasto has joined #asahi
aleasto has quit [Remote host closed the connection]
aleasto has joined #asahi