On Sun 12 Apr 2026 at 16:40:36 (-0500), Gregory Forster wrote:
> I guess I was expecting recognition like when USB flash drives, hard
> drives, my voice recorder, my cell phone are connected,

All those devices probably have some mass storage onboard, so if
you're running a DE or an automounter, you may see some effect,
like drawing an icon on the screen.

> So, I tried it again. No, it wasn't recognized, but it seems to work.

If it wasn't recognised, it wouldn't work. Yes, it was recognised, but
there was as little reason to disturb the user as there is when the
system recognises all the builtin devices shortly after booting up.

To convince yourself, type:

  $ udevadm monitor -u -p -s block/disk
  monitor will print the received events for:
  UDEV - the event which udev sends out after rule processing

Then plug in the device. You'll get some paragraphs from udev like:

  UDEV  [2685.710126] add      
/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/host6/target6:0:0/6:0:0:0/block/sr1
 (block)
  ACTION=add
  
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/host6/target6:0:0/6:0:0:0/block/sr1
  SUBSYSTEM=block
  DEVNAME=/dev/sr1
  [ … ]

and, instead:

  [ … ]
  ACTION=remove
  [ … ]

when you unplug it.

You can read what reacts to these events in /usr/lib/udev/rules.d/,
and write your own versions in /etc/udev/rules.d/, the two directories
being merged numerically to determine the order of running the rules
with each event.

You can capture more events with just   udevadm monitor -u -p
For example, type that line and then unplug your mouse or keyboard
momentarily (switch it off and on if wireless).

Happy hacking.

Cheers,
David.

Reply via email to