Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epkowa recognizes GT-F720 USB scanner only as root #90184

Closed
royneary opened this issue Jun 12, 2020 · 5 comments
Closed

epkowa recognizes GT-F720 USB scanner only as root #90184

royneary opened this issue Jun 12, 2020 · 5 comments
Labels

Comments

@royneary
Copy link
Contributor

royneary commented Jun 12, 2020

After upgrading to 20.03 my scanner Epson Perfection V30 was not recognized anymore. Since #82909 has been applied, it's recognized as root, but not as unprivileged user. My user is in the groups scanner and lp as suggested in https://nixos.wiki/wiki/Scanners.

lsusb shows:

Bus 001 Device 002: ID 04b8:0131 Seiko Epson Corp. GT-F720 [GT-S620/Perfection V30/V300 Photo]

To Reproduce
Steps to reproduce the behavior:

$ scanimage -L
$

Expected behavior
scanimage -L should list my scanner as it did on 19.09.

Additional context
sudo SANE_DEBUG_SANEI_USB=3 scanimage -L shows

[sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0131

but without sudo it doesn't.

sudo SANE_DEBUG_DLL=3 scanimage -L shows this:

[dll] add_backend: adding backend `epkowa'
[dll] sane_get_devices
[dll] load: searching backend `epkowa' in `/nix/store/kyyjfjx4i2vgldbxjn7z6nkr1dxb7c05-sane-config/lib/sane:/nix/store/sdqv2is6wi2ycr8ahpb5ww9zlf9f7k4j-sane-backends-1.0.28/lib/sane'
[dll] load: dlopen()ing `/nix/store/kyyjfjx4i2vgldbxjn7z6nkr1dxb7c05-sane-config/lib/sane/libsane-epkowa.so.1'
[dll] init: initializing backend `epkowa'

whereas without sudo it shows:

[dll] add_backend: adding backend `epkowa'
[dll] sane_get_devices
[dll] load: searching backend `epkowa' in `/nix/store/sdqv2is6wi2ycr8ahpb5ww9zlf9f7k4j-sane-backends-1.0.28/lib/sane'
[dll] load: couldn't find backend `epkowa' (No such file or directory)

Notify maintainers
@symphorien @dominikh

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.4.45, NixOS, 20.03.2133.8946799e079 (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.6
  • channels(root): "nixos-20.03.2133.8946799e079"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: epkowa
# a list of nixos modules affected by the problem
module: sane
@royneary royneary added the 0.kind: bug Something is broken label Jun 12, 2020
@royneary royneary changed the title epkowa doesn't recognize GT-F720 USB scanner epkowa recognizes GT-F720 USB scanner only as root Jun 12, 2020
@royneary
Copy link
Contributor Author

royneary commented Jun 12, 2020

I found out that as root LD_LIBRARY_PATH is set to /nix/store/kyyjfjx4i2vgldbxjn7z6nkr1dxb7c05-sane-config/lib/sane, wheras for my unprivileged user it's empty.

If I set LD_LIBRARY_PATH, I can scan.

$ export LD_LIBRARY_PATH=/nix/store/kyyjfjx4i2vgldbxjn7z6nkr1dxb7c05-sane-config/lib/sane
$ scanimage -L
device `epkowa:interpreter:001:002' is a Epson Perfection V30 flatbed scanner

Why is LD_LIBRARY_PATH not set for my user?

@symphorien
Copy link
Member

This variable is normally set by /etc/profile. Could it be that you are using an unusual shell that does not source /etc/profile ?

@royneary
Copy link
Contributor Author

I'm using bash and AFAIK I didn't configure anything special for it.

What I find strange is that SANE_CONFIG_DIR is set:

$ echo $SANE_CONFIG_DIR
/nix/store/kyyjfjx4i2vgldbxjn7z6nkr1dxb7c05-sane-config/etc/sane.d

I had a look in /etc/profile and both SANE_CONFIG_DIR and LD_LIBRARY_PATH are set from /nix/store/1iwzrq3w7g3r9dsddcmzzpki5piyvsfm-set-environment. So LD_LIBRARY_PATH seems to be overwritten after sourcing /etc/profile.

@royneary
Copy link
Contributor Author

It seems to be Gnome's fault. When I login on a non-graphical shell, LD_LIBRARY_PATH is set correctly.

@royneary
Copy link
Contributor Author

closing in favour of #90201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants