2024-11-27
03:19tobhe_ has joined #ubuntu-asahi
03:26tobhe has quit [Ping timeout: 480 seconds]
10:23hwpplayer1 has joined #ubuntu-asahi
12:45hwpplayer1 has quit [Remote host closed the connection]
13:31jhlee has joined #ubuntu-asahi
20:16nukeleti 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)
20:27tobhe_thanks, well since asahi is in the process of switching over to zswap that is likely what we would do too
20:27tobhe_ is now known as tobhe
20:35nukeleti 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 :')
20:39nukeletand 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
20:39nukeletenable/configure zswap upon boot (and critically, after systemd is brought up and /lib/modules is made available)
20:43nukelet(for reference, here's how it's being done in fedora asahi: https://pagure.io/fedora-asahi/fedora-asahi-remix-scripts/c/942ef6affe7e028b0230ca0b1465cd0651a295aa?branch=main)
21:01tobhe[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
21:02tobhe[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
21:11nukeletwe 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)
21:13nukeletright, i guess i could confirm with the asahi people first if i'm missing some other less obvious reason for doing it at runtime
21:16nukeletwe 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
21:18nukeleti 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)
21:23tobhe[m]but we still don't really have anything to migrate except custom setups since we never shipped a default