Wiki source code of Pavé tactile inactif après mise en veille
Last modified by Mélodie on 2026/05/24 23:34
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
6.1 | 1 | = Fix Touchpad Not Responding After Resume = |
| |
1.1 | 2 | |
| |
6.1 | 3 | On some laptops equipped with a Synaptics RMI4 SMBus touchpad, the touchpad fails to respond after resuming from suspend. The kernel log displays the following messages: |
| |
1.1 | 4 | |
| 5 | {{code language="text"}} | ||
| 6 | rmi4_smbus: failed to get SMBus version number! | ||
| 7 | rmi4_smbus: Failed to resume device: -6 | ||
| 8 | {{/code}} | ||
| 9 | |||
| |
6.1 | 10 | == Identify the Affected Module == |
| |
1.1 | 11 | |
| |
6.1 | 12 | To verify that your hardware is affected, run the following in administrator mode: |
| |
1.1 | 13 | |
| 14 | {{code language="bash"}} | ||
| 15 | dmesg | grep -i touchpad | ||
| 16 | dmesg | grep -i rmi | ||
| 17 | {{/code}} | ||
| 18 | |||
| |
6.1 | 19 | If the second command outputs errors such as the following after resume: |
| |
1.1 | 20 | |
| 21 | {{code language="text"}} | ||
| 22 | rmi4_smbus 0-002c: failed to get SMBus version number! | ||
| 23 | rmi4_smbus 0-002c: Failed to resume device: -6 | ||
| 24 | {{/code}} | ||
| 25 | |||
| |
6.1 | 26 | the solution described here applies to your situation. |
| |
1.1 | 27 | |
| 28 | == Solution == | ||
| 29 | |||
| |
6.1 | 30 | Two files are provided here: a bash script that creates a SystemD service, and a desktop file to run it from the menus. You can install them in two ways: |
| |
1.1 | 31 | |
| |
6.1 | 32 | * System-wide for all users |
| 33 | * Locally for your user only | ||
| |
1.1 | 34 | |
| |
6.1 | 35 | Here is the content of the two files to create and install: |
| |
1.1 | 36 | |
| 37 | → **restart-touchpad-after-resume.sh** | ||
| 38 | |||
| 39 | {{code language="bash"}} | ||
| 40 | #!/bin/bash | ||
| 41 | # restart-touchpad-after-resume.sh | ||
| 42 | # | ||
| 43 | # Fix touchpad not responding after resume from suspend, | ||
| 44 | # for devices using the Synaptics RMI4 SMBus driver (rmi_smbus). | ||
| 45 | # Tested on HP EliteBook 840 G1 running AnduinOS. | ||
| 46 | # | ||
| 47 | # This script creates and enables a systemd service that reloads | ||
| 48 | # the rmi_smbus kernel module after each resume from suspend. | ||
| 49 | # | ||
| 50 | # Only runs on laptops, detected via DMI chassis type. | ||
| 51 | # Chassis types considered as laptops: 8 (Portable), 9 (Laptop), | ||
| 52 | # 10 (Notebook), 11 (Sub Notebook). | ||
| 53 | |||
| 54 | # Detect chassis type | ||
| 55 | CHASSIS=$(cat /sys/class/dmi/id/chassis_type) | ||
| 56 | |||
| 57 | # Only proceed if we are on a laptop | ||
| 58 | if [[ "$CHASSIS" =~ ^(8|9|10|11)$ ]]; then | ||
| 59 | |||
| 60 | # Create the systemd service file | ||
| 61 | cat > /etc/systemd/system/touchpad-resume.service << EOF | ||
| 62 | [Unit] | ||
| 63 | Description=Restart touchpad after resume | ||
| 64 | After=suspend.target | ||
| 65 | |||
| 66 | [Service] | ||
| 67 | Type=oneshot | ||
| 68 | # Reload the rmi_smbus module to restore touchpad functionality | ||
| 69 | ExecStart=/bin/sh -c "rmmod rmi_smbus && modprobe rmi_smbus" | ||
| 70 | |||
| 71 | [Install] | ||
| 72 | WantedBy=suspend.target | ||
| 73 | EOF | ||
| 74 | |||
| 75 | # Enable the service | ||
| 76 | systemctl enable touchpad-resume.service | ||
| 77 | echo "touchpad-resume.service installed and enabled." | ||
| 78 | |||
| 79 | else | ||
| 80 | # Not a laptop, nothing to do | ||
| 81 | echo "Not a laptop (chassis type: $CHASSIS), skipping touchpad fix." | ||
| 82 | exit 0 | ||
| 83 | fi | ||
| 84 | {{/code}} | ||
| 85 | |||
| 86 | → **restart-touchpad-after-resume.desktop** | ||
| 87 | |||
| |
4.1 | 88 | {{code language="none"}} |
| |
1.1 | 89 | [Desktop Entry] |
| 90 | Type=Application | ||
| 91 | Name=Fix Touchpad After Resume | ||
| |
6.1 | 92 | Name[en]=Fix Touchpad After Resume |
| |
1.1 | 93 | Name[es]=Reparar el touchpad después de la suspensión |
| 94 | Name[de]=Touchpad nach Ruhezustand reparieren | ||
| 95 | Name[it]=Ripristina il touchpad dopo la sospensione | ||
| 96 | Name[zh_CN]=休眠后修复触控板 | ||
| 97 | Name[zh_TW]=休眠後修復觸控板 | ||
| 98 | Name[pt]=Reparar o touchpad após a suspensão | ||
| 99 | Name[pt_BR]=Reparar o touchpad após a suspensão | ||
| 100 | Name[nl]=Touchpad herstellen na slaapstand | ||
| 101 | Name[pl]=Napraw touchpad po uśpieniu | ||
| 102 | Comment=Fix if touchpad stops working after suspend or hibernate | ||
| |
6.1 | 103 | Comment[en]=Fix if touchpad stops working after suspend or hibernate |
| |
1.1 | 104 | Comment[es]=Reparar si el touchpad deja de funcionar después de la suspensión o hibernación |
| 105 | Comment[de]=Reparieren, wenn das Touchpad nach dem Ruhezustand nicht mehr funktioniert | ||
| 106 | Comment[it]=Ripristina se il touchpad smette di funzionare dopo la sospensione o l'ibernazione | ||
| 107 | Comment[zh_CN]=如果触控板在休眠后停止工作,请修复 | ||
| 108 | Comment[zh_TW]=如果觸控板在休眠後停止工作,請修復 | ||
| 109 | Comment[pt]=Reparar se o touchpad parar de funcionar após a suspensão ou hibernação | ||
| 110 | Comment[pt_BR]=Reparar se o touchpad parar de funcionar após a suspensão ou hibernação | ||
| 111 | Comment[nl]=Herstel als het touchpad niet meer werkt na de slaapstand of hibernatie | ||
| 112 | Comment[pl]=Napraw, jeśli touchpad przestaje działać po uśpieniu lub hibernacji | ||
| 113 | Exec=pkexec restart-touchpad-after-resume.sh | ||
| 114 | Terminal=false | ||
| 115 | Icon=input-touchpad | ||
| 116 | Categories=System; | ||
| 117 | {{/code}} | ||
| 118 | |||
| |
6.1 | 119 | === 1. System-wide Installation (Administrator Privileges Required) === |
| |
1.1 | 120 | |
| |
6.1 | 121 | All following commands must be run with administrator privileges. |
| |
1.1 | 122 | |
| |
6.1 | 123 | Copy the script and make it executable: |
| |
1.1 | 124 | |
| 125 | {{code language="bash"}} | ||
| 126 | cp restart-touchpad-after-resume.sh /usr/local/bin/ | ||
| 127 | chmod +x /usr/local/bin/restart-touchpad-after-resume.sh | ||
| 128 | {{/code}} | ||
| 129 | |||
| |
6.1 | 130 | Copy the desktop file: |
| |
1.1 | 131 | |
| 132 | {{code language="bash"}} | ||
| 133 | cp restart-touchpad-after-resume.desktop /usr/share/applications/ | ||
| 134 | {{/code}} | ||
| 135 | |||
| |
6.1 | 136 | === 2. User Directory Installation (No Administrator Privileges Required) === |
| |
1.1 | 137 | |
| |
6.1 | 138 | Make sure //~~/.local/bin// exists. Copy the script and make it executable: |
| |
1.1 | 139 | |
| 140 | {{code language="bash"}} | ||
| 141 | cp restart-touchpad-after-resume.sh $HOME/.local/bin/ | ||
| 142 | chmod +x $HOME/.local/bin/restart-touchpad-after-resume.sh | ||
| 143 | {{/code}} | ||
| 144 | |||
| |
6.1 | 145 | To append this directory to your PATH, add the following to the end of your //~~/.profile//: |
| |
1.1 | 146 | |
| 147 | {{code language="bash"}} | ||
| |
2.1 | 148 | # set PATH so it includes user's private bin if it exists |
| 149 | if [ -d "$HOME/.local/bin" ] ; then | ||
| 150 | PATH="$HOME/.local/bin:$PATH" | ||
| 151 | fi | ||
| |
1.1 | 152 | {{/code}} |
| 153 | |||
| |
6.1 | 154 | Copy the desktop file: |
| |
1.1 | 155 | |
| 156 | {{code language="bash"}} | ||
| |
2.1 | 157 | cp restart-touchpad-after-resume.desktop $HOME/.local/share/applications/ |
| |
1.1 | 158 | {{/code}} |
| 159 | |||
| |
6.1 | 160 | === 3. Enable and Start the Service === |
| |
2.2 | 161 | |
| |
6.1 | 162 | Once installed, run the script from the System menu as soon as you need it to enable the service. |
| |
1.1 | 163 | |
| 164 | == Notes == | ||
| 165 | |||
| |
6.1 | 166 | * The module is named **rmi_smbus** with an underscore, not **rmi4_smbus** as shown in the kernel logs. |
| 167 | * This issue is common on HP, Lenovo, and Dell laptops from approximately the 2013-2016 generations. | ||
| 168 | * Tested on: HP EliteBook 840 G1 running AnduinOS. |