New Lenovo Legion laptop (not mine) with a fresh F40 KDE install. If the session is put to sleep/suspend, and the lid closed, the laptop powers off.
This problem doesn’t occur with Windows which is on the second drive.
As a test, used a F40 Gnome live disk and the same thing happens.
If the system is shutdown, the powered USB ports turn off for a few seconds and then turn back on and provide power. When the system powers off on its own, due to sleep/suspend and the lid is closed, the powered ports do not turn power back on.
When the lid is closed, the power indicator that shows that the power brick is connected to the computer and supplying power goes out for seconds and turns back on.
There are no BIOS settings for the lid. Have modified the logind.conf file to add line about the lid switch.
Also a note, when the system is shutdown, keyboard settings are saved for the reboot. When crashed, the keyboard settings go back to default.
Secure boot is enabled.
Nothing is showing up in the log files since the computer is suspended before closing the lid.
Closing lid and putting system to sleep was disabled.
Something in the software, when the lid is closed is telling the system to turn the power off. Don’t know where to look anymore. Checked all BIOS settings.
Same problem occurs on battery as well, other than the power light.
Under GNOME, you can check the power settings using the gsettings get command under schema org.gnome.settings-daemon.plugins.power, or via GUI using dconf-editor.
Will have to try that. Is it possible to save the settings to the live image?
All things are looking toward ACPI issues and the power when it is put to sleep. Tested with a Mint live image and the power issue was different. Need to look at the difference with the ACPI configuration between the different distros.
Found a github site that is working on making Lenovo products work with Linux.
That shouldn’t be possible. But it doesn’t really matter, given that you are experiencing the same issue under KDE, not only GNOME.
This needs clarification: are you saying you suspend the computer from some KDE menu, or from the power button, and then close the lid? The usual method on a laptop is to close the lid, which would (usually) trigger the suspend action.
In case the former is true, did you by any chance test if there are differences in these scenarios:
suspend the computer without closing the lid;
suspend the computer and close the lid, as before;
suspend the computer, wait for several minutes, making sure the system is at sleep, then close the lid.
Either way, can you share the system log entries? Booting after a crash, you could run journalctl -b -1 | fpaste --raw-url from the terminal and share the generated link. The link will expire after one day, so you might also save it locally for future reference.
Please also share some system information by running inxi -Fzxx from the terminal.
Tested with 2 different live images (Mint, Fedora Gnome) and installed KDE.
Tested with suspend and leave lid open. Works as expected. Comes out of suspend. The power button doesn’t wake the computer, pressing any key wakes the computer which is different than the old laptop this is replacing. Thought system crashed first time due to this.
Suspend computer, wait for full suspend, and close lid, all three cases, computer shuts down. Power indicator for the charger turns off and then back on. Difference between Fedora and Mint though. With Fedora, the powered USB port is shutdown as well. With Mint the USB power turns off when the power light goes off but turns back on in a few seconds. Computer is still off.
In the above cases, we did your step three suggestion. It was fully suspended before closing the lid.
As I said, Windows suspend works, after putting the computer to sleep, and opening the lid, there is a difference. The power light for the charger doesn’t go out. The USB port power doesn’t shut off. From what I have learned in the last few days is this points to ACPI calls. Computer is not going to the correct state after suspend.
Since this isn’t my computer, I will ask them to do the tests you recommend and confirm the unanswered questions.
On Reddit, there has been at least one other post about the same issue. This is a 2024 model laptop and there may be aspects that have not been dealt with before. There is a Lenovo Github that is looking at ACPI issues and has provided some improvements.
Changing power to suspend when lid closed worked a couple of times and then it didn’t and powered off. In this case, the powered USB did come back with power after some time. Don’t know the time span though. Will try to get other data from journal when they reboot the computer on Monday.