Thinkpad X230T won't suspend under kernel 419rc4, 4.18, 4.17, 4.14, 4.9

I haven't been able to get my Thinkpad X230T to suspend under Manjaro. I've been tracking some other threads where I've seen issues. Could someone suggest a fix, or some more diagnostics?

@Chris25 said at [Stable Update] 2018-06-07 - Kernels, Systemd, Pamac, Octopi, Rebuilds

So, I'm having the same issue. I've now tried older kernels, but suspend still doesn't work.

@nadb said at (Solved) Help with Suspend/Hibernate on Lenovo Thinkpad 11e

I've done this, and suspend isn't working under:

  • Linux 4.19rc4
  • Linux 4.18.9-1
  • Linux 4.17.19-1
  • Linux 4.14.71-1
  • Linux 4.9.128-1
  • Linux 4.4.157-1

Here's some configuration information:

$ inxi -Fxz
System:    Host: di-x230t-3434cto Kernel: 4.4.157-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 
           Desktop: KDE Plasma 5.13.5 Distro: Manjaro Linux 
Machine:   Type: Laptop System: LENOVO product: 3434CTO v: ThinkPad X230 Tablet serial: <filter> 
           Mobo: LENOVO model: 3434CTO serial: <filter> UEFI [Legacy]: LENOVO v: GCETA8WW (2.68 ) 
           date: 09/25/2017 
Battery:   ID-1: BAT0 charge: 56.1 Wh condition: 56.2/57.2 Wh (98%) model: SANYO 45N1177 status: Unknown 
CPU:       Topology: Dual Core model: Intel Core i7-3520M bits: 64 type: MT MCP arch: Ivy Bridge rev: 9 
           L2 cache: 4096 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 23156 
           Speed: 1233 MHz min/max: 1200/3600 MHz Core speeds (MHz): 1: 1233 2: 1337 3: 1484 4: 1466 
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.1 driver: intel unloaded: modesetting 
           resolution: 1366x768~60Hz, 1680x1050~60Hz 
           OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile v: 4.2 Mesa 18.2.1 direct render: Yes 
Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 
           Sound Server: ALSA v: k4.4.157-1-MANJARO 
Network:   Device-1: Intel 82579LM Gigabit Network driver: e1000e v: 3.2.6-k port: 6080 bus ID: 00:19 
           IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi v: kernel bus ID: 03:00 
           IF: wlp3s0 state: up mac: <filter> 
Drives:    Local Storage: total: 1.13 TiB used: 523.93 GiB (45.4%) 
           ID-1: /dev/sda vendor: Western Digital model: WD10SPCX-22HWST0 size: 931.51 GiB 
           ID-2: /dev/sdb vendor: Crucial model: CT240M500SSD3 size: 223.57 GiB 
Partition: ID-1: / size: 48.16 GiB used: 19.87 GiB (41.3%) fs: ext4 dev: /dev/sdb7 
           ID-2: /home size: 69.57 GiB used: 31.67 GiB (45.5%) fs: ext4 dev: /dev/sdb5 
           ID-3: swap-1 size: 15.30 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdb6 
Sensors:   System Temperatures: cpu: 65.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 3916 
Info:      Processes: 240 Uptime: 17m Memory: 15.38 GiB used: 3.24 GiB (21.1%) Init: systemd Compilers: 
           gcc: 8.2.1 Shell: bash v: 4.4.23 inxi: 3.0.21

Maybe related ... or unrelated ... from the Grub Boot, I noticed an error of "“Failed to start Load Kernel Modules”.

In running journalctl -b, I noticed an error described as "Thinkpad T450s error: thinkpad ec_read_row: failed requesting row" at https://forum.thinkpads.com/viewtopic.php?t=123552

Apparently it has something to do with tp_smapi or something, does that mean I should uninstall it? I read someone got more errors after uninstalling it. Anyone know how to fix this?

... with a response ...

The module in question is a optional one and is not installed by default. Yes that error is from tp_smapi module not all Thinkpads will support it. Lets see what the output of this command is...

sudo tlp stat -b
If the output is not compatible remove it

... so I removed linux44-rp_smapi, linux49-tp_smapi, etc. The suspend isn't working with the smapi, it isn't working without the smapi.

The workaround that I had been using has been to install pm-utils, and then suspend using from the command line ...

sudo pm-suspend

... but my impression was that with systemd and systemctl, that that's not the preferred way anymore.

Is this a problem just with Thinkpad x30 (i.e. X230 and T430 models running Ivy Bridge)?

Thanks for any suggestions.

Hi David, fellow Canadian here.

Often problems with suspending are related to network components not going to sleep properly prior to suspending. Try shutting down all network components before attempting to put the computer to sleep.

Run this in terminal:

sudo systemctl stop NetworkManager; sleep 2
sudo rfkill block all; sleep 2
sudo nmcli r all off; sleep 2
sudo ip link set wlp3s0 down; sleep 2
sudo modprobe –r iwlmvm; sleep 2
sudo modprobe -r iwldvm; sleep 2
sudo modprobe -r iwlwifi; sleep 2
sudo ip link set enp0s25 down; sleep 2
sudo modprobe –r e1000e; sleep 2
sudo systemctl stop bluetooth; sleep 2
sudo modprobe –r btusb; sleep 2

Give the commands time to finish executing, then attempt to put the computer to sleep.

Let me know if the attempt was sucesseful.

Please post all error messages from the above commands.

Afterwards, rather than scripting a full restart of everything, simply run these commands:

sudo nmcli r all on; sleep 2; sudo rfkill unblock all

Then restart the computer.

Hope that works as a test. If it does we can work on a full solution.

may be check with kernel in testing for wake
about Sched/core
https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.10

@tbg Thanks for the diagnostic.

Here's the result:

$ sudo systemctl stop NetworkManager; sleep 2
$ sudo rfkill block all; sleep 2
$ sudo nmcli r all off; sleep 2
$ sudo ip link set wlp3s0 down; sleep 2
$ sudo modprobe –r iwlmvm; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.4.157-1-MANJARO
$ sudo modprobe -r iwldvm; sleep 2
$ sudo modprobe -r iwlwifi; sleep 2
$ sudo ip link set enp0s25 down; sleep 2
$ sudo modprobe –r e1000e; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.4.157-1-MANJARO
$ sudo systemctl stop bluetooth; sleep 2
$ sudo modprobe –r btusb; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.4.157-1-MANJARO

Attempting a suspend doesn't work. The screen goes dim, and eventually the login screen returns.

Well that's too bad the test was not positive. It was not that great a test as more than 1 module would not unload. It was worth a try as sometimes this will fix suspend issues.

I'm guessing yours may be a more deep seated issue with the kernel.

@tbg, thanks for the diagnostic help.

My workaround for Manjaro KDE has been to use pm-utils, and invoking sudo pm-suspend from the command line. I thought that this wasn't a good idea, based a message from @jsamyth in Sept. 2016 on No hibernation/suspend option in kickstart menu (KDE) without pm-utils:

Following through that link to https://wiki.archlinux.org/index.php/Power_management#Power_managers , I see

Note that if the power manager does not inhibit systemd for the appropriate events you can end up with a situation where systemd suspends your system and then when the system is woken up the other power manager suspends it again. As of December 2016, the power managers of KDE, GNOME, Xfce and MATE issue the necessary inhibited commands. If the inhibited commands are not being issued, such as when using acpid or others to handle ACPI events, set the Handle options to ignore . See also systemd-inhibit(1).

The systemd-inhibit is getting deep for me!

I wonder if the issue with suspend is coming from my recent resetting the user KDE account, described at Libreoffice-Fresh 6.1.0-2 missing Menu Bar (File Edit View ...)

There seems to be a trade-off between TLP (which is currently installed on my system) and pm-utils. @michaldybczak similarly expressed some frustration on the depth of the issue.

There was no response to that comment by @michaldybczak , and the topic automatically closed after 30 days without further activity ... so it seem to me as though I may be surfacing a problem that still is unresolved.

I think the comment elements could be systemd and KDE. It's possible that that having a Thinkpad x030 (i.e. T430 or X230 with Ivy Bridge) could be a factor ... or not.

I'm very glad you have improved your laptops issues. Thank for the in depth report on your progress.

That old issue is resolved now but I don't remember how. I checked now, I don't have pm-utils and yet I do have hibernation and suspend buttons on Plasma start menu. Besides, so much has changed since then that I doubt such old threads are helpful. So to sum up: I use Manjaro KDE and have no pm-utils installed, there are suspend and hibernation buttons, suspending works fine (hibernation isn't but that's because my swap is too small).

For what it's worth: I haven't experienced any issues with suspend with my Thinkpad X260 with any of the recent kernels.

I welcome more suggestions on diagnosis, but I'm not sure that I want to be fighting problems at a kernel level. @muvvenby suggests with an X260 on Kaby Lake, things are fine.

I now see a long thread, with pointers into bug reports from July 2018 on " Suspend Issues on Ubuntu 18.04 (and other flavours) – Troubleshooting and Fixes" at https://ubuntuforums.org/showthread.php?t=2395562. This mentions the 4.15 kernel and the 4.18 kernel. I'm having the problem across all levels of kernels, though.

That's reassuring. However, I think that @michaldybczak isn't on a Thinkpad x030 (and maybe specifically an Ivy Bridge chipset), so we may not be able compare apples to apples.

I may have to resort to using pm-utilis just in practicality. Using pm-suspend works fine. I prefer to "fix" problems rather than resorting to workarounds, but this question is burning a lot of time (and it's annoying to have to shutdown, rather than suspend, in the meantime).

IIRC you can change the logout/suspend commands in Sddm, so this seems to not be taken as a workaround.
Use what works, sounds like into the "Arch way" :wink:

Also having no issues with my X230 running MATE (IIRC it was fine with GNOME but I'd have to re-test).

Might this be DE-related?

It could possibly be BIOS related. Thinkpads have a lot of options in the BIOS regarding power management, bootable media, an assortment of admin lockdowns, and remote management. I can easily envision one of these interfering with suspend in particular, and possibly hibernate.

2 Likes

Also noticed you are four or five versions behind on your BIOS, with the rapid changes being made to counter a variety of speculative execution attacks this could also very easily be part of what is affecting your ability to suspend/hibernate.

1 Like

Thanks for that nudge. I've now updated the BIOS to the current release 2.71.

That is my current suspicion, that the suspend problem is related to KDE on Manjaro. I'll do some more hunting. Thanks.

1 Like

I think that I've now diagnosed the problem, and could now use some help on the fix!

Some clues come from Suspend issue with latest Manjaro 4.17.0-1

When I try this myself, I get ...

 Why: Application cleanup before suspend
Mode: delay

 Who: Screen Locker (UID 1000/daviding, PID 895/ksmserver)
What: sleep
 Why: Ensuring that the screen gets locked before going to sleep
Mode: delay

 Who: skypeforlinux (UID 1000/daviding, PID 968/skypeforlinux)
What: shutdown
 Why: Ensure a clean shutdown
Mode: delay

 Who: NetworkManager (UID 0/root, PID 530/NetworkManager)
What: sleep
 Why: NetworkManager needs to turn off networks
Mode: delay

 Who: UPower (UID 0/root, PID 794/upowerd)
What: sleep
 Why: Pause device polling
Mode: delay

 Who: ModemManager (UID 0/root, PID 529/ModemManager)
What: sleep
 Why: ModemManager needs to reset devices
Mode: delay

 Who: PowerDevil (UID 1000/daviding, PID 974/org_kde_powerde)
What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
 Why: KDE handles power events
Mode: block

7 inhibitors listed.

So, Skypeforlinux is listed. However, I also notice that Dropbox is running the tray. Looking at packages, I've got ...

dropbox version 55.4.171-1 ; and
kde-servicemenus-dropbox 0.16.1-9

... installed.

To be thorough, the kernel is 4.17-19-1

$ inxi -Fxz
System: Host: di-x230t-3434cto Kernel: 4.17.19-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.0
Desktop: KDE Plasma 5.13.5 Distro: Manjaro Linux

Quitting Dropbox and invoking a suspend works! What should I do with that knowledge?

2 Likes

This kernel reached end of life quite a while ago, you should move onto 4.18 using mhwd-kernel.

1 Like

Try this before suspend to disable networking completely:

nmcli networking off      

Enable networking:

nmcli networking on           

ModemManager can in all likelihood be disabled completely unless you send faxs regularly.

Now, we're on the right path.

Yes, suspend works when I turn networking off. How do I disable ModemManager (and how would I turn it back on when I need it)? I don't think that I've sent a fax in the last 5 years!

Thanks. I've restored 4.18 (that I had removed earlier).

To stop/disable the ModemManager service:

sudo systemctl stop ModemManager.service && systemctl disable ModemManager.service

To start/enable the ModemManager service:

sudo systemctl enable ModemManager.service && systemctl start ModemManager.service 

A systemd service can be created to automatically turn off/on networking at suspend/resume. I can help you with that. It is not that difficult to do.

1 Like

Forum kindly sponsored by