#asahi · 2023-12-23 17:48
Nefsen402But compositors don't have access to the original shm fd#asahi · 2023-12-23 17:48
marcanit maps it again#asahi · 2023-12-23 17:48
Nefsen402But then what happens when the compositor wants the texture again?#asahi · 2023-12-23 17:48
marcanwhy would you need a protocol? just have the compositor unmap textures it's not using#asahi · 2023-12-23 17:47
marcanpossible in principle though, particularly with vulkan#asahi · 2023-12-23 17:47
Nefsen402Yeah, but that isn't possible rn without a wayland protocol#asahi · 2023-12-23 17:47
marcanwould need code in the compositor to proactively garbage-collect unused textures out of actual GPU memory to improve that, but I doubt it would be very useful#asahi · 2023-12-23 17:46
marcanright, in that case it still counts of course, as long as those textures are mapped#asahi · 2023-12-23 17:46
Nefsen402aps that were previously visible but then go suspended is an example#asahi · 2023-12-23 17:46
Nefsen402Of course, but sometimes it will allocate a texture for something, but not actually texture from it#asahi · 2023-12-23 17:45
marcanthe compositor needs access to the primary framebuffers of everything it's compositing#asahi · 2023-12-23 17:45
marcanin that case no, but if the compositor is actively using it then you wouldn't be able to compress it anyway#asahi · 2023-12-23 17:45
Nefsen402Right. I was thinking of the case where it would be possible to compress the apps swapchain that it shares with the compositor#asahi · 2023-12-23 17:44
marcanthe point is just that the moment there is GPU work for that app/context, all of it has to be swapped back in#asahi · 2023-12-23 17:44
marcanif there is any shared memory then that wouldn't be swapped out if someone who needs it has it mapped#asahi · 2023-12-23 17:43
marcaneither way sharing memory is not an issue, you don't actually swap out whole apps. what I mean is that apps are either suspended (some memory swapped out) or not (no memory swapped out).#asahi · 2023-12-23 17:43
marcanso at that point it's irrelevant and the original shared memory is normally swappable#asahi · 2023-12-23 17:42
marcanif the shared memory is not GPU memory to begin with, then it needs to be copied into GPU memory#asahi · 2023-12-23 17:42
Nefsen402and that upload is done in the compositor#asahi · 2023-12-23 17:42
Nefsen402that shared memory has to be "uploaded" to the gl implementation so that it has a GLTexture to texture from#asahi · 2023-12-23 17:41
Nefsen402or fds representing shared memory#asahi · 2023-12-23 17:41
Nefsen402Wayland can either work by apps passing fds representing dmabufs#asahi · 2023-12-23 17:41
Nefsen402Foot is an example of a popular shm based terminal emulator, would compress really nicely#asahi · 2023-12-23 17:41
marcanwhat do you mean?#asahi · 2023-12-23 17:40
Nefsen402Unfortunately compositors upload shm textures themselves, it can't suspend shm based apps with this approach#asahi · 2023-12-23 17:39
marcanyeah#asahi · 2023-12-23 17:39
marcanso it's useful for whole processes/contexts stay idle, not for idle memory within a process#asahi · 2023-12-23 17:39
Nefsen402That's probably fine when my app is suspended in another workspace and not getting any frame callbacks#asahi · 2023-12-23 17:38
marcanif an app has to render anything 100% of its GPU memory needs to be available#asahi · 2023-12-23 17:38
marcanit is, but it involves essentially (potentially) swapping out whole apps at once#asahi · 2023-12-23 17:38
Nefsen402I was thinking it was a hard no, but that's really interesting that it's possible!#asahi · 2023-12-23 17:37
marcanwe don't have swapper support for the GPU yet so it all stays pinned in memory#asahi · 2023-12-23 17:37
marcanno(t yet)#asahi · 2023-12-23 17:37
Nefsen402Can zram compress memory reserved for the GPU?#asahi · 2023-12-23 17:36
marcanswap was added literally the day before release ;)#asahi · 2023-12-23 17:34
kidplayer666I had to reinstall once in November maybe?#asahi · 2023-12-23 17:34
kidplayer666It wasn’t even that long ago lol#asahi · 2023-12-23 17:34
kidplayer666Heh#asahi · 2023-12-23 17:30
marcanwe do enable proper swap in fedora by default these days, so yeah#asahi · 2023-12-23 17:30
kidplayer666So it really was that I think#asahi · 2023-12-23 17:30
kidplayer666Much higher ram usage#asahi · 2023-12-23 17:30
kidplayer666Now that I added proper swap, it works perfectly#asahi · 2023-12-23 17:29
marcanhowever I think in your case it might be zram backing too, not sure how that works#asahi · 2023-12-23 17:29
marcankidplayer666: magenta is not cache, it's shared memory which, if you don't have massive stuff in tmpfs, usually means GPU memory.#asahi · 2023-12-23 17:27
marcanpitust: I'm talking about the routes in alsamixer, but please just use pipewire. the speakers are not designed to be driven directly like that, they need DSP to work properly.#asahi · 2023-12-23 17:12
j`eyI linked the script it runs here, it runs on firstboot#asahi · 2023-12-23 17:11
kidplayer666That makes a lot of sense#asahi · 2023-12-23 17:11
kidplayer666j`ey: ah ok#asahi · 2023-12-23 17:10
j`eyfor 8-16G machines#asahi · 2023-12-23 17:10
j`eykidplayer666: newer installs automatically add swap