this post was submitted on 08 Jun 2024
623 points (97.8% liked)

Linux

48654 readers
664 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I just installed EndeavorOS on an HP Spectre360 that’s roughly 2 years old. I am honestly surprised at how easy it went. If you google it, you’ll get a lot of “lol good luck installing linux on that” type posts - so I was ready for a battle.

Turned off secure boot and tpm. Booted off a usb stick. Live environment, check. Start installer and wipe drive. Few minutes later I’m in. Ok let’s find out what’s not working…

WiFi check. Bluetooth check. Sound check (although a little quiet). Keyboard check. Screen resolution check. Hibernates correctly? Check. WTF I can’t believe this all works out the box. The touchscreen? Check. The stylus pen check. Flipping the screen over to a tablet check. Jesus H.

Ok, everything just works. Huh. Who’d have thunk?

Install programs, log into accounts, jeez this laptop is snappier than on windows. Make things pretty for my wife and install some fun games and stuff.

Finished. Ez. Why did I wait so long? Google was wrong - it was cake.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 14 points 6 months ago (4 children)

Hibernate works

Yah, I'm not buying that.

[–] [email protected] 8 points 6 months ago (2 children)

I left I alone, it went off. I came back and wiggled the mouse, nothing happened. I pressed the enter key snd it came back to life -same behavior as my desktop.

Did it again, this time I tried closing the lid and opening it - it sprung to life when the lid opened.

You’re right - not the most thorough tests, but that’s what I did/saw.

[–] [email protected] 12 points 6 months ago

Sounds like sleep. Hibernate is when it turns completely off, such that you can leave it unplugged for a weekend and still have battery when it pops you back into your session. It takes longer to save and restore the session than sleep does.

[–] [email protected] 6 points 6 months ago* (last edited 6 months ago) (1 children)

That sounds like sleep. Not hibernate. Hibernate is the process of moving your working ram onto disk. It's similar to a full power off except your current state is saved. Hibernate doesn't usually work oob. Sleep does.

[–] [email protected] 2 points 6 months ago (1 children)

It was a couple hours. Just like on my desktop, wiggling the mouse wakes it from sleep, but not so in whatever that second state is when it’s left for longer. It definitely was something other than sleep. What it was - I’ll let you guys decide. Whether it behaves long term with fans in a laptop bag, that I don’t know - I haven’t had enough run time with it.

I’m just sharing a positive experience. If I see it misbehave I’ll be sure to update the thread with reality. But so far, it really is behaving much better than I expected.

[–] [email protected] 2 points 6 months ago (1 children)

Wake from hibernation usually requires to press the power button, because the computer is off.

Sleep is not disturbed by wiggling the mouse because this trigger is usually disabled on laptops, as it would happen involuntarily.

[–] [email protected] 4 points 6 months ago (1 children)

I did some more digging on this last night. I’m more confused now than I was before, and I don’t know what it’s doing.

The arch wiki defines three states, suspend to ram (sleep), suspend to disk(hibernate), and a hybrid suspend(presumably what my steam deck does).

First there is the “turn off the display” behavior. Doing anything brings the monitor back alive and I’m presented with the Lock Screen.

Second is what I believe to be sleep. This happens when I select “suspend” from the menu or leave it alone for a very long time. This mode doesn’t happen soon (maybe at all) if the computer is doing stuff. It appears to be in a lower power state-but I can’t say why I think that (maybe it’s just because the fans aren’t running? I dunno). Wiggling the mouse or doing anything wakes it back up.

Third is another state. It’s just like the above state, except it will not wake up with mouse movement, or clicking keys on a Bluetooth keyboard. I must push a key on the keyboard, the power button, or open the lid. It’s weird because it responds to things other than the power button.

Interestingly, my desktop behaves exactly the same way. But what’s interesting on the desktop is that I can hear a power relay clicking on from this third state. It’s distinctly different than the 2nd state - exhibiting power cutoff, but still responding to the keyboard.

Neither computer enters any other state even after days of being left alone.

So I dunno. Are modes 2 and 3 like two versions of sleep, and hibernate never activates? Or is state three hibernation but it responds to things it shouldn’t?

I have no idea. But now that I’ve played with it some more - I don’t want to say hibernate is working because I don’t know what it’s doing. All I know is that it has the above three behaviors which are consistent with my desktop machine.

[–] [email protected] 3 points 6 months ago* (last edited 6 months ago) (1 children)

See what happens after actually running:

systemctl hibernate

Systems don't normally enter hibernate automatically unless they are at low battery. There is something called modern standby or s0 sleep, versus traditional s3 sleep. The "third state" you describe sounds very much like s3 sleep. I doubt it would switch between s0 and s3 sleep though, normally one or the other is enabled. Maybe it's going to hybrid suspend? In fact that would probably explain it. I believe hybrid suspend involves using s3 sleep state.

Also there are no power relays in modern ATX PSUs to my knowledge, you are describing something else. They use transistors to do all of the switching I believe, aside from the physical switch on the back which also isn't a power relay.

[–] [email protected] 3 points 6 months ago (1 children)

Excellent, that makes sense. I’ll try that command tonight at home, see what it does, and report back. I kind of want to know what it’s doing just because I’m curious.

I say a relay, but I agree with you - I couldn’t imagine a relay being used. But whatever it is on my desktop, it sounds just like a traditional ice cube relay clicking - and it’s quite loud. But I have no idea what it is. I’m not sure I’ve ever had a computer that made that noise before. My laptop makes no such noise obviously.

[–] [email protected] 2 points 6 months ago

Could be the transformer, or the inductors. Those can move when in use and they can also make sounds like coil wine.

[–] [email protected] 4 points 6 months ago (1 children)

It's Linux kernel feature. It's done purely in software.

[–] [email protected] 2 points 6 months ago (2 children)

Which is why I'm saying I don't buy it. Hibernate is notoriously terrible in every distro because it's not working right for most cases because the kernel doesn't do it well. And I know that's really not the kernels fault, because every manufacturer has some stupid implementation of S4 (and S3, frankly) that makes it fail.

[–] [email protected] 5 points 6 months ago

S4? Hybernation on hardware level is regular shutdown. Then regular boot happens, kernel sees swap partition marked as hybernation state and restores it.

[–] [email protected] 3 points 6 months ago

Hardware shouldn’t matter. Hibernation requires big enough swap to fit all of memory and kernel needs to start with resume parameter that points to the swap space it uses for hibernation. Some distros (including mainstream ones like Ubuntu) don’t configure that by default assuming most people don’t want to use it.

[–] [email protected] 4 points 6 months ago (1 children)

Hibernate never works. On every work laptop and distro I've used I've always found the laptop spinning and overheating in my bag when I get home. Eventually I just made sure to turn it off completely when I quit work.

[–] [email protected] 3 points 6 months ago (1 children)

I have no idea what you have to do to make that. Hibernation on hardware level is regular shutdown.

[–] [email protected] 1 points 6 months ago (1 children)

RAM configs and weird BIOS settings from Dell is my bet. I never managed to solve it so I am unsure. I have tried several Ubuntu and Debian flavors and have had the same issues. Gonna run some Fedora-based distro and take more care of RAM configs on my next one I think.

[–] [email protected] 3 points 6 months ago (1 children)

Check kernel args for resume= parameter. If you don't see it, then either it is handled by init(or initramfs) or just isn't enabled. Try adding resume=PARTUUID= and then partitionuuid(not just uuid) of swap partition.

[–] [email protected] 2 points 6 months ago

Sadly I cannot check this since I do not have the laptops anymore. Will be sure to look into it on my next one though.

Thanks for the info!

[–] [email protected] 2 points 6 months ago

I don't know about others here but I manually hibernate with

systemctl hibernate

And it works pretty well. I set up 16gb swap for my 16gb ram (Which I know is overkill) but it works. I am on Fedora 40