Bug 435509

Summary: Notify when new devices are connected
Product: [Plasma] plasmashell Reporter: Ilya Bizyaev <bizyaev>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: wishlist CC: nate, philipp.reichmuth, plasma-bugs, raghu
Priority: NOR    
Version: 5.21.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=384469
Latest Commit: Version Fixed In: 6.0

Description Ilya Bizyaev 2021-04-08 15:22:53 UTC
SUMMARY
Recently the "Device can be safely ejected" state gained an option to notify the user with a sound.
I noted that it would be nice to also notify the user that a new device was plugged in, like Windows does for USB flash drives.

Nate suggested to generalize this idea to 'any devices', e.g. mice and keyboards as well, to let the user know that the system has recognized them.

OBSERVED RESULT
New devices get no sound notification when plugged in


EXPECTED RESULT
User can hear that the new device is visible to the system
Comment 1 David Edmundson 2021-04-08 22:35:41 UTC
why? If you just plugged something in, you know you plugged something in
Comment 2 Nate Graham 2021-04-08 22:41:44 UTC
...Except when you don't, because nothing immediately changes to let you know that it worked. An audible sound is a useful signal that at a basic level, it is recognized by the OS, so that if for some reason the device isn't working as you expect, you can at least rule out the cable being faulty or the device not being turned on.
Comment 3 Nate Graham 2021-04-11 14:44:31 UTC
*** Bug 432577 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2022-09-12 21:03:16 UTC
In progress with https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2106.
Comment 5 Kai Uwe Broulik 2023-07-17 13:43:08 UTC
Git commit a44a666dd12a863ebfecd720c9b020dcd33674b8 by Kai Uwe Broulik.
Committed on 17/07/2023 at 12:07.
Pushed by broulik into branch 'master'.

Play notification sound when a USB device is plugged in or unplugged

This adds a kded module which will monitor Udev's "usb" subsystem
for any USB devices being added/removed and emits a notification
as a result.

Compared to device notifier, this reacts on any kind of USB device
(e.g. mouse, headset), not just storage devices. It also reacts
more quickly, for example with an external hard drive, which needs
to spin up first before device notifier scans the partitions.

It checks the sysfs `removable` property to avoid playing a sound
when an internal device that is technically a USB device (e.g.
fingerprint reader, bluetooth adapter, etc) gets enabled/disabled.

M  +9    -0    CMakeLists.txt
A  +10   -0    devicenotifications/CMakeLists.txt
A  +2    -0    devicenotifications/Messages.sh
A  +306  -0    devicenotifications/devicenotifications.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +87   -0    devicenotifications/devicenotifications.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +7    -0    devicenotifications/devicenotifications.json

https://invent.kde.org/plasma/plasma-workspace/-/commit/a44a666dd12a863ebfecd720c9b020dcd33674b8