You are not logged in.
Hello everyone,
I got an issu with my scanner (HP Laserjet M1212nf MFP).
I need to:
1. Turn it off and on to detect it after rebooting or
2. Use this command with my password: systemctl restart systemd-udev-trigger.service
After that, everything work fine.
I can't find a way to make the detection at boot. Didn't find any anwser in the Arch Wiki.
Thanks for any clues.
Last edited by mchenier (2022-12-01 00:20:24)
Offline
I suspect some race condition - it powers on toolate™ when receiving the usb signal.
1. Turn it off and on to detect it after rebooting or
Why is that thing on before the boot anyway?
Offline
Thanks for the answer.
I suspect some race condition - it powers on toolate™ when receiving the usb signal.
1. Turn it off and on to detect it after rebooting or
Why is that thing on before the boot anyway?
Good question..., my printer is always on and sometimes I have to reboot for other reason and I don't want to turn the printer off and on each time. Never had this problem with other distribution. Should be a way to permantly activate the systemd service at boot?
Last edited by mchenier (2022-11-30 14:23:26)
Offline
I'd look at the system journal to see what repowering the scanner actually triggers (and that is missing during the boot) and then look at the earlier boot phase to maybe see "why".
Rebinding the USB might do as well
Never had this problem with other distribution.
What "other distribution" and when?
Along the "this bit is missing" piece, it might be explainable why (I suspect the aggressive parallelization of systemd) might skip the device but didn't w/ "other distribution".
Edit: also, what's your metric for "detectability" - does it not show up in lsusb?
Last edited by seth (2022-11-30 14:21:54)
Offline
I'd look at the system journal to see what repowering the scanner actually triggers (and that is missing during the boot) and then look at the earlier boot phase to maybe see "why".
Rebinding the USB might do as wellNever had this problem with other distribution.
What "other distribution" and when?
Along the "this bit is missing" piece, it might be explainable why (I suspect the aggressive parallelization of systemd) might skip the device but didn't w/ "other distribution".Edit: also, what's your metric for "detectability" - does it not show up in lsusb?
I worked recently with LinuxMint, Manjaro, Ubuntu, etc. and never have this issue
[martin@archlinux ~]$ lsusb
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 2109:0813 VIA Labs, Inc. VL813 Hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 006: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
Bus 002 Device 008: ID 046d:0a29 Logitech, Inc. H600 [Wireless Headset]
Bus 002 Device 007: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 002 Device 005: ID 2109:2813 VIA Labs, Inc. VL813 Hub
Bus 002 Device 004: ID 03f0:052a HP, Inc LaserJet M1212nf MFP
Bus 002 Device 003: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000
Bus 002 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Find this (https://github.com/systemd/systemd/issues/17373), but doesn't quite understand all the explanations
Last edited by mchenier (2022-11-30 14:33:45)
Offline
Bus 002 Device 004: ID 03f0:052a HP, Inc LaserJet M1212nf MFP
what's your metric for "detectability"
*How* is it "not detected"?
getfacl /dev/bus/usb/002/004
Offline
When I open simple-scan, it's says ''no scanning device detected''. After I restart the printer or active the command ''systemctl restart systemd-udev-trigger.service'' everything work: ''ready to digitize''
Offline
So quite possibly the permission issue, though grep /usr/lib/udev/rules.d/ doesn't match your device at all.
Does "sudo simple-scan" work?
Post the getfacel output (before and afer restarting systemd-udev-trigger.service) and also the complete system journal (sudo journalctl -b) after a reboot.
Offline
So quite possibly the permission issue, though grep /usr/lib/udev/rules.d/ doesn't match your device at all.
Does "sudo simple-scan" work?
Post the getfacel output (before and afer restarting systemd-udev-trigger.service) and also the complete system journal (sudo journalctl -b) after a reboot.
Yes it work with sudo simple-scan
getfacel output? unknown command
Last edited by mchenier (2022-11-30 16:02:33)
Offline
Sorry, typo - see post #6 (the path matches the usb device)
Offline
[martin@archlinux ~]$ getfacl /dev/bus/usb/002/004
getfacl : suppression du premier « / » des noms de chemins absolus
# file: dev/bus/usb/002/004
# owner: root
# group: lp
user::rw-
group::rw-
group:saned:rw-
mask::rw-
other::r--
[martin@archlinux ~]$ systemctl restart systemd-udev-trigger.service
[martin@archlinux ~]$ getfacl /dev/bus/usb/002/004
getfacl : suppression du premier « / » des noms de chemins absolus
# file: dev/bus/usb/002/004
# owner: root
# group: lp
user::rw-
user:martin:rw-
group::rw-
group:saned:rw-
mask::rw-
other::r--
Last edited by mchenier (2022-11-30 16:57:45)
Offline
So owner and group remain but your user gets added to the ACL - presumingly because it holds the active console.
I suspect that if you reboot, do NOT login, login as root (on eg. a different VT if you're using a DM), then "systemctl restart systemd-udev-trigger.service", then log into your regular user
1. the user will not have been added to the ACL
2. you cannot use the scanner
As an alternative approach, just add your user to the "lp" group to always have access to all devices in that group - regardless of the conditions when they were added.
(This might also have been the case w/ your debian based systems)
Offline
Thanks, but not sure to understand what to do.
To add to the lp group, is this ok?
sudo usermod -a -G lp martin
If it is, it doesn't work.
Offline
Did you re-login after that?
Output of
id
In case the thing showed up as a second, scanner device that we kinda ignored here, try to also add yourself to the "scanner" group.
Offline
Well, it work after reboot!
Thanks a lot!
Maybe will meet again in another thread....https://bbs.archlinux.org/viewtopic.php?id=99175
Offline