Udev and libsane.rules

I decided to upgrade the kernel of my CRUX system from 5.15.26 to 5.18.9. As before, I grabbed the config file from Slackware -current, adjusted the GCC version to 10.3.0 (what comes with CRUX) and made sure to build support for my file system (XFS) into the kernel itself. However, upon boot, I got an error message about udev and libsane.

The issue was:

udevd[249]: unknown key 'SYSFS{idVendor}' in /etc/udev/rules.d/libsane.rules:1

I searched a bit and found the solution in the forum of Arch Linux. So, I navigated to /etc/udev/rules.d and did the following:

sed -i "s:SYSFS:ATTR:g" libsane.rules

Reboot and the warning is gone.

Where does the libsane.rules come from? It is created by the user after installing the sane port, as advised by the README:

README for sane 1.0.x



  1. To find the vendor/product id of your scanner, run the command:

     # sane-find-scanner -q
     found USB scanner (vendor=0x04a9, product=0x2204 [CanoScan FB630U] at libusb:001:005

     You need the 'vendor' id (04a9) and the 'product' id (2204)

  2. Check if /etc/udev/rules.d/libsane.rules already knows about 
     your scanner. If your scanner is not in this list, add a line 
     like the following, remember to replace 04a9 and 2204 with 
     your values:

     SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="2204", MODE="660", GROUP="scanner"
  3. Check the file permissions in /dev/bus/usb after you have plugged 
     in your scanner device.

     # ls -l /dev/bus/usb/001
     total 0
     -rw-r--r--  1 root root    43 Aug  3 10:58 001
     -rw-rw----  1 root scanner 50 Aug  3 10:58 005


Well, I guess for CRUX 3.7 it should be modified a bit.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s