2023-04-02
01:05drubrkletern has joined #asahi-dev
01:24hightower2 has quit [Remote host closed the connection]
01:28Urriellu has quit [Ping timeout: 480 seconds]
02:17Hibyehello has quit [Read error: Connection reset by peer]
02:20Hibyehello has joined #asahi-dev
02:22raveling has joined #asahi-dev
02:51drubrkletern has quit [Remote host closed the connection]
03:26cylm has joined #asahi-dev
03:39stipa is now known as Guest9642
03:39stipa has joined #asahi-dev
03:41Guest9642 has quit [Remote host closed the connection]
03:50Urriellu has joined #asahi-dev
03:50user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:14orowith2os has joined #asahi-dev
06:14orowith2osjannau: about your comments on https://oftc.irclog.whitequark.org/asahi-dev/2023-03-31, the intent in offering the drivers in Flatpak is so that they can be used in sync with the kernel.
06:14orowith2oswithout them in Flatpak format, there's no GPU acceleration for *any* flatpaks.
06:15orowith2osI have updating set up to follow the main Asahi Linux mesa updates; if a distro uses a different update cycle, they would have to provide their own Flatpak.
06:16orowith2osThe intent here is to *only* support the main Asahi Linux kernel and Mesa.
06:16orowith2osso syncing userspace with the kernel isn't an issue, so long as you follow Asahi Linux updates *very* closely.
06:34stipa is now known as Guest9649
06:34stipa has joined #asahi-dev
06:34Guest9649 has quit [Read error: Connection reset by peer]
06:47Urriellu has quit [Ping timeout: 480 seconds]
06:55seeeath has joined #asahi-dev
06:55dottedmagFlatpack isolation idea really breaks down with huge-GPU-piece-of-code-in-userspace situation.
06:59orowith2os*Flatpak, and not really.
07:00orowith2osby design, Flatpak can't really bring things in from the host; that's why it bundles the NVIDIA drivers. If the OS wants to provide a more-or-less glibc-version-independent driver, it can do so easily. But otherwise, there's no guarantee on ABI stability or drivers working.
07:01orowith2osFor example, Steam brings in the drivers from the host, but that fails when the system isn't using glibc or it has to provide its own version of glibc.
07:02orowith2osFlatpak doesn't have an issue because it provides its own *stable* drivers
07:03seeeath has quit [Ping timeout: 480 seconds]
07:04orowith2osPulling in the host drivers also presents issues, particularly when architectures come into play. For something like Asahi Linux, it has to use emulation to run Steam, but Steam can't pull in the graphics drivers *because they're made with aarch64*
07:05orowith2osso you'd have to bundle an x86 version of Mesa
07:05orowith2oswhich Flatpak conveniently has full support for
07:05orowith2osas well as alternative arches emulation
07:08nicolas17 has quit [Quit: Konversation terminated!]
07:25eiln has joined #asahi-dev
07:37raveling has quit [Ping timeout: 480 seconds]
07:37raveling has joined #asahi-dev
07:58orowith2os has quit [Remote host closed the connection]
08:00dottedmagMesa is basically a GPU driver in userspace (among other things). NVidia userspace part is the same. This is the breakage I'm talking about: Flatpak has to take on a role of abstracting hardware, the role customarily reserved for OS kernel. For the most of the hardware kernel ABI is the interface, and userspace is more-or-less insulated from the vagaries of hardware. Not so with GPUs. In a microkernel design GPU driver would probably
08:57raveling has quit [Ping timeout: 480 seconds]
09:04raveling has joined #asahi-dev
09:06i509vcb has quit [Quit: Connection closed for inactivity]
09:13raveling has quit [Ping timeout: 480 seconds]
09:18raveling has joined #asahi-dev
09:27raveling has quit [Ping timeout: 480 seconds]
09:33raveling has joined #asahi-dev
09:42raveling has quit [Ping timeout: 480 seconds]
09:59nela5 has joined #asahi-dev
10:04nela has quit [Ping timeout: 480 seconds]
10:04nela5 is now known as nela
10:05raveling has joined #asahi-dev
10:08blasty has quit [Remote host closed the connection]
10:14raveling has quit [Ping timeout: 480 seconds]
10:24raveling has joined #asahi-dev
10:32raveling has quit [Ping timeout: 480 seconds]
10:38raveling has joined #asahi-dev
10:39sefidel has quit [Remote host closed the connection]
10:43sefidel has joined #asahi-dev
10:47raveling has quit [Ping timeout: 480 seconds]
11:02raveling has joined #asahi-dev
11:10raveling has quit [Ping timeout: 480 seconds]
11:12gabuscus_ has quit []
11:13gabuscus has joined #asahi-dev
11:13amarioguy has quit [Ping timeout: 480 seconds]
11:20raveling has joined #asahi-dev
11:23marcanAIUI there is a way to bundle Flatpak runtime overlays with the OS. that is what would need to happen here, distributed as an Arch package.
11:24marcanit needs to be something I can build and push locally so I can push updates coinciding with mesa/kernel updates as we do for everything else
11:29kode54 has quit [Quit: Ping timeout (120 seconds)]
11:31raveling has quit [Ping timeout: 480 seconds]
11:32kode54 has joined #asahi-dev
11:35raveling has joined #asahi-dev
11:44raveling has quit [Ping timeout: 480 seconds]
11:49raveling has joined #asahi-dev
11:58kettenis_ has joined #asahi-dev
12:00kettenis has quit [Ping timeout: 480 seconds]
12:06raveling has quit [Ping timeout: 480 seconds]
12:15raveling has joined #asahi-dev
12:23raveling has quit [Ping timeout: 480 seconds]
12:29amarioguy has joined #asahi-dev
12:33darkapex1 has quit []
12:33darkapex has joined #asahi-dev
12:40eiln has quit [Remote host closed the connection]
12:40eiln has joined #asahi-dev
12:41eiln has quit [Remote host closed the connection]
12:43raveling has joined #asahi-dev
12:53raveling has quit [Ping timeout: 480 seconds]
13:00orowith2os has joined #asahi-dev
13:01orowith2osdottedmag: Flatpak does nothing of the sort. It just gives you the /dev device and, if you know how to communicate with it, you can do so. Everything else is handled by the kernel, including sandboxing features.
13:02orowith2osmarcan: That won't work unless you follow a model similar to NVIDIA, where you build with the oldest known used glibc version and link to *only* that.
13:02eiln has joined #asahi-dev
13:03orowith2osThe Mesa package I have right now will keep in sync with the current updates, the only work that needs to be done is setting up a Flatpak repository.
13:04orowith2osI've put some thought into it, and agonized quite a bit over getting it to work. I'm confident in it working just fine.
13:08orowith2osActually, when I enabled updates for it, it updated to the latest release right away. The workflows succeeded too. https://github.com/orowith2os/mesa-asahi-flatpak/commit/71dc18316a2127cfeee36fc5848fc75d3733261c
13:09orowith2osAll it would need to do is publish right after Mesa gets updated and it'll work just fine.
13:09orowith2osThere's not really any other solution here :shrug:
13:15raveling has joined #asahi-dev
13:23raveling has quit [Ping timeout: 480 seconds]
13:32raveling has joined #asahi-dev
13:41raveling has quit [Ping timeout: 480 seconds]
13:41raveling has joined #asahi-dev
13:50raveling has quit [Ping timeout: 480 seconds]
13:56raveling has joined #asahi-dev
14:01kettenis_and I can't find anything in the device tree schema that suggests that floating-point numbers are supported
14:02eiln has quit [Remote host closed the connection]
14:06raveling has quit [Ping timeout: 480 seconds]
14:09raveling has joined #asahi-dev
14:19jannaukettenis_: https://github.com/AsahiLinux/linux/commit/a636217494a787bbb92ae12976e086779b6694bf
14:22raveling has quit [Ping timeout: 480 seconds]
14:23orowith2osmarcan: The Flatpak runtime includes a specific version of libc, in most cases older then Arch's (and alarm's). If you try to toss the native driver into Flatpak, you are going to run into glibc version errors, as well as llvm libraries and the like.
14:24orowith2osNVIDIA doesn't have an issue because it links against an older version, one that works with some of the oldest runtimes available
14:24orowith2osAsahi would need to do the same to achieve something similar
14:24marcanI think you misunderstood me. I'm saying we'd ship the same flatpak thing you're building, built the same way, just wrapped in an Arch package.
14:25orowith2oshmmm, maybe?
14:25orowith2osWant to give it a try?
14:25orowith2osI have something you can base it off of
14:26orowith2osmarcan: you're thinking of the host driver, that merge request uses it for the NVIDIA driver, for example
14:26orowith2oslet me get some more resources
14:27marcanand then the other thing is just being able to run the build locally, both because everything else is like that and because you saw how the GH runners do :p
14:27orowith2osI'd like to make a quote from the article:
14:27orowith2osIf you are a distro packager I do believe it makes sense to start making a nvidia package for the Flatpak extension especially for beta versions. This should probably not be used to package host versions of Mesa though because they link to host libraries outside of libc.
14:28orowith2oswait, still misunderstood
14:28orowith2ossorry
14:28orowith2osI thought you still meant building the driver on the host and mounting it in inside of Flatpak
14:28orowith2osyou mean building it inside of Flatpak, as intended, and shipping those binaries through the native package manager?
14:28raveling has joined #asahi-dev
14:28orowith2osI think that's doable
14:29marcanthe goal here is that this way we *know* people get everything in sync with a pacman upgrade, which is the only sane way to survive the UAPI instability phase without users hating us
14:29orowith2osMakes sense
14:29orowith2oshow do you want to handle builds?
14:30orowith2osToss me some aarch64 runners for github, generate an archive, and the pacman package extracts and moves around those binaries?
14:30marcanas I said, ideally something I can run myself locally, end to end (flatpak side and pacman side)
14:30marcaneven better if we can outright stick everything into our existing PKGBUILDs repo and duct tape it together :)
14:31orowith2osmmmm, I'd rather have the flatpak manifest in its own repo, for my own sanity
14:31orowith2oswant to make a repo on the AsahiLinux org and push the current repo there?
14:31marcanwell, for my own sanity I'd rather not have to push to even more repos every time I need to bump the version...
14:32orowith2osmarcan: it'll update for you, all you need to do is update the PKGBUILD
14:32marcanhttps://github.com/orowith2os/mesa-asahi-flatpak/blob/main/org.freedesktop.Platform.GL.asahi.metainfo.xml
14:32orowith2osit updates those too
14:33orowith2osthe workflows
14:33orowith2ossee the diff here: https://github.com/orowith2os/mesa-asahi-flatpak/commit/71dc18316a2127cfeee36fc5848fc75d3733261c
14:33orowith2osso long as it knows what to check for, it'll keep in sync with that
14:33marcanoh https://github.com/orowith2os/mesa-asahi-flatpak/blob/main/org.freedesktop.Platform.GL.asahi.yml#L105
14:34orowith2osFlathub has a bot go through all packages it hosts and updates them using that mechanism
14:34orowith2osthe local workflows here do that too, on a similar schedule
14:34amarioguy has quit [Read error: Connection reset by peer]
14:35orowith2oswhat I've been having trouble with is generating usable archives from the workflows
14:35marcanokay I see how that works but given I trigger everything myself anyway... doesn't it make more sense to just do it myself?
14:35orowith2oswhen a commit is pushed, namely a mesa update, it'll build for you
14:36orowith2osyou can also build it manually if desired
14:36marcanI know, but I only push commits to that branch when they're ready for release, and we also have a dev repo and we need to keep the flatpak stuff following the same pattern
14:36marcanI mean this automagic pull stuff makes sense when it's a third party doing one side, but in this case I want to be in charge of both sides
14:36orowith2osWe can make a separate branch for dev
14:37raveling has quit [Ping timeout: 480 seconds]
14:37orowith2osif you have a dev PKGBUILD I can base a workflow off of, that would work just fine. Or, if everything's local, point toward a specific source URL for Mesa
14:37raveling has joined #asahi-dev
14:38orowith2osoh yeah this is doable
14:38marcanstuff just gets synced from there to the main repo once I'm happy that it's in a good state
14:38orowith2osjust make the update workflow check a dev branch, and change the URL it searches
14:39orowith2oswant me to get on that?
14:39marcanokay but as I said, doesn't it make more sense for me to trigger these builds somehow from the PKGBUILD that will ship them, instead of all this checker/pull stuff?
14:39orowith2osYou can build the Flatpak by running a command like this: `flatpak-builder --user --install --force-clean build-dir org.irssi.irssi.yaml`
14:39marcanthen I can plug that into a PKGBUILD for mesa-asahi-edge-flatpak or something, and we tell people to install that for flatpak support, and that's thaat
14:40orowith2osIs there a way to trigger a workflow from another git repository?
14:41orowith2osThat's that the x-checker-data does, though?
14:41orowith2osIf it searches often enough, or has a webhook trigger, the flatpak will update whenever the PKGBUILD is
14:41orowith2osI'm probably misunderstanding
14:42orowith2osit's easier when I have something to base off of
14:42marcannone of this should involve github, it should just be another PKGBUILD I can just makepkg which itself invokes the flatpak-builder command (and hopefully there is some way of passing the version via environment/arg so we don't need to keep updating those files)
14:42jannauthe flatpak is ideally build on the same system as the asahi linux PKGBUILDs without involvment of any github workflow
14:43orowith2osyeah, that can be done
14:43orowith2ospoint the flatpak manifest toward the git repo that the PKGBUILD clones and whenever you build the PKGBUILD, it'll update the flatpak too
14:43orowith2osfrom there it's moving files around
14:43marcanI mean the url: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-20230311/mesa-asahi-20230311.tar.bz2
14:44orowith2osYou can't take in variables from outside the build env, no
14:45orowith2osbut what you *can* do is clone asahi/mesa to the normal PKGBUILD clone directories and point the flatpak towards the local directory
14:45orowith2osyeah, whatever the PKGBUILD uses, the flatpak will too
14:45orowith2osyou see the current sources, where it has a git url, checksums, etc?
14:46orowith2osthere are other source types, namely `dir`
14:46raveling has quit [Ping timeout: 480 seconds]
14:46marcanand then how is the actual flatpak versioned? like is there metadata that has to contain the version somewhere?
14:46orowith2osyou don't strictly have to have the metadata outside of flathub
14:46orowith2osit's allowed to just neglect it
14:47orowith2oskeep in mind you'll have to build the flatpak for every branch of the freedesktop runtime
14:47orowith2osonly the currently supported ones
14:47orowith2os21.08 and 22.08
14:47orowith2osnot without risking ABI breakage
14:47orowith2oswhat does asahi/mesa link against?
14:48raveling has joined #asahi-dev
14:48orowith2osif it were to link against glibc.so, and the ABI changed from 21.08 to 22.08 in a breaking way, the flatpak would be broken. That's what I mean by risking breakage
14:48orowith2ossomething like NVIDIA doesn't have an issue because it links to glibc.so and *only* glibc.so, and an old one at that
14:49orowith2ostheoretically, if it did
14:49orowith2osthat's the situation we'd have on our hands
14:49orowith2oscan't say you're wrong
14:49marcanother libs break ABI all the time, glibc certainly does not, they have all kinds of versioned symbol stuff for that
14:49orowith2osback to my previous question: what does asahi/mesa link against?
14:50orowith2osoh, no, that'll be fine
14:50orowith2osread the manifest again
14:50orowith2osat the end, it copies the LLVM library to the driver
14:52orowith2osif ABI stability is guaranteed for the libraries, we'll be fine. If not, drag em into the extension and pray for the best.
14:53orowith2osokay, so now that the ABI is out of the way
14:53marcanI don't think ABI stability is "guaranteed", but libstdc++ already learned the breaking ABI lesson, and the others are .1 versions which tells me they're not fans of breaking ABI
14:53orowith2oshow do you want to handle multiarch?
14:54orowith2osaarch64 can easily be provided, but I made the flatpak with the express intention of supporting x86
14:54orowith2osit builds on x86, at least
14:54marcanit's entirely possible the answer will be "we won't, until fedora, and call it a fedora perk" because exploding combinatronics are no fun and we are going to be moving wholesale to fedora as the main supported distro anyway
14:54orowith2osFlatpak also has built-in support for binfmt_misc, so it can make an x86 environment to build in
14:55marcanbut ultimately whatever we do for host-side multiarch will have to involve host-side x86 packages and then the flatpak stuff can just tag along the same way in that environment
14:55orowith2osgood enough
14:56orowith2osyou'll have to add qemu and the like as a dependency to the PKGBUILD unless you can manage to run the builds on a mix of aarch64 and x86
14:56marcanI do have a threadripper that's going to be very idle once I stop daily driving gentoo :p
14:57orowith2oscan you split a PKGBUILD into different sections for different runners, like a mixed x86<->aarch64 PKGBUILD?
14:57marcanthe same PKGBUILD can be used on multiple arches and if you must you can check for the arch
14:57marcanbut there are a bunch of other questions to be asked there because the use case for this is FEX and FEX requires funny things to build a rootfs and yada yada
14:57orowith2osworks for me, the core Mesa stuff can be disabled on x86 anyways
14:58orowith2osthe native libs
14:58raveling has quit [Ping timeout: 480 seconds]
14:58orowith2osonly for Flatpak, unless you want to support the Asahi driver on x86 outside of Flatpak too
14:59orowith2osah, alright
14:59orowith2osx86 will need one extra patch file, for 32-bit support
14:59orowith2oswe're a bit blocked on an upstream issue
15:00orowith2osSome people just wanna play Crysis
15:00orowith2osthrough Steam
15:01marcanorowith2os: either way the layers involved in steam stuff on FEX on x86 make me unclear on whether the flatpak stuff is even going to make sense, so let's punt on all that until the whole thing is clearer
15:01orowith2osmmmmmmm, I really don't wanna
15:02orowith2os~~I've been doing everything so far from an x86 machine~~
15:02orowith2osthe only arm systems I have right now are my raspberry pis
15:03orowith2osyou can't use the *asahi* driver
15:03orowith2oswhen this was starting out, I ran it on CPU renderers
15:03orowith2osto be sure it was packaged correctly and all
15:04orowith2osalright, I'll get on making some build scripts
15:04orowith2oswhere does makepkg store the sources?
15:04orowith2osrelative to the PKGBUILD directory
15:04orowith2osso the Mesa source would me src/mesa?
15:05orowith2osgrrrr
15:06orowith2osI'll have to figure out how to get $_asahiver in there
15:06orowith2osthat would be nice
15:06orowith2ossrc/mesa to src/mesa-asahi-$_asahiver
15:07orowith2osWe're trying to sort out Flatpak support in the Asahi driver
15:08seeeath has joined #asahi-dev
15:09raveling has joined #asahi-dev
15:11leeaster has joined #asahi-dev
15:11leeaster is now known as baahemian
15:12orowith2osmarcan: can you hop over onto Matrix for sorting out the Flatpak stuff? I still need to set up a proper IRC client and I'd like to share stuff like code blocks more easily.
15:14marcanit's midnight here, I'm about to crash, and I'd prefer to keep discussion here since here is where the community is
15:15orowith2osalrighty
15:16marcanthis isn't going to be very complicated anyway, if you can give me some flatpak yaml that can build the flatpak out of some relative directory of your choosing I can deal with the PKGBUILD side
15:16orowith2osI'll push it to a branch you can clone
15:16marcanideally also tell me what arch/ALARM packages I need as dependencies to do all this (flatpak-builder))
15:16orowith2osoh yeah I'll have checks for all those in a build script too
15:17kettenis_marcan: the device tree floating-point is annoying since it means I can't build the asahi-wip device trees for testing with u-boot and OpenBSD anymore
15:17marcankettenis_: sounds like you're in a great position to start pushing through the float support then! :D
15:17marcanyeah well it's either this or we start putting binary float32 hex constants in the DT which is worse
15:18raveling has quit [Ping timeout: 480 seconds]
15:19marcanhey lina pulled off softfloat in a couple hundred lines of rust and it's all operator overloaded and nice and ergonomic
15:20marcanjust be glad m1n1 is taking care of the calculations involving exponentials (yes there's some of those those too)
15:21raveling has joined #asahi-dev
15:22kettenis_I don't think you want me to push for something that I'm not certain is a good idea ;)
15:23marcanin fact the dynamic stuff m1n1 fills in isn't even floats (though it is computed using floats)
15:25marcanI mean nothing stops you from replacing all the floats with the equivalent uint32 representations, it will work the same
15:26baahemian has quit [Quit: baahemian]
15:28baahemian has joined #asahi-dev
15:38raveling has quit [Ping timeout: 480 seconds]
15:39kettenis_still something to consider; easier to change your own principles that that of others ;)
15:42raveling has joined #asahi-dev
15:51raveling has quit [Ping timeout: 480 seconds]
16:01zkrx has quit []
16:05cylm has quit [Remote host closed the connection]
16:13raveling has joined #asahi-dev
16:13zkrx has joined #asahi-dev
16:20user982492 has joined #asahi-dev
16:21raveling has quit [Ping timeout: 480 seconds]
16:22seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:23user982492_ has joined #asahi-dev
16:24raveling has joined #asahi-dev
16:28user982492 has quit [Ping timeout: 480 seconds]
16:39raveling has quit [Ping timeout: 480 seconds]
16:39raveling has joined #asahi-dev
16:43orowith2os has quit [Remote host closed the connection]
17:08marcaneiln: since I forgot to answer, before I go to sleep: feel free to move in-tree, that's where we want to be anyway. you can prepare a branch based on asahi-wip and I can rebase it into one more bits/ branch. we can enable it in actual asahi-dev then asahi builds whenver you think it's usable/worth having people test.
17:10marcanANE is very much a "side" thing right now so I'm comfortable leaving things up to you, I doubt it's going to become a critical piece of the ecosystem overnight (which is a good place to be when developing since you don't have to care about users as much :p)
17:12raveling has quit [Ping timeout: 480 seconds]
17:35raveling has joined #asahi-dev
17:44seeeath has joined #asahi-dev
17:45bcrumb has joined #asahi-dev
17:49bcrumb has quit []
17:56seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:02seeeath has joined #asahi-dev
18:36derzahl has joined #asahi-dev
18:41seeeath has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:22YungRaj has joined #asahi-dev
19:56DarkShadow44 has quit [Quit: ZNC - https://znc.in]
19:56DarkShadow44 has joined #asahi-dev
20:05user982492_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:09i509vcb has joined #asahi-dev
20:10baahemian has quit [Quit: baahemian]
20:21baahemian has joined #asahi-dev
20:21baahemian has quit [Remote host closed the connection]
20:23baahemian has joined #asahi-dev
20:34systwi_ has quit []
20:35systwi has joined #asahi-dev
20:55thevar1able_ has quit [Remote host closed the connection]
20:56thevar1able_ has joined #asahi-dev
20:59baahemian has quit [Quit: baahemian]
21:28derzahl has quit [Quit: auf wiedersehen]
21:28derzahl has joined #asahi-dev
21:44baahemian has joined #asahi-dev
21:59user982492 has joined #asahi-dev
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:00baahemian has quit [Quit: baahemian]
22:01yrlf has joined #asahi-dev
22:04baahemian has joined #asahi-dev
22:07baahemian has quit []
22:22YungRaj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:32tired- has quit [Quit: /]
22:33tired has joined #asahi-dev
23:01raveling has quit [Ping timeout: 480 seconds]
23:03baahemian has joined #asahi-dev
23:08drubrkletern has joined #asahi-dev
23:24raveling has joined #asahi-dev
23:29baahemian has quit [Quit: baahemian]
23:30Urriellu has joined #asahi-dev
23:33raveling has quit [Ping timeout: 480 seconds]
23:44raveling has joined #asahi-dev
23:52raveling has quit [Ping timeout: 480 seconds]
23:57nicolas17 has joined #asahi-dev