[SOLVED] Random freezes when resuming from suspend

Try this after a suspend failurejournalctl --boot=-1

If kernel 4.14 is working for you, it might be a bug in the newer kernels…

If you dont know/ dont see where the settings I described, chances are they don’t exist and are not a solution to the problem.

Thanks, I’ll inspect the outcome of that command if I have a freeze when resuming. For the moment I remain with kernel 4.14.

Kernel 4.14 seems to have no problems. I’m going to use it until I can, hoping that the bug gets fixed in newer kernels.

For your information, this is my hardware:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 02)
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Network controller: Intel Corporation Wireless 3165 (rev 79)

Same issue here on a Lenovo X250, randomly the system wouldn’t wake up from suspend. Sometimes it freezes if I close the lid on power, even though nothing should happen when plugged in. Running kernel 4.20 now, I’ll try a few other kernels.
Get a few ACPI errors on boot but nothing that should cause this.

“systemctl suspend” seems to work if I wake up the machine right afterwards. Don’t know if it’s the same after a few hours.

However, I’m not surprised. This is probably the 5th or 6th laptop running Arch in the last 10 years and suspend never worked out-of-the-box/without issues. I’ll test and report.

Update: Kernel 4.19 suspends fine from terminal and wakes up. Doesn’t suspend on lid-close though. Also, Fingerprint is not working anymore after wakeup.
Update-2: Nevermind, same ■■■■ different kernel. Wouldn’t wake up after suspend for a few hours. Nothing in the logs.

For me the kernel 414 works fine. With kernel 419 these random freezes keep happening (I keep testing it from time to time). Don’t know what’s the cause. It’s not a big problem until I can use kernel 414, but in one year or so it will stop being maintained, and by then I hope there’s some new kernel that works. Otherwise it won’t be nice.

This service may solve your issue:

Thanks, I’m giving it a try right now and will report how it goes.

@tbg, I applied your fix and used kernel 419 for a while. After 3-5 successful resumes from suspending, I get a freeze, like before. So, it seems, forcing a sleep & wake up of all USB devices does not solve the problem.

Did you run systemctl status on your service?

You should post the output so I can see if the service is running properly.

There are other ways of shutting down problematic devices. If you wish to pursue a solution please post:

usb-devices 

The commands below will list how the bus paths relate to different vendor/product ID pairs.

Paste these commands into the terminal.

for X in /sys/bus/usb/devices/*; do 
    echo "$X"
    cat "$X/idVendor" 2>/dev/null 
    cat "$X/idProduct" 2>/dev/null
    echo
done

Then hit enter, and post this output as well.

This is the output of my systemctl status:

● usb-restart.service - Disable, then restart USB devices
   Loaded: loaded (/etc/systemd/system/usb-restart.service; enabled; vendor pre>
   Active: inactive (dead)

This is lsusb:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 0bda:0177 Realtek Semiconductor Corp. 
Bus 001 Device 008: ID 2386:3111  
Bus 001 Device 007: ID 8087:0a2a Intel Corp. 
Bus 001 Device 006: ID 0bda:58c2 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And this is the last command:

/sys/bus/usb/devices/1-0:1.0

/sys/bus/usb/devices/1-5
0bda
58c2

/sys/bus/usb/devices/1-5:1.0

/sys/bus/usb/devices/1-5:1.1

/sys/bus/usb/devices/1-6
8087
0a2a

/sys/bus/usb/devices/1-6:1.0

/sys/bus/usb/devices/1-6:1.1

/sys/bus/usb/devices/1-7
2386
3111

/sys/bus/usb/devices/1-7:1.0

/sys/bus/usb/devices/1-8
0bda
0177

/sys/bus/usb/devices/1-8:1.0

/sys/bus/usb/devices/2-0:1.0

/sys/bus/usb/devices/usb1
1d6b
0002

/sys/bus/usb/devices/usb2
1d6b
0003

I meant the unit status, such as:

systemctl status usb-restart.service

I fixed the output of the first command in my previous post.

"usb-devices " is a command.

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=12
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=04.14
S:  Manufacturer=Linux 4.14.102-1-MANJARO xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  6 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=58c2 Rev=62.02
S:  Manufacturer=CN0JCXG0724876CKA1VYA00
S:  Product=Integrated_Webcam_HD
S:  SerialNumber=200901010001
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#=0x1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#=  7 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=8087 ProdID=0a2a Rev=00.01
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#=0x1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

T:  Bus=01 Lev=01 Prnt=01 Port=06 Cnt=03 Dev#=  8 Spd=12  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2386 ProdID=3111 Rev=00.00
S:  Manufacturer=Raydium Corporation
S:  Product=Raydium Touch System
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=96mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=0177 Rev=77.11
S:  Manufacturer=Generic
S:  Product=USB2.0-CRW
S:  SerialNumber=20121112761000000
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=ums-realtek

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 6
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=04.14
S:  Manufacturer=Linux 4.14.102-1-MANJARO xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

See what happens when you run this command:

sudo rmmod usbhid && sleep 20 && sudo modprobe usbhid  

Test your kb and trackpad operation after running that command (if successful).

Also, please post:

lsmod

Should it be “modprobe” instead of “modprbe”?

Sorry that was a typo. I found out that module was associated to your touchsreen driver. It could also be linked to your kb as many of these type devices have an “hid” suffix.

Please post:

udevadm info --export-db | grep -i keyboard
lsmod
E: NAME="AT Translated Set 2 keyboard"
E: ID_INPUT_KEYBOARD=1
E: KEYBOARD_KEY_81=playpause
E: KEYBOARD_KEY_82=stopcd
E: KEYBOARD_KEY_83=previoussong
E: KEYBOARD_KEY_84=nextsong
E: KEYBOARD_KEY_85=brightnessdown
E: KEYBOARD_KEY_86=brightnessup
E: KEYBOARD_KEY_87=battery
E: KEYBOARD_KEY_88=unknown
E: KEYBOARD_KEY_89=ejectclosecd
E: KEYBOARD_KEY_8a=suspend
E: KEYBOARD_KEY_8b=switchvideomode
E: KEYBOARD_KEY_8c=unknown
E: KEYBOARD_KEY_8f=switchvideomode
E: KEYBOARD_KEY_90=previoussong
E: KEYBOARD_KEY_91=prog1
E: KEYBOARD_KEY_92=media
E: KEYBOARD_KEY_93=unknown
E: KEYBOARD_KEY_95=camera
E: KEYBOARD_KEY_97=email
E: KEYBOARD_KEY_98=f21
E: KEYBOARD_KEY_99=nextsong
E: KEYBOARD_KEY_9a=setup
E: KEYBOARD_KEY_9b=switchvideomode
E: KEYBOARD_KEY_9e=f21
E: KEYBOARD_KEY_a2=playpause
E: KEYBOARD_KEY_a4=stopcd
E: KEYBOARD_KEY_d8=screenlock
E: KEYBOARD_KEY_d9=f21
E: KEYBOARD_KEY_ed=media
E: ID_INPUT_KEYBOARD=1

Module                  Size  Used by
btrfs                1339392  0
zstd_compress         180224  1 btrfs
zstd_decompress        81920  1 btrfs
xxhash                 16384  2 zstd_compress,zstd_decompress
xor                    24576  1 btrfs
raid6_pq              122880  1 btrfs
ufs                    86016  0
hfsplus               118784  0
hfs                    69632  0
minix                  40960  0
ntfs                  225280  0
msdos                  20480  0
jfs                   208896  0
xfs                  1445888  0
libcrc32c              16384  1 xfs
rfcomm                 86016  16
ccm                    20480  9
fuse                  118784  3
arc4                   16384  2
iwlmvm                344064  0
snd_hda_codec_hdmi     57344  1
mac80211              905216  1 iwlmvm
iwlwifi               311296  1 iwlmvm
snd_hda_codec_realtek   110592  1
snd_hda_codec_generic    86016  1 snd_hda_codec_realtek
bnep                   24576  2
cfg80211              733184  3 iwlmvm,iwlwifi,mac80211
snd_soc_skl            94208  0
snd_soc_skl_ipc        73728  1 snd_soc_skl
snd_soc_sst_ipc        16384  1 snd_soc_skl_ipc
snd_soc_sst_dsp        36864  1 snd_soc_skl_ipc
snd_hda_ext_core       28672  1 snd_soc_skl
snd_soc_sst_match      16384  1 snd_soc_skl
snd_soc_core          266240  1 snd_soc_skl
iTCO_wdt               16384  0
snd_compress           24576  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
iTCO_vendor_support    16384  1 iTCO_wdt
hid_sensor_rotation    16384  0
hid_sensor_magn_3d     16384  0
hid_sensor_incl_3d     16384  0
hid_sensor_gyro_3d     16384  0
hid_sensor_accel_3d    16384  0
hid_sensor_trigger     16384  11 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
industrialio_triggered_buffer    16384  5 hid_sensor_gyro_3d,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
kfifo_buf              16384  1 industrialio_triggered_buffer
hid_sensor_iio_common    16384  6 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
nls_iso8859_1          16384  1
industrialio           81920  8 industrialio_triggered_buffer,hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_incl_3d,kfifo_buf,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
nls_cp437              20480  1
vfat                   20480  1
fat                    81920  2 msdos,vfat
hid_sensor_hub         20480  7 hid_sensor_gyro_3d,hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_incl_3d,hid_sensor_accel_3d,hid_sensor_magn_3d,hid_sensor_rotation
idma64                 20480  0
intel_ishtp_hid        24576  0
msr                    16384  0
uvcvideo              102400  0
btusb                  53248  0
videobuf2_vmalloc      16384  1 uvcvideo
btrtl                  16384  1 btusb
videobuf2_memops       16384  1 videobuf2_vmalloc
btbcm                  16384  1 btusb
videobuf2_v4l2         28672  1 uvcvideo
btintel                16384  1 btusb
videobuf2_core         45056  2 videobuf2_v4l2,uvcvideo
videodev              208896  3 videobuf2_core,videobuf2_v4l2,uvcvideo
bluetooth             634880  41 btrtl,btintel,btbcm,bnep,btusb,rfcomm
joydev                 24576  0
i915                 1937408  8
media                  45056  2 videodev,uvcvideo
dell_wmi               16384  0
mousedev               24576  0
wmi_bmof               16384  0
ecdh_generic           24576  1 bluetooth
snd_hda_intel          45056  3
intel_rapl             24576  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
coretemp               16384  0
snd_hda_codec         151552  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
dell_laptop            24576  1
dell_smbios            16384  2 dell_wmi,dell_laptop
i2c_algo_bit           16384  1 i915
kvm_intel             233472  0
rfkill                 28672  7 bluetooth,dell_laptop,cfg80211
dcdbas                 16384  1 dell_smbios
drm_kms_helper        196608  1 i915
dell_smm_hwmon         16384  0
snd_hda_core           90112  7 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_skl
snd_hwdep              16384  1 snd_hda_codec
kvm                   712704  1 kvm_intel
snd_pcm               118784  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
snd_timer              36864  1 snd_pcm
drm                   434176  6 drm_kms_helper,i915
evdev                  24576  18
input_leds             16384  0
led_class              16384  3 input_leds,iwlmvm,dell_laptop
mac_hid                16384  0
psmouse               172032  0
irqbypass              16384  1 kvm
intel_cstate           16384  0
intel_rapl_perf        16384  0
snd                    94208  16 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm
i2c_i801               28672  0
pcspkr                 16384  0
soundcore              16384  1 snd
shpchp                 40960  0
intel_gtt              24576  1 i915
intel_lpss_pci         20480  0
agpgart                49152  2 intel_gtt,drm
processor_thermal_device    16384  0
mei_me                 45056  0
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
intel_soc_dts_iosf     16384  1 processor_thermal_device
sysimgblt              16384  1 drm_kms_helper
mei                   114688  1 mei_me
fb_sys_fops            16384  1 drm_kms_helper
intel_pch_thermal      16384  0
intel_lpss             16384  1 intel_lpss_pci
intel_ish_ipc          20480  0
wmi                    28672  2 dell_wmi,wmi_bmof
thermal                20480  0
intel_ishtp            45056  2 intel_ishtp_hid,intel_ish_ipc
i2c_hid                24576  0
battery                20480  0
soc_button_array       16384  0
int3403_thermal        16384  0
intel_vbtn             16384  0
tpm_crb                16384  0
video                  45056  3 dell_wmi,dell_laptop,i915
tpm_tis                16384  0
intel_hid              16384  0
tpm_tis_core           20480  1 tpm_tis
pinctrl_sunrisepoint    28672  0
sparse_keymap          16384  3 intel_hid,dell_wmi,intel_vbtn
int3402_thermal        16384  0
int3400_thermal        16384  0
pinctrl_intel          24576  1 pinctrl_sunrisepoint
tpm                    65536  3 tpm_tis,tpm_crb,tpm_tis_core
int340x_thermal_zone    16384  3 int3403_thermal,int3402_thermal,processor_thermal_device
acpi_thermal_rel       16384  1 int3400_thermal
acpi_pad               16384  0
ac                     16384  0
pcc_cpufreq            16384  0
button                 16384  0
sch_fq_codel           20480  5
uinput                 20480  0
pci_stub               16384  1
vboxpci                28672  0
vboxnetflt             32768  0
vboxnetadp             28672  0
vboxdrv               499712  3 vboxpci,vboxnetadp,vboxnetflt
crypto_user            16384  0
ip_tables              28672  0
x_tables               45056  1 ip_tables
ext4                  720896  1
crc32c_generic         16384  0
crc16                  16384  2 bluetooth,ext4
mbcache                16384  1 ext4
jbd2                  118784  1 ext4
fscrypto               32768  1 ext4
algif_skcipher         16384  0
af_alg                 28672  1 algif_skcipher
ums_realtek            20480  0
uas                    28672  0
usb_storage            73728  2 uas,ums_realtek
hid_multitouch         24576  0
hid                   131072  4 i2c_hid,hid_multitouch,hid_sensor_hub,intel_ishtp_hid
dm_crypt               40960  2
dm_mod                143360  5 dm_crypt
sd_mod                 61440  4
crct10dif_pclmul       16384  0
crc32_pclmul           16384  0
crc32c_intel           24576  4
ghash_clmulni_intel    16384  0
pcbc                   16384  0
serio_raw              16384  0
atkbd                  32768  0
libps2                 16384  2 atkbd,psmouse
ahci                   40960  3
libahci                40960  1 ahci
aesni_intel           188416  10
aes_x86_64             20480  1 aesni_intel
crypto_simd            16384  1 aesni_intel
xhci_pci               16384  0
glue_helper            16384  1 aesni_intel
libata                278528  2 libahci,ahci
cryptd                 28672  5 crypto_simd,ghash_clmulni_intel,aesni_intel
xhci_hcd              245760  1 xhci_pci
scsi_mod              212992  4 sd_mod,usb_storage,uas,libata
usbcore               286720  7 xhci_hcd,usb_storage,uvcvideo,btusb,xhci_pci,uas,ums_realtek
usb_common             16384  1 usbcore
i8042                  32768  1 dell_laptop
serio                  28672  6 serio_raw,atkbd,psmouse,i8042

Run:

sudo rmmod psmouse && sleep 20 && sudo modprobe psmouse  

Test your trackpad operation after running that command. Post any errors and the effect of the command.

Run:

sudo rmmod i2c_hid && sleep 20 && sudo modprobe i2c_hid  

Test your trackpad operation after running that command. Post any errors and the effect of the command.

Both commands do not produce errors. The trackpad works as expected after both.

Forum kindly sponsored by Bytemark