atomspring / Scansnap-ix500-Linux

Support the ix500 on Linux
GNU General Public License v3.0
19 stars 8 forks source link

Error on udev rules #5

Open elsiehupp opened 3 years ago

elsiehupp commented 3 years ago

I got the following error when running systemctl status udev:

systemd-udevd[11933]: /etc/udev/rules.d/40-fujitsu.rules:3 Invalid key/value pair, ignoring.

But the scanner works anyway.

atomspring commented 3 years ago

Cool, I'll look into this. I'd like some background info, what's your OS? What version of udev and systemd have you got?

Thanks @elsiehupp

atomspring commented 3 years ago

Some people seem to be mentioning that adding a newline to the end of the udev file may help.

Could you try running echo -e '\n' >> /etc/udev/rules.d/40-fujitsu.rules, followed by udevadm control --reload-rules?

elsiehupp commented 3 years ago

Hi there! I'm running Ubuntu 20.04.1 LTS. Here are my package versions:

$ apt list udev systemd
Listing... Done
systemd/focal-updates,now 245.4-4ubuntu3.3 amd64 [installed,automatic]
systemd/focal-updates 245.4-4ubuntu3.3 i386
udev/focal-updates,now 245.4-4ubuntu3.3 amd64 [installed]
udev/focal-updates 245.4-4ubuntu3.3 i386

I got the same error after trying those commands. (I had done plenty of googling before posting here, so I probably looked at some of the same results as you.)

FYI found my way here because I have a ScanSnap ix500 that I've had for quite some time (they last forever!), but I only recently switched my Windows PC over to Linux after Windows 10 decided to brick itself. This is one of the top results for "scansnap ix500 linux".

I've also tried setting up SimulPiscator/AirSane, and some of the setup instructions there seem to overwrite or conflict with the instructions here. Among other things, it seems like it might no longer be necessary to rebuild libsane from scratch. I haven't tried using vanilla libsane, though.

As for permissions, AirSane has a different but similar fix, which seems to work:

If all scanners are listed for 'root' but none for 'saned,' you might have hit a bug in libsane. As a workaround, create a file /etc/udev/rules.d/65-libsane.rules with this content:

ENV{libsane_matched}=="yes", RUN+="/usr/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

Double-check the location of the setfacl binary using which setfacl, adapt the line if necessary. Unplug and re-plug all scanners. sudo -u saned scanimage -L should now list all of them.

It's also possible that it's interfering with your fix, though I know little enough about systemd to say for sure.

Little tutorials like this aren't the usual content for GitHub, but they're useful to have, and GitHub is as good a place as a blog to post them! The ScanSnap ix500 has long been superseded by newer models, but thanks for putting in the work six years ago to write up the instructions here!