colord
colord copied to clipboard
colord-sane wakes up network scanner on desktop unsuspend
Since installing colord with SANE support for a scanner, whenever I unsuspend my desktop our all-in-one printer suddenly gets woken up. A bit of wiresharking later and we figured out that this happens b/c my desktop connects to port 9400 on the target printer.
I can observe this behaviour by running while true; do ss -antp | grep 9400 && sleep 1; done
and then suspending and waking up my desktop. This results in:
ESTAB 0 4 10.16.2.222:47738 10.16.3.144:9400 users:(("colord-sane",pid=49527,fd=14))
TIME-WAIT 0 0 10.16.2.222:47738 10.16.3.144:9400
TIME-WAIT 0 0 10.16.2.222:47738 10.16.3.144:9400
[..]
Though I can understand colord being interested in the scanner, I don't understand why it does this every time I unsuspend my desktop. I would expect it to not interact with the device until I actually start something like simple-scan.
Is there some configuration that lets me turn off this behaviour?
This happens on an Arch Linux box with:
- GNOME 3.36
- gnome-color-manager 3.36.0-1
- colord 1.4.4+9+g1ce26da-2
- colord-sane 1.4.4+9+g1ce26da-2
- sane 1.0.30-1
This is likely related to the discussion at these:
- https://askubuntu.com/questions/607302/network-printer-makes-noise-every-time-i-insert-remove-a-usb-device
- https://unix.stackexchange.com/questions/351006/logging-in-or-plugging-in-a-usb-device-wakes-up-network-printer
- https://superuser.com/questions/981187/epson-wf-7525-makes-noise-when-plugging-in-usb-device
This happens because colord-sane
always scans all SANE devices, instead of handling a device that’s just been added. You’ll see the same effect from running scanimage -L
. I wonder if it would be possible to have colord-sane
only check the new device or handle the removed device when it’s invoked as a result of a udev
rule...