News for hackers. Stuff that matters.
Re:The Framework Laptop Chromebook Edition by duped on Wednesday September 21, 2022 @12:00PM (#32927095)
I think the question is, why ChromeOS instead of a Linux?
Re:The Framework Laptop Chromebook Edition by jagrsw on Wednesday September 21, 2022 @12:32PM (#32927583)
Biased opinion here (working for Google).

I love Linux and I would consider myself a power user (understanding HW arch, working with kernel sources).

Basic Chromebook apps (+ Play Store) are something that "just work" for 80% of time for my use-cases (which is, browser and ssh-ing into a power machine in ze cloud/DC). I also have rather good understanding of threat models here, and the quality of the sandboxes and HW roots-of-trust, hardening and software isolation on a typical Chromebook, so it gives me a relative piece of mind for specific use-cases (personal/family files etc.). Supporting an extended family, if they can get used to Chromebooks (it covers 99% of their needs, esp. that Android apps can be installed here) is a bliss.

Customizing Linux is mental fun, but on a road you probably something that just works, and typical Linux is rough at edges - GFX support, hibernation, esp. if you don't want to stick to some LTS distro, b/c you always need this newer package for dev purposes or tinkering.

The remaining 15% is covered by a VM, which seems really nicely integrated (X11 proxy etc). The remaining remaining 5% cannot be covered - custom kernels, custom USB drivers, occasional need to use Windows, but that's fine, I can do that on a desktop or on some random, cheap, low-power laptop.

In essence, it's just a thin client on steroids, which almost always works in its basic form. But if you want something more interesting, there's always a VM with some Linux distro, or Android apps via the Play Store. But these are optional and don't affect stability of the core system, if you don't use them.

Re:The Framework Laptop Chromebook Edition by mkozlows on Wednesday September 21, 2022 @01:31PM (#32928432)
I agree that there are tons of great use cases for Chromebooks (I've owned like eight of them, including the Chromebook Pixel, and love them), but I also think that once you start getting into Android or Linux-heavy use cases, native devices are better than Chromebooks.

An Android tablet is a muuuuuch better experience for running Android apps than the Pixel Slate. A Framework running Fedora is a muuuuuch better experience for doing dev work than a Chromebook.

ChromeOS is great when used for what it is, and it's cool that it can flex to handle edge casey things with VMs. But if the VM stuff is most of what you want to do, just go a different way.

Re:The Framework Laptop Chromebook Edition by duped on Wednesday September 21, 2022 @02:29PM (#32929243)
> I've owned like eight of them

This is something that jumps out to me - over how many years and why did you replace them?

Re:The Framework Laptop Chromebook Edition by mkozlows on Wednesday September 21, 2022 @04:42PM (#32931260)
9 years, and I'm exaggerating a bit for effect; it's actually five of them. (HP 11 G2 in 2013, bought because it was tiny and worked well. Replaced with a Toshiba something, because it had a better screen and was faster. Replaced with a Chromebook Pixel 2015 because it was the god tier amazing Chromebook of your dreams. Replaced with an HP X2 because it was a convertible tablet and I wanted a convertible tablet. Replaced with a Pixel Slate because it was a faster and better-screened convertible tablet and I like things that are better.)

None of them were replaced because I strictly speaking needed to replace them, and all got handed over to someone else who happily used them.

Re:The Framework Laptop Chromebook Edition by hn_throwaway_99 on Wednesday September 21, 2022 @12:46PM (#32927799)
I'm the poster of the original comment, and I don't work for Google, but your comment pretty much summed up perfectly my thoughts as well, and is a big reason why I'm a ChromeOS fan.
Re:The Framework Laptop Chromebook Edition by kelvie on Wednesday September 21, 2022 @02:33PM (#32929317)
Less biased opinion here (don't work for google, don't hold stock, am primarily a Linux user at home), but I use(d) a Pixelbook for all the same reasons mentioned above, though I now use a Framework as my primary laptop, but mostly because I wanted to switch from Chrome -> Firefox for a bunch of other reasons.
Re:The Framework Laptop Chromebook Edition by Arainach on Wednesday September 21, 2022 @01:44PM (#32928580)
Biased opinion: I work on ChromeOS at Google

Biased but informed opinion: I own a Framework Laptop running Ubuntu 22.04.

Linux on a server or a desktop isn't so bad. Linux on a laptop is awful. Hibernation isn't supported. Battery life is mediocre, and battery drain in sleep is significant. If I close the lid on my Framework at 75% and come back the next day, it will be at 25%. If I come back in 3 days, it will be completely dead. Even on a device designed to support Linux (Framework, Thinkpad, whatever) the Bluetooth experience is....err......well, if you don't have anything nice to say don't say anything?

ChromeOS isn't perfect, but as a laptop I'd much rather run it (with Crostini to get a Linux development environment) any day.

Re:The Framework Laptop Chromebook Edition by xorcist on Wednesday September 21, 2022 @02:18PM (#32929059)
> Even on a device designed to support Linux (Framework, Thinkpad, whatever)

There's apparently a world of difference. Nothing about the Framework suggests it was designed for Linux.

A proper Thinkpad does not have issues with hibernation, or losing battery, or graphics, or any of the other things you mentioned.

I just want something that works, and will receive updates as long as there are users. I don't want to muck about with VMs, or Crostini, or whatever it's called. Sounds like I must never let go of my Thinkpad.

Re:The Framework Laptop Chromebook Edition by Arainach on Wednesday September 21, 2022 @02:42PM (#32929473)
I'm glad you've had that experience, but it hasn't been mine. I've owned other laptops running Linux and have had plenty of coworkers with experiences as well. Heck, there's an entire team at Google dedicated (full of incredibly smart people who know way more about Linux than I ever will) to trying to get Linux running well on laptops. Plenty of people shared their experiences in this thread: https://news.ycombinator.com/item?id=32293541

The vast majority of people I know who tried running Linux on their laptop switched to Mac/Windows/ChromeOS. Containers and subsystems like WSLv2 or Crostini make it mostly painless to do Linux development while having a host operating system that has people paid to make the experience great rather than volunteers who generally want to work on shiny algorithms rather than fixing UX bugs.

More specifically: I've run Windows on the Framework and it was generally great (I wished it was a touchscreen, but that's about it). Maybe with the right magical device I could get a great Linux experience, but it's not worth having to search and compromise for me. I can install Windows on anything and it will work. I can buy any of the few Macbooks on sale and it will just work. I can buy any Chromebook and it will largely work out of the box. Linux is the only OS that makes me carefully check that my exact set of chipsets and components will probably not be a complete disaster. I buy laptops based on their hardware specs (screen, keyboard, trackpad, weight, ports) rather than their compatibility with an operating system.

Re:The Framework Laptop Chromebook Edition by xorcist on Wednesday September 21, 2022 @06:34PM (#32932470)
Not to take anything away from your experience, but drawing conclusions from threads like those is not the whole picture. That will be skewed against people who use problematic hardware, and say things like "the Linux way is tweaking everything".

But it's really not. Linux is mainly for users, by users. You're going to a very diverse set of users and experiences. For every tweaker out there you're going to find someone like me who just wants a unix-like operating system, with Perl and Python and everything else available with a minimum of fuss. They just don't speak up very often, because there's not much to something that works.

Of course it's important to mention the problematic bits too, and there's been many. I've mostly run Debian for over twenty years, and there has been several times where I had to fix issues from migrations such as rootless, utf8, python3 things, and file format migrations. For a long time things like hot plugging monitors, projectors and printers were a bit of a gamble.

But for the most part it's given me an environment where I can use a wide range of tools from emacs to nmap, from git to latex without giving a second thought how to configure paths, and how to fix some random missing dependency for a package to build, or why nginx doesn't pick up the changed file date. All those things have been ironed out by someone who went before me. That's worth a lot.

> I buy laptops based on their hardware specs (screen, keyboard, trackpad, weight, ports) rather than their compatibility with an operating system

Yes, that pretty much explains everything.

That's a luxury available to users only of a completely dominant software platform.

A Mac user could never say that. If you want OSX you must carefully buy supported hardware. You can buy a hackintosh, but don't fill up threads with complaints how bad the suspend works, and that the picture quality of the webcam is subpar.

Speaking for myself, I know what software I want to use. I do not care about hardware specifications in any other way than it runs my software reliably. Sometimes that means you can pick any color you want, as long as it's black. Black as my laptop.

Re:The Framework Laptop Chromebook Edition by flkiwi on Wednesday September 21, 2022 @06:56PM (#32932697)
The hackintosh world is fascinating, and a really useful analogy. It makes the Linux experience (which, in the last half decade, has been largely good) look utterly seamless and polished, at least with the bigger distros. I own a MBP and will continue to use Apple laptops, but their excellence depends entirely on controlling the entire end-to-end product. And there's nothing particularly weird or objectionable about that. But it makes what the Linux community has been able to do, supporting an almost arbitrarily large set of hardware, that much more impressive. (This, incidentally, is one reason I don't get into OS wars: they're all doing different things in wildly different ways, even if, for the most part, they're capable of the same core tasks.)
Re:The Framework Laptop Chromebook Edition by outworlder on Wednesday September 21, 2022 @04:04PM (#32930776)
> I can install Windows on anything and it will work.

Not necessarily. There's plenty of instances of devices working poorly in Windows before the issues get patched (if they are at all).

If you want something that 'just works', you are indeed better with the Apple ecosystem. They control the hardware and software.

The only way around these issues is to pressure vendors to provide better Linux support. The only reason Windows laptops tend to work better out of the box (or at least with all hardware working to some extent) is because of all the testing done by vendors.

Re:The Framework Laptop Chromebook Edition by ayushnix on Wednesday September 21, 2022 @06:24PM (#32932374)
> A proper Thinkpad does not have issues with hibernation, or losing battery, or graphics, or any of the other things you mentioned.

Not sure if my E495 would qualify as a "proper thinkpad", although I've read about the same issues on T series laptops, I've almost never managed to make my laptop sleep in the 3 years I've owned this laptop starting from kernel version 5.4.x to the present 5.19.x. Whenever I try to 'systemctl suspend', one of the following things happens

- the laptop sleeps for a few seconds and wakes up

- the laptop sleeps for a few seconds and wakes up completely frozen and I have to perform a hard reboot

- the laptop doesn't sleep and freezes and I have to perform a hard reboot

- the laptop sleeps successfully but when I wake it up, the screen is messed up with green colors all over the place, hard reboot needed

My laptop also kept freezing randomly from 5.4.x to 5.14.x.

Re:The Framework Laptop Chromebook Edition by xorcist on Saturday October 01, 2022 @05:24AM (#33045234)
The T- and X-series is what people usually refer to as the "real" Thinkpads, which existed before this Lenovo nonsense. Lenovo labels widely varying hardware under the Thinkpad brand, but that's not what you want as a Linux user.

I don't know about the E-series specifically, sorry.

Re:The Framework Laptop Chromebook Edition by ayushnix on Friday October 07, 2022 @07:42AM (#33119948)
As I wrote before, I have observed similar issues reported by many T series owners when I was desperately scouring the Internet for a fix for months. Of course, I haven't used a T series ThinkPad so I can't say if these issues got resolved or not. I gave up long ago and now keep my laptop on 24x7 when I'm not traveling.
Re:The Framework Laptop Chromebook Edition by flkiwi on Wednesday September 21, 2022 @06:48PM (#32932618)
Conversely, I have a ThinkPad X1 running Fedora 36 (and, previously, 35), and it has never given me a problem ... well, other than because I messed with one too many things. The only thing I did was to disable the so-called "modern suspend" in BIOS and it has run like an absolute dream.

Not trying to contradict you. Just noting how even within one manufacturer's footprint (and "linux" however we define that for the purposes of this conversation) YMMV.

Re:The Framework Laptop Chromebook Edition by binkHN on Wednesday September 21, 2022 @01:49PM (#32928633)
I concur. While I know all the world is Linux, I run OpenBSD on many of my hobby systems. I love OpenBSD’s simplicity, but, IMHO, it’s missing too many things to be a good laptop OS. With ChromeOS I get the support a laptop environment requires, while still having the Debian VM to take things further.
Re:The Framework Laptop Chromebook Edition by cbsmith on Wednesday September 21, 2022 @01:54PM (#32928709)
System76 seems to have finally gotten to the bottom of the battery issues with their Lemur Pro. It's all about the drivers, and getting drivers that do power management right for devices that are miserly is surprisingly difficult.
Re:The Framework Laptop Chromebook Edition by hutzlibu on Wednesday September 21, 2022 @03:41PM (#32930458)
Can you confirm this for your own device?

I am really waiting for a linux laptop, which is truly mobile. I also rather went with chromebooks so far.

Re:The Framework Laptop Chromebook Edition by cbsmith on Wednesday September 21, 2022 @05:39PM (#32931869)
Note personally (all my laptops are provided by work, and they don't do System76 :-(), but you don't have to look far to see people talking about the battery life: https://www.reddit.com/r/System76/comments/n235vc/a_lemur_pr...
Re:The Framework Laptop Chromebook Edition by duped on Wednesday September 21, 2022 @02:32PM (#32929294)
I've noticed this on my framework running Pop but my XPS running Ubuntu has comparable battery life to the last MacBook I owned (granted, these are now both "old" laptops relative to the contemporary designs that have ludicrous battery life).

I will say I agree, you can't use a Linux laptop and take a video call without being tethered to power.

Re:The Framework Laptop Chromebook Edition by isr on Wednesday September 21, 2022 @09:35PM (#32933867)
Well, as long as we're sharing personal anecdotes as absolute judgements, then allow me to throw my own hat into the ring.

I have never had a problem with suspend, hibernate, nor excessive battery drain (beyond what the hardware should do) on any of linux laptop setups.

Thats starting from a thinkpad in 1998 (yes), all the way to my current amd 4800 tongfeng (generic chinese oem laptop maker).

Along with quite a few chromebooks thrown in along the way (all of which were developer-mode enabled, WITH secure verified boot turned back on, so had full access to linux apps WITHOUT using crostini vm's).

But, seeing as how chromebooks are essentially machines running GENTOO LINUX with a custom google ebuild overlay, then perhaps their reliability should be another plus checkmark for "linux on laptops", and not somehow a ding against that.

Anyway, take that for what its worth ...

Re:The Framework Laptop Chromebook Edition by caskstrength on Wednesday September 21, 2022 @02:19PM (#32929082)
Sounds more like a list of problems with Framework. Battery life on my x1c is similar to Windows (TLP FTW!) and with working S3 (what Lenovo calls "Sleep mode: Linux" in their BIOS) battery drain during sleep is very low. Can't say anything about quality of Bluetooth stack though since I don't use it.
Re:The Framework Laptop Chromebook Edition by outworlder on Wednesday September 21, 2022 @04:00PM (#32930731)
> Linux on a laptop is awful.

YMMV

Sounds like something that Framework should fix. There's nothing wrong with the Linux kernel per-se.

I have an older Dell Chromebook (turned into a Linux machine once Google stopped OS updates). Battery drain during sleep is pretty significant with either ChromeOS or Linux.

Re:The Framework Laptop Chromebook Edition by gausswho on Wednesday September 21, 2022 @05:06PM (#32931530)
Adding TLP (https://linrunner.de/tlp/index.html) significantly improved sleep battery drain on my Manjaro based Framework laptop.
Re:The Framework Laptop Chromebook Edition by ufmace on Wednesday September 21, 2022 @12:57PM (#32927960)
Personally, I chose ChromeOS as the bare-metal OS for my laptop because I think it's the best of both worlds:

For web browser-based stuff, I have a constantly-updated state of the art browser with full vendor-backed hardware support for everything around graphics, sound, USB, Bluetooth, etc, anything else I might want, plus probably the best sandboxing you can get as far as protecting the core system from any malicious web exploits. It also works rather well in tablet mode with convertible devices. IME, getting all of this on bare-metal Linux and having it stay working for years is very hit-or-miss.

For linuxy CLI stuff, I have a built-in Linux container with a nice terminal. Everything I've wanted to do as far as CLI stuff works great, including Vim + Tmux, developing and compiling in any language, systemd services, docker and k8s CLI support. I've opened at least a dozen or so PRs on various open-source projects and maintained server clusters working entirely on a Chromebook. All the driver and display stuff is taken care of by ChromeOS so I never have to mess with config for it.

Re:The Framework Laptop Chromebook Edition by nrp on Wednesday September 21, 2022 @12:02PM (#32927136)
In practice, full, stable hardware compatibility and battery life. The Linux experience on the Framework Laptop on recent distros (e.g. Ubuntu 22.04.1) is solid, but battery life will still generally be better running Ubuntu on top of ChromeOS.
Re:The Framework Laptop Chromebook Edition by r-w on Wednesday September 21, 2022 @12:36PM (#32927645)
Interesting. Do we have a concrete reason why, e.g., TLP[0] falls short of the power management features offered on other OSes?

[0]: https://linrunner.de/tlp/

Re:The Framework Laptop Chromebook Edition by jeffbee on Wednesday September 21, 2022 @01:00PM (#32927998)
One reason is all the binary artifacts are peak-optimized for the platform and this yields significant, often 10-20% lower CPU usage than plain vanilla binaries offered by all other Linux distributions. This includes the kernel, which in ChromeOS is built with LLVM with profile-guided optimization. Faster software translates directly to longer battery life. Every other distribution is years behind Google in terms of tooling.
Re:The Framework Laptop Chromebook Edition by binkHN on Wednesday September 21, 2022 @01:04PM (#32928056)
> Every other distribution is years behind Google in terms of tooling.

Can you expand on this? Perhaps a URL with more detail?

Re:The Framework Laptop Chromebook Edition by jeffbee on Wednesday September 21, 2022 @01:13PM (#32928188)
I'm not sure if there are any single good URLs I can give you. The best way to learn is to read the chromiumos repo and see how they build the image, how they collect and deploy profiles, etc. You can also look at the mailing list of clang-built-linux to see how their kernel is built with clang and how they integrated that with their profile pipeline.

In the end though it is cultural and not technical. Debian will bend over backwards to make sure That One Guy can still install the latest version on his old Centaur CPU, from floppies. ChromeOS is laser-targeted for specific, allow-listed hardware platforms. If you are philosophically committed to the eternal comfort of That One Guy, the Debian way makes more sense. If you just want software that's faster and more secure, ChromeOS has the better way.

Re:The Framework Laptop Chromebook Edition by pksebben on Thursday September 22, 2022 @01:54AM (#32935194)
I'd just like to put a vote of confidence in for That Guy, I think we should absolutely have an option for them.

Which is a roundabout way of saying; it's critically important that we don't over-optimize for the central, happy path (just wanna browse securely on whatever hardware ya got). The most interesting things (and the most valuable) frequently come from the edge cases, which are absolutely supported by keeping an eye on the needs of "That One Guy". Unix interoperability has given us a bounty of awesome shit and I anticipate it will continue to do so.

Re:The Framework Laptop Chromebook Edition by caskstrength on Wednesday September 21, 2022 @02:27PM (#32929195)
We don't because it doesn't.

Battery life of ThinkPad that supports Linux with TLP installed and properly configured will be very similar to Windows. And to address FUD from other reply to your question: AFAIK official Firefox builds for Linux use PGO as well, however PGO has quite less impact on battery life than what another commenter suggests.

Re:The Framework Laptop Chromebook Edition by yjftsjthsd-h on Wednesday September 21, 2022 @01:27PM (#32928374)
The usual reason for a lot of those boil down to "poor driver support", but this is the same hardware with what I would presume is the same Linux kernel so same drivers, so what's the difference?
Re:The Framework Laptop Chromebook Edition by duped on Wednesday September 21, 2022 @01:34PM (#32928469)
The usual reason is that you can't enable hibernate with disk encryption
Re:The Framework Laptop Chromebook Edition by cbsmith on Wednesday September 21, 2022 @02:10PM (#32928934)
It tends to specifically be an issue with encrypted swap, because encrypted swap uses a random ephemeral encryption key. Honestly, I think in a lot of cases it makes sense to simply There are solutions for this: https://help.ubuntu.com/community/EnableHibernateWithEncrypt...

I think the real challenge here is for distro vendors to figure out how to provide a better user experience around this. There's no reason that the ephemeral key can't be stored in a sealed state that can be recovered as the machine wakes. There are obviously some security implications to this, but I think it's fair to say that a lot of users would prefer making that trade-off.

Re:The Framework Laptop Chromebook Edition by r2binx on Wednesday September 21, 2022 @02:28PM (#32929216)
Why use another encrypted partition instead of putting a swap partition/file on the same with LVM/btrfs?
Re:The Framework Laptop Chromebook Edition by cbsmith on Wednesday September 21, 2022 @02:43PM (#32929487)
There's a lot of security models that rely on RAM being more difficult for an attacker to access than disk (as you can imagine it is much easier to ensure things stored to disk are resistant to compromise than to ensure that nothing in working memory is usable by an attacker). Swap is that in between case where storage is memory, so that creates a unique challenge.

What you want is that if someone steals your hibernated laptop, that absent a way to securely authenticate themselves as you, they can't restore the working memory of your laptop. If you think about it, if they could, much of the point of many security precautions would be lost.

Re:The Framework Laptop Chromebook Edition by r2binx on Thursday September 22, 2022 @06:25AM (#32936978)
Ah of course, I haven't thought about it that way, thanks for your explanation. I guess it depends if you're willing to put all eggs in one basket so to speak. But instead of disabling hibernation outright maybe distros can find a compromise there.

My anecdotal experience with friends that tried Linux is that it left such a bad impression when they opened they're laptop the next morning and it's lost most of its battery life that some actually went back to Windows.

Re:The Framework Laptop Chromebook Edition by cbsmith on Friday September 23, 2022 @03:36AM (#32949034)
Oddly, no one thinks about the Chromebooks.
Re:The Framework Laptop Chromebook Edition by saltcured on Wednesday September 21, 2022 @04:41PM (#32931246)
I think you may have missed what was being asked? I think they assume that an LVM PV is encrypted and could contain the block filesystem and swap volumes as LVs. There is already a boot-time process to unlock such an LVM setup. Why should the swap require a separate encryption key?

As a Fedora user, this is how my disks have been setup for many years, and I don't understand why Fedora have disabled hibernation. During wake from hibernation, the kernel and boot ramdisk would need user input to unlock the PV and to decode the LVs. Then, the hibernation state would be visible at the same time as the other filesystem state, and the kernel could decide whether to load the hibernation image or continue a normal boot sequence.

This seems to provide the protection of content needed for theft of a hibernated machine. I don't know whether there is some unhappy sequencing flaw in the dracut-generated ramdisk (between when the wake-versus-boot decision has to be made and the LVM decryption is done), or, whether someone at Fedora has decided that the threat model is different than we discuss above?

Re:The Framework Laptop Chromebook Edition by cbsmith on Wednesday September 21, 2022 @05:10PM (#32931572)
> I think they assume that an LVM PV is encrypted and could contain the block filesystem and swap volumes as LVs. There is already a boot-time process to unlock such an LVM setup. Why should the swap require a separate encryption key?

Again, the reason why it's different is the security model for memory is different from the filesystem. This is exactly what I was getting at: the fixed key. Encrypted swap volumes typically are set up to use ephemeral keys that are "forgotten" when you power down. The idea is that you only have access to that memory while the computer is running. When you boot up again, whatever data is in the swap partition is just noise. As mentioned in the link I provided (https://help.ubuntu.com/community/EnableHibernateWithEncrypt...), the current solution is to switch to using a fixed key, much as you described. That fundamentally changes the security model, and not in a subtle way.

I think there's a solution that more closely approximates the security model, with only a minor compromise: when you boot up, you generate an ephemeral key in the secure enclave, and use that to encrypt your swap. When you hibernate, the secure enclave encrypts all the metadata (including the ephemeral key) into a sealed state that is stored on disk with the swap information. When you restore, the sealed data is read back into the secure enclave (and erased) and it can then decrypt swap as needed. This still means the hibernated memory state is fully recoverable by whomever is able to authenticate with the enclave, but that's what everyone wants. On the upside, if you shut down the machine (rather than hibernate), the ephemeral key is lost, so there's no way anyone can recover what's on your swap, even if they have access to whatever fixed key(s) you have used for your LVM volumes.

If you're really paranoid, you could even generate a new ephemeral key on restore and reencrypt the entire swap volume with the new ephemeral key, though I'd question what realistic threat model that would really address.

Re:The Framework Laptop Chromebook Edition by saltcured on Wednesday September 21, 2022 @09:08PM (#32933677)
Maybe we're not talking about the same scenarios/alternatives? If I've set up whole-disk encryption with a security level I trust for my persistent storage, how is that not appropriate for the persisted hibernation state? To me, hibernation state is a subset of persistent storage needs, not some categorically different thing. The coupling between running system and persistent state seems so strong to me that I consider them one equivalence class of data and requiring one consistent protection standard.

I adopted the conveniently offered, software-based whole disk encryption mode when installing Fedora. A luks-encrypted LVM PV is the only luks mapping at runtime, and a naked /boot volume is the only volume not allocated as an LVM LV in that encrypted volume group. Thus, I have selected my storage security posture. I expect the cold or detached storage device to be resistant to inspection. Due to the unencrypted /boot, I have doubts that there is tamper-protection of the future running software, should I temporarily lose control of the physical device. I have no illusion that the running kernel lacks access to the plaintext content.

My swap is an LV in that encrypted volume group. Why is hibernation disabled on Fedora? This is where I feel like there is a poorly communicated threat model or some other unstated assumption that I do not appreciate. (But see my last paragraph below for a possible answer!)

Are people concerned about the written hibernation state using the same key as the filesystem volumes? I.e. that knowing how to unlock the whole-disk encryption means you can reconstruct the hibernated image too? I don't see why I, as a user, should care to protect the hibernation image even more than all my regular data. Similarly, if I have the key I can potentially attack the root volume (while offline) to inject all sorts of malware, such that I could exfiltrate RAM state from the running system in the future. Swap isn't required to open me to that attack.

Are people concerned about regular swap state being available on disk during system operation? I.e. the running Linux luks mappings can be abused to inspect swap state? I am not sure I can appreciate this angle, since I think it is farfetched that the swap mapping can somehow be more resistant to attack than the filesystem mappings in the same running kernel.

Are people concerned about regular swap state being left on disk during a non-hibernated shutdown? If so, I would suggest that the swap crypto should not be conflated with the hibernation crypto. Add an ephemeral cipher to swap if you must, but use framing/metadata to reliably distinguish the ephemeral swap "noise" image from a valid hibernation image. I'm OK saying that hibernate must write an entire image and not assuming that regular swapping can opportunistically prepare any hibernation state prior to a hibernation event actually commencing.

While writing all this, I have thought up another possible angle. Maybe this is the actual Fedora issue? I can see that control of an offline hibernation image means control of a future running system image, and this might violate some secure boot agenda? I.e. I can tinker with the hibernated state to introduce a "hacked kernel" and ask the system to restart with that. I can see why secure boot might prevent return from hibernation. This requires some integrity-protection chain to enable the trusted bootloader and kernel to verify a hibernation image before opting to load and restart it. I can see how a variation on your "sealed state" approach could address this. But note, it only requires integrity protection and does not actually need another layer of confidentiality protection.

Re:The Framework Laptop Chromebook Edition by cbsmith on Thursday September 22, 2022 @05:56PM (#32945137)
> Maybe we're not talking about the same scenarios/alternatives? If I've set up whole-disk encryption with a security level I trust for my persistent storage, how is that not appropriate for the persisted hibernation state? To me, hibernation state is a subset of persistent storage needs, not some categorically different thing. The coupling between running system and persistent state seems so strong to me that I consider them one equivalence class of data and requiring one consistent protection standard.

Yes, we are talking about different scenarios. As I said, you can absolutely set up your swap to use a fixed password and then it will work fine as you describe.

> Are people concerned about the written hibernation state using the same key as the filesystem volumes?

That might be part of the concern, but it's more that it is possible to recover previous memory/swap state with a key that can reasonably be subsequently recovered.

Let's imagine a scenario where I have a secure password, that I enter into my browser, to say, access my bank's website. That's stored in memory by my browser & the GUI, but it is not normally allowed to be put on disk for security reasons. Then I hibernate my laptop and it gets written to the encrypted hibernate volume that uses a fixed password. I restore my laptop and go about my business. I might even reboot the laptop several time subsequently without thinking much about it. Then, someone finds a way to compromise the password used for swap encryption using any number of possible attacks (some you described). Now, not only do they have access to all the stuff on my computer, but they also have access to the contents of the encrypted swap volume, which unless I was lucky and the particular swap page was overwritten, the compromise goes back to the memory of the runtime from long before the machine was compromised. This would include this password that was very intentionally NOT stored on that computer, in order to avert precisely this kind of threat.

> If so, I would suggest that the swap crypto should not be conflated with the hibernation crypto.

That's another possible avenue, not that unlike what I was suggesting. It's worth noting though that these days there may not be much value in having separate passwords for swap vs. hibernate, since swap is rarely used on laptops.

They are all different security trade-offs, and it is debatable which is the right one. I don't think the current default is the right one for most users, but I do understand it.

Re:The Framework Laptop Chromebook Edition by r2binx on Wednesday September 21, 2022 @02:19PM (#32929074)
You definitely can. Actually relatively simple if you know your way around Linux. This is a good guide for Arch [1]. I think there's a couple more steps on Fedora or if you're using zram in general but it's definitely doable. I've even got it working with secure boot using my own keys.

[1]: https://gist.github.com/RobFisher/abd9b2b9fca4194ac8df112715...

Re:The Framework Laptop Chromebook Edition by kxyvr on Wednesday September 21, 2022 @07:24PM (#32932950)
I just went through this process with Gentoo on a framework laptop. Here are some random, likely incomplete notes to make this work. It uses a swap file on an encrypted filesystem

  1.  Create a swap file.  Our rule of thumb is ram + sqrt(ram) for hibernate

      fallocate -l 72GiB swapfile
      chmod 600 swapfile
      mkswap swapfile
      swapon swapfile
      swapon --show

  2.  emerge suspend

  3.  Get the number to use with resume_offset later.  In the current case, it was 125798400

      swap-offset /swapfile
      
      emerge sys-boot/grub
      grub-install --target=x86_64-efi --efi-directory=/boot                       
                                                                                 
      vim /boot/grub/grub.cfg                                                      
                                                                                 
      timeout=5                                                                    
                                                                                 
      menuentry 'Gentoo Linux 5.18.19' {                                           
              root=hd0,1                                                           
              insmod all_video                                                     
              linux /kernel-5.18.19 root=/dev/mapper/root resume=/dev/mapper/root resume_offset=125798400
      }

  4. Fix suspend.conf

     vim /etc/suspend.conf

     resume device = /dev/mapper/root                                             
     resume offset = 125798400    

  5. Setup an initramfs

     cd /usr/src
     mkdir initramfs
     cd initramfs                                                                 
     mkdir -p bin dev etc proc sys new-root                                       
     cp -a /dev/{null,console,tty} /usr/src/initramfs/dev/                        
     cp -a /bin/busybox ./bin                                                     
     cd bin                                                                       
     for i in `./busybox --list`                                                  
     do                                                                           
         ln -s ./busybox $i                                                       
     done                                                                         
     cd ..                                                                        
     cp -a /sbin/cryptsetup ./bin                                                 
     mkdir -p ./run/cryptsetup                                                    
    lddtree -l /sbin/cryptsetup

    Copy in all of those files until the local cryptsetup works appropriately

    vim init

      #!/bin/sh                                                                        
                                                                                 
      # Define a rescue shell                                                          
      rescue_shell() {                                                                 
          echo "Error in boot process, dropping to a shell"                            
          exec /bin/sh                                                                 
      }·                                                                               
                                                                                 
      # Mount our devices.  We sleep prior to dev to hopefully finish loading.         
      mount -t proc none /proc                                                           
      mount -t sysfs none /sys                                                         
      sleep 2 && mount -t devtmpfs none /dev                                           
                                                                                 
      # Decrypt the root partition                                                     
      cryptsetup --allow-discards luksOpen /dev/nvme0n1p2 root || rescue_shell         
                                                                                 
      # Attempt to resume                                                              
      printf '%u:%u\n' $(stat -L -c '0x%t 0x%T' /dev/mapper/root) > /sys/power/resume  
                                                                                 
      # If we're not resuming, mount the new root                                      
      mount -o noatime,discard -t ext4 /dev/mapper/root /new-root                      
                                                                                 
      # Unmount (cleanup) our devices                                                  
      umount /proc                                                                     
      umount /sys                                                                      
      umount /dev                                                                      
                                                                                 
      # Boot from the unencrypted partition                                            
      exec switch_root /new-root /sbin/init
          
  6.  Suspend should be working with:

      echo shutdown > /sys/power/disk                                              
      echo disk > /sys/power/state  

      or preferably

      loginctl hibernate
Anyway, there's a lot of missing detail in there, but the idea is that there's a swapfile inside the normal encrypted root partition. For me, I've enough ram where I don't really use swap unless hibernating, so a swapfile versus a separate encrypted swap partition suffices.
Re:The Framework Laptop Chromebook Edition by staticassertion on Wednesday September 21, 2022 @01:07PM (#32928113)
I have a whole bunch of reasons.

ChromeOS has a great separation of concerns and isolation of environments. I have my work profile and my personal profile, which are totally separate. I have my browser environment and my dev VM, which are totally separate. Different activities are cleanly partitioned.

This has obvious security benefits but also is just a really nice, simple way to manage the system. I can fuck up a dev VM without impacting anything else, I can click random links on my personal profile without impacting work, etc.

It also just does what I want it to do. I browse the internet, I program. It's good for those things. So... why Linux?

Re:The Framework Laptop Chromebook Edition by rasengan0 on Wednesday September 21, 2022 @10:22PM (#32934151)
I too enjoy ChromeOS but how do you play a DVD? [1]

[1] https://old.reddit.com/r/Crostini/comments/b680wa/external_d...

Re:The Framework Laptop Chromebook Edition by staticassertion on Wednesday September 21, 2022 @11:29PM (#32934500)
No idea, I haven't been in the presence of a DVD in years
Re:The Framework Laptop Chromebook Edition by hollerith on Wednesday September 21, 2022 @02:23PM (#32929130)
ChromeOS (especially when "pre-installed", as is the case here) is much more secure than Linux, IMO.
Re:The Framework Laptop Chromebook Edition by paxys on Wednesday September 21, 2022 @12:53PM (#32927896)
You can actually recommend ChromeOS to your non technical friends
Re:The Framework Laptop Chromebook Edition by LegitShady on Wednesday September 21, 2022 @12:39PM (#32927696)
https://frame.work/ca/en/linux

don't they already support this on the existing framework?

Re:The Framework Laptop Chromebook Edition by jrm4 on Wednesday September 21, 2022 @02:00PM (#32928805)
I appreciate the folks here being open about their biased opinions, because they are completely out of line with the reality I've seen. I teach IT in a college and I run a non-profit the refurbishes computers.

I have not seen a remotely significant difference between ChromeOS and Linux (with Chrome Installed) for the vast majority of users.

It is true that Linux on ChromeOS is annoyingly fiddly and my suspicion is that this is the Google mind (perhaps subconsciously) not wanting to reveal how generally unnecessary "ChromeOS" would be in a world that collectively "knew that the Linux Desktop existed." And I do mean this "without modification," i.e. most of your top 20ish Distrowatch distros fare perfectly well here.

Re:The Framework Laptop Chromebook Edition by yunohn on Wednesday September 21, 2022 @05:50PM (#32931986)
> remotely significant difference between ChromeOS and Linux (with Chrome Installed) for the vast majority of users

You provide IT support, eg for school kids, and somehow they grok Linux just as well as a browser? That is not my experience.

Re:The Framework Laptop Chromebook Edition by jrm4 on Wednesday September 21, 2022 @06:14PM (#32932275)
No, I mean they turn on computer, there's a Chrome icon, and a start menu etc etc. It's pretty much the same experience. I'm not sure if they literally can much tell the difference.