Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Thinkpad laptop reboots insted of powerff after suspend
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
widlokm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2007
Posts: 75
Location: Poland

PostPosted: Sat Apr 02, 2022 3:42 pm    Post subject: Thinkpad laptop reboots insted of powerff after suspend Reply with quote

Hello,
I have old thinkpad T530 with gentoo and custom build 5.15.26 kernel. Some time ago (I'm not sure when) I've noticed strange issue with poweroff. Laptop reboots whenever I'm switching it off after entering suspend-to-ram, like:
1. Turn on laptop
2. Enter suspend to ram (Fn-F4)
3. Wake up (by pressing power button)
4. Turn off with power button - now laptop performs normal shutdown, but instead of staying OFF it reboots.
5. Turn off again with power button - laptops stays off as expected

Poweroff works perfectly OK without step 2&3, plugging network cable or power supply does not seem to have any effect, "wake on lan" is disabled in BIOS.
This is not very problematic, more inconvenient, but could You give me any suggestions how to solve this. I'm out of ideas.
Thanks,
Michael Widlok
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3950

PostPosted: Sat Apr 02, 2022 6:55 pm    Post subject: Reply with quote

Quote:

4. Turn off with power button - now laptop performs normal shutdown, but instead of staying OFF it reboots.


Plz use poweroff instead of power button.
Also in your DE power management plz check what "pressing the power button" is supposed to do.
_________________
:)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23103

PostPosted: Sat Apr 02, 2022 9:22 pm    Post subject: Reply with quote

ACPI soft-off through a brief tap on the power button should be legal, and should gracefully halt, hibernate, or suspend the system, depending on how it was configured.

OP: please describe how you enter suspend-to-RAM state. What Linux actions does Fn-F4 perform?
Back to top
View user's profile Send private message
widlokm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2007
Posts: 75
Location: Poland

PostPosted: Mon Apr 04, 2022 8:40 am    Post subject: Reply with quote

Poweroff & suspend is controlled by elogind (without systemd). Elogind has one hook script for suspend & resume in "/lib64/elogind/system-sleep/" to shut down and restore one USB to Ethernet interface (connected to raspberry pi), but I don't thing it is a problem. The script just performs "rc-service net.enp0s.... stop" then "c-service net.enp0s..... start" on resume. ACPI (acpid daemon) does not handle suspend or power button, only elogind. I've also tested a few other situations:

1. Kill elogind, manually enter suspend (echo "mem" >/sys/power/state), then shutdown (by command "poweroff").
2. Enter sleep & shutdown by elogind: loginctl suspend, loginctl poweroff.
3. Enter sleep & shutdown with and without Xorg running.
4. Enter sleep by Fn-F4, shutdown by "poweroff" command.

The result is always the same, if sleep to ram was used laptop reboots. Now I suspect a kernel / kernel configuration problem, but I might be wrong. Should I provide kernel log or something? For me they look perfectly normal. By the way, I use custom kernel compiled specially for this laptop, without initrd. Should I post kernel config?
Thanks,
Michael W.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23103

PostPosted: Mon Apr 04, 2022 3:17 pm    Post subject: Reply with quote

I once had a system where, due to a configuration omission on my part, if it had used suspend-to-both, future uses of suspend-to-disk (or maybe it was suspend-to-ram - I don't recall) acted as suspend-to-both. It was caused by the hibernate script not fully setting all the various parameters. For your case, please show the output of grep --directories=skip -e . /sys/power/*.
Back to top
View user's profile Send private message
widlokm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2007
Posts: 75
Location: Poland

PostPosted: Tue Apr 05, 2022 7:30 am    Post subject: Reply with quote

Here they are:
Code:
dolphin /sys/power # grep --directories=skip -e . /sys/power/*
/sys/power/mem_sleep:s2idle [deep]
/sys/power/pm_async:1
/sys/power/pm_freeze_timeout:20000
/sys/power/state:freeze mem
/sys/power/sync_on_suspend:1
/sys/power/wakeup_count:2
dolphin /sys/power #


I also double checked my kernel, but there is nothing obvious there. And I am not using hibernete (not set in kernel) so suspend to disk is not present.
Back to top
View user's profile Send private message
deagol
n00b
n00b


Joined: 12 Jul 2014
Posts: 62

PostPosted: Tue Apr 05, 2022 9:03 am    Post subject: Reply with quote

I've a Thinkpad W530, which should from a HW perspective pretty close to what you have.
And shutdown after sleep is working normal here, running ~amd64.

Quite some time ago (> one year for sure) I had some issues with powering down. I remember it was not powering off properly but forgot the details.
I figured out that this was related to using the i915 driver. I switched over to i965 which fixed the issue for me. So when you are still using i915 I would give that a shot.
Back to top
View user's profile Send private message
widlokm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2007
Posts: 75
Location: Poland

PostPosted: Tue Apr 05, 2022 10:11 am    Post subject: Reply with quote

Yes T530 and W530 are very similar, I will be switching to W530, but only as a "desktop" machine, where suspend is not needed.

In make.conf I have:
Code:
VIDEO_CARDS="intel dri3 i965 nouveau"
but nvidia is not used in this laptop. Anyway I have the same behavior without Xorg (on txt console only), so I don't think X drivers are the problem here.
I also forget to note that I have jailbreak-ed BIOS, with https://github.com/n4ru/1vyrain and "soft intel ME disable" enabled in advanced menu. I also do not use any overclocking. When new laptop arrive I will test it there (on original BIOS) and report here, most likely in next week.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum