F40 on laptop powers off (crashes) when put to sleep/suspend and close lid

Hello,

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.

Some info.
Manufacturer: LENOVO
Version: Legion Slim 5 16AHP9
Wake-up Type: Power Switch
SKU Number: LENOVO_MT_83DH_BU_idea_FM_Legion Slim 5 16AHP9
Family: Legion Slim 5 16AHP9
CPU model: AMD Ryzen 7 8845HS w/ Radeon 780M
GPU model: NVIDIA RTX 4060

I will upload info as soon as I can get it.

Partial update.

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.

1 Like

Requested data.

journalctl -b -1 | fpaste --raw-url output
Output data

inxi -Fzxx

System:
  Kernel: 6.9.12-200.fc40.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.41-37.fc40
  Desktop: KDE Plasma v: 6.1.3 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: Fedora Linux 40 (KDE Plasma)
Machine:
  Type: Laptop System: LENOVO product: 83DH v: Legion Slim 5 16AHP9
    serial: <superuser required> Chassis: type: 10 v: Legion Slim 5 16AHP9
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76461 WIN
    serial: <superuser required> part-nu: LENOVO_MT_83DH_BU_idea_FM_Legion Slim
    5 16AHP9 UEFI: LENOVO v: NRCN17WW date: 04/11/2024
Battery:
  ID-1: BAT1 charge: 85.1 Wh (99.6%) condition: 85.4/80.0 Wh (106.8%)
    volts: 17.4 min: 15.4 model: SMP L22M4PC2 serial: <filter>
    status: not charging
CPU:
  Info: 8-core model: AMD Ryzen 7 8845HS w/ Radeon 780M Graphics bits: 64
    type: MT MCP arch: Zen 4 rev: 2 cache: L1: 512 KiB L2: 8 MiB L3: 16 MiB
  Speed (MHz): avg: 1748 high: 3800 min/max: 1600/6680 boost: enabled cores:
    1: 1600 2: 1600 3: 1600 4: 1591 5: 1600 6: 1600 7: 1820 8: 1600 9: 2004
    10: 1597 11: 1432 12: 1600 13: 3800 14: 1600 15: 1329 16: 1600
    bogomips: 121378
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA AD107M [GeForce RTX 4060 Max-Q / Mobile] vendor: Lenovo
    driver: nouveau v: kernel arch: Lovelace pcie: speed: 16 GT/s lanes: 8
    ports: active: none empty: DP-9,HDMI-A-1,eDP-2 bus-ID: 01:00.0
    chip-ID: 10de:28e0
  Device-2: AMD Phoenix3 vendor: Lenovo driver: amdgpu v: kernel
    arch: RDNA-3 pcie: speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1,
    DP-2, DP-3, DP-4, DP-5, DP-6, DP-7, DP-8, Writeback-1 bus-ID: 06:00.0
    chip-ID: 1002:1900 temp: 38.0 C
  Device-3: Chicony Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 1-3:3 chip-ID: 04f2:b7b6
Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 24.1.1
    compositor: kwin_wayland driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa alternate: nv dri: crocus gpu: nouveau,amdgpu
    display-ID: 0
  Monitor-1: eDP-1 res: 2560x1600 size: N/A
  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: nouveau
    device: 2 drv: swrast gbm: drv: kms_swrast surfaceless: drv: radeonsi
    wayland: drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.3 vendor: amd mesa v: 24.1.5 glx-v: 1.4
    direct-render: yes renderer: AMD Radeon Graphics (radeonsi gfx1103_r1 LLVM
    18.1.6 DRM 3.57 6.9.12-200.fc40.x86_64) device-ID: 1002:1900
    display-ID: :0.0
  API: Vulkan v: 1.3.283 surfaces: xcb,xlib,wayland device: 0
    type: integrated-gpu driver: N/A device-ID: 1002:1900 device: 1
    type: discrete-gpu driver: N/A device-ID: 10de:28e0 device: 2 type: cpu
    driver: N/A device-ID: 10005:0000
Audio:
  Device-1: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel pcie:
    speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:22be
  Device-2: AMD Rembrandt Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 06:00.1 chip-ID: 1002:1640
  Device-3: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: snd_pci_ps
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 06:00.5 chip-ID: 1022:15e2
  Device-4: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 06:00.6 chip-ID: 1022:15e3
  API: ALSA v: k6.9.12-200.fc40.x86_64 status: kernel-api
  Server-1: aRts v: 1.5.10 status: off with: artswrapper status: off
  Server-2: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168
  IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Realtek RTL8852CE PCIe 802.11ax Wireless Network vendor: Lenovo
    driver: rtw89_8852ce v: kernel pcie: speed: 5 GT/s lanes: 1 port: 2000
    bus-ID: 03:00.0 chip-ID: 10ec:c852
  IF: wlo1 state: down mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
    speed: 12 Mb/s lanes: 1 bus-ID: 1-4:4 chip-ID: 0bda:5852
  Report: btmgmt ID: hci0 rfk-id: 9 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.3 lmp-v: 12
Drives:
  Local Storage: total: 2.75 TiB used: 604.37 GiB (21.5%)
  ID-1: /dev/nvme0n1 vendor: SK Hynix model: HFS001TEJ9X115N
    size: 953.87 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 40.9 C
  ID-2: /dev/nvme1n1 vendor: Western Digital model: WD BLACK SN770 2TB
    size: 1.82 TiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 34.9 C
Partition:
  ID-1: / size: 97.86 GiB used: 10.8 GiB (11.0%) fs: ext4 dev: /dev/dm-0
    mapped: luks-3582b3c3-0f85-4ec9-aa09-47825b4b13ea
  ID-2: /boot size: 1.9 GiB used: 524.2 MiB (26.9%) fs: ext4
    dev: /dev/nvme1n1p1
  ID-3: /boot/efi size: 2 GiB used: 19 MiB (0.9%) fs: vfat
    dev: /dev/nvme1n1p2
  ID-4: /home size: 1.66 TiB used: 593.04 GiB (34.9%) fs: ext4
    dev: /dev/dm-2 mapped: luks-dd88fd38-5969-4483-a1ee-6a66df2ccdbc
Swap:
  ID-1: swap-1 type: partition size: 31.98 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/dm-1 mapped: luks-c707ae54-71c3-43a8-91bb-83e59a9d1858
  ID-2: swap-2 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: N/A mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 32 GiB note: est. available: 30.65 GiB
    used: 12.41 GiB (40.5%)
  Processes: 613 Power: uptime: 2d 2h 36m wakeups: 6 Init: systemd v: 255
    target: graphical (5) default: graphical
  Packages: Compilers: gcc: 14.1.1 Shell: Bash v: 5.2.26 running-in: konsole
    inxi: 3.3.34

I hope this helps.