You are not logged in.

#1 2022-11-30 01:34:49

mchenier
Member
Registered: 2017-08-26
Posts: 13

scanner not detected after rebooting [SOLVED]

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

#2 2022-11-30 08:32:11

seth
Member
Registered: 2012-09-03
Posts: 57,090

Re: scanner not detected after rebooting [SOLVED]

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

#3 2022-11-30 13:59:46

mchenier
Member
Registered: 2017-08-26
Posts: 13

Re: scanner not detected after rebooting [SOLVED]

Thanks for the answer.

seth wrote:

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

#4 2022-11-30 14:20:57

seth
Member
Registered: 2012-09-03
Posts: 57,090

Re: scanner not detected after rebooting [SOLVED]

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

#5 2022-11-30 14:28:47

mchenier
Member
Registered: 2017-08-26
Posts: 13

Re: scanner not detected after rebooting [SOLVED]

seth wrote:

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?

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

#6 2022-11-30 14:57:33

seth
Member
Registered: 2012-09-03
Posts: 57,090

Re: scanner not detected after rebooting [SOLVED]

Bus 002 Device 004: ID 03f0:052a HP, Inc LaserJet M1212nf MFP
seth wrote:

what's your metric for "detectability"

*How* is it "not detected"?

getfacl /dev/bus/usb/002/004

Offline

#7 2022-11-30 15:08:43

mchenier
Member
Registered: 2017-08-26
Posts: 13

Re: scanner not detected after rebooting [SOLVED]

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

#8 2022-11-30 15:27:40

seth
Member
Registered: 2012-09-03
Posts: 57,090

Re: scanner not detected after rebooting [SOLVED]

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

#9 2022-11-30 16:00:30

mchenier
Member
Registered: 2017-08-26
Posts: 13

Re: scanner not detected after rebooting [SOLVED]

seth wrote:

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

#10 2022-11-30 16:11:25

seth
Member
Registered: 2012-09-03
Posts: 57,090

Re: scanner not detected after rebooting [SOLVED]

Sorry, typo - see post #6 (the path matches the usb device)

Offline

#11 2022-11-30 16:42:41

mchenier
Member
Registered: 2017-08-26
Posts: 13

Re: scanner not detected after rebooting [SOLVED]

[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--


http://0x0.st/o0tA.txt

Last edited by mchenier (2022-11-30 16:57:45)

Offline

#12 2022-11-30 21:37:15

seth
Member
Registered: 2012-09-03
Posts: 57,090

Re: scanner not detected after rebooting [SOLVED]

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

#13 2022-11-30 22:44:07

mchenier
Member
Registered: 2017-08-26
Posts: 13

Re: scanner not detected after rebooting [SOLVED]

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

#14 2022-11-30 22:59:50

seth
Member
Registered: 2012-09-03
Posts: 57,090

Re: scanner not detected after rebooting [SOLVED]

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

#15 2022-12-01 00:15:20

mchenier
Member
Registered: 2017-08-26
Posts: 13

Re: scanner not detected after rebooting [SOLVED]

Well, it work after reboot!

Thanks a lot!

Maybe will meet again in another thread....https://bbs.archlinux.org/viewtopic.php?id=99175

Offline

Board footer

Powered by FluxBB