I’ve been researching information about /etc/machine-id, a file that contains an ever-persistent machine ID that identifies the install across hardware or netwotk changes, and that is world-readable.
Most documentation I’ve seen says it is mostly safe to change this file and generate a new ID on shutdown, and there are example scripts to do it via eg.: systemd or rc.shutdown . That’s nice, but… we’re on Linux, we don’t “shutdown” our machines, what do they think we are, Windows users? We don’t shutdown at least intentionally.
So, I was wondering, is it feasible to regenerate this ID on hibernate? It’s another instance where the machine powers down, there are ACPI hooks to run scripts on hibernate/wakeup, and I feel at least for a laptop it’s a more common use case than a shutdown.
Sorry, I can’t help you with your problem.
But just in case you were serious about “We don’t shutdown.”:
In my case - clean boot takes 25s. Waking up from hibernation takes over 60 seconds, because of huge RAM. And sleep is broken due to some USB interface shenanigans. Soooo yeaaah, I fully shut down and power on every day.
Oh and btw. by default windows doesn’t do a full shutdown, but a sneaky hibernate. You can see that for example if you “shutdown” windows (not reboot.), then power off the pc and boot into linux - trying to access the drive, you will see an error that windows “didn’t shutdown properly” and is still claiming access to the drive. Because it’s hibernating and changing content on the drive might break the wakeup.
In my case - clean boot takes 25s.
Clean boot yes. But I rarely start my workflow from the “blank” desktop background - there’s prep and glam I like to do or tend to set up but that I would prefer to explicitly set up instead of it being done automatically / without my input, starting with the FDE unlock during bootup (defo not something that I intend to leave the system to solve by itself). It’s one of the reasons why I like hibernate (more than suspend, anyway).
tl;dr: my workflow is not good for “true” powerdowns because it draws none to negative benefit from “clean boot”
All that said, wakeup from hibernate is snaily slow if one does not do some prep before hibernate and I avoid such interruptions where possible, but it’s not bad to the point that clean shutdown → clean boot isn’t worse.
btw. by default windows doesn’t do a full shutdown, but a sneaky hibernate
Huh… I suspected as such, as some Linuxes do also offer the option, but didn’t expect that Windows would get hung up on the idea that someone else dared to take a look at the drive while Windows was not looking. Talk about yanderes. Thanks for the interesting info!
there’s prep and glam I like to do or tend to set up but that I would prefer to explicitly set up instead of it being done automaticall
Back in the x11 days I had a script that would take a config file and open multiple programs in a specified arrangement across my displays.
I used KDE activities by task and had such a config for each task. KDE activities can run arbitrary scripts on being started. So when I opened the “work” activity for example, all my work apps would open up in my preffered arrangement. When I opened the gaming activity, steam would start on my side monitor and the main monitor had all of the other gaming related shortcuts on it etc.
Together with the preload daemon or a custom vm-touch (i switched from one to the other at some point) it was blazingly fast and very comfy. (Again, I overprovisioned my RAM so I used it by filling it post boot with a cache of pages that my apps load on startup)
Then wayland came and broke it and I didn’t bother to fix it yet.
But everybody has their own prefered workflows, I’m not saying one is better than the other. Just wanted to share.
I used KDE activities by task and had such a config for each task. KDE activities can run arbitrary scripts on being started.
Omg absolutely separate from the purpose of this thread, but would you happen to have copies of such scripts or could you recommend some tutorials on KDE activities? I usually prefer lean DEs, but every once in a while KDE makes it so difficult for me to say no to them.
Really thank you for sharing your insight and experience on this.
Here you go:
Everything should be documented there
https://git.sr.ht/~deckweiss/x11_activity_session
It probably can be adopted to wayland (or even native kde tiling) with a bit of tinkering.
I’m instacloning this. I get from the files and from previous experience with KDE that it can be done, I just haven’t gotten enough tinkering experience outside of the classics such as wmctrl to do that yet.
KDE activities don’t get much dev love, so be warned.
The activity script hooks are (or were for a long time, idk how it is now) an undocumented feature.
I’ll dig all the stuff out for you later today.

