-
Notifications
You must be signed in to change notification settings - Fork 95
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
Log input devices #3417
Log input devices #3417
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3417 +/- ##
==========================================
- Coverage 77.31% 77.23% -0.09%
==========================================
Files 1068 1071 +3
Lines 68284 68460 +176
==========================================
+ Hits 52797 52878 +81
- Misses 15487 15582 +95 ☔ View full report in Codecov by Sentry. |
41b9d3c
to
d45e29a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nits, but feel free to merge if you don't think worth it.
While here, should we unify the logging categories?
#define MIR_LOG_COMPONENT "Input" |
Could be input-hub
instead?
<information> evdev-input: Opened device: /dev/input/event9 [0000:0006] Video Bus
<information> Input: Device configuration: Lid Switch, capabilities={}
<information> evdev-input: Opened device: /dev/input/event0 [0000:0005] Lid Switch
<information> Input: Device configuration: Power Button, capabilities={keyboard}
<information> evdev-input: Opened device: /dev/input/event1 [0000:0001] Power Button
# …
vs.
<information> evdev-input: Opened device: /dev/input/event9 [0000:0006] Video Bus
<information> input-hub: Device configuration: Lid Switch, capabilities={}
<information> evdev-input: Opened device: /dev/input/event0 [0000:0005] Lid Switch
<information> input-hub: Device configuration: Power Button, capabilities={keyboard}
<information> evdev-input: Opened device: /dev/input/event1 [0000:0001] Power Button
# …
Looks like an opportunity to introduce std::formatter<>
s for the different types?
Oh! Yeah, I still have to get used to having this stuff available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we align the command line options with what's logged?
--mouse-acceleration
vs. capabilities={pointer}…, pointer_config={acceleration=…}
Underscores vs. hyphens, too?
Co-authored-by: Michał Sawicz <michal.sawicz@canonical.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still no…
$ ubuntu-frame --mouse-acceleration=none --mouse-cursor-acceleration-bias=1.00 2>&1 | grep -e input-hub -e evdev-input
[2024-06-19 08:09:21.795207] <information> mirserver: Selected input driver: mir:evdev-input (version: 2.18.0)
[2024-06-19 08:09:25.329572] <information> evdev-input: Opened device: /dev/input/event3 [0000:0001] Power Button
[2024-06-19 08:09:25.351274] <information> evdev-input: Opened device: /dev/input/event7 [0000:0006] Video Bus
[2024-06-19 08:09:25.373068] <information> evdev-input: Opened device: /dev/input/event1 [0000:0001] Power Button
[2024-06-19 08:09:25.373404] <information> evdev-input: Opened device: /dev/input/event0 [0000:0005] Lid Switch
[2024-06-19 08:09:25.395651] <information> evdev-input: Opened device: /dev/input/event2 [0000:0003] Sleep Button
[2024-06-19 08:09:25.417728] <information> evdev-input: Opened device: /dev/input/event5 [05ac:024a] Apple Inc. Apple Internal Keyboard / Trackpad
[2024-06-19 08:09:25.419174] <information> evdev-input: Opened device: /dev/input/event8 [05ac:024a] bcm5974
[2024-06-19 08:09:25.419356] <information> input-hub: Device configuration: Power Button, capabilities={keyboard}
[2024-06-19 08:09:25.419481] <information> input-hub: Device configuration: Video Bus, capabilities={keyboard}
[2024-06-19 08:09:25.419586] <information> input-hub: Device configuration: Power Button, capabilities={keyboard}
[2024-06-19 08:09:25.419687] <information> input-hub: Device configuration: Lid Switch, capabilities={}
[2024-06-19 08:09:25.419787] <information> input-hub: Device configuration: Sleep Button, capabilities={keyboard}
[2024-06-19 08:09:25.432277] <information> input-hub: Device configuration: Apple Inc. Apple Internal Keyboard / Trackpad, capabilities={keyboard|alpha_numeric}
[2024-06-19 08:09:25.432513] <information> input-hub: Device configuration: bcm5974, capabilities={pointer|touchpad}, pointer_config={handedness=right,acceleration=adaptive,acceleration_bias=0.00,hscale=1.00,vscale=1.00}, touchpad_config={click_mode=finger_count|scroll_mode=two_finger|disable_while_typing}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still no…
Gah!
It's good, only now I realized pointer != mouse…
$ ubuntu-frame --mouse-acceleration=none --mouse-cursor-acceleration-bias=1.00 2>&1 | grep -e input-hub -e evdev-input
[2024-06-19 14:52:17.962644] <information> mirserver: Selected input driver: mir:evdev-input (version: 2.18.0)
[2024-06-19 14:52:23.735914] <information> evdev-input: Opened device: /dev/input/event3 [0000:0001] Power Button
[2024-06-19 14:52:23.758030] <information> evdev-input: Opened device: /dev/input/event7 [0000:0006] Video Bus
[2024-06-19 14:52:23.780154] <information> evdev-input: Opened device: /dev/input/event1 [0000:0001] Power Button
[2024-06-19 14:52:23.780434] <information> evdev-input: Opened device: /dev/input/event0 [0000:0005] Lid Switch
[2024-06-19 14:52:23.802997] <information> evdev-input: Opened device: /dev/input/event2 [0000:0003] Sleep Button
[2024-06-19 14:52:23.825003] <information> evdev-input: Opened device: /dev/input/event5 [05ac:024a] Apple Inc. Apple Internal Keyboard / Trackpad
[2024-06-19 14:52:23.826464] <information> evdev-input: Opened device: /dev/input/event8 [05ac:024a] bcm5974
[2024-06-19 14:52:23.826630] <information> input-hub: Device configuration: Power Button, capabilities={keyboard}
[2024-06-19 14:52:23.826732] <information> input-hub: Device configuration: Video Bus, capabilities={keyboard}
[2024-06-19 14:52:23.826843] <information> input-hub: Device configuration: Power Button, capabilities={keyboard}
[2024-06-19 14:52:23.826942] <information> input-hub: Device configuration: Lid Switch, capabilities={}
[2024-06-19 14:52:23.827042] <information> input-hub: Device configuration: Sleep Button, capabilities={keyboard}
[2024-06-19 14:52:23.839656] <information> input-hub: Device configuration: Apple Inc. Apple Internal Keyboard / Trackpad, capabilities={keyboard|alpha_numeric}
[2024-06-19 14:52:23.840048] <information> input-hub: Device configuration: bcm5974, capabilities={pointer|touchpad}, pointer_config={handedness=right,acceleration=adaptive,acceleration_bias=0.00,hscale=1.00,vscale=1.00}, touchpad_config={click_mode=finger_count|scroll_mode=two_finger|disable_while_typing}
[2024-06-19 14:52:32.119525] <information> evdev-input: Opened device: /dev/input/event6 [046d:4023] Logitech Wireless Keyboard PID:4023
[2024-06-19 14:52:32.119778] <information> evdev-input: Opened device: /dev/input/event12 [046d:4091] Logitech Wireless Mouse
[2024-06-19 14:52:32.126371] <information> input-hub: Device configuration: Logitech Wireless Keyboard PID:4023, capabilities={keyboard|alpha_numeric}
[2024-06-19 14:52:32.126465] <information> input-hub: Device configuration: Logitech Wireless Mouse, capabilities={pointer}, pointer_config={handedness=right,acceleration=none,acceleration_bias=1.00,hscale=1.00,vscale=1.00}
[2024-06-19 14:52:36.732264] <information> evdev-input: Removed device: /dev/input/event6 [046d:4023] Logitech Wireless Keyboard PID:4023
[2024-06-19 14:52:36.944260] <information> evdev-input: Removed device: /dev/input/event12 [046d:4091] Logitech Wireless Mouse
(but you will need to fix the tests…) |
… may update the properties)
7966439
to
a65965e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh well, sid
's got a short run…
Drops some unused code from the "Input Report", and replaces the optional logging with direct logging.
This now includes logging the actual configuration of the device