this post was submitted on 25 Apr 2024
21 points (100.0% liked)

Linux

47952 readers
1873 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
 

MX Linux, Xfce 4.18

Closing the laptop lid suspends the system, opening it resumes it, but the screen is black. I'm guessing it's related to powerup because suspending through the logout menu and systemctl suspend both work as expected. When it's black, switching to a different tty works, as well as C-M-Backspace to logout.

Same results with both lightdm and sddm, when replacing suspend with hibernate, and I've tried a few solutions like disabling lock on sleep.

Seems like this issue has been around for years, but had a whole bunch of different causes since every other thread has a different solution.

XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon > /tmp/xf.log 2>&1

ps -ef | grep -E 'screen|lock'

xfconf-query -c xfce4-power-manager -lv

dmesg, cleared it before trying to suspend

updates:

I'm not seeing a black screen, instead it turns on the display and then turns it off.

Additionally, I tried closing and opening the lid a few times, and it woke up correctly.

I tried it in i3wm with the xfce power manager to suspend after closing the lid. It woke up correctly 10 times in a row.

Solution: start an xrandr config and the monitor turns back on.

you are viewing a single comment's thread
view the rest of the comments
[–] just_another_person@lemmy.world 5 points 6 months ago (1 children)

Few things to figure out that could be helpful:

  • What's your GPU?
  • What suspend modes does your laptop supposedly support, and then what modes does your kernel THINK it supports
  • What kernel are you in?
  • What does dmesg show right after you wake the machine back up?
[–] Shareni@programming.dev 2 points 6 months ago* (last edited 6 months ago) (1 children)

What’s your GPU?

NVIDIA GeForce MX150 (Thinkpad t480)

What suspend modes does your laptop supposedly support, and then what modes does your kernel THINK it supports

Sleep mode, hibernation mode, wireless off (source). freeze mem disk (cat /sys/power/state)

I doubt it's related as systemctl suspend works as expected.

What kernel are you in?

6.1.0-20-amd64

What does dmesg show right after you wake the machine back up?

dmesg, cleared it before trying to suspend

I've tried resuming 50+ times while troubleshooting, and it only once did it correctly. Now I try to replicate the bug and it worked correctly 2/3 times.

[–] just_another_person@lemmy.world 1 points 6 months ago* (last edited 6 months ago) (2 children)

I've tried resuming 50+ times while troubleshooting, and it only once did it correctly. Now I try to replicate the bug and it worked correctly 2/3 times

That's just the computers fucking with you. It's how it always happens 😉

Regarding the sleep modes, I was referring to the S* states. Run this:

dmesg | grep 'S3\|suspend'

[–] Shareni@programming.dev 1 points 6 months ago (1 children)

Tried systemctl suspend and then resume:

dmesg after a successful resume

sudo dmesg | grep -E "S3|suspend"

[ 9760.639020] PM: suspend entry (deep)
[ 9761.235526] printk: Suspending console(s) (use no_console_suspend to debug)
[ 9764.716421] ACPI: PM: Preparing to enter system sleep state S3
[ 9764.764150] ACPI: PM: Waking up from system sleep state S3
[ 9767.889922] PM: suspend exit
[–] just_another_person@lemmy.world 1 points 6 months ago (1 children)

The only thing that looks odd in there is the default in libgl, but otherwise looks okay. So it's probably not a compatibility problem.

How is your swap sized compared to your system memory?

[–] Shareni@programming.dev 1 points 6 months ago* (last edited 6 months ago)

I just tried starting the xfce power manager in i3 and using it to go to standby when i close the lid. It woke up 10 times in a row without an issue. It looks like it's a purely xfce issue.

Also, when it wakes up it turns on the display, but then it doesn't go black but instead turns it off. I was still able to reboot while it was off.

$ swapon -s
Filename				Type		Size		Used		Priority
/swap/swap                              file		38915068	0		-2
Memory: 2926MiB / 31859MiB
[–] Shareni@programming.dev 1 points 6 months ago* (last edited 6 months ago)

That’s just the computers fucking with you. It’s how it always happens 😉

Oh I know, just complaining

sudo dmesg | grep -E "S3|suspend"

[ 7225.917778] PM: suspend entry (deep)
[ 7226.596293] printk: Suspending console(s) (use no_console_suspend to debug)
[ 7230.132960] ACPI: PM: Preparing to enter system sleep state S3
[ 7230.178542] ACPI: PM: Waking up from system sleep state S3
[ 7233.500089] PM: suspend exit

cat /sys/power/mem_sleep gives me: s2idle [deep]