Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] CUPS and Usb printer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 11:34 am    Post subject: [SOLVED] CUPS and Usb printer Reply with quote

Hi all,

i'm trying to install my usb printer in cups (cups seems to be installed by default, i didn't installed it, maybe it was installed as dependency)

But stiill i cannot find any usb printer option in cups.

First of all if try to emerge with use flag usb (the wiki says that the usb flag was available, but:
Code:
 emerge -pv cups


has the following output:
Code:
USE="X acl dbus jpeg ldap pam perl png python ssl threads tiff -debug -gnutls -java -kerberos -php -samba -slp -static-libs -xinetd" LINGUAS="-da -de -es -eu -fi -fr -id -it -ja -ko -nl -no -pl -pt -pt_BR -ru -sv -zh -zh_TW" 0 kB


And i cannot see any usb flag.

Then i unloaded the usblp module (rmmod usblp) and started cups, try to add a new printer and the only options available are:

  • SCSI Printer
  • LPD/LPR Host or Printer
  • Internet Printing Protocol (http)
  • Internet Printing Protocol (ipp)
  • Internet Printing Protocol (https)
  • AppSocket/HP JetDirect


I recompiled the kernel installing *HCI driver as built-in.
I checked the ebuild file for the installed version of cups and there is no usb flag in the IUSE var on /usr/portage/net-print/cups/cups-1.4.8-r1.ebuild (how can i add it? if i add it manually i have a digest check failed). Here is the content of the IUSE flags:

Code:

IUSE="acl dbus debug gnutls java +jpeg kerberos ldap pam perl php +png python samba slp +ssl static-libs +threads +tiff X xinetd"


I am using gentoo for amd64

I am sure that my printer works with cups (in archlinux it worked without problems).
Any idea?
Thanks
_________________
printf("hello world")


Last edited by finarfin on Sun Sep 25, 2011 9:41 am; edited 1 time in total
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Sep 23, 2011 12:48 pm    Post subject: Reply with quote

As far as I am aware, the usb use flag only concerns >= 1.4.8-r21 versions of cups.
It does not concern latest stable that is 1.4.8-r1

=> If you want cups with the usb use flag then simply allow tildarch for cups in package.keywords
_________________
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 1:21 pm    Post subject: Reply with quote

ok,
i enabled the usb flag in cups, installed the version 1.4.8-r22 and i still have the same problem.

There isn't any option for usb printer.
Now when emerge compile cups says that if i want to use the usblp i need to remove the usb flag to cups.

I'll try in that way.
[edit] No success in that way [/edit]
Any ideas?
_________________
printf("hello world")
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 3:00 pm    Post subject: Reply with quote

Ok,

i tried everything, and it doesn't want to work!!!!

I tried:
1. to disable usb flag and use usblp as module with cups and it doesn't work
2. i tried to enable usblp in the kernel and disable usb flag in cups, and it doesn't work
3. i tried to remove usblp from the kernel, and enable usb flag in cups and it doesn't work.

lsusb recognize my printer:
Code:
Bus 004 Device 011: ID 04b8:082f Seiko Epson Corp. Stylus DX4050


Dmesg recognize my printer:

I'm sure that this pritner work with cups (i used it with arch linux).
Code:
usb 4-3: new full speed USB device number 11 using ohci_hcd
usb 4-3: New USB device found, idVendor=04b8, idProduct=082f
usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-3: Product: USB MFP
usb 4-3: Manufacturer: EPSON
usb 4-3: SerialNumber: L32040703130921260

my question now is:

What is wrong?
I installed also gutenprint and ppd files.

here the usb modules loaded by the kernel:

Code:
adora rincewind # lsmod | grep usb 
usbhid                 19176  0
usb_storage            37248  0


I don't know if this help but this is the content of my /dev folder:
Code:

.udev/  bsg/    char/   disk/   fd/     mapper/ pts/    snd/   
block/  bus/    cpu/    dri/    input/  net/    shm/   


The printer works with cups (it worked in archlinux).
I really need help!!! Please.
_________________
printf("hello world")
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Sep 23, 2011 3:11 pm    Post subject: Reply with quote

Could you please :

1/ Launch the cups console
2/ Select the printers tab
3/ click on the name of your printer in the queue name column
4/ post the information given for Driver and Connection
_________________
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 3:16 pm    Post subject: Reply with quote

Here all that i can found in the printer column:


No printers


The problem is that cups cannot find my printer!!!
The actual configuration is with usblp removed from the kernel and usb module of cups loaded.
_________________
printf("hello world")
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Sep 23, 2011 3:20 pm    Post subject: Reply with quote

finarfin wrote:
Here all that i can found in the printer column:
No printers

So, now, still under the cups console,

5/ Select the Administration tab
6/ Press the Find new printers button.
_________________
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 3:22 pm    Post subject: Reply with quote

No printers found.
_________________
printf("hello world")
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Sep 23, 2011 3:26 pm    Post subject: Reply with quote

Did you make sure after having installed cups to start the daemon and ensure it starts at each reboot ?
Code:

# /etc/init.d/cupsd start
# rc-update add cupsd default
?
_________________
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 3:27 pm    Post subject: Reply with quote

yeah i did it!!!!
_________________
printf("hello world")
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Sep 23, 2011 3:52 pm    Post subject: Reply with quote

Anything wrong in dmesg ?
Anything wrong in /var/log/cups/* ?
_________________
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 3:59 pm    Post subject: Reply with quote

here the dmesg content:
http://pastebin.com/XJphC3Cz

i cannot find nothing strange, when the printer is plugged you can see these lines:

usbhid: USB HID core driver
usb 4-3: New USB device found, idVendor=04b8, idProduct=082f
usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-3: Product: USB MFP
usb 4-3: Manufacturer: EPSON
usb 4-3: SerialNumber: L32040703130921260

In cups no errors.
_________________
printf("hello world")
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Sep 23, 2011 4:13 pm    Post subject: Reply with quote

Geee !!!

Can you rebuild your kernel with the usblp driver / re-emerge cups stable (without the usb use flag) / restart the demon and retry finding printers under the cups console ?
_________________
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Fri Sep 23, 2011 7:13 pm    Post subject: Reply with quote

I installed the stable version, of cups.
usblp is configured as builtin in kernel
but the problem is still here.

Dmesg recognize the printer, but cups no.
The printer is an espons stylus dx 4000.

The parallel port printer support is disabled. Should i need to activate it?

Thanks,
Ivan
_________________
printf("hello world")
Back to top
View user's profile Send private message
gerard82
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2229
Location: Netherlands

PostPosted: Fri Sep 23, 2011 9:41 pm    Post subject: Reply with quote

I have an Epson stylus photo rx560 also usb connected.
When I first installed it it refused to run because it was not connected to the first usb channel.
This was solved by simply trying out different usb outlets until I found the right one.
I used cups-1.3.11-r4 for a long time because the higher versions gave me the same problem you have.
Printer worked fine.
A couple of days ago I did a world update and to make it go I had to install a higher version of cups.
I removed the mask and installed cups-1.4.8-r1 thinking I could always go back to the old one.
To my surprise it worked without any problem.
I think it used the existing configure files.
You might try doing the same:install 1.3.11-r4 and when you succeed in getting it to work install latest stable.
I have usb printer support as module.
Hope this is of use.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1696

PostPosted: Sat Sep 24, 2011 7:44 am    Post subject: Reply with quote

Last time I played with a USB printer I had to power up and plug in the printer before
I booted the computer.

Will
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Sat Sep 24, 2011 7:46 am    Post subject: Reply with quote

cwr,
the printer is plugged and power up, before i turn on the pc.

Ivan
_________________
printf("hello world")
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Sat Sep 24, 2011 9:42 pm    Post subject: Reply with quote

Hi gerard,
i'm trying to downgrade from 1.4.8 to 1.3.11. But i cannot emerge the older version.
I tried to add a lien in /etc/portage/package.mask with:
>=net-print/cups-1.3.11-r4
And i receive the following output:
Code:
Calculating dependencies... done!
[ebuild     U #] net-print/cups-1.5.0-r2 [1.4.8-r1] USE="X acl dbus jpeg ldap pam perl png python ssl threads tiff usb%* -debug -gnutls -java -kerberos -php -samba -slp -static-libs -xinetd" LINGUAS="-da -de -es -eu -fi -fr -id -it -ja -ko -nl -no -pl -pt -pt_BR -ru -sv -zh -zh_TW" 3,995 kB

Total: 1 package (1 upgrade), Size of downloads: 3,995 kB

The following keyword changes are necessary to proceed:
#required by cups (argument)
>=net-print/cups-1.5.0-r2 ~amd64

The following mask changes are necessary to proceed:
#required by cups (argument)
# /usr/portage/profiles/package.mask:
# Andreas K. Huettel <dilfridge@gentoo.org> (18 Jun 2011)
# Mask cups-1.5, too new and still needs a lot of testing
>=net-print/cups-1.5.0-r2

It wants to install cups version 1.5.0.
I tried to add a cups file in package.keywords folder with the line:
>=net-print/cups-1.3.11-r4

And it simply ignore it, and continue to install version 1.4.8.

Now i can force emrege to isntall the version 1.3.11?

Thanks,
Ivan
_________________
printf("hello world")
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Sat Sep 24, 2011 10:21 pm    Post subject: Reply with quote

Ok
i installed the old version of cups (1.3.11-r1)
And i still have the same problem.

There isn't any USB printer.

Do you think that i have to enable also these simbols (for parallel printer) in the kernel:
Code:
 Symbol: PRINTER [=n]
 Prompt: Parallel printer support
   Defined at drivers/char/Kconfig:531
   Depends on: PARPORT [=y]
   Location:
     -> Device Drivers
       -> Character devices


This is my kernel .config file:
http://pastebin.com/nLBepGmq

I hope that someone could help!!! (I repeat: the printer is supposed to work with cups, i used it in other distros).
_________________
printf("hello world")
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Sun Sep 25, 2011 8:31 am    Post subject: Reply with quote

My printer is an Epson Stylus DX 4000 (a multifunction scanner/printer)

Here you find the erro_log with debug mode enabled:

http://pastebin.com/GzqMsVhR

also here the lsusb output for my printer:
Code:
Bus 004 Device 007: ID 04b8:082f Seiko Epson Corp. Stylus DX4050


If i do an ls to that devic (/dev/bus/usb/004) here the result:

Code:
adora 004 # ls -l
total 0
crw-rw-r-- 1 root usb     189, 384 Sep 25  2011 001
crw-rw-r-- 1 root scanner 189, 390 Sep 25 10:15 007

I tried to change the group of 007 from scanner to lp with no luck.

Ivan
_________________
printf("hello world")
Back to top
View user's profile Send private message
finarfin
n00b
n00b


Joined: 20 Sep 2011
Posts: 62

PostPosted: Sun Sep 25, 2011 9:32 am    Post subject: Reply with quote

And finally i managed to have my USB printer work with cups.
The problem was very very simple.

The device:
/dev/usb/lp0
has the following permissions:
root:scanner

i changed permissions to:
root:lp

and finally cups can see my printer!!!
_________________
printf("hello world")
Back to top
View user's profile Send private message
greenius
n00b
n00b


Joined: 29 Mar 2004
Posts: 9
Location: Oxford, UK

PostPosted: Tue Oct 25, 2011 10:08 am    Post subject: Reply with quote

finarfin wrote:

i changed permissions to:
root:lp


Next time you reboot, or if you turn the printer off and on, or disconnect/reconnect USB cable, this will get reset back to scanner again (by udev?).

I am having a similar problem with an Epson Stylus SX415 printer/scanner, and to make matters worse, the usb device number seems to change each time the printer is turned off and on again.

In /etc/group I've tried adding lp to the scanner group and scanner to the lp group, but that made no difference.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1241
Location: 42.68n 85.41w

PostPosted: Sun Jul 15, 2012 9:45 pm    Post subject: Reply with quote

/etc/udev/rules.d/70-libsane.rules
#Hewlett-Packard
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="a111", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

caused it to break?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum