Bug 1480602 - Kernel 4.12.5-200.fc25 fails to suspend on a Lenovo E531
Kernel 4.12.5-200.fc25 fails to suspend on a Lenovo E531
Status: NEW
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
27
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-11 09:04 EDT by David H. Gutteridge
Modified: 2018-03-22 05:50 EDT (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
journalctl -k output (274.77 KB, text/plain)
2017-08-11 09:05 EDT, David H. Gutteridge
no flags Details

  None (edit)
Description David H. Gutteridge 2017-08-11 09:04:21 EDT
Description of problem:

After upgrading to kernel 4.12.5-200.fc25, my Lenovo E531 fails to suspend. It has suspended with no issues from kernel 3.11 to 4.9, after which there were intermittent issues which I worked around by setting /sys/power/pm_async to 0. That workaround no longer applies with 4.12, instead the machine consistently fails to suspend.

Version-Release number of selected component (if applicable):
4.12.5-200.fc25

How reproducible:
Always

Steps to Reproduce:
1. Close lid of laptop
2. Observe it fails to suspend
3. Observe various messages in dmesg that relate to the failure

Actual results:
Failure to suspend

Expected results:
Suspension

Additional info:
Snippet from kernel log:

[ 2418.216600] PM: Syncing filesystems ... done.
[ 2418.711550] PM: Preparing system for sleep (mem)
[ 2418.712437] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 2418.715259] OOM killer disabled.
[ 2418.715261] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 2418.716757] PM: Suspending system (mem)
[ 2418.716790] Suspending console(s) (use no_console_suspend to debug)
[ 2418.742342] rmi4_f01 rmi4-00.fn01: Failed to write sleep mode: -6.
[ 2418.742345] rmi4_f01 rmi4-00.fn01: Suspend failed with code -6.
[ 2418.742347] rmi4_physical rmi4-00: Failed to suspend functions: -6
[ 2418.742350] rmi4_smbus 8-002c: Failed to suspend device: -6
[ 2418.742358] dpm_run_callback(): rmi_smb_suspend+0x0/0x50 [rmi_smbus] returns -6
[ 2418.742360] PM: Device 8-002c failed to suspend: error -6
[ 2418.742363] PM: Some devices failed to suspend, or early wake event detected
[ 2418.748592] PM: resume of devices complete after 6.223 msecs
[ 2418.748916] PM: resume devices took 0.006 seconds
[ 2418.748983] PM: Finishing wakeup.
[ 2418.748984] OOM killer enabled.
[ 2418.748987] Restarting tasks ... done.
[ 2418.751321] PM: Syncing filesystems ... 
[ 2418.764380] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
[ 2418.948815] done.
[ 2418.948826] PM: Preparing system for sleep (freeze)
[ 2418.949090] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 2418.951905] OOM killer disabled.
[ 2418.951907] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 2418.953392] PM: Suspending system (freeze)
[ 2418.953394] Suspending console(s) (use no_console_suspend to debug)
[ 2418.978304] rmi4_f01 rmi4-00.fn01: Failed to write sleep mode: -6.
[ 2418.978307] rmi4_f01 rmi4-00.fn01: Suspend failed with code -6.
[ 2418.978310] rmi4_physical rmi4-00: Failed to suspend functions: -6
[ 2418.978312] rmi4_smbus 8-002c: Failed to suspend device: -6
[ 2418.978321] dpm_run_callback(): rmi_smb_suspend+0x0/0x50 [rmi_smbus] returns -6
[ 2418.978323] PM: Device 8-002c failed to suspend: error -6
[ 2418.978325] PM: Some devices failed to suspend, or early wake event detected
[ 2418.984840] PM: resume of devices complete after 6.509 msecs
[ 2418.985195] PM: resume devices took 0.007 seconds
[ 2418.985241] PM: Finishing wakeup.
[ 2418.985242] OOM killer enabled.
[ 2418.985244] Restarting tasks ... done.
Comment 1 David H. Gutteridge 2017-08-11 09:05 EDT
Created attachment 1312139 [details]
journalctl -k output
Comment 2 David H. Gutteridge 2017-08-11 09:38:36 EDT
Possibly related to bug 1431375.
Comment 3 David H. Gutteridge 2017-08-16 09:30:26 EDT
I can also duplicate this with 4.12.5-300.fc26, unsurprisingly I suppose (I didn't see any differences in downstream patches between it and the Fedora 25 version). I've moved this bug to Fedora 26.
Comment 4 David H. Gutteridge 2017-09-02 14:05:58 EDT
Still an issue with 4.12.9-300.fc26.
Comment 5 David H. Gutteridge 2017-09-09 00:07:10 EDT
Still an issue with 4.12.11-300.fc26.
Comment 6 Torsten Casselt 2017-09-14 16:50:37 EDT
Same here with Lenovo E540. Problem lies in the kernel module rmi_smbus. You can make the system suspend again if you unload rmi_smbus. Touchpad won’t work (if you even use it, I don’t).

WORKAROUND:

sudo modprobe -r rmi_smbus

Suspend should work. Touchpad not.
To make it persistent on reboots, add rmi_smbus to /etc/modprobe.d/backlist-touchpad.conf and run dracut -f.
Comment 7 Torsten Casselt 2017-09-19 13:50:01 EDT
Not an issue anymore with 4.12.13-300.fc26. Thanks for the fix!
Comment 8 David H. Gutteridge 2017-09-19 19:10:47 EDT
Unfortunately, with 4.12.13-300.fc26, this is still an issue with my hardware. No change.

Sep 18 20:38:20 arcusix.nonus-porta.net kernel: PM: Suspending system (mem)
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: Suspending console(s) (use no_console_suspend to debug)
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: psmouse serio3: Failed to disable mouse on synaptics-rmi4-pt/serio1
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_f01 rmi4-00.fn01: Failed to write sleep mode: -6.
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_f01 rmi4-00.fn01: Suspend failed with code -6.
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_physical rmi4-00: Failed to suspend functions: -6
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_smbus 8-002c: Failed to suspend device: -6
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: dpm_run_callback(): rmi_smb_suspend+0x0/0x50 [rmi_smbus] returns -6
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: PM: Device 8-002c failed to suspend: error -6
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: PM: Some devices failed to suspend, or early wake event detected
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: PM: resume of devices complete after 3.488 msecs
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: PM: resume devices took 0.004 seconds
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: PM: Finishing wakeup.
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: OOM killer enabled.
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: Restarting tasks ... done.
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: PM: Syncing filesystems ... 
Sep 18 20:38:20 arcusix.nonus-porta.net kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: done.
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: PM: Preparing system for sleep (freeze)
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: OOM killer disabled.
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: PM: Suspending system (freeze)
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: Suspending console(s) (use no_console_suspend to debug)
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: rmi4_f01 rmi4-00.fn01: Failed to write sleep mode: -6.
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: rmi4_f01 rmi4-00.fn01: Suspend failed with code -6.
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: rmi4_physical rmi4-00: Failed to suspend functions: -6
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: rmi4_smbus 8-002c: Failed to suspend device: -6
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: dpm_run_callback(): rmi_smb_suspend+0x0/0x50 [rmi_smbus] returns -6
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: PM: Device 8-002c failed to suspend: error -6
Sep 18 20:38:21 arcusix.nonus-porta.net kernel: PM: Some devices failed to suspend, or early wake event detected
Comment 9 nikita.marchant 2017-10-04 17:44:56 EDT
I also have the same problem on a Lenovo L440 running 4.12.14-300.fc26.x86_64.

Sometimes, after a suspend (with the lid) the trackpad refuses to work and the system refuses to sleep, either by closing the lid or with systemctl suspend (du the suspend command does not complain).
I don't know the version of the last kernel that didn't have the problem but it has already been present for a few versions (but always fedora 26)

Running sudo modprobe -r rmi_smbus && sudo modprobe rmi_smbus in a shell does work to re-enable my trackpad and be able to suspend again.

Here is the output of dmesg when i do a systemctl suspend :

[51649.195601] e1000e: enp0s25 NIC Link is Down
[51649.225066] wlp2s0: deauthenticating from 84:a1:d1:46:d9:8f by local choice (Reason: 3=DEAUTH_LEAVING)
[51649.241030] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[51649.455308] PM: Syncing filesystems ... done.
[51649.547391] PM: Preparing system for sleep (mem)
[51649.548292] Freezing user space processes ... (elapsed 0.003 seconds) done.
[51649.551666] OOM killer disabled.
[51649.551667] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[51649.553634] PM: Suspending system (mem)
[51649.553672] Suspending console(s) (use no_console_suspend to debug)
[51649.554368] rmi4_f01 rmi4-00.fn01: Failed to write sleep mode: -6.
[51649.554370] rmi4_f01 rmi4-00.fn01: Suspend failed with code -6.
[51649.554372] rmi4_physical rmi4-00: Failed to suspend functions: -6
[51649.554375] rmi4_smbus 9-002c: Failed to suspend device: -6
[51649.554381] dpm_run_callback(): rmi_smb_suspend+0x0/0x50 [rmi_smbus] returns -6
[51649.554383] PM: Device 9-002c failed to suspend: error -6
[51649.554384] PM: Some devices failed to suspend, or early wake event detected
[51649.555014] PM: resume of devices complete after 0.627 msecs
[51649.555287] PM: resume devices took 0.001 seconds
[51649.555555] PM: Finishing wakeup.
[51649.555555] OOM killer enabled.
[51649.555556] Restarting tasks ... done.
[51649.558639] PM: Syncing filesystems ... 
[51649.566198] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
[51649.569394] done.
[51649.569397] PM: Preparing system for sleep (freeze)
[51649.569586] Freezing user space processes ... (elapsed 0.002 seconds) done.
[51649.572224] OOM killer disabled.
[51649.572225] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[51649.573467] PM: Suspending system (freeze)
[51649.573468] Suspending console(s) (use no_console_suspend to debug)
[51649.574013] rmi4_f01 rmi4-00.fn01: Failed to write sleep mode: -6.
[51649.574014] rmi4_f01 rmi4-00.fn01: Suspend failed with code -6.
[51649.574015] rmi4_physical rmi4-00: Failed to suspend functions: -6
[51649.574017] rmi4_smbus 9-002c: Failed to suspend device: -6
[51649.574021] dpm_run_callback(): rmi_smb_suspend+0x0/0x50 [rmi_smbus] returns -6
[51649.574022] PM: Device 9-002c failed to suspend: error -6
[51649.574023] PM: Some devices failed to suspend, or early wake event detected
[51649.574541] PM: resume of devices complete after 0.517 msecs
[51649.574759] PM: resume devices took 0.001 seconds
[51649.574777] PM: Finishing wakeup.
[51649.574778] OOM killer enabled.
[51649.574778] Restarting tasks ... done.
[51649.585795] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
[51649.589488] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-6).
[51649.814440] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
[51649.816481] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[51649.818198] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[51649.818500] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[51650.041295] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[51650.041580] iwlwifi 0000:02:00.0: L1 Enabled - LTR Enabled
[51650.055524] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[51650.099479] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready
[51653.526858] wlp2s0: authenticate with 84:a1:d1:46:d9:8f
[51653.529285] wlp2s0: send auth to 84:a1:d1:46:d9:8f (try 1/3)
[51653.532374] wlp2s0: authenticated
[51653.533127] wlp2s0: associate with 84:a1:d1:46:d9:8f (try 1/3)
[51653.535616] wlp2s0: RX AssocResp from 84:a1:d1:46:d9:8f (capab=0x511 status=0 aid=42)
[51653.537191] wlp2s0: associated
[51653.537239] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[51653.573662] wlp2s0: Limiting TX power to 30 (30 - 0) dBm as advertised by 84:a1:d1:46:d9:8f
Comment 10 David H. Gutteridge 2017-10-14 14:55:40 EDT
Still an issue with kernel 4.13.6.
Comment 11 David H. Gutteridge 2017-10-30 19:44:02 EDT
Still an issue with kernel 4.13.10. ("sudo modprobe -r rmi_smbus" is an effective workaround for me, but obviously not optimal...)
Comment 12 David H. Gutteridge 2017-12-05 09:02:08 EST
(Updating version to Fedora 27. Still an issue with kernel 4.14.3.)
Comment 13 David H. Gutteridge 2018-02-10 13:25:29 EST
Still an issue with kernel 4.15.2.
Comment 14 Dan Kenigsberg 2018-02-19 02:19:59 EST
Also with 4.15.3-300.fc27.x86_64
Comment 15 Aleksandar Kostadinov 2018-03-08 04:26:03 EST
On T460p with 4.14 things worked well for me. Now upgraded to 4.15.6-300.fc27.x86_64 and I needed to reload `rmi_smbus` module for suspend to start working.

Touchpad doesn't seem to work though before and after module reload. I need to try a reboot or something to be sure though.
Comment 16 Brad 2018-03-17 17:57:35 EDT
(In reply to Aleksandar Kostadinov from comment #15)
> On T460p with 4.14 things worked well for me. Now upgraded to
> 4.15.6-300.fc27.x86_64 and I needed to reload `rmi_smbus` module for suspend
> to start working.
> 
> Touchpad doesn't seem to work through before and after the module reload. I need
> to try a reboot or something to be sure though.

I also own a T460p and have identical behavior on 4.15.9-300.fc27.x86_64. I just noticed it this week after restarting my computer for the first time in 2 months (over which several kernel upgrades took place). reloading `rmi_smbus` allows me to suspend again, but I was unable to get the trackpad and TrackPoint working again without a reboot.
Comment 17 David H. Gutteridge 2018-03-17 18:15:30 EDT
(In reply to Brad from comment #16)
> (In reply to Aleksandar Kostadinov from comment #15)
> > On T460p with 4.14 things worked well for me. Now upgraded to
> > 4.15.6-300.fc27.x86_64 and I needed to reload `rmi_smbus` module for suspend
> > to start working.
> > 
> > Touchpad doesn't seem to work through before and after the module reload. I need
> > to try a reboot or something to be sure though.
> 
> I also own a T460p and have identical behavior on 4.15.9-300.fc27.x86_64. I
> just noticed it this week after restarting my computer for the first time in
> 2 months (over which several kernel upgrades took place). reloading
> `rmi_smbus` allows me to suspend again, but I was unable to get the trackpad
> and TrackPoint working again without a reboot.

The T460p issues -- only those -- should be resolved with kernel 4.15.10, which is now in testing. It has the following change applied:

commit 9f30ff6fa1a4b6075309163af33ca4d59ba8c9ae
Author: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Date:   Wed Mar 7 15:40:28 2018 -0800

    Revert "Input: synaptics - Lenovo Thinkpad T460p devices should use RMI"
    
    commit 5444a992b4a73aa5246a432c482b20b89bce93a5 upstream.

The Fedora 27 update is here:

https://bodhi.fedoraproject.org/updates/FEDORA-2018-959aac67a3
Comment 18 David H. Gutteridge 2018-03-21 19:07:43 EDT
I built a custom 4.15 kernel using Fedora's config-4.15.10-300.fc27.x86_64 as the basis, the only difference being I disabled the CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS option. That resolved the issue for me: my laptop now suspends and resumes consistently and the track pad works (such that I need it to) as before.
Comment 19 Aleksandar Kostadinov 2018-03-22 05:50:45 EDT
Forgot to reply. T460p with 4.15.10 works fine here. With the older 4.15 I saw another driver have been used and input device name changed. Now things are back to how they worked in 4.14. So at least T460p is covered.

Note You need to log in before you can comment on or make changes to this bug.