ChanServ changed the topic of #asahi-alt to: Asahi Linux: porting Linux to Apple Silicon macs | User-contributed/unofficial distribution ports | Logs: https://alx.sh/l/asahi-alt
<liv> chadmed: I installed mesa::asahi, how do I build it into the kernel?
<liv> I'm sorry for my many questions, but I hope to end up with a working system and to be able to do this myself :P
VeeBop8 has joined #asahi-alt
lynndotpy9 has joined #asahi-alt
lynndotpy has quit [Read error: Connection reset by peer]
lynndotpy9 is now known as lynndotpy
zzywysm has quit [Ping timeout: 480 seconds]
VeeBop has quit [Ping timeout: 480 seconds]
VeeBop8 is now known as VeeBop
<liv> I am hesitant to try and replace my kernel in /boot because I don't trust myself :P
<j`ey> liv: install a second one
<j`ey> as in, dont overwrite that one
kidplayer666 has quit [Quit: Connection closed for inactivity]
<liv> Can I just run `doas make install -j10`?
john-cabaj has quit [Remote host closed the connection]
john-cabaj has joined #asahi-alt
<liv> Also, is there a Matrix-bridge to this room?
<liv> I am currently in a tmux window SSH'd into a server that has a tmux window running in the background running irssi
<liv> I'd like to have a browser to be able to open links when needed :P
<liv> if not, curl is also okay-ish for that...
zerdox has joined #asahi-alt
<zerdox> janneg, chadmed: i found that both of available 6.6 kernels break speakers volume control for me. it was and still working on 6.5. compiling both using same config, just updated some rust things because kernel required to upgrade them. do you have any ideas? i sent a strace of alsactl above
<liv> I'll continue tomorrow, good night people :)
<liv> 1:35 am here :P
<j`ey> liv: no bridge
chadmed_ has joined #asahi-alt
<chadmed_> liv: you dont build mesa into the kernel. mesa is the userspace component of the graphics stack.
<chadmed_> once you install rust aand bindgen, you need to rebuild the kernel with RUST=y and DRM_ASAHI=m
<chadmed_> (then reinstall with the usual procedure)
<chadmed_> zerdox: refer to above. speakersafetyd locks the kcontrols. there is no way around this and we will not be providing facilities for them to be unlocked. use pipewire.
<zerdox> chadmed_: i do use pipewire, volume control just works on 6.5 but doesn't on 6.6. i use pavucontrol or pwctl to change volume
<chadmed_> do you have asahi-audio installed?
<zerdox> also as i mentioned before i can change volume of my right speaker, that's strange and i am sure it is not intended behavior
<zerdox> yes i do
<zerdox> latest one
<chadmed_> which DE are you using
<zerdox> none
<zerdox> wayland and hyprland
<chadmed_> please clear out /etc/wireplumber/ and /etc/pipewire/ if they exist and reinstall asahi-audio, wireplumber and pipewire
<chadmed_> then reboot
<zerdox> sure, i'll try now
<zerdox> yay, that worked
<zerdox> chadmed_: thank you :)
<zerdox> ohj
<zerdox> ohjj
<zerdox> no, now i only got dummy output
<chadmed_> i might need to push a release of asahi-audio to the overlay
<chadmed_> what machine do you have?
<zerdox> air 2020
<chadmed_> run `echo -n "J313" | sudo tee /sys/class/sound/card0/id` and then log out and log back in
zerdox has quit [Read error: No route to host]
eiln has joined #asahi-alt
jeisom has quit [Ping timeout: 480 seconds]
possiblemeatball has quit [Quit: Quit]
chadmed_ has quit [Quit: Page closed]
kidplayer666 has joined #asahi-alt
<marcan> < yuka> also when I unload and load the snd_soc_macaudio again my system sometimes locks up <- unloading modules is basically completely untested and expected to be broken in all sorts of ways :p
<marcan> < yuka> I updated to kernel asahi-6.6-9, speakersafetyd 0.1.7, asahi-audio e1ccf5f. With a freshly booted system the speakers are unlocked, then once I start playing something they immediately become "Speaker volumes locked: Lock timeout" <- IIRC this happens when the routing is configured wrong, which means PW/ALSA UCM didn't do its job.
<marcan> note that with bare ALSA it's expected not to work out of the box right now, you need to manually poke the routing settings in alsamixer first (UCM does this when using PW)
<marcan> I need to figure out what to do about the alt routing modes, but honestly I'm tempted to just remove all that, it just makes everything more complicated once speakersafetyd is in the mix
kidplayer666 has quit [Quit: Connection closed for inactivity]
kujeger has quit [Ping timeout: 480 seconds]
<liv> chadmed: Is that `CONFIG_HAVE_RUST=y`?
<liv> DRM_ASAHI does not exist in my kernel's .config file (took the one from you)
<mps> liv: it is auto if rust installed and run `make {menu,n}config}`
<liv> wdym?
<mps> it is set by make config if rust is intalled on machine
<mps> I have bitten few times with this when I don't rust in kernel and have it installed
<mps> don't need*
<liv> after running `doas make {menu,n}config` I did not get anything matching `ASAHI` inside the document
<ChaosPrincess> did you enable config_rust
<liv> `CONFIG_HAVE_RUST=y`
<ChaosPrincess> no, specifically config_rust
<liv> That's not there
<liv> Wait I'll upload my kernel config
<mps> liv: '{menu,n}' means one of this
<ChaosPrincess> don't bother
<ChaosPrincess> can you run make menuconfig and search for "RUSt"
<mps> so 'make menuconfig' or 'make nconfig'
<ChaosPrincess> and say which options matched
<liv> https:/0x0.st/PYPV.txt
<liv> I did that
<liv> and none appeared
<ChaosPrincess> run `make rustavailable`
<liv> Rust compiler `rustc` is too new. This may or may not work.
<ChaosPrincess> anything else?
<liv> Rust bindings generator `bindgen` is too new. This may or may not work.
<liv> then it fails with error 1/error 2
<liv> Wait I'll get on my desktop so I can ssh in and copy/paste
<ChaosPrincess> can you post the full output
<liv> ye 2 sec
<liv> Do I paste it here?
<liv> or in a seperate pastebin-like thingy?
<ChaosPrincess> pastebin
<ChaosPrincess> do not post more than 3-4 lines of text at once to irc, it makes everyone cranky
<liv> alright
<ChaosPrincess> do you have clang installed?
<liv> clang version 17.0.6
<liv> Target: aarch64-unknown-linux-gnu
<liv> Thread model: posix
<liv> InstalledDir: /usr/lib/llvm/17/bin
<liv> Configuration file: /etc/clang/aarch64-unknown-linux-gnu-clang.cfg
<liv> This is 5 lines but I think it should be fine??
<liv> That's `clang --version` btw
<liv> Walking the dog, brb
nst_ has quit [Ping timeout: 480 seconds]
nst has joined #asahi-alt
kujeger has joined #asahi-alt
<liv> ChaosPrincess: do you have other things I can test?
<liv> of chadmed:
<ChaosPrincess> idk at this point, what does equery u clang says?
<liv> !!! Could not load USE flag descriptions from /var/db/repos/asahi/profiles/use.desc
<liv> then a traceback (because Python) and then `UnboundLocalError: cannot access local variable 'open_file' where it is not associated with a value`
<liv> I dm'd chadmed on Matrix, rebooting now
zerdox has joined #asahi-alt
kidplayer666 has joined #asahi-alt
zerdox has quit [Ping timeout: 480 seconds]
zerdox has joined #asahi-alt
jeisom has joined #asahi-alt
zerdox has quit [Ping timeout: 480 seconds]
zerdox has joined #asahi-alt
<zerdox> chadmed: i get it reset after a reboot, back to AppleJ313
<zerdox> btw it did the trick. i also had to do etc-update which i missed yesterday. how to make sound card id persistent?
<j`ey> zerdox: it should be persistent on the latest kernels
<zerdox> j`ey: i am in 6.6.0_p10
<j`ey> that has the commit.. (c6da2ce989fe14e65bfb251f1957147b068ce72c)
<zerdox> i could reboot and check it's value on 6.5
<chadmed> no no
<chadmed> that value is correct
<chadmed> the problem is you have an old speakersafetyd
<chadmed> please be patient and ill get an update into the overlay tomorrow
<zerdox> 0.1.6
<zerdox> oh okay
<zerdox> does this mean it's getting disabled?
<j`ey> no gentoo has been patched
<zerdox> okay
<zerdox> ty :)
<zerdox> waiting for an update, for now i'll update id manually because it works for me
rino has joined #asahi-alt
rino has quit [Quit: leaving]
tpz has joined #asahi-alt
zerdox has quit [Ping timeout: 480 seconds]
tpz has quit [Quit: leaving]
<liv> Does anyone run Hyprland here?
millenialhacker has joined #asahi-alt
matteo has joined #asahi-alt
<mps> janneg: j`ey: to fix uclamp warning in speakersafetyd it is enough to enable UCLAMP_TASK. UCLAMP_TASK_GROUP is not needed
millenialhacker has quit [Quit: Konversation terminated!]
millenialhacker has joined #asahi-alt
millenialhacker has quit [Quit: Konversation terminated!]
millenialhacker has joined #asahi-alt
<j`ey> liv: set HYPRLAND_LOG_WLR=1 and run hyprland
<j`ey> that will print one of two reasons why the gles2 renderer failed
<j`ey> basically overriding the mesa/asahi driver to change the supported version
matteo has quit [Remote host closed the connection]
millenialhacker has quit [Quit: Konversation terminated!]
millenialhacker has joined #asahi-alt
<yuka> I just got the speakers working correctly(?) for the first time on my MacBook Pro (14-inch, M1 Pro, 2021) on NixOS. The issues was indeed the Alsa UCM config not being visible to pipewire/wireplumber correctly. This sounds amazing!
<liv> j`ey: github issue thingy didn't work, going to try the reddit solution now
<liv> trying the legacy renderer now
<j`ey> liv: before that, use HYPRLAND_LOG_WLR=1
<yuka> j`ey: whoops, I'm still on an lsp-plugins version from before they split it into modules, let's see how that works
<yuka> or, no, actually i am on 1.2.x, but only pulling the repo at https://github.com/sadko4u/lsp-plugins/ ?
tpz has joined #asahi-alt
tpz has quit []
<j`ey> goodgood
<yuka> and thanks for pointing me to that :)
<yuka> is there a way to boost the bass a bit more for those who like that? ;)
<yuka> normal equalizer?
<liv> j`ey: doesn't work :P
<liv> I don't think `DRM_ASAHI` is loaded correctly
<liv> lsmod returns this: https://0x0.st/HYN4.txt
<liv> can I just force `DRM_ASAHI` to load?
<liv> can't*
<j`ey> liv: ls /usr/lib64/dri/*
<j`ey> liv: also paste dmesg
<j`ey> also can look for the asahi.ko in your modules, to make sure it was actually built
<liv> `ls /usr/lib64/dri/*`: http://0x0.st/HYbS.txt
<liv> where can I find modules?
<j`ey> /usr/lib/modules
<j`ey> kinda look like DRM_ASAHI wasnt built
<j`ey> or maybe a make modules_install wasnt run after finally getting it working
<mps> could someone post link of the speakersafetyd package scipt/build system for gentoo or fedora
<mps> I'm thinking to add it to alpine
<mps> j`ey: thanks
<liv> ls: cannot access '/usr/lib/modules': No such file or directory
<liv> do I create that manually and run `make -j10 modules_install` again?
<liv> `modbrobe DRM_ASAHI` results in "modprobe: FATAL: Module drm_asahi not found in directory /lib/modules/6.6.0-asahi-10-liv"
<j`ey> liv: did you run modules_install after the latest kernel build?
<liv> yes
<liv> running it again, it seems to return: "/lib/modules/6.6.0-asahi-10-liv" as the place it puts the stuff.
<j`ey> check for any file there with asahi in the name
<liv> `ls /lib/modules/6.6.0-asahi-10/kernel/drivers/gpu/drm/` returns: "apple bridge display drm_dma_helper.ko.zst panel vgem"
<liv> `find -type f | grep asahi` returns nothing
<j`ey> sounds like you didnt buildit then
<liv> but "build/include/uapi/drm/asahi_drm.h" does exist
<j`ey> check the .config
<liv> I swear I selected those and checked afterwards...
<liv> DRM_ASAHI isn't in there...
<liv> The DRM_ASAHI option is nowhere to be seen in Device Drivers -> Graphics support
<liv> I am so lost...
<liv> Do I put it manually in .config?
<j`ey> liv: in menuconfig press / and then type ASAHI
<j`ey> it will then show you the option
<j`ey> and also why it's not available
<j`ey> I assume it's related to RUST somehow
<liv> jqey: I did exactly that to search :P
<liv> j`ey:*
<millenialhacker> QQ: do I need to do anything special to get GPU running on Gentoo?
<j`ey> liv: did it show it in menuconfig after searching?
<j`ey> (sounded like you went via the menu: Device Drivers -> Graphics support)
<j`ey> for example, I searched for it, and it says: "Depends on: HAS_IOMEM [=y] && RUST [=n]"
<j`ey> showing that I dont have rust enabled
<j`ey> millenialhacker: you need rust and bindgen
zerdox has joined #asahi-alt
<j`ey> liv: if you go via the menu, it wont show up, if you search, it will
<liv> I hate that there's no multimedia support... Do you have Matrix?
<liv> I could send a screenshot then...
<j`ey> sure
<liv> @ahwx:ahwx.org is mine.
<millenialhacker> j`ey could you share the specific config entries so I can add them to my .config file?
<j`ey> millenialhacker: DRM_ASAHI is the main one
<j`ey> liv: I still want to talk about it here though
<j`ey> so just send stuff via there
<j`ey> liv: right: RUST=n
<j`ey> that means your rust isnt setup
<liv> fair
<liv> uhm
<liv> okay
<j`ey> make rustavailable again
<liv> Now it does not seem to work?
jeisom has quit [Ping timeout: 480 seconds]
<liv> 2 sec I'll try something
<liv> Last time, I did `env-update && source /etc/profile`
<liv> yeah after doing that it works
<liv> I'll drop a screenshot in Matrix
<liv> Oh... I think I built the kernel without doing the `env-update && source /etc/profile`
<liv> Let me build the kernel again...
<liv> I'll add it to root's bashrc as well so I won't forget next time.
<j`ey> good idea
<j`ey> after that, it should work!
<liv> finally...
<liv> Do I need `APPLE_M1_CPU_PMU`?
<j`ey> you don't *need* it.. but might aswell enable it
<j`ey> (enables `perf` support)
<liv> `BACKLIGHT_APPLE`?
<millenialhacker> j`ey thank you. Trying it out
<j`ey> liv: nah, not ours
<liv> alright
<liv> That's for (older) Intel MacBooks right?
<j`ey> yeah
<liv> Building right now...
<j`ey> uses some ACPI stuff
<liv> "The system is going down for reboot NOW!"
<liv> high hopes for this one
<j`ey> if not you can always just rebuild!
<j`ey> when its booted: dmesg | grep gpu, if it shows something, youre good
<liv> nothing :P
<j`ey> and you make module_installed?
<millenialhacker> Is it normal to experience network issues with wifi connection?
<liv> Nope
<liv> > and you make module_installed?
<liv> yes
<liv> oh that does not work here like on other chat thingies
<liv> oh I forgot to mount /boot
<liv> let's try again
<liv> "[ 1.499144] asahi 406400000.gpu: Probed!"
<liv> WOHOOO
<j`ey> epic
<liv> hyprland runs now
<liv> runs pretty smooth
<j`ey> removed the software rendering env var?
<liv> yes!
<liv> Let me try to remove the other vars aswell
<liv> to see if they are still needed
<j`ey> time to rice
<liv> exactly haha
<j`ey> I think they are, seems like mesa asahi is still on gles 3.1, but try
<liv> okay so uhm
<liv> hyprland kinda crashed when I changed the values from within hyprland
<liv> let me try that again after a reboot :P
<j`ey> cant get to a tty
<j`ey> ?
<liv> reboot was easier
<j`ey> heh
matteo has joined #asahi-alt
<liv> works now, don't even need the env vars
<j`ey> alright, great
<liv> Now I need to wait for DP Alt Mode to be in the kernel and then I'll replace macOS entirely /sarc
<j`ey> last time I tried my external display it didnt even work with macOS
<liv> I am going to try HDMI
<liv> Work flawlessly
<liv> Don't even need some xrandr commands like I used to script when daily-driving DWM
<liv> Thank you so much j`ey!
<j`ey> np, glad it's working
<liv> Now I need to figure out how to compile firefox, there was some weird issue...
tpz has joined #asahi-alt
matteo_ has joined #asahi-alt
matteo has quit [Read error: Connection reset by peer]
matteo_ has quit []
millenialhacker has quit [Remote host closed the connection]
tpz has quit [Read error: Connection reset by peer]
<liv> `hyprctl dispatch exit` works, but it just shows a black screen.
<liv> (will post my findings here if I find a solution)
<liv> according to Viola in Matrix: "yeah it causes a gpu fault sometimes when exiting, and some gpu faults may break the gpu driver"
<j`ey> is that about asahi?
<j`ey> check dmesg!
<liv> yeah
<liv> i will check dmesg in a bit
<liv> and some gpu faults may break the gpu driver 
<liv> oops
<j`ey> which comment?
<liv> No clue, Viola linked me that
<liv> well I will probably not really exit Hyprland so it's fine for now, *i guess?*
<j`ey> well dmesg will tell you if there actually was a gpu fault
<j`ey> asahi driver basically never faults, so Im surprised if it is that..
<liv> weird...
<liv> Ill see next time I need to close Hyprland
billak has joined #asahi-alt
<liv> I'll try the newest from GitHub
Compassion has joined #asahi-alt
<liv> it works for some reason now
<liv> 4th time is the charm I guess?
jacksonchen666 has joined #asahi-alt
<tpw_rules> yuka: you around?
<yuka> yes
<tpw_rules> pm?
<yuka> sure
<yuka> or matrix @yuka@yuka.dev
<yuka> * @yuka:yuka.dev
<yuka> silly matrix syntax
<liv> I like Matrix' syntax better than Mastodon or something else :P
tpz has joined #asahi-alt
jeisom has joined #asahi-alt
tpz has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-alt
millenialhacker has quit [Remote host closed the connection]
<liv> j`ey: or chadmed: I can't seem to build Firefox, any idea?
<liv> emerge errors ^^
<j`ey> multilib seems weird
<leio> liv: this is ffmpeg failing, and you have cut away the interesting bits from the beginning
<j`ey> /var/tmp/portage/media-video/ffmpeg-6.1-r1/temp/build.log will be the important bit i guess
<liv> ill merge ffmpeg itself and upload the log
<leio> that's what you did already, the first part ;)
<leio> * (media-video/ffmpeg-6.1-r1:0/58.60.60::gentoo, ebuild scheduled for merge), Log file:
<leio> * '/var/tmp/portage/media-video/ffmpeg-6.1-r1/temp/build.log'
<j`ey> --cpu=host not supported with compiler aarch64-unknown-linux-gnu-gcc
<liv> I meant the .log indeed
<j`ey> I wonder if thats why chadmed has set CHOST?
<leio> No
<j`ey> (sorry just guessing, ive never run gentoo :D)
<liv> I use COMMON_FLAGS="-march=native -O2 -pipe"
<j`ey> I thnk you want to set mcpu
<liv> When I used chadmed's compile flags, everything failed
<leio> chadmed uses clang, not gcc
<leio> gcc has no clue what M1 or M2 CPUs are and has no clue how to optimize for them
<liv> Ah...
<leio> that was my core takeaway from the ffmpeg failure, and I switched to clang as well
<j`ey> tbh I bet llvm doesnt do much for them either
<leio> my workaround is in there, it's some gcc bug
<liv> How can I tell `emerge` to use `clang`?
<leio> my understand is that it optimizes for some early iPhone used CPU in terms of tuning
<leio> (clang m2 cpu setting)
<leio> or something we can do for the ffmpeg with gcc thing above?
<leio> liv: Using clang is a bit of a bigger ordeal. Maybe you want to apply the workaround for now instead
billak has quit [Quit: Konversation terminated!]
<chadmed> j`ey: llvm's processor model for all apple devices is aliased back to Cyclone lmfao
<leio> you can save it as /etc/portage/patches/media-video/ffmpeg/gcc-apple-workaround.patch
<leio> and then it should applied when you try again
<leio> more info on that technique: https://wiki.gentoo.org/wiki//etc/portage/patches
<leio> but I haven't seen a full build log, so I'm not even sure yet it's this problem, but smells like it.
<j`ey> chadmed: ;_;
<liv> sent chadmed a dm on matrix
<liv> "yeah do what leio suggested"
<liv> alright
<liv> * User patches applied.
<liv> Seems to work now
<liv> For reference, what did you Google? So I know how to search for this stuff...
<leio> I didn't google anything, I'm the person that wrote that dirty patch (I'm also a Gentoo maintainer)
<leio> but I did re-find it by searching https://bugs.gentoo.org/ for media-video/ffmpeg
<liv> ffmpeg is compiled :D
millenialhacker has joined #asahi-alt
millenialhacker has quit [Remote host closed the connection]
jacksonchen666 has quit [Ping timeout: 480 seconds]
millenialhacker has joined #asahi-alt
millenialhacker has quit [Remote host closed the connection]
millenialhacker has joined #asahi-alt
chadmed has quit [Quit: Konversation terminated!]
chadmed has joined #asahi-alt
millenialhacker has quit [Remote host closed the connection]
millenialhacker has joined #asahi-alt
<liv> firefox too :)
<j`ey> wee
<sam_> leio: let's talk tomorrow about how to handle ffmpeg, but no news on the gcc side
millenialhacker has quit [Read error: No route to host]
millenialhacker has joined #asahi-alt
millenialhacker has quit [Remote host closed the connection]
millenialhacker has joined #asahi-alt
tpz has joined #asahi-alt
DevEthann has joined #asahi-alt
DevEthann has quit []
DevEthann has joined #asahi-alt
DevEthann has quit []
DevEthann has joined #asahi-alt
DevEthann has quit [Remote host closed the connection]
DevEthann has joined #asahi-alt
DevEthann has quit []
<liv> How does sleep work exactly? Is that a command, can I create a rule that makes my laptop sleep when I close the lid? Does it automatically resume when I open the lid? etc
rino has joined #asahi-alt
<j`ey> it does it in a 'normal' linux way. systemd can automatically handle that
<j`ey> I dont exactly know how systemd works it out, but there's SW_LID event that it listens for