Commit 5540d08
committed
feat: replace kernel file with udev for touchpad control
This commit replaces the kernel file-based touchpad control mechanism
with a udev-based solution. The main changes include:
1. Removed dependency on /proc/uos/touchpad_switch kernel file
2. Implemented udev rules to control touchpad via LIBINPUT_IGNORE_DEVICE
environment variable
3. Added udev monitor to track touchpad device changes in real-time
4. Enhanced system touchpad integration with proper DBus property
synchronization
5. Improved channel handling in transient units to prevent blocking
The new approach uses udev rules to set LIBINPUT_IGNORE_DEVICE=1 for
touchpad devices when disabled, which is more reliable and portable
across different kernel versions. The system now properly monitors
device changes and synchronizes touchpad state between user session and
system level.
Log: Touchpad control now uses udev rules instead of kernel files
Influence:
1. Test touchpad enable/disable functionality through settings
2. Verify touchpad state persists after reboot
3. Test touchpad hotplug detection (plug/unplug external touchpad)
4. Verify touchpad toggle keyboard shortcuts work correctly
5. Test touchpad behavior when mouse is connected/disconnected
6. Check system logs for any udev-related errors
feat: 使用 udev 替代内核文件控制触控板
本次提交将基于内核文件的触控板控制机制替换为基于 udev 的解决方案。主要变
更包括:
1. 移除对 /proc/uos/touchpad_switch 内核文件的依赖
2. 实现 udev 规则通过 LIBINPUT_IGNORE_DEVICE 环境变量控制触控板
3. 添加 udev 监视器实时跟踪触控板设备变化
4. 增强系统触控板集成,实现正确的 DBus 属性同步
5. 改进瞬态单元中的通道处理以防止阻塞
新方法使用 udev 规则在禁用触控板时设置 LIBINPUT_IGNORE_DEVICE=1,这种方
法更可靠且可在不同内核版本间移植。系统现在能正确监控设备变化并在用户会话
和系统级别之间同步触控板状态。
Log: 触控板控制现在使用 udev 规则替代内核文件
PMS: BUG-342407
Influence:
1. 通过设置测试触控板启用/禁用功能
2. 验证重启后触控板状态持久化
3. 测试触控板热插拔检测(插拔外接触控板)
4. 验证触控板切换键盘快捷键正常工作
5. 测试连接/断开鼠标时的触控板行为
6. 检查系统日志中是否有 udev 相关错误1 parent b209345 commit 5540d08
9 files changed
Lines changed: 514 additions & 186 deletions
File tree
- common/systemdunit
- inputdevices1
- system
- inputdevices1
- keyevent1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
35 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 120 | | |
127 | 121 | | |
128 | 122 | | |
129 | 123 | | |
130 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
131 | 159 | | |
| 160 | + | |
132 | 161 | | |
133 | 162 | | |
134 | 163 | | |
| |||
180 | 209 | | |
181 | 210 | | |
182 | 211 | | |
183 | | - | |
184 | | - | |
185 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
186 | 215 | | |
187 | 216 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 217 | + | |
200 | 218 | | |
201 | 219 | | |
202 | 220 | | |
203 | | - | |
204 | | - | |
205 | 221 | | |
206 | 222 | | |
207 | 223 | | |
| |||
213 | 229 | | |
214 | 230 | | |
215 | 231 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
| |||
238 | 250 | | |
239 | 251 | | |
240 | 252 | | |
241 | | - | |
242 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
243 | 260 | | |
244 | | - | |
245 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
246 | 265 | | |
| 266 | + | |
247 | 267 | | |
248 | 268 | | |
249 | 269 | | |
250 | 270 | | |
251 | 271 | | |
252 | 272 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | 273 | | |
257 | 274 | | |
258 | | - | |
| 275 | + | |
259 | 276 | | |
260 | 277 | | |
261 | 278 | | |
262 | 279 | | |
263 | 280 | | |
264 | 281 | | |
265 | | - | |
266 | 282 | | |
267 | 283 | | |
268 | 284 | | |
269 | | - | |
| 285 | + | |
270 | 286 | | |
271 | 287 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
277 | 291 | | |
278 | | - | |
| 292 | + | |
279 | 293 | | |
280 | 294 | | |
281 | 295 | | |
| |||
284 | 298 | | |
285 | 299 | | |
286 | 300 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 301 | + | |
294 | 302 | | |
295 | 303 | | |
296 | 304 | | |
| |||
544 | 552 | | |
545 | 553 | | |
546 | 554 | | |
547 | | - | |
| 555 | + | |
548 | 556 | | |
549 | 557 | | |
550 | 558 | | |
| |||
562 | 570 | | |
563 | 571 | | |
564 | 572 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | 573 | | |
573 | 574 | | |
574 | 575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments