this post was submitted on 03 May 2026
47 points (98.0% liked)

Linux

65045 readers
200 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 7 years ago
MODERATORS
 

Linux is cool, I can do a lot of things with it. If i set a config file in Linux, I am damn sure that it is ran every single time. The code does what you tell it to do.

There is 1 thing that always seems to be "black magic": 1) lid close and suspend 2) lid close and suspend and lock.

If we ignore locking for a moment and focus on suspend. I cant seem to figure out why sometimes lid close would suspend immediately, when other time it takes 5 seconds after lid closes. On some days, lid closes would not even suspend !!

Did anyone manage to get suspend work 100 %? I cant believe we have tons of great linux tools and years into kernel dev, and still suspend is a hit or miss.

you are viewing a single comment's thread
view the rest of the comments
[–] utopiah@lemmy.ml 9 points 21 hours ago

Few seem to address the issue here : it does not work 100% of the time for you.

It might work for everybody else but that doesn't help you much. You have your setup, no theirs.

So... you need to investigate. When it works, great, nothing to learn from. When it fails though... can you find a pattern? Does it always fail after you have use something specific? Check https://lemmy.ml/post/46800646/25494455 which gives examples of potential failure point and journalctl logs. You can then check what failed and if not you can at least know when then backtrack to others logs, e.g. dmesg.

They key take away is that when things do not behave as expected you need to put a detective hat on and you investigate :

  • what's your crime scene? Your laptop and it's log files
  • what's the crime? It didn't suspend properly
  • where are the traces? In the logs
  • where are the logs? Using journalctl or dmesg and typically in /var/log/
  • what would a good detective do? Search for specific clues, e.g. places where fingerprints do stick, e.g metal or glass, which here would be error messages. That can be found using grep and other tools

You also have limited times because the logs will, just like on a real crime scene, get contaminated or rotated or deleted. So... if you do encounter the problem do not rush to the next tasks at hand because you are wasting an opportunity to learn and there is vanishing window.

TL;DR : grep logs