Post AmyC1b9cFs1BC0ogoC by matthartley@fosstodon.org
 (DIR) More posts by matthartley@fosstodon.org
 (DIR) Post #Amy2DfqxbulLhTD5PM by frameworkcomputer@fosstodon.org
       2024-10-13T15:11:07Z
       
       0 likes, 0 repeats
       
       Hibernate for Linux is nothing new. Making the setup and controlling lid behavior easy could be easier. This coming week, it will be.https://fosstodon.org/@matthartley/113298890378795321- For new Fedora installations.- Follow soon to be provided partitioning guide for Fedora, then run the installer.- Paste in one short line into the terminal.(Cont)
       
 (DIR) Post #Amy2GrGdd5M9y9jsHY by frameworkcomputer@fosstodon.org
       2024-10-13T15:11:41Z
       
       0 likes, 0 repeats
       
       ...(cont)- Laptop reboots, flashes the screen once, then hibernates at login once (Setting up SELinux rule for hibernate)- Power on, profit. LUKS encryption for your main install and the swap partition where your hibernation happens. - Coming soon: Non secure boot TPM LUKS passphrase bypass and Yubikey LUKS handling.
       
 (DIR) Post #Amy2egsHvA52gdiIWe by frameworkcomputer@fosstodon.org
       2024-10-13T15:16:00Z
       
       0 likes, 0 repeats
       
       (cont...) Note: When it's ready, Mastodon followers will know here, first.
       
 (DIR) Post #Amy35dL5ArOjXY1sGG by frameworkcomputer@fosstodon.org
       2024-10-13T15:20:53Z
       
       0 likes, 0 repeats
       
       @sidereal Hibernate?
       
 (DIR) Post #Amy3at6Cd31NObyM88 by frameworkcomputer@fosstodon.org
       2024-10-13T15:26:31Z
       
       0 likes, 0 repeats
       
       @aburka Agreed and it does. The ouchie point is for Fedora with Btrfs, we need a clean installation with custom (easily done, takes like 2 minutes) partitioning to set up swap.Tested this for weeks, tested Kickstart, Ansible, found custom partitioning and using Anaconda was going to be the most reliable option. Follow up with the bash script we just curl in from the repo to do the heavy lifting.
       
 (DIR) Post #Amy4OMLqeqtUJHsep6 by rlounsbury@twit.social
       2024-10-13T15:35:24Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer and give @matthartley if you want the nerdy details of building it. :)
       
 (DIR) Post #Amy4OvHolpSyevGQts by frameworkcomputer@fosstodon.org
       2024-10-13T15:35:35Z
       
       0 likes, 0 repeats
       
       @aburka (cont) This will evolve over time, smooth out, refine and likely see a little GTK gui in the near future.
       
 (DIR) Post #Amy4nF0b5xicmCnyQC by twojays@ruhr.social
       2024-10-13T15:39:58Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer i think @UniversalBlue should get on board early so they can come up with a nice solution for us!
       
 (DIR) Post #Amy7wHLc4HNsV1dUy8 by frameworkcomputer@fosstodon.org
       2024-10-13T16:15:07Z
       
       0 likes, 0 repeats
       
       @flobii Fedora, new installs because btrfs needs. For Ubuntu, I'll be testing swap file and swap partition. This could allow for either new or existing on Ubuntu, but this is not done yet.
       
 (DIR) Post #Amy8kz2VteDSUEsdhA by frameworkcomputer@fosstodon.org
       2024-10-13T16:24:19Z
       
       0 likes, 0 repeats
       
       @flobii This is important feedback as it will go into the guide later.I found that for Fedora using its default btrfs, messing with existing partitioning is not ideal. Subvolumes, etc, add a layer of consideration.We basically have:- boot efi- boot - Fedora install partition (btrfs) - swap (ext4, 1.5x the ram installed) (Cont)
       
 (DIR) Post #Amy8m1XE6WoMW1k4S8 by frameworkcomputer@fosstodon.org
       2024-10-13T16:24:34Z
       
       0 likes, 0 repeats
       
       @flobii (cont)Hopefully that makes more sense. The guide will walk users through this with the end goal in focus. So even if details as to why are hazy, end result will be achieved regardless.
       
 (DIR) Post #Amy9hyh2pMYwUwy95c by cubeofcheese@mstdn.social
       2024-10-13T16:35:02Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer I'm a software engineer and still don't quite understand what this means. Can someone explain what's happening from a normal user perspective? What are the implications of suspend vs hibernate vs suspend then hibernate?I'm assuming this should result in battery life improvement?
       
 (DIR) Post #AmyC1a9Dzq6w4VcrYm by khleedril@cyberplace.social
       2024-10-13T16:40:26Z
       
       0 likes, 0 repeats
       
       @cubeofcheese @frameworkcomputer Suspend shuts the CPU off (mostly) but leaves memory all powered up, hibernate dumps memory into the swap partition and then turns everything off.
       
 (DIR) Post #AmyC1b9cFs1BC0ogoC by matthartley@fosstodon.org
       2024-10-13T16:42:45Z
       
       0 likes, 0 repeats
       
       @khleedril @cubeofcheese @frameworkcomputer Correct. Hibernate is far, far more appropriate for longer term periods.- Backpack, hibernate.- Lunch, suspend.- Done for the day and disconnected from power, wish to not lose your work, hibernate. - Done for the day and CONNECTED power, wish to not lose your work, suspend or hibernate.
       
 (DIR) Post #AmyC1bmFwCvV7qtY2K by cubeofcheese@mstdn.social
       2024-10-13T16:54:58Z
       
       0 likes, 0 repeats
       
       @matthartley @khleedril @frameworkcomputer That was a perfect explanation, thank you. Oh! So this makes it suspend for say 20 minutes then hibernates if that time is exceeded? To get the best of both worlds when closing the laptop?
       
 (DIR) Post #AmyC1cN7j8PuyC8zVA by frameworkcomputer@fosstodon.org
       2024-10-13T17:00:56Z
       
       0 likes, 0 repeats
       
       @cubeofcheese @matthartley @khleedril exactly. :)
       
 (DIR) Post #AmyTA4ClpK7opVuqgq by JoshuaACNewman@xeno.glyphpress.com
       2024-10-13T19:25:53Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer Am I correct that this is a part of optimizing battery efficiency? It’s what’s been holding me back on ordering a Framework 16. I’ve been hearing that there’s only about two hours of work time on the battery under Ubuntu.
       
 (DIR) Post #AmyTA5GhsArs80lVSq by frameworkcomputer@fosstodon.org
       2024-10-13T20:12:49Z
       
       0 likes, 0 repeats
       
       @JoshuaACNewman Great question. Ubuntu 24.04 and Fedora 40 are pretty good in terms of general usage on the 16. Implementing hardware acceleration in Firefox, etc, also can help. Now, that said, hibernate would address battery drain while in suspend for Fedora (and later Ubuntu) as we're not relying on suspend. We're putting the lift on hibernate instead of only relying on suspend.(Cont)
       
 (DIR) Post #AmyTBc7RDktwIm9whs by frameworkcomputer@fosstodon.org
       2024-10-13T20:13:18Z
       
       0 likes, 0 repeats
       
       @JoshuaACNewman (cont)Hibernate also means phantom key presses are not an issue to wake it as hibernate is a powered off state. Saves your existing working environment, snap shots to swap, powers down.My biggest contribution besides automating hibernate setup on a new install is also making sure the swap partition is LUKS encrypted. This means your user data, all od it, is encrypted in terms of what's stored on the drive.
       
 (DIR) Post #AmyVlNfyb2uFqDUtCS by Conan_Kudo@fosstodon.org
       2024-10-13T20:42:10Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer @flobii You should be able to create a subvolume for just the swapfile after the fact and configure things to use that.Basically, it boils down to:```$ mount /tmp/sysroot <btrfs /dev disk>$ cd /tmp/sysroot && btrfs subvolume create swap$ btrfs filesystem mkswapfile --size <size> --uuid clear $PWD/swap/swapfile``Then add the following lines to `/etc/fstab`:```UUID=<btrfs uuid> /mnt/swap subvol=swap 0 0/mnt/swap/swapfile none swap defaults 0 0```Then reboot.
       
 (DIR) Post #AmyXz1F702AeECYw8u by frameworkcomputer@fosstodon.org
       2024-10-13T21:07:02Z
       
       0 likes, 0 repeats
       
       @Conan_Kudo @flobii Hi Neal, I did some testing with this as this was of my earliest tests (and I'll circle back again for a retest, but hibernate did not like to perform reliably here. But I'll give it one more whirl as yeah, it "should" work...in terms of expected subvolume function..but was less than reliable for me. I'll give it another spin Tuesday. :)
       
 (DIR) Post #AmyZ00U1PPNc7GZU24 by frameworkcomputer@fosstodon.org
       2024-10-13T21:18:26Z
       
       0 likes, 0 repeats
       
       @Conan_Kudo @flobii Okay, I'll be coordinating with the Fedora team on this (better approach for btrfs). Now we're cookin'!
       
 (DIR) Post #Amyb6N9cEQpm4gBovY by frameworkcomputer@fosstodon.org
       2024-10-13T21:41:53Z
       
       0 likes, 0 repeats
       
       @JoshuaACNewman the integrated GPU is the default. The dGPU is in an ultra low power state until called upon with select applications, DRI_PRIME, switcharoo, etc.So both in use or in a suspend state, dGPU is in a D3cold (BOCO) through the kernel runtime.
       
 (DIR) Post #AmyiXOJ8kYyH9NTWaW by jaimebarrancos@mastodon.social
       2024-10-13T23:05:18Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer why here
       
 (DIR) Post #Amyk9zZ4mGdPevtoq8 by breizh@pleroma.breizh.pm
       2024-10-13T22:08:36.611129Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer @flobii The swap isn’t ext4, it’s just swap.
       
 (DIR) Post #AmykA1OrxBetLr8hCy by frameworkcomputer@fosstodon.org
       2024-10-13T23:23:25Z
       
       0 likes, 0 repeats
       
       @breizh @flobii Was a typo, fixed it. Apparently it didn't stick.
       
 (DIR) Post #An0IpBYmfvXwKnXLLE by SkyLuke@mastodon.social
       2024-10-14T17:26:36Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer Is this hardware agnostic? Or will only work with a framework? I really can't afford a framework. Cool feature anyway! Linux is finicky with hibernation!
       
 (DIR) Post #An4iU1lLHWJBJ7p2Lg by frameworkcomputer@fosstodon.org
       2024-10-16T20:32:57Z
       
       0 likes, 0 repeats
       
       The latest - let there be GUI. https://fosstodon.org/@matthartley/113318896444479270
       
 (DIR) Post #An5vx95ac6oozTT34q by frameworkcomputer@fosstodon.org
       2024-10-17T10:38:34Z
       
       0 likes, 1 repeats
       
       Code goes live next week. This round is swap partition. I'm working on a btrfs swap subvolume option.
       
 (DIR) Post #An5w2GNyuct14JViFs by frameworkcomputer@fosstodon.org
       2024-10-17T10:39:31Z
       
       0 likes, 0 repeats
       
       https://fosstodon.org/@frameworkcomputer/113322329026462096
       
 (DIR) Post #An5xPcMXTA97qJXHii by Natanox@chaos.social
       2024-10-17T10:54:56Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer People are right, you seriously give a shit. My next new laptop definitely will be a Framework. :blahaj:
       
 (DIR) Post #An61LVfUoewZjthR5c by mks_h@mstdn.social
       2024-10-17T11:39:01Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer why not a swap file tho? Sounds way easier
       
 (DIR) Post #An61ku1vNQ7yXGIZZg by knezi@mastodon.arch-linux.cz
       2024-10-17T11:43:35Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer does hibernation require machine specific code? I thought this is universal, just install any distro and you're good to go.
       
 (DIR) Post #An66S8xK9sbL601MqO by Anachron@fosstodon.org
       2024-10-17T12:36:15Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer @matthartley please tell me you are doing input validation to not allow for non-integer input and ridiculous small numbers like 5 seconds? 🙂
       
 (DIR) Post #An6EdyDwgUjUv4wiSu by frameworkcomputer@fosstodon.org
       2024-10-17T14:08:02Z
       
       0 likes, 0 repeats
       
       @mks_h When it works, it's good. Swap partition is far more stable.
       
 (DIR) Post #An6FARKbzz9eSgXxpY by deafbeef@mastodon.social
       2024-10-17T13:42:51Z
       
       0 likes, 0 repeats
       
       @mks_h @frameworkcomputerYou can easily nuke you fs if it's done wrong. https://www.kernel.org/doc/Documentation/power/swsusp.rstYou don't access file to resume from swap, only some bytes range on disk
       
 (DIR) Post #An6FASPxxZ21pa3koa by frameworkcomputer@fosstodon.org
       2024-10-17T14:13:54Z
       
       0 likes, 0 repeats
       
       @deafbeef @mks_h I've used partitions for swap off and on for years. Never had a problem when correctly configured and setup during the installation.Yes, swap file with the correct resume offset (ext4 for example) works well, too.
       
 (DIR) Post #An6FOXlmrGCwU3z0Wu by frameworkcomputer@fosstodon.org
       2024-10-17T14:16:27Z
       
       0 likes, 0 repeats
       
       @Anachron @matthartley Opted for seconds as it's more granular. As this continues, yes, it'll likely he adjusted.
       
 (DIR) Post #An6FTXmYEv11yCizlA by frameworkcomputer@fosstodon.org
       2024-10-17T14:17:21Z
       
       0 likes, 0 repeats
       
       @knezi Suspend is automatic. Hibernate is not unless configured.
       
 (DIR) Post #An6IqoeLzWyao7g9rc by deafbeef@mastodon.social
       2024-10-17T14:55:10Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer @mks_h I'm not saying that it won't work, just that separate partition is safer. Thank you for your work!
       
 (DIR) Post #An6LLOcH27xQx2PpDM by frameworkcomputer@fosstodon.org
       2024-10-17T15:23:04Z
       
       0 likes, 0 repeats
       
       @deafbeef @mks_h Appreciate it. Actually, we may be on the same page, then. The current approach I'm using is with a uses a separate, dedicated partition.
       
 (DIR) Post #An6cUhtkPaPsa0c9dQ by knezi@mastodon.arch-linux.cz
       2024-10-17T18:35:15Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer yep, but do you actually send code specific to framework hibernation to Fedora?
       
 (DIR) Post #An6dxTInrEvJfCc7Pc by frameworkcomputer@fosstodon.org
       2024-10-17T18:51:41Z
       
       0 likes, 0 repeats
       
       @knezi This is a user specific option that will be in github. I doubt they will use it officially as they have a different flow.
       
 (DIR) Post #An6lYrEOYKyWGtKH7w by knezi@mastodon.arch-linux.cz
       2024-10-17T20:16:52Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer right, thanks.
       
 (DIR) Post #AnTK9n2lLBL8zWFDtI by mobergmann@chaos.social
       2024-10-28T17:28:09Z
       
       0 likes, 0 repeats
       
       @frameworkcomputer Where is the code released? I was searching for it on GitHub, but couldn't find anything. Would like to try it :)