Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal keyboard and touchpad stop working after a number of suspends #7710

Open
resulin opened this issue Aug 24, 2022 · 9 comments
Open
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: power management hardware support needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@resulin
Copy link

resulin commented Aug 24, 2022

How to file a helpful issue

Qubes OS release

4.1.1

Brief summary

Internal keyboard and touchpad stop working after a number of suspends. After which suspend itself stops working (and the laptop doesn't suspend but keeps being awake, typing on an external keyboard or mouse shows the lock screen). I'd appreciate any help in providing relevant logs/debug files. The issue only appeared in the last 2-3 weeks.

Steps to reproduce

Suspend Qubes quiet a couple of times.

Expected behavior

Internal keyboard and touchpad working.

Actual behavior

Internal keyboard and touchpad not working.

@resulin resulin added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Aug 24, 2022
@andrewdavidwong andrewdavidwong added C: power management hardware support needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Aug 25, 2022
@andrewdavidwong andrewdavidwong added this to the Release 4.1 updates milestone Aug 25, 2022
@resulin
Copy link
Author

resulin commented Nov 15, 2022

Seems to have stopped since the last kernel update, will re-open if I observe this behavior again.

@resulin resulin closed this as completed Nov 15, 2022
@andrewdavidwong andrewdavidwong removed the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Nov 15, 2022
@resulin
Copy link
Author

resulin commented Nov 19, 2022

Issue happens again unfortunately, here's the journalctl logs after I resumed from suspend:

Nov 19 07:01:56 dom0 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-suspend comm="systemd" exe="/usr/lib/systemd/>
Nov 19 07:01:56 dom0 systemd[1]: Stopped Qubes suspend hooks.
Nov 19 07:01:56 dom0 systemd[1]: qubes-suspend.service: Succeeded.
Nov 19 07:01:56 dom0 52qubes-pause-vms[756863]: 0
Nov 19 07:01:56 dom0 qrexec-policy-daemon[4489]: qrexec: whonix.NewStatus+status: anon-s -> sys-whonix: allowed to sys-whonix
Nov 19 07:01:51 dom0 qrexec-policy-daemon[4489]: qrexec: whonix.SdwdateStatus+: sys-whonix -> anon-s: allowed to anon-s
Nov 19 07:01:51 dom0 qrexec-policy-daemon[4489]: qrexec: whonix.SdwdateStatus+: sys-whonix -> disp4281: allowed to disp4281
Nov 19 07:01:51 dom0 kernel: pciback 0000:00:14.0: xen_pciback: cannot enable memory-write-invalidate (-22)
Nov 19 07:01:51 dom0 kernel: psmouse: probe of serio3 failed with error -1
Nov 19 07:01:51 dom0 kernel: rmi4_physical rmi4-00: rmi_driver_set_irq_bits: Failed to change enabled interrupts!
Nov 19 07:01:51 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:51 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:51 dom0 kernel: rmi4_physical rmi4-00: rmi_driver_clear_irq_bits: Failed to change enabled interrupts!
Nov 19 07:01:51 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:50 dom0 systemd[1]: Stopping Qubes suspend hooks...
Nov 19 07:01:50 dom0 systemd[1]: Stopped target Suspend.
Nov 19 07:01:50 dom0 systemd-logind[1822]: Operation 'sleep' finished.
Nov 19 07:01:50 dom0 kernel: audit: type=1131 audit(1668848510.910:3704): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm=>
Nov 19 07:01:50 dom0 kernel: audit: type=1130 audit(1668848510.910:3703): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm=>
Nov 19 07:01:50 dom0 systemd[1]: Reached target Suspend.
Nov 19 07:01:50 dom0 systemd[1]: Stopped target Sleep.
Nov 19 07:01:50 dom0 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/system>
Nov 19 07:01:50 dom0 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/syste>
Nov 19 07:01:50 dom0 systemd[1]: Finished Suspend.
Nov 19 07:01:50 dom0 systemd[1]: systemd-suspend.service: Succeeded.
Nov 19 07:01:50 dom0 kernel: PM: suspend exit
Nov 19 07:01:50 dom0 systemd-sleep[756829]: System resumed.
Nov 19 07:01:50 dom0 kernel: rmi4_physical rmi4-00: Failed to read irqs, code=-110
Nov 19 07:01:50 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:50 dom0 kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
Nov 19 07:01:50 dom0 kernel: rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-110).
Nov 19 07:01:50 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:50 dom0 systemd-logind[1822]: Lid opened.
Nov 19 07:01:50 dom0 kernel: Restarting tasks ... done.
Nov 19 07:01:50 dom0 kernel: OOM killer enabled.
Nov 19 07:01:50 dom0 kernel: PM: resume devices took 0.950 seconds
Nov 19 07:01:50 dom0 kernel: rmi4_smbus 6-002c: Failed to resume device: -110
Nov 19 07:01:50 dom0 kernel: rmi4_physical rmi4-00: Failed to suspend functions: -110
Nov 19 07:01:50 dom0 kernel: rmi4_f01 rmi4-00.fn01: Resume failed with code -110.
Nov 19 07:01:50 dom0 kernel: rmi4_f01 rmi4-00.fn01: Failed to restore normal operation: -110.
Nov 19 07:01:50 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:50 dom0 kernel: rmi4_physical rmi4-00: rmi_driver_reset_handler: Failed to read current IRQ mask.
Nov 19 07:01:50 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:50 dom0 kernel: rmi4_smbus 6-002c: failed to get SMBus version number!
Nov 19 07:01:50 dom0 kernel: i801_smbus 0000:00:1f.4: Transaction timeout
Nov 19 07:01:50 dom0 kernel: psmouse serio1: Failed to deactivate mouse on isa0060/serio1: -5
Nov 19 07:01:50 dom0 kernel: nvme nvme0: 4/0/0 default/read/poll queues
Nov 19 07:01:50 dom0 kernel: nvme nvme0: Shutdown timeout set to 8 seconds
Nov 19 07:01:50 dom0 kernel: i915 0000:00:02.0: [drm] [ENCODER:118:DDI C/PHY C] is disabled/in DSI mode with an ungated DDI clock, gate it
Nov 19 07:01:50 dom0 kernel: i915 0000:00:02.0: [drm] [ENCODER:102:DDI B/PHY B] is disabled/in DSI mode with an ungated DDI clock, gate it
Nov 19 07:01:50 dom0 kernel: i915 0000:00:02.0: [drm] [ENCODER:94:DDI A/PHY A] is disabled/in DSI mode with an ungated DDI clock, gate it
Nov 19 07:01:50 dom0 kernel: ACPI: EC: event unblocked
Nov 19 07:01:50 dom0 kernel: pcieport 0000:00:1c.6: Intel SPT PCH root port ACS workaround enabled
Nov 19 07:01:50 dom0 kernel: pcieport 0000:00:1d.2: Intel SPT PCH root port ACS workaround enabled
Nov 19 07:01:50 dom0 kernel: pcieport 0000:00:1d.0: Intel SPT PCH root port ACS workaround enabled
Nov 19 07:01:50 dom0 kernel: ACPI: EC: interrupt unblocked
Nov 19 07:01:50 dom0 kernel: ACPI: PM: Waking up from system sleep state S3
Nov 19 07:01:50 dom0 kernel: CPU3 is up
Nov 19 07:01:50 dom0 kernel: ACPI: \_PR_.PR03: Found 3 idle states
Nov 19 07:01:50 dom0 kernel: cpu 3 spinlock event irq 143
Nov 19 07:01:50 dom0 kernel: installing Xen timer for CPU 3
Nov 19 07:01:50 dom0 kernel: CPU2 is up
Nov 19 07:01:50 dom0 kernel: ACPI: \_PR_.PR02: Found 3 idle states
Nov 19 07:01:50 dom0 kernel: cpu 2 spinlock event irq 137
Nov 19 07:01:50 dom0 kernel: installing Xen timer for CPU 2
Nov 19 07:01:50 dom0 kernel: CPU1 is up
Nov 19 07:01:50 dom0 kernel: ACPI: \_PR_.PR01: Found 3 idle states
Nov 19 07:01:50 dom0 kernel: cpu 1 spinlock event irq 131
Nov 19 07:01:50 dom0 kernel: installing Xen timer for CPU 1
Nov 19 07:01:50 dom0 kernel: Enabling non-boot CPUs ...
Nov 19 07:01:50 dom0 kernel: xen_acpi_processor: Uploading Xen processor PM info
Nov 19 07:01:50 dom0 kernel: ACPI: PM: Restoring platform NVS memory
Nov 19 07:01:50 dom0 kernel: ACPI: EC: EC started
Nov 19 07:01:50 dom0 kernel: ACPI: PM: Low-level resume complete
Nov 19 07:01:50 dom0 kernel: smpboot: CPU 3 is now offline
Nov 19 07:01:50 dom0 kernel: smpboot: CPU 2 is now offline
Nov 19 07:01:50 dom0 kernel: smpboot: CPU 1 is now offline
Nov 19 07:01:50 dom0 kernel: Disabling non-boot CPUs ...
Nov 19 07:01:50 dom0 kernel: ACPI: PM: Saving platform NVS memory
Nov 19 07:01:50 dom0 kernel: ACPI: EC: EC stopped
Nov 19 07:01:50 dom0 kernel: ACPI: EC: event blocked
Nov 19 07:01:50 dom0 kernel: ACPI: PM: Preparing to enter system sleep state S3
Nov 19 07:01:50 dom0 kernel: ACPI: EC: interrupt blocked
Nov 19 07:01:50 dom0 kernel: PM: suspend devices took 0.518 seconds
Nov 19 07:01:50 dom0 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Nov 19 07:01:50 dom0 kernel: Freezing remaining freezable tasks ... (elapsed 0.102 seconds) done.
Nov 19 07:01:50 dom0 kernel: OOM killer disabled.
Nov 19 07:01:50 dom0 kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Nov 19 07:01:50 dom0 kernel: Filesystems sync: 0.013 seconds

@resulin resulin reopened this Nov 19, 2022
@andrewdavidwong andrewdavidwong added the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Nov 19, 2022
@resulin
Copy link
Author

resulin commented Dec 9, 2022

Problem still happens with the latest 5.15.78-1 kernel and Xen 4.14.5-14.

@resulin
Copy link
Author

resulin commented Jan 27, 2023

I still encounter this issue with dom0 kernel 5.15.81-1.

@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
@jamke
Copy link

jamke commented Aug 22, 2023

If something like touchpad is broken after suspend+resume, the "internet" advises to reload some kernel module and it helps in most cases. In dom0 or sys-usb if your input device is manager though sys-usb.

If it does help you, you can add this reload command to some script that automatically runs on resume and call it kind of solved.

You can investigate what module is suspected with lsmod, xinput list and other things. Or try everything one by one.

I expect you to have working external keyboard and be prepared that you may need to hard turn off and on again if access from this keyboard will be also broken due to module reload (reboot will fix it if it happens).

Reloading module is done like that:
sudo rmmod MODULE && sudo modprobe MODULE

MODULE can be something like: rmi_smbus, rmi4_smbus, i801_smbus, i2c_i801, psmouse, i2c_hid and others.

@marmarek
Copy link
Member

In some cases it's enough to just switch to the text console and back: ctrl+alt+F2, and then ctrl+alt+F1. It causes input devices to be re-opened and may be enough to fix the issue.

@jamke
Copy link

jamke commented Aug 22, 2023

In some cases it's enough to just switch to the text console and back: ctrl+alt+F2, and then ctrl+alt+F1

Yes, it also helps some people.

Another advice: to disable and enable back the device using xinput disable ... and xinput enable ....

None of that helped me on modern Thinkpad T16, though. So I am still investigating.

@resulin
Copy link
Author

resulin commented Sep 9, 2023

I can report that I still encountered this issue on kernel 6.1.42-1.fc32 and Xen 4.14.6.

In some cases it's enough to just switch to the text console and back: ctrl+alt+F2, and then ctrl+alt+F1. It causes input devices to be re-opened and may be enough to fix the issue.

I tried this at first but unfortunately this didn't fix the issue.

Reloading module is done like that: sudo rmmod MODULE && sudo modprobe MODULE

MODULE can be something like: rmi_smbus, rmi4_smbus, i801_smbus, i2c_i801, psmouse, i2c_hid and others.

Running sudo rmmod rmi_smbus && sudo modprobe rmi_smbus crashed Qubes OS entirely and led to a restart.

I can only test the other suggestions once I encounter the issue again. Thanks for all the tips so far!

@resulin
Copy link
Author

resulin commented Nov 8, 2024

Update: The issue is still unresolved as of Qubes OS 4.2.3, kernel 6.6.54-1.

@andrewdavidwong andrewdavidwong added the affects-4.2 This issue affects Qubes OS 4.2. label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. C: power management hardware support needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants