Closed danielzgtg closed 3 years ago
Thought I would leave a quick note to confirm this behaviour, using the same model SP7, but running Manjaro with the packaged surface-linux kernel Linux Maxwell 5.5.7-arch1-2-surface #1 SMP PREEMPT Sun, 01 Mar 2020 13:14:42 +0000 x86_64 GNU/Linux
.
I didn't dig as deeply as Daniel, but it after noticing it was confined to waking from sleep I used a wicd suspend/resume service script to automatically unload and reload the ipts module. Seems to be sidestepping the problem quite well for now, so I'll paste in my service file below for any other folks who discover this issue and are looking for a quick fix:
[james@Maxwell ~]$ cat /etc/systemd/system/wicd-sleep.service
[Unit]
Description=Wicd sleep hook
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rmmod ipts
ExecStop=/usr/bin/modprobe ipts
[Install]
WantedBy=sleep.target
Hi,
I tried to use your fix, but my wicd-sleep.service can't launch. I have this error when i check the statuts :
`● wicd-sleep.service - Wicd sleep hook Loaded: loaded (/etc/systemd/system/wicd-sleep.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2020-05-20 01:52:14 CEST; 10s ago Process: 3566 ExecStart=/usr/bin/rmmod ipts (code=exited, status=203/EXEC) Main PID: 3566 (code=exited, status=203/EXEC)
mai 20 01:52:14 Surface systemd[1]: Starting Wicd sleep hook... mai 20 01:52:14 Surface systemd[3566]: wicd-sleep.service: Failed to execute command: No such file or d> mai 20 01:52:14 Surface systemd[3566]: wicd-sleep.service: Failed at step EXEC spawning /usr/bin/rmmod:> mai 20 01:52:14 Surface systemd[1]: wicd-sleep.service: Main process exited, code=exited, status=203/EX> mai 20 01:52:14 Surface systemd[1]: wicd-sleep.service: Failed with result 'exit-code'. mai 20 01:52:14 Surface systemd[1]: Failed to start Wicd sleep hook.
I check the access right of each files and the path to rmmod & modprobe. I can't understand the issue.
Can u help ? Thx a lot
On some systems, bin
needs to be replaced with sbin
Thx, it seems to work and start properly.
The oneshot unit only works sometimes for me. most of the time the Touchscreen is still unresponsive on my SP7. Is there any other race condition I am missing ?
my dmesg keeps mentions it not working.
[ 97.271492] printk: Suspending console(s) (use no_console_suspend to debug)
[ 97.272887] wlp0s20f3: deauthenticating from 2c:3a:fd:90:81:83 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 97.293151] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Removing IPTS
[ 97.293158] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: ipts_control_send: error 0x4:-19
[ 97.293161] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: ipts_control_send: error 0x7:-19
[ 97.293885] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping receive loop
[ 97.499262] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping data loop
[ 118.183517] iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
[ 118.332444] iwlwifi 0000:00:14.3: FW already configured (0) - re-configuring
[ 118.481040] OOM killer enabled.
[ 118.481042] Restarting tasks ...
[ 118.487050] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Probing IPTS
[ 118.487052] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS using DMA_BIT_MASK(64)
[ 118.488097] done.
[ 118.489891] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting receive loop
[ 118.491307] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[ 118.491313] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting data loop
My Device:
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
Linux crashface 5.6.13-surface #1 SMP Sun May 17 01:54:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
My UnitFile:
# /etc/systemd/system/wicd-sleep.service
[Unit]
Description=Wicd sleep hook
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/rmmod ipts
ExecStop=/usr/sbin/modprobe ipts
[Install]
WantedBy=sleep.target
Unloading it myself before going to sleep appears to work.
I have further no entries whatsoever in the jounral:
$ systemctl status wicd-sleep.service
● wicd-sleep.service - Wicd sleep hook
Loaded: loaded (/etc/systemd/system/wicd-sleep.service; enabled; vendor preset: enabled)
Active: inactive (dead)
[Surface Laptop 3]
I tried wicd-sleep.service, and the "ExecStop" is working, but "ExecStart" is not working. I have to run rmmod ipts
manually before closing the lid.
If you're facing the same problem, I have a workaround: Create the file /usr/lib/systemd/system-sleep/rmmod-ipts.sh
with the following content, and make it executable (chmod +x rmmod-ipts.sh
).
#!/bin/bash
echo "DEBUG: rmmod ipts at `date`" >> /tmp/a.log
rmmod ipts
exit $?
I have no idea why but changing wicd-sleep.service from sleep.target to suspend.target seems to have fixed the issue so far (Haven't lost touch functionality without turning it off for about a week now). I don't know why because I'm pretty sure that sleep.target is called alongside suspend.target regardless.
Can anyone else confirm whether the script is working in 5.8.5? it no longer seems to be working for me. many thanks
Yeah, the script honestly is just not working anymore so I just turned off the touchscreen entirely at this point.
Yeah, the script honestly is just not working anymore so I just turned off the touchscreen entirely at this point.
downgrading back to 5.7.17 seems to solve the problem for me. Manually typing rmmod ipts
and modprobe ipts
isn't working either with the new drivers
@danielzgtg do you know what commands to use for stopping and restarting the drivers on 5.8.5? cheers
I don't have a gen7 device to test, but this should work.
#!/bin/sh
case $1 in
pre)
systemctl stop iptsd
modprobe -r ipts
;;
post)
modprobe ipts
systemctl start iptsd
;;
esac
The only difference is that you need to stop the iptsd service before you can unload the kernel module, and start it again after reloading the module.
Put this into an executable (chmod +x <path>
) file /lib/systemd/system-sleep/ipts
and it should work again.
I don't have a gen7 device to test, but this should work.
#!/bin/sh case $1 in pre) systemctl stop iptsd modprobe -r ipts ;; post) modprobe ipts systemctl start iptsd ;; esac
The only difference is that you need to stop the iptsd service before you can unload the kernel module, and start it again after reloading the module.
Put this into an executable (
chmod +x <path>
) file/lib/systemd/system-sleep/ipts
and it should work again.
Confirmed working on SP7. Thank you for the information. Is it possible for you to put this in the SP7 wiki so that new comers don't have to look for this thread? thanks
#!/bin/sh # [...]
This seems right for preventing IPTS problems.
However, I forgot to add the two lines about iptsd
after iptsd
got introduced, and it broke for me today when I suspended. Now, none of the following worked for recovering from the problem:
lightdm
Only a reboot worked, and this problem caused my tablet to freeze during shutdown.
The iptsd
error is the same as from #273 :
Sep 15 07:22:38 daniel-tablet1 systemd[1]: Started Intel Precise Touch & Stylus Daemon.
Sep 15 07:22:38 daniel-tablet1 iptsd[939]: Connected to device 045e:099f
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: open /dev/ipts: no such device
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: main.(*IptsControl).Start
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: /__w/iptsd/iptsd/control.go:39
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: main.(*IptsControl).Restart
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: /__w/iptsd/iptsd/control.go:87
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: main.(*IptsControl).Read
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: /__w/iptsd/iptsd/control.go:118
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: main.main
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: /__w/iptsd/iptsd/main.go:57
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: runtime.main
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: /usr/lib/go-1.14/src/runtime/proc.go:203
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: runtime.goexit
Sep 16 14:28:35 daniel-tablet1 iptsd[939]: /usr/lib/go-1.14/src/runtime/asm_amd64.s:1373
Sep 16 14:28:35 daniel-tablet1 systemd[1]: iptsd.service: Succeeded.
The kernel side (dmesg
) seems fine like before:
[98818.015857] OOM killer enabled.
[98818.015859] Restarting tasks ... done.
[98818.039297] PM: suspend exit
[98818.055733] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Probing IPTS
[98818.055735] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS using DMA_BIT_MASK(64)
However, looking at the /dev/ipts
file, we find the cause of that error:
root@daniel-tablet1:~# stat /dev/ipts
File: /dev/ipts
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 5h/5d Inode: 1847647 Links: 1 Device type: a,39
Access: (0600/crw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-09-16 14:48:40.380001261 -0400
Modify: 2020-09-16 14:48:40.380001261 -0400
Change: 2020-09-16 14:48:40.380001261 -0400
Birth: -
root@daniel-tablet1:~# cat /dev/ipts
cat: /dev/ipts: No such device
root@daniel-tablet1:~#
I don't have a gen7 device to test, but this should work.
#!/bin/sh case $1 in pre) systemctl stop iptsd modprobe -r ipts ;; post) modprobe ipts systemctl start iptsd ;; esac
The only difference is that you need to stop the iptsd service before you can unload the kernel module, and start it again after reloading the module. Put this into an executable (
chmod +x <path>
) file/lib/systemd/system-sleep/ipts
and it should work again.Confirmed working on SP7. Thank you for the information. Is it possible for you to put this in the SP7 wiki so that new comers don't have to look for this thread? thanks
I'm using this scrip on SP4 and it works. however after sleep, if I rotate the device in GNOME input matrix is not rotated. see this https://github.com/linux-surface/linux-surface/issues/302#issue-718801422
https://github.com/linux-surface/kernel/commit/1f11c87fb851c199f356f7a499bf2f0896ed9595 looks like it will fix the root cause. TODO: confirm
Dear all, have some problems starting iptsd on SGO2: $ uname -a 5.10.2-surface #1 SMP Sat Dec 26 23:32:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ apt info iptsd Version: 0.3.1-1
$ sudo systemctl status iptsd ● iptsd.service - Intel Precise Touch & Stylus Daemon Loaded: loaded (/lib/systemd/system/iptsd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2021-01-01 23:35:49 CET; 23min ago Docs: https://github.com/linux-surface/iptsd Process: 13235 ExecStart=/usr/bin/iptsd (code=exited, status=254) Main PID: 13235 (code=exited, status=254)
Jan 01 23:35:49 Go2 systemd[1]: Started Intel Precise Touch & Stylus Daemon. Jan 01 23:35:49 Go2 iptsd[13235]: ERROR: ../src/control.c:141: Failed to open /dev/ipts/0: No such file or directory Jan 01 23:35:49 Go2 iptsd[13235]: ERROR: ../src/main.c:83: Failed to start IPTS: No such file or directory Jan 01 23:35:49 Go2 systemd[1]: iptsd.service: Main process exited, code=exited, status=254/n/a Jan 01 23:35:49 Go2 systemd[1]: iptsd.service: Failed with result 'exit-code'.
$ sudo lsmod Module Size Used by ipts 16384 0 uhid 20480 0 ccm 20480 9 rfcomm 81920 16 cmac 16384 5 algif_hash 16384 2 algif_skcipher 16384 2 af_alg 28672 10 algif_hash,algif_skcipher bnep 24576 2 binfmt_misc 24576 1 nls_iso8859_1 16384 1 snd_hda_codec_realtek 126976 1 snd_hda_codec_generic 81920 1 snd_hda_codec_realtek ledtrig_audio 16384 1 snd_hda_codec_generic snd_soc_skl 159744 0 snd_soc_sst_ipc 20480 1 snd_soc_skl snd_soc_sst_dsp 32768 1 snd_soc_skl snd_hda_ext_core 32768 1 snd_soc_skl snd_soc_acpi_intel_match 45056 1 snd_soc_skl snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_soc_skl snd_hda_intel 53248 3 snd_intel_dspcfg 24576 2 snd_hda_intel,snd_soc_skl soundwire_intel 40960 1 snd_intel_dspcfg soundwire_generic_allocation 16384 1 soundwire_intel soundwire_cadence 32768 1 soundwire_intel snd_hda_codec 147456 3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_realtek snd_hda_core 94208 6 snd_hda_codec_generic,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_skl snd_hwdep 16384 1 snd_hda_codec soundwire_bus 77824 3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence snd_soc_core 278528 2 soundwire_intel,snd_soc_skl snd_compress 28672 1 snd_soc_core ac97_bus 16384 1 snd_soc_core snd_pcm_dmaengine 16384 1 snd_soc_core snd_pcm 114688 8 snd_hda_intel,snd_hda_codec,soundwire_intel,snd_compress,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine snd_seq_midi 20480 0 snd_seq_midi_event 16384 1 snd_seq_midi snd_rawmidi 36864 1 snd_seq_midi mei_hdcp 24576 0 intel_rapl_msr 20480 0 snd_seq 73728 2 snd_seq_midi,snd_seq_midi_event snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi snd_timer 40960 2 snd_seq,snd_pcm x86_pkg_temp_thermal 20480 0 intel_powerclamp 20480 0 coretemp 20480 0 iwlmvm 405504 0 kvm_intel 294912 0 mac80211 958464 1 iwlmvm kvm 782336 1 kvm_intel libarc4 16384 1 mac80211 rapl 20480 0 snd 94208 18 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi wmi_bmof 16384 0 intel_cstate 20480 0 iwlwifi 364544 1 iwlmvm intel_wmi_thunderbolt 20480 0 efi_pstore 16384 0 serio_raw 20480 0 cfg80211 839680 3 iwlmvm,iwlwifi,mac80211 btusb 57344 0 soundcore 16384 1 snd btrtl 20480 1 btusb btbcm 16384 1 btusb btintel 28672 1 btusb cdc_mbim 20480 0 cdc_wdm 24576 2 cdc_mbim cdc_ncm 49152 1 cdc_mbim bluetooth 622592 43 btrtl,btintel,btbcm,bnep,btusb,rfcomm mei_me 40960 1 input_leds 16384 0 8250_dw 16384 0 cdc_ether 20480 1 cdc_ncm joydev 24576 0 usbnet 49152 3 cdc_mbim,cdc_ncm,cdc_ether ecdh_generic 16384 2 bluetooth mousedev 20480 0 mii 20480 1 usbnet ecc 32768 1 ecdh_generic hid_sensor_accel_3d 20480 1 mei 118784 4 mei_hdcp,mei_me,ipts hid_sensor_gyro_3d 20480 0 hid_sensor_rotation 20480 0 hid_sensor_als 20480 1 hid_sensor_trigger 20480 9 hid_sensor_gyro_3d,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_rotation industrialio_triggered_buffer 16384 1 hid_sensor_trigger kfifo_buf 16384 1 industrialio_triggered_buffer hid_sensor_iio_common 20480 5 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_rotation industrialio 77824 9 industrialio_triggered_buffer,hid_sensor_gyro_3d,hid_sensor_trigger,kfifo_buf,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_rotation ipu3_cio2 40960 0 ipu3_imgu 212992 0 intel_xhci_usb_role_switch 16384 0 videobuf2_dma_sg 16384 2 ipu3_cio2,ipu3_imgu processor_thermal_device 24576 0 videobuf2_memops 20480 1 videobuf2_dma_sg intel_rapl_common 24576 2 intel_rapl_msr,processor_thermal_device cros_ec_ishtp 20480 0 videobuf2_v4l2 32768 2 ipu3_cio2,ipu3_imgu ucsi_acpi 16384 0 cros_ec 20480 1 cros_ec_ishtp typec_ucsi 36864 1 ucsi_acpi intel_soc_dts_iosf 20480 1 processor_thermal_device intel_pch_thermal 16384 0 videobuf2_common 61440 3 ipu3_cio2,videobuf2_v4l2,ipu3_imgu typec 53248 1 typec_ucsi ov5693 28672 1 v4l2_fwnode 28672 2 ipu3_cio2,ov5693 soc_button_array 20480 0 videodev 258048 6 v4l2_fwnode,ipu3_cio2,videobuf2_v4l2,ov5693,videobuf2_common,ipu3_imgu mac_hid 16384 0 int3472 16384 2 mc 57344 6 videodev,ipu3_cio2,videobuf2_v4l2,ov5693,videobuf2_common,ipu3_imgu int3403_thermal 20480 0 int340x_thermal_zone 16384 2 int3403_thermal,processor_thermal_device int3400_thermal 20480 0 acpi_pad 184320 0 acpi_thermal_rel 16384 1 int3400_thermal intel_hid 20480 0 sparse_keymap 16384 1 intel_hid sch_fq_codel 20480 1 parport_pc 45056 0 ppdev 24576 0 lp 20480 0 parport 65536 3 parport_pc,lp,ppdev ip_tables 32768 0 x_tables 45056 1 ip_tables autofs4 45056 2 mmc_block 49152 2 usbhid 57344 0 hid_sensor_hub 24576 6 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_als,hid_sensor_accel_3d,hid_sensor_rotation intel_ishtp_loader 24576 0 intel_ishtp_hid 24576 0 hid_multitouch 28672 0 hid_generic 16384 0 i915 2244608 8 crct10dif_pclmul 16384 1 crc32_pclmul 16384 0 ghash_clmulni_intel 16384 0 aesni_intel 372736 13 rtsx_pci_sdmmc 28672 0 i2c_algo_bit 16384 1 i915 crypto_simd 16384 1 aesni_intel drm_kms_helper 229376 1 i915 i2c_designware_platform 16384 0 i2c_designware_core 28672 1 i2c_designware_platform cryptd 24576 4 crypto_simd,ghash_clmulni_intel syscopyarea 16384 1 drm_kms_helper glue_helper 16384 1 aesni_intel sysfillrect 16384 1 drm_kms_helper sysimgblt 16384 1 drm_kms_helper fb_sys_fops 16384 1 drm_kms_helper nvme 45056 2 cec 53248 2 drm_kms_helper,i915 rc_core 57344 1 cec intel_ish_ipc 24576 0 nvme_core 122880 4 nvme drm 544768 8 drm_kms_helper,i915 rtsx_pci 90112 1 rtsx_pci_sdmmc intel_ishtp 53248 4 cros_ec_ishtp,intel_ishtp_hid,intel_ish_ipc,intel_ishtp_loader intel_lpss_pci 20480 0 intel_lpss 16384 1 intel_lpss_pci idma64 20480 0 xhci_pci 20480 0 virt_dma 20480 1 idma64 xhci_pci_renesas 20480 1 xhci_pci wmi 32768 2 intel_wmi_thunderbolt,wmi_bmof i2c_hid 28672 0 hid 135168 7 i2c_hid,usbhid,hid_multitouch,hid_sensor_hub,intel_ishtp_hid,hid_generic,uhid video 49152 1 i915 backlight 24576 3 video,i915,drm pinctrl_sunrisepoint 28672 2
$ sudo systemctl restart iptsd uwe@Go2:~/linux-surface$ sudo systemctl status iptsd ● iptsd.service - Intel Precise Touch & Stylus Daemon Loaded: loaded (/lib/systemd/system/iptsd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2021-01-02 00:23:21 CET; 17s ago Docs: https://github.com/linux-surface/iptsd Process: 15183 ExecStart=/usr/bin/iptsd (code=exited, status=237/KEYRING) Main PID: 15183 (code=exited, status=237/KEYRING)
Jan 02 00:23:16 Go2 iptsd[15183]: ERROR: ../src/control.c:28: Failed get ready status: No such device Jan 02 00:23:17 Go2 iptsd[15183]: ERROR: ../src/control.c:28: Failed get ready status: No such device Jan 02 00:23:18 Go2 iptsd[15183]: ERROR: ../src/control.c:28: Failed get ready status: No such device Jan 02 00:23:19 Go2 iptsd[15183]: ERROR: ../src/control.c:28: Failed get ready status: No such device Jan 02 00:23:20 Go2 iptsd[15183]: ERROR: ../src/control.c:28: Failed get ready status: No such device Jan 02 00:23:21 Go2 iptsd[15183]: ERROR: ../src/control.c:52: Failed to send feedback: No such device Jan 02 00:23:21 Go2 iptsd[15183]: ERROR: ../src/control.c:75: Failed to flush buffers: No such device Jan 02 00:23:21 Go2 iptsd[15183]: ERROR: ../src/main.c:83: Failed to start IPTS: No such device Jan 02 00:23:21 Go2 systemd[1]: iptsd.service: Main process exited, code=exited, status=237/KEYRING Jan 02 00:23:21 Go2 systemd[1]: iptsd.service: Failed with result 'exit-code'.
The Surface Go line doesn't use IPTS, so you dont have to enable iptsd. It cannot work.
Thank you, good to know
My workaround stopped working today.
$ systemctl status iptsd
● iptsd.service - Intel Precise Touch & Stylus Daemon
Loaded: loaded (/lib/systemd/system/iptsd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-02-20 20:52:19 EST; 1min 58s ago
Docs: https://github.com/linux-surface/iptsd
Process: 13556 ExecStart=/usr/bin/iptsd (code=exited, status=237/KEYRING)
Main PID: 13556 (code=exited, status=237/KEYRING)
Feb 20 20:52:14 daniel-tablet1 systemd[1]: Started Intel Precise Touch & Stylus Daemon.
Feb 20 20:52:19 daniel-tablet1 iptsd[13556]: ERROR: ../src/control.c:52: Failed to send feedback: No such device
Feb 20 20:52:19 daniel-tablet1 iptsd[13556]: ERROR: ../src/control.c:75: Failed to flush buffers: No such device
Feb 20 20:52:19 daniel-tablet1 iptsd[13556]: ERROR: ../src/main.c:83: Failed to start IPTS: No such device
Feb 20 20:52:19 daniel-tablet1 systemd[1]: iptsd.service: Main process exited, code=exited, status=237/KEYRING
Feb 20 20:52:19 daniel-tablet1 systemd[1]: iptsd.service: Failed with result 'exit-code'.
Not even a manual rmmod ipts; modprobe ipts; service iptsd restart
worked
Can you please post your dmesg?
This is after the following steps:
I also had a boot before that where it suspended and resumed properly with touch, but where a second suspend and resume resulted in broken touch
dmesg
This is after the following steps:
- Cold start
- Login
- Suspend
- Wait 10 seconds
- Press power button to resume
- Log back in
- Touch screen to see it doesn't work
I also had a boot before that where it suspended and resumed properly with touch, but where a second suspend and resume resulted in broken touch
I am also having the same issue, SL3(I) kernel: 5.10.16-arch1-3-surface
I am suspecting that this might happen due to the revert of the MEI bus patch that I applied, so the driver no longer sends the CLEAR_MEM_WINDOW
command on shutdown.
If that command is not sent IPTS keeps around the old buffers, which are freed by the module. The older devices dont have a problem with that, but maybe gen7 requires that you clear out the old buffer addresses before you can start the device again.
We might be able to get it to work by sending CLEAR_MEM_WINDOW
on startup. In fact, ipts did that in the past but I removed it because I didnt see the purpose in clearing something that will be overwritten a second later. But eh.
diff --git a/context.h b/context.h
index f4b06a2..6a99671 100644
--- a/context.h
+++ b/context.h
@@ -32,7 +32,6 @@ struct ipts_context {
struct mei_cl_device *cldev;
struct device *dev;
- bool restart;
enum ipts_host_status status;
struct ipts_get_device_info_rsp device_info;
diff --git a/control.c b/control.c
index 24d3d19..53cbd55 100644
--- a/control.c
+++ b/control.c
@@ -40,13 +40,12 @@ int ipts_control_start(struct ipts_context *ipts)
dev_info(ipts->dev, "Starting IPTS\n");
ipts->status = IPTS_HOST_STATUS_STARTING;
- ipts->restart = false;
ipts_uapi_link(ipts);
- return ipts_control_send(ipts, IPTS_CMD_GET_DEVICE_INFO, NULL, 0);
+ return ipts_control_send(ipts, IPTS_CMD_CLEAR_MEM_WINDOW, NULL, 0);
}
-int ipts_control_stop(struct ipts_context *ipts)
+static int ipts_control_shutdown(struct ipts_context *ipts)
{
if (ipts->status == IPTS_HOST_STATUS_STOPPING)
return -EBUSY;
@@ -60,6 +59,14 @@ int ipts_control_stop(struct ipts_context *ipts)
ipts_uapi_unlink();
ipts_resources_free(ipts);
+ return 0;
+}
+
+int ipts_control_stop(struct ipts_context *ipts)
+{
+ if (ipts_control_shutdown(ipts))
+ return -EBUSY;
+
if (!mei_cldev_enabled(ipts->cldev))
return 0;
@@ -68,9 +75,9 @@ int ipts_control_stop(struct ipts_context *ipts)
int ipts_control_restart(struct ipts_context *ipts)
{
- if (ipts->restart)
+ if (ipts_control_shutdown(ipts))
return -EBUSY;
- ipts->restart = true;
- return ipts_control_stop(ipts);
+ ipts->status = IPTS_HOST_STATUS_STOPPED;
+ return ipts_control_start(ipts);
}
diff --git a/receiver.c b/receiver.c
index 916ba3e..44cf500 100644
--- a/receiver.c
+++ b/receiver.c
@@ -83,12 +83,12 @@ static int ipts_receiver_handle_set_mem_window(struct ipts_context *ipts)
static int ipts_receiver_handle_clear_mem_window(struct ipts_context *ipts)
{
- ipts->status = IPTS_HOST_STATUS_STOPPED;
-
- if (ipts->restart)
- return ipts_control_start(ipts);
+ if (ipts->status == IPTS_HOST_STATUS_STOPPING) {
+ ipts->status = IPTS_HOST_STATUS_STOPPED;
+ return 0;
+ }
- return 0;
+ return ipts_control_send(ipts, IPTS_CMD_GET_DEVICE_INFO, NULL, 0);
}
static bool ipts_receiver_sensor_was_reset(u32 status)
@@ -111,7 +111,7 @@ static bool ipts_receiver_handle_error(struct ipts_context *ipts,
error = rsp->code != IPTS_RSP_FEEDBACK;
break;
case IPTS_STATUS_SENSOR_DISABLED:
- error = ipts->status != IPTS_HOST_STATUS_STOPPING;
+ error = rsp->code != IPTS_RSP_READY_FOR_DATA;
break;
default:
error = true;
Can you apply that patch to the master branch of intel-precise-touch and try again?
It doesn't compile:
error: ‘rps’ undeclared (first use in this function); did you mean ‘rsp’?
114 | error = rps->code != IPTS_RSP_READY_FOR_DATA;
| ^~~
| rsp
I will try fixing it by changing it to rsp
...
The patched module broke touch even without a suspend.
I will try fixing it by changing it to
rsp
...
Whoops, sorry. I fixed the original patch, thanks.
The patched module broke touch even without a suspend.
Thanks for trying. The CLEAR_MEM_WINDOW
command now fails with error 14 which means timeout. The old driver from intel ignores that error, so lets try that too. Could you apply this on top of the other patch I posted above?
diff --git a/receiver.c b/receiver.c
index 44cf500..9be3ac5 100644
--- a/receiver.c
+++ b/receiver.c
@@ -113,6 +113,9 @@ static bool ipts_receiver_handle_error(struct ipts_context *ipts,
case IPTS_STATUS_SENSOR_DISABLED:
error = rsp->code != IPTS_RSP_READY_FOR_DATA;
break;
+ case IPTS_STATUS_TIMEOUT:
+ error = rsp->code != IPTS_RSP_CLEAR_MEM_WINDOW;
+ break;
default:
error = true;
break;
The double patched module loads fine after unloading the previous one. Without suspending, touch works fine before and after the operation.
However, touch still doesn't work after resume:
[ 1467.756044] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping IPTS
[ 1475.434647] ipts: loading out-of-tree module taints kernel.
[ 1475.434735] ipts: module verification failed: signature and/or required key missing - tainting kernel
[ 1475.436306] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[ 1475.690384] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Device 045E:099F ready
[ 1481.942786] input: IPTS Touch as /devices/virtual/input/input36
[ 1481.942938] input: IPTS Stylus as /devices/virtual/input/input37
[ 1493.560688] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping IPTS
[ 1493.676460] PM: suspend entry (s2idle)
[ 1493.688245] Filesystems sync: 0.011 seconds
[ 1493.689072] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 1493.691164] OOM killer disabled.
[ 1493.691164] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1493.692380] printk: Suspending console(s) (use no_console_suspend to debug)
[ 1510.836305] r8152 2-1.4:1.0 enx00e04c76752f: carrier on
[ 1510.932410] OOM killer enabled.
[ 1510.932411] Restarting tasks ... done.
[ 1510.949653] thermal thermal_zone9: failed to read out thermal zone (-61)
[ 1510.949676] PM: suspend exit
[ 1510.966424] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[ 1510.967527] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[ 1516.117751] r8152 2-1.4:1.0 enx00e04c76752f: carrier on
[ 1516.291460] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c76752f: link becomes ready
[ 1516.300555] docker_gwbridge: port 1(veth5f93f7b) entered disabled state
Hmm.. an earlier workaround on gen7 was to unload the module before suspending and reloading it when resuming. Are you still doing that? If not, can you try if that fixes the issue?
i.e. https://github.com/linux-surface/linux-surface/issues/89#issuecomment-683780497
I have the following suspend-resume script. It contains my modifications on top of the original script that shipped long ago:
$ cat /lib/systemd/system-sleep/sleep
#!/bin/bash
case $1 in
pre) # unload the modules before going to sleep
# Disable bluetooth if no device is connected
if ps cax | grep bluetoothd && ! bluetoothctl info; then
bluetoothctl power off
fi
## Disable bluetooth regardless if devices are connected (see notes below)
#if ps cax | grep bluetoothd; then
# bluetoothctl power off
#fi
# handle wifi issues
modprobe -r mwifiex_pcie;
modprobe -r mwifiex;
modprobe -r cfg80211;
## IPTS: see notes below
## > Remove IPTS from ME side
systemctl stop iptsd
modprobe -r ipts
#modprobe -r ipts_surface
#modprobe -r intel_ipts
modprobe -r mei_hdcp
modprobe -r mei_me
modprobe -r mei
## > Remove IPTS from i915 side
#for i in $(find /sys/kernel/debug/dri -name i915_intel_ipts_cleanup); do echo 1 > $i; done
;;
post) # re-load modules after resume
## IPTS: see notes below
## > Load IPTS from i915 side
#for i in $(find /sys/kernel/debug/dri -name i915_intel_ipts_init); do echo 1 > $i; done
## > Load IPTS from ME side
modprobe mei
modprobe mei_me
modprobe mei_hdcp
#modprobe intel_ipts
#modprobe ipts_surface
modprobe ipts
systemctl start iptsd
# Restart bluetooth
if ps cax | grep bluetoothd; then
bluetoothctl power on
fi
# handle wifi issues: complete cycle
modprobe cfg80211;
modprobe mwifiex;
modprobe mwifiex_pcie;
echo 1 > /sys/bus/pci/rescan
if [ -x "$(command -v nmcli)" ] && [ "$(nmcli net)" = "enabled" ]; then
nmcli net off
nmcli net on
fi
;;
esac
# Notes:
# - For IPTS, see
# > https://github.com/jakeday/linux-surface/issues/544#issuecomment-519126757
# for an explanation/discussion. We do not unload/reload modules for now as
# the IPTS drivers should be able to resume/suspend without this. If you
# experience any issues on suspend/resume, please file an appropriate issue or
# join the discussion linked above so that we can fix it. As a temporary
# workaround, you may want to uncomment the IPTS-related lines above.
# - For bluetooth: If you have spontaneous wakeups, you may want to disable
# bluetooth completely, regardless if any devices are connected or not, by
# removing the `! bluetoothctl info;` part as indicated in the comment (e.g.
# comment-out the original check and comment-in the one below). Note that you
# may be required to re-connect your devices after resume if you choose this
# change
Could you try without the script? For the most part it should be obsolete, the marvell wifi stuff doesnt apply to gen7 devices because Microsoft switched to Intel Wifi chips. The bluetooth stuff was fixed in the kernel iirc.
If that doesnt work try with the minimal script I posted above, so just reload the ipts
module and restart iptsd
.
I did rm /lib/systemd/system-sleep/sleep; systemctl daemon-reload
.
The first suspend-resume worked (though before the patch it also worked sometimes).
Touch stopped working in the next suspend-resume:
# service iptsd status
● iptsd.service - Intel Precise Touch & Stylus Daemon
Loaded: loaded (/lib/systemd/system/iptsd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-02-24 03:38:47 EST; 38s ago
Docs: https://github.com/linux-surface/iptsd
Process: 27663 ExecStart=/usr/bin/iptsd (code=exited, status=237/KEYRING)
Main PID: 27663 (code=exited, status=237/KEYRING)
Feb 24 03:37:47 daniel-tablet1 systemd[1]: Started Intel Precise Touch & Stylus Daemon.
Feb 24 03:38:47 daniel-tablet1 iptsd[27663]: ERROR: ../src/control.c:93: Failed to get doorbell: No such device
Feb 24 03:38:47 daniel-tablet1 iptsd[27663]: ERROR: ../src/main.c:114: IPTSD loop failed: No such device
Feb 24 03:38:47 daniel-tablet1 iptsd[27663]: Connected to device 045E:099F
Feb 24 03:38:47 daniel-tablet1 systemd[1]: iptsd.service: Main process exited, code=exited, status=237/KEYRING
Feb 24 03:38:47 daniel-tablet1 systemd[1]: iptsd.service: Failed with result 'exit-code'.
$ dmesg
[ 6519.969981] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[ 6520.224039] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Device 045E:099F ready
[ 6524.777546] input: IPTS Touch as /devices/virtual/input/input42
[ 6524.777862] input: IPTS Stylus as /devices/virtual/input/input43
[ 6543.115809] wlp0s20f3: deauthenticating from 1c:5f:2b:7d:7f:85 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 6543.381967] PM: suspend entry (s2idle)
[ 6543.405983] Filesystems sync: 0.024 seconds
[ 6543.409776] Freezing user space processes ... (elapsed 0.007 seconds) done.
[ 6543.417078] OOM killer disabled.
[ 6543.417079] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 6543.418455] printk: Suspending console(s) (use no_console_suspend to debug)
[ 6543.477594] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping IPTS
[ 6550.398847] OOM killer enabled.
[ 6550.398849] Restarting tasks ...
[ 6550.398881] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[ 6550.403064] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[ 6550.406465] done.
[ 6550.427896] thermal thermal_zone9: failed to read out thermal zone (-61)
[ 6550.427946] PM: suspend exit
[ 6550.652198] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Device 045E:099F ready
[ 6568.690178] PM: suspend entry (s2idle)
[ 6568.713812] Filesystems sync: 0.023 seconds
[ 6568.714569] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 6568.717332] OOM killer disabled.
[ 6568.717332] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 6568.718741] printk: Suspending console(s) (use no_console_suspend to debug)
[ 6568.737702] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping IPTS
[ 6579.365516] OOM killer enabled.
[ 6579.365518] Restarting tasks ...
[ 6579.368286] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[ 6579.369106] done.
[ 6579.369840] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[ 6579.382138] thermal thermal_zone9: failed to read out thermal zone (-61)
[ 6579.382161] PM: suspend exit
A further rmmod ipts; insmod ipts.ko; service iptsd restart
leads to the previous error:
# dmesg
[ 6768.174192] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Stopping IPTS
[ 6771.009934] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
# systemctl status iptsd
● iptsd.service - Intel Precise Touch & Stylus Daemon
Loaded: loaded (/lib/systemd/system/iptsd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-02-24 03:42:03 EST; 1min 55s ago
Docs: https://github.com/linux-surface/iptsd
Process: 28603 ExecStart=/usr/bin/iptsd (code=exited, status=237/KEYRING)
Main PID: 28603 (code=exited, status=237/KEYRING)
Feb 24 03:41:58 daniel-tablet1 systemd[1]: Started Intel Precise Touch & Stylus Daemon.
Feb 24 03:42:03 daniel-tablet1 iptsd[28603]: ERROR: ../src/control.c:52: Failed to send feedback: No such device
Feb 24 03:42:03 daniel-tablet1 iptsd[28603]: ERROR: ../src/control.c:75: Failed to flush buffers: No such device
Feb 24 03:42:03 daniel-tablet1 iptsd[28603]: ERROR: ../src/main.c:83: Failed to start IPTS: No such device
Feb 24 03:42:03 daniel-tablet1 systemd[1]: iptsd.service: Main process exited, code=exited, status=237/KEYRING
Feb 24 03:42:03 daniel-tablet1 systemd[1]: iptsd.service: Failed with result 'exit-code'.
I then retried after installing your script (edited to load the right module). I got the same errors
Okay, strange request, but can you downgrade the kernel to 5.10.13 and try with the ipts module from master (without any patches)?
The only difference in that setup would be the MEI bus patch, so if that works I will simply reapply it.
EDIT: Actually, you need a patch, sorry:
diff --git a/control.c b/control.c
index 24d3d19..05f0b76 100644
--- a/control.c
+++ b/control.c
@@ -59,10 +59,6 @@ int ipts_control_stop(struct ipts_context *ipts)
ipts_uapi_unlink();
ipts_resources_free(ipts);
-
- if (!mei_cldev_enabled(ipts->cldev))
- return 0;
-
return ipts_control_send(ipts, IPTS_CMD_CLEAR_MEM_WINDOW, NULL, 0);
}
diff --git a/mei.c b/mei.c
index d45f31c..b3805a9 100644
--- a/mei.c
+++ b/mei.c
@@ -65,10 +65,19 @@ static int ipts_mei_probe(struct mei_cl_device *cldev,
static int ipts_mei_remove(struct mei_cl_device *cldev)
{
+ int i;
struct ipts_context *ipts = mei_cldev_get_drvdata(cldev);
- mei_cldev_disable(cldev);
ipts_control_stop(ipts);
+
+ for (i = 0; i < 20; i++) {
+ if (ipts->status == IPTS_HOST_STATUS_STOPPED)
+ break;
+
+ msleep(25);
+ }
+
+ mei_cldev_disable(cldev);
kfree(ipts);
return 0;
I was unable to apply the patch:
$ git apply 82-3.patch
error: patch failed: control.c:59
error: control.c: patch does not apply
error: patch failed: mei.c:65
error: mei.c: patch does not apply
I was able to apply it manually and build though
Copying the diff out of the terminal replaced all tabs with spaces, sorry. Today isnt my day, it seems...
I loaded the newer version of the ipts.ko
module on Linux daniel-tablet1 5.10.13-surface #1 SMP Thu Feb 4 00:43:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
with the new sleep script installed.
On one boot, I was able to suspend and resume 3 times while touch remained functional before I rebooted.
On the next boot, touch stopped working on the first resume. However, it might be related to unloading the old module. Here is the dmesg:
Okay, maybe I need to take a step back on this. Because I feel like I managed to confuse myself, partially by jumping the gun and posting patches right off the bat, instead of asking questions first. Sorry for that.. :(
You said that your workarounds stopped working. Did that correlate to a kernel update? If you downgrade to 5.10.13 with your workarounds, does it work reliably again? (without building the module from master)
Did that correlate to a kernel update?
I don't know if or which yet, but I think it must have. If userspace was allowed to cause these problems then that would be a much bigger problem.
I'll bisect on kernel images from the repo once I have the time
5.10.13 with your workarounds, does it work reliably again? (without building the module from master)
I don't think it would.
The error in dmesg
from my second attempt happens before the module from master is loaded. It happens when the old one is unloaded. Both workaround scripts do the unloading, so this is effectively "5.10.13 with your workarounds, [...] (without building the module from master)"
I didn't know how to install the module, so the ipts.ko
is still somewhere in my Downloads directory and I'm doing rmmod
and insmod
with it. Since the problem happens with the old module (second attempt) and not with the new module (first attempt), I wonder whether it'll work reliably once I properly install the module from master
The error in
dmesg
from my second attempt happens before the module from master is loaded. It happens when the old one is unloaded.
These timeout issues (error 14) can be flaky hardware I think. I had them too when testing one of the patches and they went away after a while (or after a reboot). At the moment I am more interested if the device comes back after suspend, if there arent any errors before suspending.
Actually, I think I found a way to reliably reproduce the timeout issue: When there is unprocessed data waiting, the command will timeout. So you can reproduce the issue on 5.10.13 by stopping iptsd, touching the screen and then unloading the module.
I pushed a branch to the ipts repo: https://github.com/linux-surface/intel-precise-touch/commits/suspend-fun
It should fix the timeout issues, and hopefully also the suspend issues you are having. Could you give that branch a try on kernel 5.10.13 (it needs the MEI bus patch)? To prevent the builtin module from messing things up with timeout errors, you can blacklist it: echo "blacklist ipts" | sudo tee /etc/modprobe.d/ipts.conf
When there is unprocessed data waiting, the command will timeout. So you can reproduce the issue on 5.10.13 by stopping iptsd, touching the screen and then unloading the module.
Are we sure touching the screen is the only way to have unprocessed data waiting? What about the other thing that sends data periodically, which it sounds like would also be "unprocessed data" if iptsd is stopped?
"blacklist ipts"
blacklist
barely does anything. We need install ipts /bin/false
Are we sure touching the screen is the only way to have unprocessed data waiting? What about the other thing that sends data periodically, which it sounds like would also be "unprocessed data" if iptsd is stopped?
Yes, thats also unprocessed data.
blacklist
barely does anything. We needinstall ipts /bin/false
Not sure what you mean to be honest. I want to prevent automatic loading of the builtin ipts module, because that can have the timeout issue when you unload it. blacklisting it in modprobe.d works fine for that. If the module is blacklisted it should be easier to properly test if the branch I posted fixes the issue, because you shouldnt get timeout errors.
Touch kept working through 3 boots with 3 suspend-resumes each
Not sure what you mean to be honest
I meant that we need to use echo "install ipts /bin/false" >> /etc/modprobe.d/blacklist.conf
.
When debugging a separate GPU problem, someone on Gitter suggested using blacklist i915
. It didn't work. You can still modprobe
modules even after they are blacklisted. Even if you are not modprobing it yourself, something in the system might be, as demonstrated by that time
prevent automatic loading of the builtin ipts module
install ipts /bin/false
is a stronger guarantee for that. By using the /bin/false
method, we forcibly break automatic loading of ipts
. It's like how systemctl mask
is stronger than systemctl disable
. By using the stronger method, we don't need to worry about some other script (such as the original suspend-resume script before I edited it to use insmod
instead of modprobe
) loading the wrong module anymore.
Touch kept working through 3 boots with 3 suspend-resumes each
I totally overread this. That sounds great!
Out of curiosity, was that with the sleep script or without? If it was with the script, could you try without it?
was that with the sleep script or without
With
If it was with the script, could you try without it?
I just performed the same procedure and it still worked without the script
Awesome, thank you for testing!
This should be fixed with the latest kernel updates.
Can confirm. Thanks!
This follows up on the IPTS suspend issues on #74. It seems that a
modprobe -r ipts
needs to be done before suspend or else Intel ME goes into an inconsistent state.Environment
Surface Pro 7 i7 512GB
Linux daniel-tablet1 5.5.0-danielbind #4 SMP Thu Feb 13 10:55:25 EST 2020 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 19.10 Desktop
What is working
Scheduler part of suspend
Driver suspend without platform suspend
What doesn't work
Suspend from user interface
pm-suspend
However these can be reduced to the other cases.
Platform suspend
If system enters this state, shutdown freezes at "reboot" line and requires holding the power button to complete.
Further debugging
To debug the issue further, I ran the following commands after going through "platform suspend."
That worked fine. However, the following causes IPTS to load and causes a kernel oops:
None of {mei, mei_me, ipts} can be unloaded after.
Workaround
I found that if I do
rmmod ipts
before suspending, then all of the ways of suspending DO work.Analysis
After a couple more attempts, I found that the problem has a small chance of not occurring. I wonder if this is a race condition between
ipts
andmei_me
, and whether we need to make sureipts
suspends first.