2023-03-07
00:09Guest3132 has quit [Ping timeout: 480 seconds]
00:50aratuk has quit [Remote host closed the connection]
01:37aratuk has joined #asahi
01:50nafod has quit [Read error: Connection reset by peer]
01:50nafod has joined #asahi
01:52aratuk has quit []
02:10rayanamukami3 has quit [Ping timeout: 480 seconds]
02:11akspecs_ has quit [Remote host closed the connection]
02:11akspecs has joined #asahi
02:20rayanamukami3 has joined #asahi
02:40zef_ has joined #asahi
02:47zef has quit [Ping timeout: 480 seconds]
02:52rayanamukami3 has quit [Ping timeout: 480 seconds]
02:59rayanamukami3 has joined #asahi
03:14julio7359 has quit [Ping timeout: 480 seconds]
03:20kesslerd has quit [Remote host closed the connection]
03:34julio7359 has joined #asahi
04:03Zopolis4 has joined #asahi
04:28wintp has quit [Quit: Connection closed for inactivity]
04:32user982492 has joined #asahi
04:55marvin24_ has joined #asahi
04:59marvin24 has quit [Ping timeout: 480 seconds]
05:00c10l has quit [Quit: Bye o/]
05:01c10l has joined #asahi
05:02julio7359 has quit [Ping timeout: 480 seconds]
05:25eroc1990 has quit [Quit: The Lounge - https://thelounge.chat]
05:25julio7359 has joined #asahi
05:25eroc1990 has joined #asahi
05:27rvalue has quit [Quit: ZNC - https://znc.in]
05:27rvalue has joined #asahi
05:37rg has joined #asahi
05:38taniyama has joined #asahi
05:48possiblemeatball has quit [Quit: Quit]
05:48taniyamamy RTC time is stuck in 1970, any idea on how I could fix it? Any help would be appreciated
05:51taniyamai've tried timedatectl set-local-rtc but after a resstart, the clock is back at January 1st, 1970
05:55taniyama has quit [Remote host closed the connection]
05:58Guest6706 has quit [Quit: G-line: User has been permanently banned from this network.]
06:01vx has joined #asahi
06:01vx is now known as Guest6921
06:16user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:19ciggi has joined #asahi
06:26Zeroine has joined #asahi
06:43ciggi has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
06:52Zopolis4 has quit []
06:59rg has quit [Read error: Connection reset by peer]
07:00Zopolis4 has joined #asahi
07:03rg has joined #asahi
07:07maz_ is now known as maz
07:07rg has quit [Read error: Connection reset by peer]
07:18guillaume_g has joined #asahi
07:21c10l has quit [Read error: Connection reset by peer]
07:21c10l has joined #asahi
08:06MajorBiscuit has joined #asahi
08:07thansen has quit [Remote host closed the connection]
08:09thansen has joined #asahi
08:15Major_Biscuit has joined #asahi
08:16MajorBiscuit has quit [Ping timeout: 480 seconds]
08:17thansen has quit [Read error: Connection reset by peer]
08:20bisko has joined #asahi
08:25ciggi has joined #asahi
08:29thansen has joined #asahi
08:37thansen has quit [Read error: Connection reset by peer]
08:39thansen has joined #asahi
08:39Zeroine has quit [Quit: Connection closed for inactivity]
08:43hendry has joined #asahi
08:43hendry has quit []
08:47thansen has quit [Read error: Connection reset by peer]
08:49thansen has joined #asahi
08:58thansen has quit [Read error: Connection reset by peer]
09:00thansen has joined #asahi
09:05nyilas has joined #asahi
09:07nyilas has quit [Remote host closed the connection]
09:09thansen has quit [Read error: Connection reset by peer]
09:10thansen has joined #asahi
09:14gladiac has joined #asahi
09:14nyilas has joined #asahi
09:20thansen has quit [Read error: Connection reset by peer]
09:20thansen has joined #asahi
09:26DarkShadow44 has quit [Quit: ZNC - https://znc.in]
09:26DarkShadow44 has joined #asahi
09:28gladiac has quit [Quit: k thx bye]
09:29thansen has quit [Read error: Connection reset by peer]
09:30Lazlo has quit [Quit: ZNC 1.9.x-git-251-64da93f7 - https://znc.in]
09:42thansen has joined #asahi
09:51thansen has quit [Read error: Connection reset by peer]
09:55svenmort_: I don’t know much about the idle code but from those LKML threads it seems to me that the issue is on the core code
10:02mort_sven: the issue that it doesn't work without a cpuidle driver is in the core code, I'm looking at maybe being able to use the cpuidle-arm driver on the M1
10:05thelounge98 has joined #asahi
10:06mort_chadmed: yes, but it gets those idle states from the devicetree: and it has a hard coded wfi idle state that doesn't rely on psci. If there was a way to tell it to activate, but not give it any idle states other than the default wfi one, I don't see any reason why it wouldn't work
10:07mort_I made a kernel like that yesterday but I must've messed up building it somehow, everything worked including sddm except that plasma failed to start due to a bunch of Qt errors..
10:08mort_so I didn't get to test whether the idle thing actually worked or not before going to sleep
10:10chadmedright right so your plan is to just hack in a path where it keeps the core in WFI if theres no psci interface available?
10:14kettenis_ is now known as kettenis
10:16thansen has joined #asahi
10:16mort_well, just remove the code which says, "if there was no additional idle states in the devicetree, don't activate the driver"
10:17DarkShadow44 has quit [Quit: ZNC - https://znc.in]
10:17mort_then if that was ever to be upstreamed I suppose we'd need to add another devicetree thing which lets you opt in to using the cpuidle-arm driver despite not having additional idle states, as it is it would try to activate on any system if the aforementioned check is removed
10:19DarkShadow44 has joined #asahi
10:23thansen has quit [Read error: Connection reset by peer]
10:25thansen has joined #asahi
10:29chadmedif idle-states has binding documentation you could propose just adding "wfi" as a valid value or somethign
10:31chadmedits easier for us to add stuff to our devicetrees that we maintain than it is to get totally new bindings and mechanisms upstreamed
10:31commandoline has joined #asahi
10:34mort_the issue is, at the moment, all devices with additional psci devices get wfi for free, it's not listed in the devicetree anywhere; and all the logic to add idle states from the devicetree are highly psci specific and the function has psci in the name
10:34commandoline has quit []
10:35mort_I don't see a clean way to make that code add a wfi idle state without possibly breaking existing devicetrees or at least making kinda semantically weird changes to make psci code card about wfi
10:35commandoline has joined #asahi
10:37mort_the logic is pretty much, "Here's the set of PSCI idle states", not "Here's the list of idle states, this one and that one happens to use PSCI"
10:51mort_Hmm. Thinking about it from an upstream perspective: one approach would lead to a generic arm cpuidle driver which at least makes WFI idle work on non-PSCI devices, and then non-PSCI devices could add their own hardware specific cpuidle driver as they get to that point. The other approach leads to the one psci driver being the only option on arm,
10:51mort_so non-PSCI devices don't even get WFI idle until they have made a hack to make their hardware look like it supports PSCI to the rest of the kernel
10:52mort_I won't argue against the second approach since I don't know enough about it, but it feels a bit weird
10:53mort_maybe Apple's power management stuff is PSCI-like enough that tapering over the differences makes sense
10:56j`ey_well I mean the macOS kernel must do the stuff, for PSCI it's firmware that does it, PSCI just does a hvc/smc
11:16as400 has quit [Remote host closed the connection]
11:19as400 has joined #asahi
11:20thansen has quit [Ping timeout: 480 seconds]
11:31mort_turns out plasma fails to start when installing an edge kernel from an h modified Asahi pkgbuild as well, that's odd. Does anyone know what exact PKGBUILDs commit the current edge kernel was built from?
11:39mort_maybe it breaks because my cbindgen is too new? There was a warning about that but I assumed cbindgen would at least be backwards compatible
11:41nyilas has quit [Remote host closed the connection]
11:45chadmedthe uapi is not stable and the kernel tags usually only work with one or two mesa commits before it breaks again
11:46mort_I mean, I have a mess and a kernel which work together from the repos, I would expect that if I compile my own identical kernel from the exact same kernel source code it would work with the mesa from the repos
11:48mort_the only explanation I can think of is that the kernel isn't actually identical because of bindgen version differences or other toolchain differences
11:49chadmedrust tooling can be super annoying, especially since kernel rust hasnt really settled yet
11:50mort_and yeah, I've done some rust development and the tooling is always kind of a pain.. especially since everyone seems to be using nightly features so you need a nightly rustc but not one that's too new so that the nightly feature has changed
11:52mort_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
11:59hightower2 has joined #asahi
12:05mort_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?
12:16Zeroine has joined #asahi
12:17ciggi has quit [Ping timeout: 480 seconds]
12:22mort_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
12:22mort_SAFEMODE_OFF pair of ioctls, presumably the macaudio driver could automatically run SAFEMODE_OFF when the process which called SAFEMODE_ON exits?
12:23mort_err and I accidentally swapped SAFEMODE_ON and SAFEMODE_OFF a few times, hopefully the meaning came through
12:26chadmedchadmed: 0.61 works fine, 0.64 hard deprecated a flag the kernel folks still use so thats a no no
12:28chadmedalso 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
12:28chadmedwe cant just keep a stream to the pcm open all the time since we need to be able to change sample rate etc
12:29chadmedand also that would be wasteful as the daemon would be constantly doing operations on a zeroed buffer
12:30mort_is it to protect against the daemon crashing, or is it also supposed to protect against the daemon freezing somehow?
12:30chadmedthe driver should kick the codecs into safe mode upon any condition where it cannot be satisfied that userspace is guaranteeing safety
12:31chadmedthis 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
12:34mort_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
12:34chadmedyeah exactly, the driver should go "huh havent heard from userspace in a while it probably died" and put the codecs into safe mode
12:35chadmedideally 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)
12:37mort_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
12:38mort_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)
12:39mort_I think Linux has mechanisms for letting you do arbitrary cleanup stuff when a device fd closes?
12:39mort_I assume video4linux drivers don't poll in order to do cleanup when a process which has called VIDIOC_STREAMON exits
12:40mort_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
12:41chadmedi looked into v4l when i first started tracing avd months and months ago and wanted to cry
12:43mort_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
12:45mort_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
12:49mort_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
13:01mort_if I install linux-asahi-edge from the repos, /lib/modules/6.1.0-asahi-2-2-edge-ARCH does indeed contain an asahi.ko.zst; if I install my own linux-asahi-edge-6.1.asahi2-2-aarch64.pkg.tar.gz, there is no asahi.ko.zst in /lib/modules/6.1.0-asahi-2-2-edge-ARCH, so you're definitely on to something
13:02mort_no mention of DRM_ASAHI in /proc/config.gz on my own build; not even a '# CONFIG_DRM_ASAHI is not set' comment
13:17cy8aer has quit [Remote host closed the connection]
13:17cy8aer has joined #asahi
13:19maanil_ has joined #asahi
13:32bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
14:01bisko has joined #asahi
14:10c10l has quit [Quit: Bye o/]
14:22Zopolis4 has quit []
14:24balrog has quit [Remote host closed the connection]
14:26maanil_ has quit [Quit: Page closed]
14:26maanil has joined #asahi
14:27maanil has quit []
14:28ciggi has joined #asahi
14:28maanil[m]_ has joined #asahi
14:28maanil[m]_ has quit []
14:31Mali has joined #asahi
14:32MaliHi all, I am tempted by the compilation benchmarks of ARM silicon, and willing to get a macbook to run Asahi on in.
14:39mort_the only issues you're gonna encounter from a development standpoint is that not everything might work with ARM Linux, for example Yocto has some issues with using ARM Linux as a build machine (but toolchains generally support ARM Linux build machines no problem)
14:43delsol has joined #asahi
14:46mort_yocto is a system to build your own Linux distro, you can use it to make a distro which works on the raspberry pi but you can also use it for all kinds of other embedded Linux use cases
14:47mort_at the company I work use Yocto to build the system images we put on our embedded Linux products
14:51MaliBut, I presume with more effort, one can setup a dev environment with GCC or LLVM or similar.
14:51possiblemeatball has joined #asahi
14:53mort_mali: what you could do is to set up some arm linux virtual machine with qemu or something, and see if you're able to set up a dev environment which does what you need
14:56kesslerd has joined #asahi
14:56mort_Are you familiar with Docker or Podman? I *think * you should be able to basically just say: podman run --platform linux/arm64 -it ubuntu:22.04
14:58mort_using software development tools on Windows is easier than using hardware design tools on Linux sadly, so I get you
15:03kesslerd has quit [Quit: Konversation terminated!]
15:11mort_apple silicon is aarch64 (I have never heard of aarch64w and google doesn't seem to know about it either?)
15:11MaliThey have Python scripting, sometimes there comes a plugin that even I am jealous, having paid like 6k to Altium
15:15j`ey_it doesnt emulate the m1, but you could use the 'virt' machine to try get a setup working, and that's likely to work on the m1 too
15:16kesslerd has joined #asahi
15:16mort_as long as you've verified that the toolchain works on some aarch64 machine it'll work on the m1 mac as well
15:23iaguis has joined #asahi
15:26balrog has joined #asahi
15:52delsol has quit [Remote host closed the connection]
15:53bisko has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:42jannauhttps://github.com/AsahiLinux/PKGBUILDs/blob/f63adcdce22eb5278520fae78547111809e70dc3/linux-asahi/PKGBUILD#L78
16:43jannauyou don't need to replicate the rest of the pkgbuild if you want to build just your own edge kernel
16:45mort_right now I'm trying to just get a kernel build to work at all, so I'm starting with the one that's as close as possible to the existing linux-asahi-edge I have installed
16:54mort_I wonder if it was just that I hadn't properly cleaned out the build directory after building with bindgen 0.64 earlier...
16:57Mali has quit [Ping timeout: 480 seconds]
17:02Bey0ndB1nary has joined #asahi
17:07chipxxx has joined #asahi
17:07chipxxx has quit [Remote host closed the connection]
17:08chipxxx has joined #asahi
17:17bluetail9 has quit [Ping timeout: 480 seconds]
17:18ladyTel has joined #asahi
17:23maria has quit [Ping timeout: 480 seconds]
17:26gladiac has joined #asahi
17:28ladyTel has quit [Quit: Konversation terminated!]
17:31ciggi_ has joined #asahi
17:35ciggi has quit [Ping timeout: 480 seconds]
17:40ciggi_ has quit [Ping timeout: 480 seconds]
17:40Bey0ndB1nary has quit []
17:43Fischmiep has joined #asahi
17:51delsol has joined #asahi
18:00Major_Biscuit has quit [Ping timeout: 480 seconds]
18:05ciggi has joined #asahi
18:09bluetail9 has joined #asahi
18:10maria has joined #asahi
18:21zshrc has joined #asahi
18:42zshrc has quit [Ping timeout: 480 seconds]
18:45delsol has quit [Remote host closed the connection]
18:46zshrc has joined #asahi
18:49delsol has joined #asahi
18:52zshrc is now known as Guest6969
18:52zshrc has joined #asahi
18:58delsol has quit [Remote host closed the connection]
18:58Guest6969 has quit [Ping timeout: 480 seconds]
19:04zshrc has quit [Quit: leaving]
19:08gladiac has quit [Quit: k thx bye]
19:16___nick___ has joined #asahi
19:36bluetail94 has joined #asahi
19:38___nick___ has quit []
19:40___nick___ has joined #asahi
19:41guillaume_g has quit []
19:41___nick___ has quit []
19:43bluetail9 has quit [Ping timeout: 480 seconds]
19:43___nick___ has joined #asahi
19:49delsol has joined #asahi
19:50i509vcb has quit [Quit: Connection closed for inactivity]
19:58delsol has quit [Read error: Connection reset by peer]
20:00i509vcb has joined #asahi
20:01delsol has joined #asahi
20:05Mali has joined #asahi
20:06delsol has quit [Remote host closed the connection]
20:06Zopolis4 has joined #asahi
20:07giskard has joined #asahi
20:08giskard has quit []
20:44delsol has joined #asahi
20:45iaguis has quit [Quit: leaving]
20:52possiblemeatball has quit [Quit: Quit]
21:02D-Spirits has joined #asahi
21:03possiblemeatball has joined #asahi
21:07Metroid has quit [Quit: See you Space Cowboy]
21:07___nick___ has quit [Ping timeout: 480 seconds]
21:08Metroid has joined #asahi
21:08thansen has joined #asahi
21:28roxfan2 has joined #asahi
21:33roxfan has quit [Ping timeout: 480 seconds]
21:55i509vcbI assume the firmware or something provides enough info to set the proper "iso_layout" but it has not been implemented or handled yet?
22:40bluetail94 has quit []
22:55artemist has quit [Quit: artemist]
22:56artemist has joined #asahi
23:02delsol has quit [Remote host closed the connection]
23:03delsol has joined #asahi
23:08Droop has quit []
23:08D-Spirits has quit [Quit: D-Spirits]
23:09Droop has joined #asahi
23:11delsol has quit [Ping timeout: 480 seconds]
23:25mort_I see what y'all mean with packaging issues... I just tried to install bear (the make compile_commands.json tool), but the package from the alarm repos is linked against libspdlog.so.1 and libfmt.so.8 even though the repos provide packages with libspdlog.so.1.11 and libfmt.so.9 files
23:27malte has joined #asahi
23:28c10l has joined #asahi
23:34ayke_mali: if most of the work you do is programming (not hardware design), you could perhaps use MacOS for the hardware parts? Closed source software (like Altium) is unlikely to support aarch64-linux but if it supports macOS then you could do the hardware design parts in there.
23:36malte has quit [Ping timeout: 480 seconds]
23:36Mali@ayke_ thank you for the help. Unfortunately Altium is Win only, but I already have a machine for that, and it is capable enough.
23:36MaliMy issue is the rust compilation times, I realized that I procrastinate a lot while long builds (:
23:37ayke_Ah, well if it's open source then I'm like 90% sure it'll work just fine. It's closed source software that can be a problem.
23:38mort_I don't remember the numbers exactly but my desktop with a monster r9 5950x is not *that* much faster than my m1 pro laptop at compiling rust
23:39mort_a whole lot of rust compilation is limited in core count, which means the 5950x's core and power advantage doesn't come in to play as much as one might expect
23:41ayke_If all else fails, you could run Windows software in a Windows ARM64 VM (under MacOS, at least until Windows ARM64 runs in KVM). At least in theory you should be able to run x86 software that way.
23:47ayke_mali: when I switched to a MacBook that was a 10x performance increase (not exaggerating). It's certainly more productive to have a fast system.
23:51Droop has quit []
23:52kesslerd_ has joined #asahi
23:52Droop has joined #asahi