OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
apps-services medium occasional DISPUTE

Fix a scanner (or USB printer) the tools can see but cannot open

archomarchyendeavouroscachyosmanjarosanescannercupsprintingudevusb
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The diagnosis and the driverless half are right (sane, sane-airscan and ipp-usb all exist, ipp-usb.service for USB models, sane-find-scanner, explicit --device when a webcam shadows the scanner). The permissions half is wrong in two ways, both verified against the packaging: Arch's sane generates /usr/lib/udev/rules.d/65-sane.rules from sane-desc -m udev+hwdb (the path the record cites is correct), whose access rule is ENV{libsane_matched}=="yes", MODE="664", GROUP="scanner", so the group for scanners is scanner, not lp, and a hand-written rule using GROUP="lp" does not match how the shipped rules grant access. And the closing note that 'the scanner and lp groups are deprecated under systemd — do not add your user to them' is false: scanner (gid 96) is created by the filesystem package precisely for this, and membership in it is the intended way to open the device on Arch. Following that note leaves the user with no working access path.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.

Symptom

scanimage -L prints No scanners were identified. even though lsusb shows the device. Running sudo scanimage -L finds it, so it works as root. The same pattern hits USB printers: CUPS lists the device but the backend fails to open it.

Cause

Either the scanner is a modern driverless (eSCL/AirScan/WSD) device that needs sane-airscan (plus ipp-usb when connected by USB), or it is a permissions problem: the USB device node is only opened by root unless a udev rule tags it libsane_matched and gives it MODE="664", GROUP="scanner", and unless your user is in the scanner group. Arch ships those rules in /usr/lib/udev/rules.d/65-sane.rules, generated from SANE's device database. A device missing from that database gets no rule at all.

Fix

Driverless scanners, unchanged:


sudo pacman -S sane sane-airscan ipp-usb
sudo systemctl enable --now ipp-usb.service   # USB-connected models only
scanimage -L

If sudo scanimage -L works but the unprivileged one does not, it is permissions. First join the group the shipped rules actually use, then log out and back in:


sudo usermod -aG scanner $USER
id -nG   # should list: scanner

If the device still is not matched, check whether it appears in /usr/lib/udev/rules.d/65-sane.rules (lsusb for the IDs, sudo sane-find-scanner), and if not, add /etc/udev/rules.d/65-sane-missing-scanner.rules using the **same group the shipped rules use**:


ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="2504", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

Then sudo udevadm control --reload-rules && sudo udevadm trigger and re-plug. Verify with scanimage -L as your normal user and ls -l /dev/bus/usb/<bus>/<dev> showing group scanner. (For a *USB printer* the equivalent group is lp. Do not mix the two.)

Verify

scanimage -L as your normal user lists the device, ls -l /dev/bus/usb/<bus>/<dev> shows group lp mode 0664, and scanimage --format=png --output-file test.png --progress produces a real image.

Sources

scanner-not-detected-scanimage