You are not logged in.

#1 2021-02-01 19:51:59

katarok
Member
Registered: 2020-05-24
Posts: 40

Scanner shows up only as root

I have a HP Officejet j4580 all in one printer and scanner.

While it prints just fine. I cannot scan with it unless I am root.

$ scanimage -L
device `v4l:/dev/video1' is a Noname USB 2.0 Camera: USB Camera virtual device
device `v4l:/dev/video0' is a Noname Droidcam virtual device

$ sudo scanimage -L
device `v4l:/dev/video1' is a Noname USB 2.0 Camera: USB Camera virtual device
device `v4l:/dev/video0' is a Noname Droidcam virtual device
device `hpaio:/usb/Officejet_J4500_series?serial=CN896560Y6052T' is a Hewlett-Packard Officejet_J4500_series all-in-one

I have already tried the solution in the wiki in case of mission permissions and it didn't work https://wiki.archlinux.org/index.php/SANE

 $ cat /etc/udev/rules.d/49-sane-missing-scanner.rules
ATTRS{idVendor}=="30f0", ATTRS{idProduct}=="2a12", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes" 

and of course my user is in the scanner group

 $ groups $USER
scanner wheel users 

There is obviously something wrong with the permissions, but I am too archnoob to fix it myself. So I kindly ask for your help to guide me to what steps I should do to fix this issue.

EDIT: Added stuff I tried after uploading it

Last edited by katarok (2021-02-01 20:37:09)

Offline

#2 2021-02-01 20:35:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,615

Re: Scanner shows up only as root

https://wiki.archlinux.org/index.php/SA … on_problem
Your session might be broken because of a incomplete xinitrc (see link in my signature) - otherwise you'll need a udev rule to match the device.

Online

#3 2021-02-01 20:41:16

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

seth wrote:

https://wiki.archlinux.org/index.php/SA … on_problem
Your session might be broken because of a incomplete xinitrc (see link in my signature) - otherwise you'll need a udev rule to match the device.

I tried the SANE solution sadly it didn't work. I edited it in my OP
As for the incomplete xinitrc, should I reinstall the xorg-xinit package?

Offline

#4 2021-02-01 20:44:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,615

Re: Scanner shows up only as root

should I reinstall the xorg-xinit package?

No. Post yoru xinitrc and see the link in my signature.

Online

#5 2021-02-01 20:49:26

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

seth wrote:

should I reinstall the xorg-xinit package?

No. Post yoru xinitrc and see the link in my signature.

You mean like this?

$ cat .xinitrc 
exec startkde

Offline

#6 2021-02-01 20:54:28

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Scanner shows up only as root

Yep, that's completely broken.
Read https://wiki.archlinux.org/index.php/Xinit#xinitrc paying particular attention to the second note.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2021-02-01 21:13:53

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

Slithery wrote:

Yep, that's completely broken.
Read https://wiki.archlinux.org/index.php/Xinit#xinitrc paying particular attention to the second note.

so I did this

  $ cp /etc/X11/xinit/xinitrc ~/.xinitrc 

and now it looks like this

$ cat .xinitrc                        
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

is it ready or do I need to change a few things to have kde plasma start?

Offline

#8 2021-02-01 21:15:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,615

Re: Scanner shows up only as root

Actually running plasma might be a good idea to add there…
Do yo even have twm & xterm installed?

Sanity check: how do you start your sesion? xinit/startx or SDDM?

Online

#9 2021-02-01 21:18:22

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

seth wrote:

Actually running plasma might be a good idea to add there…
Do yo even have twm & xterm installed?

I don't know, how do I check?

seth wrote:

Sanity check: how do you start your sesion? xinit/startx or SDDM?

SDDM

Offline

#10 2021-02-01 21:20:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,615

Re: Scanner shows up only as root

katarok wrote:

I don't know, how do I check?

Because you inntalled them.
How did you install archlinux? Which tutorial did you follow?

katarok wrote:

SDDM

Then this is moot because your xinitrc isn't used anyway.

Output of "lsusb"?

Online

#11 2021-02-01 21:28:36

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

seth wrote:

How did you install archlinux? Which tutorial did you follow?

This one : https://averagelinuxuser.com/a-step-by- … ion-guide/

seth wrote:

Output of "lsusb"?

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 03f0:2a12 HP, Inc Officejet J4500 series
Bus 003 Device 004: ID 056a:0376 Wacom Co., Ltd CTL-4100WL [Intuos BT (S)]
Bus 003 Device 003: ID 1b1c:1b34 Corsair Corsair Gaming GLAIVE RGB Mouse
Bus 003 Device 002: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0c45:62c0 Microdia Sonix USB 2.0 Camera
Bus 001 Device 003: ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Last edited by katarok (2021-02-01 21:30:34)

Offline

#12 2021-02-01 21:30:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,615

Re: Scanner shows up only as root

getfacl /dev/bus/usb/003/005

Yeah, that's a problem… you're supposed to use https://wiki.archlinux.org/index.php/Installation_guide to actually derstand what you're doing.

Edit, @mods - I'd like to have a look at the device access situation before this gets binned.

Last edited by seth (2021-02-01 21:31:42)

Online

#13 2021-02-01 21:36:35

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

seth wrote:
getfacl /dev/bus/usb/003/005

Here is the output

$ getfacl /dev/bus/usb/003/005
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/003/005
# owner: root
# group: lp
user::rw-
group::rw-
other::r--
seth wrote:

Yeah, that's a problem… you're supposed to use https://wiki.archlinux.org/index.php/Installation_guide to actually derstand what you're doing.

(awkward sounds) apologies, I just wanted to try arch and like I did in all distros I went to youtube and searched for a guide I found the guide of ALU and all comments saying that it is a good guide so I used it.

Last edited by katarok (2021-02-01 21:37:38)

Offline

#14 2021-02-01 21:52:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,615

Re: Scanner shows up only as root

The rule doesn't apply (group lp - printer, not scanner) - you probably didn't reload the rules, https://wiki.archlinux.org/index.php/Udev
Also there's no ACL permission for any user (your login), so there seems to be a problem w/ the systemd session status as well. SDDM should behave properly itr, though…

Adding yourself to the lp group will grant you access there, but that's not the proper solution.

I went to youtube and searched for a guide

(awkward sounds) I feel sooooooo old now.

The only supported way of installation of archlinux is the guide in the arch wiki so you don't take a shortcut to a system that's not really udner your control, but actually learn something on the road.

Online

#15 2021-02-01 22:06:26

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

seth wrote:

The rule doesn't apply (group lp - printer, not scanner) - you probably didn't reload the rules, https://wiki.archlinux.org/index.php/Udev

I restarted the system and also did

$ su
# udevadm control --reload
# exit

It didn't change it

$ getfacl /dev/bus/usb/003/005
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/003/005
# owner: root
# group: lp
user::rw-
group::rw-
other::r--
seth wrote:

The only supported way of installation of archlinux is the guide in the arch wiki so you don't take a shortcut to a system that's not really udner your control, but actually learn something on the road.

It makes sense, next time I will use the archwiki

Offline

#16 2021-02-01 22:14:58

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

seth wrote:

Adding yourself to the lp group will grant you access there, but that's not the proper solution.

Well that did work I can scan. If I may ask, why isn't it the proper solution?

Also thanks for the help Seth I have exams tomorrow and I needed that scanner working to send my answers to the professor.
Again a million thanks smile

Offline

#17 2021-02-01 22:52:58

loqs
Member
Registered: 2014-03-06
Posts: 19,025

Re: Scanner shows up only as root

katarok wrote:
seth wrote:

Adding yourself to the lp group will grant you access there, but that's not the proper solution.

Well that did work I can scan. If I may ask, why isn't it the proper solution?

If /etc/udev/rules.d/49-sane-missing-scanner.rules worked your user being in the scanner group would be enough.
Edit:
Other possibility is the rule is correct but your session is broken.

Last edited by loqs (2021-02-01 22:55:12)

Offline

#18 2021-02-01 22:56:28

katarok
Member
Registered: 2020-05-24
Posts: 40

Re: Scanner shows up only as root

loqs wrote:

Other possibility is the rule is correct but your session is broken.

How do I check it?

Last edited by katarok (2021-02-01 22:56:46)

Offline

#19 2021-02-01 22:59:29

loqs
Member
Registered: 2014-03-06
Posts: 19,025

Re: Scanner shows up only as root

Offline

#20 2021-02-01 23:59:09

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Scanner shows up only as root

I believe there is a typo in the udev rule. 0 and 3 are mixed up.

lsusb: id 03f0:2a12
udev: ATTRS{idVendor}=="30f0"

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB