News for hackers. Stuff that matters.
Re:The Framework Laptop 13 by reacharavindh on Wednesday May 03, 2023 @10:28AM (#35802816)
I’ll wait to see if they have proper “sleep” mode such that they don’t keep draining batter while not in use, particularly when running Linux. This is something that baffles me about non Apple Laptops how they just refuse to catch up to such a great benefit.. (alongside the trackpad experience which I can may be live with).
Re:The Framework Laptop 13 by consp on Wednesday May 03, 2023 @10:40AM (#35802973)
Many laptops these days only implement s2idle and no proper s3 support which is the main culprit. My lenovo only does a day (at best) in s2idle under linux (windows is worse), when I switched it to s3 it does about 4 days as expected for the amd cpu. Fortunately this has a switch in the bios (which says windows won't work afterwards which is cow manure). You get the added benefit that windows can't phone home when you close the lid.
Re:The Framework Laptop 13 by kitsunesoba on Wednesday May 03, 2023 @10:51AM (#35803098)
My X1 Nano Gen 1 has the same switch in EFI. Glad it exists but yeah it’s weird that Lenovo suggests that using it breaks Windows.
Re:The Framework Laptop 13 by aksss on Wednesday May 03, 2023 @12:39PM (#35804482)
I think the idea is that Windows will occasionally not wake up properly, leaving the user to “choke it out” (power button for 5 sec to force a hard shut down, power button to power up). Sorry if you had any unsaved work.

Personally, Hibernate works great, doesn’t require any battery life to sustain it, and always comes back with state intact, so it’s my go to.

Re:The Framework Laptop 13 by kibwen on Wednesday May 03, 2023 @05:25PM (#35808002)
> Hibernate works great

Seconded. All of these modern "smart sleep" solutions are uniformly worse than just giving me a got-danged hibernate option.

Re:The Framework Laptop 13 by zbrozek on Thursday May 04, 2023 @12:10AM (#35811088)
Hibernate is just slow, especially if you dual boot and have to wait through grub.
Re:The Framework Laptop 13 by chrismorgan on Thursday May 04, 2023 @05:56AM (#35813166)
> uniformly worse

Extremely false: hibernate is way slower. Sleep happens within a second and awakes within a second. Hibernate requires writing all your memory to disk; if you have, say, 15GB of memory in use and a disk that can read and write at 1 GB/sec (far from the fastest, but also extremely far from the slowest), that’s fifteen seconds. For many (probably most) people’s realistic situations, hibernate will take over a minute.

(Heh, my own laptop takes 4–8 minutes to hibernate if its CPU is slowed to 400 MHz to minimise power consumption, which incidentally happens automatically when it’s almost down to 0% battery power, shortly after which it triggers a suspend-then-hibernate, and the extra time that makes it take it brings it perilously close to running out of power before it finishes. Not certain why limiting the CPU has such a massive effect, but I’ve compared it when manually inducing similar circumstances by giving the CPU an impossibly low power envelope with `ryzenadj --stapm-limit 100 --fast-limit 100 --slow-limit 100`, which limits all cores to 400 MHz, and yeah, that makes hibernate slow.)

Re:The Framework Laptop 13 by dvd23 on Wednesday May 03, 2023 @11:24AM (#35803516)
Same for mine, there's even a long thread about it in Lenovo's forum (T14 gen1). I still think 4 days is not really great compared to my previous MacBook that could sleep for weeks.
Re:The Framework Laptop 13 by courgette on Wednesday May 03, 2023 @12:27PM (#35804333)
Yeah, I kinda give up on great trackpad and insane, actual, battery life.

It's been a while too, I'm remember that being a plus of Apple devices since 10+ years.

Re:The Framework Laptop 13 by dvd23 on Thursday May 04, 2023 @07:46AM (#35813910)
It's a bit crazy that it's been so long and it's still a major pain point for me on Linux. Apart from that, I really enjoy the machine. Not really an issue when it's plugged in at home, but annoying on the go...
Re:The Framework Laptop 13 by talhah on Wednesday May 03, 2023 @03:02PM (#35806337)
Battery life is bad overall for this, at least on the sister T14s gen1. Is it the same experience for you and what tweaks have you made to increase battery life?

According to this thread we might never get AMD pstate driver working.

https://forums.lenovo.com/t5/Other-Linux-Discussions/amd-pst...

Re:The Framework Laptop 13 by pimeys on Thursday May 04, 2023 @03:40AM (#35812460)
I enabled the pstate driver yesterday for my T14s gen3 (AMD). It almost doubled my battery life, the fan never spins anymore and it's very very quiet and cool now. You need to specifically enable it in Linux kernel, this is how I did it:

https://github.com/pimeys/nixos/commit/17e8a9e2ce4b0f34ef6cf...

It should also be used together with the `shedutil` governor for the best results.

Re:The Framework Laptop 13 by talhah on Thursday May 04, 2023 @04:05AM (#35812586)
CPPC needs to be enabled in BIOS for this and unfortunately that option isn't present.

If you see the thread linked in previous comment, Lenovo has been advised not to enable the feature :/

Re:The Framework Laptop 13 by pimeys on Thursday May 04, 2023 @04:07AM (#35812596)
Seems to work for me at least:

  > cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
  amd-pstate
And, it has a tremendous effect on battery life and the fan speed on the G3. Maybe it doesn't work with previous models?
Re:The Framework Laptop 13 by dvd23 on Thursday May 04, 2023 @07:58AM (#35813997)
As the parent said, apparently AMD recommended not to enable it for that generation [1]. That's the price to pay for having a first gen I suppose...

[1] https://forums.lenovo.com/t5/Other-Linux-Discussions/amd-pst...

Re:The Framework Laptop 13 by dvd23 on Thursday May 04, 2023 @07:49AM (#35813932)
Yes battery life is awful since day 1. I initially thought I had a faulty device or something. Apart from that the machine is great, it's really a shame. I tried a lot of various things mentioned in the forum, updated the BIOS, tested plenty of various configurations, to no avail.
Re:The Framework Laptop 13 by f_devd on Wednesday May 03, 2023 @10:34AM (#35802904)
It might be a bit of tinkering but you can enable suspend-then-hibernate with logind/systemd which gives you a similar setup to Macbooks but slightly slower to wake from deep sleep as it needs to go through post/grub again. With the bigger battery provide and new CPU I do hope it lasts longer when idle though.
Re:The Framework Laptop 13 by sowbug on Wednesday May 03, 2023 @11:23AM (#35803498)
Does that require a LUKS unlock step?
Re:The Framework Laptop 13 by f_devd on Wednesday May 03, 2023 @01:08PM (#35804887)
I believe so, I remember an article on hibernation+luks being more difficult to set up
Re:The Framework Laptop 13 by dathinab on Wednesday May 03, 2023 @04:47PM (#35807563)
it mainly lacks good UI/UX tools to do so and an agreement on what the right approach is, especially if combined with raid

without raid it's not too hard, just bothersome and finding the right information can be annoying

the main gotcha is that lockdown mode is incompatible with hibernation (no matter if it's encrypted or not) and some distros enable it by default when secure boot is used, which is most times the case with a full disk encryption setup

Re:The Framework Laptop 13 by hutzlibu on Wednesday May 03, 2023 @11:24AM (#35803517)
"It might be a bit of tinkering"

Thats an understatement. I never made suspend-then-hibernate work reliable on linux and I tried it over the years on different systems. So I just had developed the habit of always entering hibernation, if I intend to close the lid for longer.

On windows suspend-then-hibernate never failed so far.

Drivers are just the crux with linux in too many cases. Not much you can do about it, except reverse engeneering drivers as a side project.

Re:The Framework Laptop 13 by vetinari on Wednesday May 03, 2023 @12:28PM (#35804336)
Suspend and hibernate are calls into ACPI, so no amount of driver work is going to help, when the firmware is responsible.
Re:The Framework Laptop 13 by hutzlibu on Wednesday May 03, 2023 @12:38PM (#35804474)
You can also reverse engeneer the firmware if you like, but as a matter of fact, it always worked reliable with windows laptops and not one single time with linux for me (open for suggestions of stable hw). And I am not a kernel dev, but I am pretty sure drivers are in general involved with waking up and sleeping as well. There are just lots of things, that can go wrong there. One small bug somewhere can result in blocking the hibernation => result is a drained battery.
Re:The Framework Laptop 13 by f_devd on Wednesday May 03, 2023 @01:11PM (#35804933)
For the framework 13th gen it only required running a fairly recent kernel (>=6.1) for it to work, but that's definitely hindsight
Re:The Framework Laptop 13 by dathinab on Wednesday May 03, 2023 @04:23PM (#35807270)
I use it too it's not hard to setup and works well (with very few exceptions and if you use a "recent" enough linux kernel, depending on your hardware).

Once hibernation is setup just set systemd [Login]HandleLidSwitch=suspend-then-hibernate and maybe configure the delay with [Sleep]HibernateDelaySec=5min.

Hibernation most times works nice too (even with Full Disk Encryption (FDE)) there is just one gotcha, lockdown mode is currently fundamentally incompatible with hibernation (even through it's docs seem to imply something else, they refer to a not yet existing feature). And some distros enable lockdown mode by default if you use a proper FDE setup. Leading to a lot of confusion about hibernation suposedly not working anymore in linux or being incompatible with FDE.

Re:The Framework Laptop 13 by hutzlibu on Thursday May 04, 2023 @01:04PM (#35818673)
Ok, I will give it a try again, thanks for the explanation.
Re:The Framework Laptop 13 by bobmaxup on Wednesday May 03, 2023 @03:13PM (#35806464)
Every time I put my Apple laptop to sleep for an extended period, I come back to it completely dead.

It cannot even boot for an about an hour while it charges to a minimum level.

Re:The Framework Laptop 13 by dathinab on Wednesday May 03, 2023 @04:48PM (#35807579)
a Intel Apple laptop? because they kinda don't care much more about the intel devices they had produced
Re:The Framework Laptop 13 by bobmaxup on Thursday May 04, 2023 @06:47AM (#35813497)
Yeah, unfortunate I suppose.
Re:The Framework Laptop 13 by bodge5000 on Wednesday May 03, 2023 @04:38PM (#35807452)
Maybe its just me, but I've found Macbooks to be worse for this

I have a Macbook Air, M1, which I don't use regularly but turn off after every use. When I go to turn it back on again, the battery's completely dead. I haven't had that from any non-apple laptop for a long time, and I sometimes go +6 months without turning them on

The trackpad though I'm in agreement with. I never understood why people use an external trackpad with their imacs until I used it on the macbook

Re:The Framework Laptop 13 by stefandesu on Thursday May 04, 2023 @10:49AM (#35816240)
I feel like my M1 Air could live on for weeks in sleep mode, as long as nothing's plugged in. Maybe you could try Sleep Air [1] to find the culprit?

[1]: https://ohanaware.com/sleepaid/