ThinkPad T14s won't power down

Everything works great expect my laptop hangs at the end of shutdown. It appears to complete the shutdown sequence then I just get a blank screen, spinning fans and I need to hold the power button to get it to power down. Not a huge problem but the same thing happens on hibernation so I can’t use that. The laptop is a ThinkPad T14s Gen 4

========================================================================
                                              system         21F8CTO1WW (LENOVO_MT_21F8_BU_Think_FM_ThinkPad T14s Gen 4)
/0                                            bus            21F8CTO1WW
/0/0                                          memory         512KiB L1 cache
/0/1                                          memory         8MiB L2 cache
/0/2                                          memory         16MiB L3 cache
/0/3                                          processor      AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics
/0/5                                          memory         32GiB System Memory

Here the last few lines from the most recent attempt:

Jun 10 11:41:28 cheryl systemd[1]: Stopped target Preparation for Local File Systems.
Jun 10 11:41:28 cheryl systemd[1]: systemd-remount-fs.service: Deactivated successfully.
Jun 10 11:41:28 cheryl systemd[1]: Stopped Remount Root and Kernel File Systems.
Jun 10 11:41:28 cheryl systemd[1]: systemd-tmpfiles-setup-dev.service: Deactivated successfully.
Jun 10 11:41:28 cheryl systemd[1]: Stopped Create Static Device Nodes in /dev.
Jun 10 11:41:28 cheryl systemd[1]: systemd-tmpfiles-setup-dev-early.service: Deactivated successfully.
Jun 10 11:41:28 cheryl systemd[1]: Stopped Create Static Device Nodes in /dev gracefully.
Jun 10 11:41:28 cheryl systemd[1]: Reached target System Shutdown.
Jun 10 11:41:28 cheryl systemd[1]: Reached target Late Shutdown Services.
Jun 10 11:41:28 cheryl systemd[1]: systemd-poweroff.service: Deactivated successfully.
Jun 10 11:41:28 cheryl systemd[1]: Finished System Power Off.
Jun 10 11:41:28 cheryl systemd[1]: Reached target System Power Off.
Jun 10 11:41:28 cheryl systemd[1]: Shutting down.
Jun 10 11:41:28 cheryl systemd-shutdown[1]: Syncing filesystems and block devices.
Jun 10 11:41:28 cheryl systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Jun 10 11:41:28 cheryl systemd-journald[858]: Received SIGTERM from PID 1 (systemd-shutdow).
Jun 10 11:41:28 cheryl systemd-journald[858]: Journal stopped

I’m using 24.05 and kernel 6.6.32.

I’ve tried various things including blacklisting kernel modules sp5100_tco and watchdog as I saw this was a solution to a similar problem on the Arch forums but no dice. I can’t find a useful error message to help point me in the right direction so any idea greatly appreciated.

By way of an update, things I have tried that haven’t worked:

  • The latest and oldest 6 series kernels
  • Stripped the system down to the bare minimum of packages and config options including boot to shell with no x windows system
  • Resetting my BIOS to factory default
  • Booting from a NixOS 24.05 live disk (still won’t power off)

What does seem to work is an Ubuntu Live disk. That powers down just fine.

My next move is to try and update the BIOS but any suggestions as to how I can debug this would be great.

I have no help to offer but just wanted to confirm that I have the same problem on my T14s. I got Debian on dual-boot and it too is able to power off.

I have T14s and have no problem to shut down.

I import nixos-hardware/lenovo/thinkpad/t14s at master · NixOS/nixos-hardware · GitHub in my system config.

Running NixOS 23.11.

Further update: I’m pretty sure this is a kernel problem. If I load a 5.4 kernel it will power off (although a bunch of other things won’t work). I haven’t found a installable 6 series kernel yet where this phenomenon doesn’t occur but hopefully someone will.

Thanks @imincik: is yours a Gen 4 AMD?

It is Gen 1. (make post 20 chars long)

OK - I can confirm importing the NixOS hardware settings directly does not solve the problem on a Gen 4.

There is a similar discussion here in discourse. Good luck.

Solution: Use a later kernel.

Adding this to your configuration.nix will currently give you a 6.9 kernel

boot.kernelPackages = pkgs.linuxPackages_latest;

which fixes the power off problem but will not build with VirtualBox (which I need) due to this issue.

I’ve used a 6.8 kernel with

boot.kernelPackages = pkgs.linuxPackages_6_8;

which builds VirtualBox and will power off the laptop.