Hacker News new | ask | show | jobs
by netizen-936824 1575 days ago
Genuine question here. I run gentoo on an NVMe drive and I have zero reason to use sleep or hibernate as my machine gets to the DE in under 30s.

What use cases are there that absolutely requires these features when boot times are so short?

3 comments

Sleep and hibernate are about persisting state and not about boot time. I don't want to spend time reopening everything and setting everything up when I come back to my computer. I just want to continue where I left off.
The way I have things set up, my browser opens all my last tabs and I have things set to start the browser and a few other programs at boot.

What programs are you using in such a fashion that simply having the program autostart at boot is not feasible?

My code is stopped inside the debugger when I've finally reproduced a bug. My wife calls for dinner. I close my laptop and stick it in a safe place where a kid won't spill something sticky on it. After dinner I open up the laptop and the debugger is right there in the same spot, I don't have to spend another 30 minutes trying to reproduce the bug.
I actually find it a bit surprising that you aren’t aware of a difference. Have you used a MacBook recently? If no, I highly suggest you try it. Once you’re used to instant startups, waiting for a boot is just frustrating.
This.

I have an old 2013 MBP that wakes up from sleep quicker than I can open the lid.

This is one of the niceties I've lost when I moved to a PC last year (the others can mostly be attributed to cheap "enterprise" hardware).

My current laptop takes longer to wake from sleep while also sucking the battery dry. Talk about lose-lose.

Debugging has already been mentioned. I run lots of programs that take several hours too, be that copying files or transcoding or processing some data. Right now I have something running that won't be done for two days.

And when I have 20 programs open, even if it only takes 15-30 seconds per program to get them going again that's a bunch of time I didn't need to waste. And even the programs I have that autostart still require prodding to get them into the right state.

I also have programs that can take weeks to run, but I just leave my computer on and running in those cases. I have never trusted sleep or hibernate to properly handle those situations and I don't want to lose data. Not to mention, if I'm pausing it while its running it will take even longer to finish.

Debugging I can understand, as that's a bit of a different beast than a program that can run unattended.

>What programs are you using in such a fashion that simply having the program autostart at boot is not feasible?

Developing an application in Lisp and there's all kinds of state in the REPL right now. Gotta pick kid up from preschool, just close the lid and it'll be exactly as I left it when I come home.

Have a document open in an ad-hoc fashion (i.e. it's some PDF for work, not something on my autostart list) and I get interrupted. Close lid. Document is still there when I open it again, and what's more it's open to the exact spot I stopped reading.

I guess I also don't understand the "closing the lid to leave" behavior as well. My laptop is integrated into a desktop setup with external monitors and it only gets closed when I actually take it out of the house. Otherwise screen locking and letting the monitors go sleep is fine with me
>My laptop is integrated into a desktop setup

Say no more. In my experience most of the "linux is fine for laptop usage" folks tend to be "laptop is actually a desktop that I rarely if ever take anywhere" folks also.

>What programs are you using in such a fashion that simply having the program autostart at boot is not feasible?

As a simple example open documents in libreoffice. I don't want to automatically start LO every time I turn on computer. If I have documents open I want to be able to return to the same place when I came back.

Some Linux DEs have a "reopen windows at login" setting. I remember KDE used to have this some 10 years ago, while still on version 3. So if LO is open when you shut down, it'll bring it back up. Otherwise, it won't.

I don't know if it's able to handle reopening the last document, and even less if it can take you back to the position where you left off. This is probably application-dependent.

However, like others here, I would much rather have a functioning sleep that allows the computer to both wake up fast and not drain the battery. I don't really care for it to check my mail while it's in my backpack without any kind of network access, or whatever it is it does instead of sleeping.

The task I want to do is quick, and I don't want to spend 30 seconds waiting to start something that might finish in less time than that.

A bunch of browser tabs are open, and I don't feel like recovering them at relaunch.

I have my app windows set up exactly the way I like them, down to the pixel.

I'm used to my phone, TV, microwave, wristwatch, stereo, and car not needing to boot up.

Window tiling has killed off my need to worry about app window position.

I used to have a nasty habit of opening a text editor during the day and taking random notes during phone calls or as I worked. Several forced restarts (administrative, accidental or hardware related) forced me to start using those sticky-note apps. I've moved to Joplin now (very structured, supports markdown, syncs to dropbox periodically, is multiplatform)

The browser thing resonates though. It's not just which websites are open, but what state they're in (ie: logged in, midway through filling out a long form or survey). In a pinch I'll just 'kill -9 firefox' so after the reboot it automatically restores tabs and windows, but it's still messy. Sites that require authentication will just bounce you to the login page and may not "remember" where you were trying to get to. Maybe we need hibernate for browsers.

I thought browsers preserved session cookies when configured to open previous tabs on launch.

I don't think I've ever noticed a logout from restarting a browser.

Same here, as long as firefox is set up for it then everything is restores (don't think there's a solution for half-filled forms though)
I also use window tiling, everything goes where I want it to be and quickly. I almost never have to putz with placement unless I'm doing something new.
Why even turn the computer off? Is there a reason to not leave it plugged in and just let the monitors fall asleep?

I could understand if you're away from a plug and/or on the move though.

Also if cars have computers, don't they cold boot when you turn the car on? Phones and smart watches never truly "turn off" their screen goes into sleep mode which is fast to turn on

I'm also curious why people are so keen on needing a device to be powered on and ready to go within a second or two.

On my Framework (running Windows) I have it set up to hibernate when the lid closes to preserve battery. It takes about 10 seconds to get back into the desktop when I open the lid again. It's not like I'm opening/closing the lid dozens of times a day; I open it, work for a few hours, then close it. It's not like a phone where I power it on for a few seconds every hour or so to check notifications.

> I'm also curious why people are so keen on needing a device to be powered on and ready to go within a second or two.

Because it’s way more convenient. Next time you go to open your front door, take out your phone, start a timer for 30s, and then put the key in the door once the timer expires. Once you’re used to something being near-instant, there is no going back. Waiting is frustrating.

Not judging, but this thread goes to show how differently people use computers and what they’re willing to tolerate.

Personally I haven’t used hibernate in over a decade and my machines typically run 6 months until I have to reboot for updates. If I had to wait ~10 seconds every time I wanted to google something, I wouldn’t use my PC nearly as often as I do today. Maybe that’s why mobile is dominant in so many categories like web search.

Yeah, but it's not like every time you want to search the web you're opening up your laptop, going to a browser, doing the search, and then closing the laptop, right?

You're right that this is why I use my phone to do quick searches so often- it's on and searching within seconds. Even faster to use my voice to search instead of typing.

The thing is, your phone never goes to "sleep" or powers off in those situations. The screen is off, that's all