0

This applies to a fresh install of Ubuntu 20.04, kernel 5.4.0-40-generic on a Lenovo ThinkPad Edge E531.

Symptoms: Closing the lid shuts off the display, but the laptop doesn't enter sleep. The system freezes. Reopening the lid, the system is completely unresponsive (no Ctrl-Alt-F1 login possible, interestingly disconnecting and connecting the power supply makes the system play the corresponding sound, no other interaction seems possible).

I found out that running sudo modprobe -r rmi_smbus before closing the lid resolves the issues entirely. The laptop enters sleep normally and wakes up normally. Of course, the trackpad is unresponsive. I have to manually call sudo modprobe rmi_smbus after opening the lid and logging in. Then the trackpad works again normally.

Here's the result of journalctl when rmi_smbus is loaded when closing the lid.

Jul 09 16:25:18 myuser-ThinkPad-Edge-E531 systemd-logind[853]: Lid closed.
Jul 09 16:25:18 myuser-ThinkPad-Edge-E531 systemd-logind[853]: Suspending...
Jul 09 16:25:18 myuser-ThinkPad-Edge-E531 NetworkManager[817]: <info>  [1594304718.5145] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Jul 09 16:25:18 myuser-ThinkPad-Edge-E531 NetworkManager[817]: <info>  [1594304718.5146] device (enp5s0): state change: unavailable -> unmanaged (reason 'sleeping', sys-iface-state:>
Jul 09 16:25:18 myuser-ThinkPad-Edge-E531 gnome-shell[1228]: Screen lock is locked down, not locking
Jul 09 16:25:18 myuser-ThinkPad-Edge-E531 NetworkManager[817]: <info>  [1594304718.5460] manager: NetworkManager state is now ASLEEP
Jul 09 16:25:18 myuser-ThinkPad-Edge-E531 whoopsie[1400]: [16:25:18] offline
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 gnome-shell[1779]: Error adding children to desktop: desktopGrid is undefined
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 gnome-shell[1779]: Error adding children to desktop: desktopGrid is undefined
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 systemd[1]: Reached target Sleep.
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 systemd[1]: Starting Suspend...
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 systemd-sleep[2902]: Suspending system...
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 kernel: PM: suspend entry (deep)
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 kernel: Filesystems sync: 0.005 seconds
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "44"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event2  - Power Button: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "47"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event8  - Video Bus: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "48"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event9  - Video Bus: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "49"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event0  - Power Button: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "50"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event4  - PIXART USB OPTICAL MOUSE: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "51"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event6  - Integrated Camera: Integrated C: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "52"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event3  - AT Translated Set 2 keyboard: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "53"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event5  - ThinkPad Extra Buttons: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "54"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event7  - Synaptics TM2722-001: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (**) Option "fd" "55"
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) event14 - TPPS/2 IBM TrackPoint: device removed
Jul 09 16:25:19 myuser-ThinkPad-Edge-E531 kernel: rfkill: input handler enabled
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:67
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:69
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 226:0
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:68
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:73
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:64
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:66
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:70
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:78
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: OOM killer disabled.
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: psmouse serio2: Failed to disable mouse on rmi4-00.fn03/serio0
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: wlp4s0: deauthenticating from 34:31:c4:2c:98:a3 by local choice (Reason: 3=DEAUTH_LEAVING)
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_f01 rmi4-00.fn01: Failed to write sleep mode: -6.
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_f01 rmi4-00.fn01: Suspend failed with code -6.
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_physical rmi4-00: Failed to suspend functions: -6
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_smbus 0-002c: Failed to suspend device: -6
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: PM: dpm_run_callback(): rmi_smb_suspend+0x0/0x40 [rmi_smbus] returns -6
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: PM: Device 0-002c failed to suspend: error -6
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: PM: Some devices failed to suspend, or early wake event detected
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: iwlwifi 0000:04:00.0: Radio type=0x2-0x0-0x0
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: iwlwifi 0000:04:00.0: Radio type=0x2-0x0-0x0
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: OOM killer enabled.
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: Restarting tasks ... 
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: done.
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_physical rmi4-00: rmi_driver_clear_irq_bits: Failed to change enabled interrupts!
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:72
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: got pause for 13:71
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 wpa_supplicant[860]: wlp4s0: CTRL-EVENT-DISCONNECTED bssid=34:31:c4:2c:98:a3 reason=3 locally_generated=1
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 NetworkManager[817]: <warn>  [1594304720.4336] sup-iface[0x55eb6a22c110,wlp4s0]: connection disconnected (reason -3)
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 wpa_supplicant[860]: wlp4s0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 NetworkManager[817]: <info>  [1594304720.4413] device (wlp4s0): supplicant interface state: completed -> disconnected
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 acpid[805]: client 1518[0:0] has disconnected
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 gnome-shell[1228]: An active wireless connection, in infrastructure mode, involves no access point?
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1024]: (II) config/udev: removing device TPPS/2 IBM TrackPoint
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1024]: (II) UnloadModule: "libinput"
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1024]: (II) systemd-logind: releasing fd for 13:78
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) config/udev: removing device TPPS/2 IBM TrackPoint
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: rmi4_physical rmi4-00: rmi_driver_set_irq_bits: Failed to change enabled interrupts!
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: psmouse: probe of serio2 failed with error -1
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) UnloadModule: "libinput"
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (II) systemd-logind: releasing fd for 13:78
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 /usr/lib/gdm3/gdm-x-session[1518]: (EE) systemd-logind: failed to release device: Device not taken
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 NetworkManager[817]: <info>  [1594304720.5362] device (wlp4s0): supplicant interface state: disconnected -> scanning
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 gnome-shell[1779]: An active wireless connection, in infrastructure mode, involves no access point?
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: PM: suspend exit
Jul 09 16:25:20 myuser-ThinkPad-Edge-E531 kernel: PM: suspend entry (s2idle)
-- Reboot -- // << this was me long-pressing the power button to reboot

Any suggestions what to try? Can i somehow manually unload the rmi_smbus module before sleep and reload it afterwards? Or is there a more elegant solution?

2 Answers 2

0

Here's my quick and dirty solution, though I'm not sure how well this would work regarding updates or upgrades of the system. The idea is to manually unload and reload the problematic kernel module before and after the suspend.

  1. Login as root in a terminal: sudo -s
  2. run nano /usr/lib/systemd/system-sleep/pre-suspend-unload-rmi-smbus.sh and enter the following file content:
#!/bin/bash
if [ "${1}" == "pre" ]; then
modprobe -r rmi_smbus
elif [ "${1}" == "post" ]; then
modprobe rmi_smbus
fi
  1. Make the file executable: chmod +x /usr/lib/systemd/system-sleep/pre-suspend-unload-rmi-smbus.sh
  2. reboot (not sure if this step is required, though)
0

I saw in another post that the rmi_smbus crash is related to the load order of modules. What worked for me is to build RMI4 into the kernel and not use a module.

CONFIG_RMI4_CORE=y

No more crashing on sleep. This is a Thinkpad T440s.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .