ChanServ changed the topic of #ubuntu-asahi to: Ubuntu-Asahi development | Github: https://github.com/UbuntuAsahi | Logs: https://oftc.irclog.whitequark.org/ubuntu-asahi
tobhe_ has joined #ubuntu-asahi
tobhe has quit [Ping timeout: 480 seconds]
hwpplayer1 has joined #ubuntu-asahi
hwpplayer1 has quit [Remote host closed the connection]
jhlee has joined #ubuntu-asahi
<nukelet> i think enabling zswap + swap would be great for the users; i've been daily-driving the config used in fedora asahi (12GB swapfile + zswap) for a few days and it improved my experience quite a bit (even on my 16GB machine i still run into awkward OOM scenarios sometimes)
<nukelet> on 8GB i think it would make even more of an impact
<tobhe_> thanks, well since asahi is in the process of switching over to zswap that is likely what we would do too
tobhe_ is now known as tobhe
<tobhe> but I agree that this is overdue
<nukelet> i would like to help with this, but i'd need some help figuring things out; i'm familiar with the ubuntu kernel packaging bits, but that's about it :')
<nukelet> and these changes are not really kernel-specific as we would need to basically just run a couple scripts to create a swapfile + add it to fstab, and then enable zswap either through kernel cmdline options in grub (this has some important caveats), or do it the fedora asahi way and write to the relevant files in /sys/module/zswap/parameters to
<nukelet> enable/configure zswap upon boot (and critically, after systemd is brought up and /lib/modules is made available)
<nukelet> what would be the best way to achieve this? maybe through a new package?
<tobhe[m]> I haven't looked at the script in detail yet but I think we would do this in the postinst hook of our ubuntu-asahi meta package
<tobhe[m]> oh no it actually is a first-boot script. so install a script with the meta package and add a first-boot systemd service I guess
<tobhe[m]> but I think the zram stuff doesn't need to be done at runtime or does it?
<nukelet> we could do it as kernel cmdline options but then we would need to make sure the relevant modules for the compression algorithm we're using for zswap are included in the initramfs (otherwise we panic early in boot)
<tobhe[m]> that shouldn't be too hard
<tobhe[m]> they could even be built-in
<nukelet> right, i guess i could confirm with the asahi people first if i'm missing some other less obvious reason for doing it at runtime
<tobhe[m]> well migrating has to be done at runtime
<tobhe[m]> if we want to enable it on existing installations
<nukelet> we could migrate upon reboot, no? i was under the impression that the tmpfile script fedora is using to write to /sys/moduke/zswap is run by systemd-tmpfile during boot
<nukelet> i think migrating during runtime can be weird especially if the ram is already somewhat full (with the need to reserve a chunk of it for the zswap pool)
<tobhe[m]> makes sense yes
<tobhe[m]> but we still don't really have anything to migrate except custom setups since we never shipped a default
<tobhe[m]> question is how do we make sure those don't break badly
<tobhe[m]> if we ship a kernel cmdline file in /etc/default/grub.d and make sure the modules I don't see a lot of potential fallout. there is no zram default we need to disable
<tobhe[m]> what we do need is a way to enable swap in new installations
<tobhe[m]> I guess an argument for creating everything on first boot is that it doesn't make a lot of sense to ship and install an empty 12GB swap file