#
#asahi · 2023-03-07 12:52
mort_the kernel tag I'm building is the same as the one from the repos as far as I can tell
#asahi · 2023-03-07 12:51
chadmedmaybe your device trees need updating with the ones from the kernel tag youre building
#asahi · 2023-03-07 12:51
chadmedsomethings funky though
#asahi · 2023-03-07 12:51
chadmedtry modprobing it i guess
#asahi · 2023-03-07 12:50
mort_hmm the config.edge has CONFIG_DRM_ASAHI=m
#asahi · 2023-03-07 12:50
chadmedor if you did its not loaded
#asahi · 2023-03-07 12:49
chadmedyou didnt build DRM_ASAHI
#asahi · 2023-03-07 12:49
mort_I think the log ended up with a bunch of boots, not just the current, I suppose I should've said journalctl -b 0 rather than just journalctl or something. Not that it matters
#asahi · 2023-03-07 12:48
mort_I'll try that
#asahi · 2023-03-07 12:48
mort_https://p.mort.coffee/Mli.txt here's the asahi-diagnose output
#asahi · 2023-03-07 12:47
chadmedcan you try dbus-run-session startplasma-wayland from a tty?
#asahi · 2023-03-07 12:45
mort_https://p.mort.coffee/Iqs here's the journalctl log, look near the end for all the qt errors when trying to log in to the plasma wayland session from sddm
#asahi · 2023-03-07 12:44
chadmedsame with whatever qt errors youre getting
#asahi · 2023-03-07 12:43
chadmedrun asahi-diagnose and paste it somewhere and link here
#asahi · 2023-03-07 12:43
mort_ok this is really weird, I compiled the kernel from the linux-asahi pkgbuild, from that "linux-asahi: bump to 6.1.asahi2-2" commit, with bindgen 0.56 and rustc 1.62, and qt is still sad
#asahi · 2023-03-07 12:41
chadmedthe lack of avd support should be all you need to know how that endeavour ended
#asahi · 2023-03-07 12:41
mort_haha
#asahi · 2023-03-07 12:41
chadmedi looked into v4l when i first started tracing avd months and months ago and wanted to cry
#asahi · 2023-03-07 12:40
mort_I sadly only have experience from the userspace side of video4linux (and some printk debugging on the kernel side) so I don't know the details
#asahi · 2023-03-07 12:39
mort_I assume video4linux drivers don't poll in order to do cleanup when a process which has called VIDIOC_STREAMON exits
#asahi · 2023-03-07 12:39
mort_I think Linux has mechanisms for letting you do arbitrary cleanup stuff when a device fd closes?
#asahi · 2023-03-07 12:38
chadmedwould the driver have to poll for the file descriptor
#asahi · 2023-03-07 12:38
mort_that would mimick the VIDIOC_STREAMON + VIDIOC_STREAMOFF/exit-the-process-to-streamoff behavior of video4linux, and would catch the case where the daemon crashes (but not the case where the daemon freezes)
#asahi · 2023-03-07 12:38
chadmedyeah that makes sense
#asahi · 2023-03-07 12:38
mort_MACAUDIO_SAFETYON and MACAUDIO_SAFETYOFF would be ioctls :p
#asahi · 2023-03-07 12:38
chadmedisnt that just an ioctl with extra steps?
#asahi · 2023-03-07 12:37
mort_something), the macaudio driver sets the speakers in the safe mode
#asahi · 2023-03-07 12:37
mort_what I'm thinking would be possible is: represent the speakers as a device (/dev/macspkr?), speakersafetyd opens that device and gets an fd, calls MACAUDIO_SAFETYOFF on it, that makes macaudio set the speakers in the not-safe mote, and then if either the daemon calls MACAUDIO_SAFETYON *or* the fd is closed (because the process crashed or
#asahi · 2023-03-07 12:35
chadmedideally id like there to be a module parameter to suppress this behaviour because i want to run without the daemon myself (to dogfood userspace dsp safety and easily run tests on new devices without patching the kernel)
#asahi · 2023-03-07 12:34
chadmedyeah exactly, the driver should go "huh havent heard from userspace in a while it probably died" and put the codecs into safe mode
#asahi · 2023-03-07 12:34
mort_it has to be either told from the userspace that userspace isn't doing its job, or have some other mechanism to detect that userspace isn't doing its job; the proposed "ping" approach would let the driver automatically detect when the userspace daemon has crashed or frozen somehow, right? Since the driver would no longer be getting pings
#asahi · 2023-03-07 12:31
chadmedthis process should be transparent to userspace entirely as the safe mode register does not smush the DVC register or any other setting we expose to userspace
#asahi · 2023-03-07 12:30
chadmedthe driver should kick the codecs into safe mode upon any condition where it cannot be satisfied that userspace is guaranteeing safety
#asahi · 2023-03-07 12:30
mort_is it to protect against the daemon crashing, or is it also supposed to protect against the daemon freezing somehow?
#asahi · 2023-03-07 12:29
chadmedthe daemon needs to be able to stop all that and just keep kicking the driver
#asahi · 2023-03-07 12:29
chadmedwaste of cycles
#asahi · 2023-03-07 12:29
chadmedand also that would be wasteful as the daemon would be constantly doing operations on a zeroed buffer
#asahi · 2023-03-07 12:28
chadmedwe cant just keep a stream to the pcm open all the time since we need to be able to change sample rate etc
#asahi · 2023-03-07 12:28
chadmedalso re speaker safety we need something that the daemon can kinda poll while its not streaming since the idea is for the codec to go into safety mode (a special hardware register mode) when the deamon doesnt kick the driver
#asahi · 2023-03-07 12:28
mort_interesting that 0.64 didn't straight up error then, huh
#asahi · 2023-03-07 12:27
mort_haha :p
#asahi · 2023-03-07 12:27
chadmedmort_: err sorry meant to ping you not myself :P
#asahi · 2023-03-07 12:26
chadmedchadmed: 0.61 works fine, 0.64 hard deprecated a flag the kernel folks still use so thats a no no
#asahi · 2023-03-07 12:23
mort_err and I accidentally swapped SAFEMODE_ON and SAFEMODE_OFF a few times, hopefully the meaning came through
#asahi · 2023-03-07 12:22
mort_(sorry, I was just reading about the fail safe thing in speakersafetyd's readme)
#asahi · 2023-03-07 12:22
mort_SAFEMODE_OFF pair of ioctls, presumably the macaudio driver could automatically run SAFEMODE_OFF when the process which called SAFEMODE_ON exits?
#asahi · 2023-03-07 12:22
mort_regarding speaker safety: we already have mechanisms in the kernel for making things happen when the process using a hardware device exits. For example, if a process opens a v4l2 device, calls IOCTL_STREAMON on it, and then crashes, the driver automatically cleans up and stops streaming frames from the device. If there was some SAFEMODE_ON and
#asahi · 2023-03-07 12:07
mort_I suppose I'm grabbing the source for 0.56 from github and installing from there
#asahi · 2023-03-07 12:05
mort_chadmed: hmm I need to install bindgen-cli 0.56.0 I'm guessing (since that's what the warning says is expected), but on the only versions on crates.io are 0.61-0.64?
#asahi · 2023-03-07 11:52
mort_I hope the language eventually matures, to the point that there are few breaking changes, no reason to use nightly features, and no more essential tooling and libraries on a 0.x version

plus ›