Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Locally attached printer (USB) activated in the kernel??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jhon987
Apprentice
Apprentice


Joined: 18 Nov 2013
Posts: 297

PostPosted: Mon Oct 24, 2016 3:57 pm    Post subject: Locally attached printer (USB) activated in the kernel?? Reply with quote

Hi,

I'll try to be concise as possible:

Gentoo Wiki says - "USB printing ... [Alternatively it] can be activated in the kernel." (Link= https://wiki.gentoo.org/wiki/Printing#Locally_attached_printer_.28USB.29)
When I load the kernel with USB_PRINTER [=y], I can't get my printer to print.
By contrast, when I use the USB use-flag with cups - it works.

What am I missing regarding activation via the kernel?

Thanks for any help
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Mon Oct 24, 2016 8:51 pm    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

jhon987 wrote:
Hi,

I'll try to be concise as possible:

Gentoo Wiki says - "USB printing ... [Alternatively it] can be activated in the kernel." (Link= https://wiki.gentoo.org/wiki/Printing#Locally_attached_printer_.28USB.29)
When I load the kernel with USB_PRINTER [=y], I can't get my printer to print.
By contrast, when I use the USB use-flag with cups - it works.

What am I missing regarding activation via the kernel?

You can use one or the other, if you activate both they conflict. Did you rebuild cups -usb after you built into the kernel?

I always use the cups flag, as I only compile things into the kernel when they really need to be there. Is there something unsatisfactory with the performance of your usb printer when printing with cups +usb?
Back to top
View user's profile Send private message
jhon987
Apprentice
Apprentice


Joined: 18 Nov 2013
Posts: 297

PostPosted: Tue Oct 25, 2016 6:47 am    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

ian.au wrote:

You can use one or the other, if you activate both they conflict. Did you rebuild cups -usb after you built into the kernel?

I always use the cups flag, as I only compile things into the kernel when they really need to be there. Is there something unsatisfactory with the performance of your usb printer when printing with cups +usb?


I did rebuild with cups -usb but it still didn't work.
The dissatisfaction stems from me being frustrated not managing to make it work. If the wiki says it should work through the kernel then that's the result I'm expecting.
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1249

PostPosted: Tue Oct 25, 2016 7:17 am    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

ian.au wrote:

You can use one or the other, if you activate both they conflict. Did you rebuild cups -usb after you built into the kernel??

i got USB_PRINTER [=m] and cups built with usb, printer and scanner work.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Tue Oct 25, 2016 10:19 am    Post subject: Reply with quote

So. In conclusion: I should have USB_PRINTER=m? Then I could load or unload (or blacklist) the module to get it working without rebuilding the kernel?
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
grumblebear
Apprentice
Apprentice


Joined: 26 Feb 2008
Posts: 202

PostPosted: Tue Oct 25, 2016 11:16 am    Post subject: Reply with quote

Normally you should not use the usb printer kernel module any more with cups. Only some manufacturer specific tools like escputil from Epson (for querying the ink levels, perform some administrative tasks) still require the kernel support. If you have to use such a software build the kernel driver as a module and load / unload it as needed.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Tue Oct 25, 2016 11:20 am    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

Perfect Gentleman wrote:
ian.au wrote:

You can use one or the other, if you activate both they conflict. Did you rebuild cups -usb after you built into the kernel??

i got USB_PRINTER [=m] and cups built with usb, printer and scanner work.

I found the kernel driver got in the way more often than not, (years ago, admittedly) and always disable it. So has that module ever been called?

If the module ends up loaded I'm guessing CUPS +usb will auger.

Scanning works on my mfd's too, but neither CUPS nor USB_PRINTER is involved with that.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Tue Oct 25, 2016 12:01 pm    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

jhon987 wrote:
ian.au wrote:

You can use one or the other, if you activate both they conflict. Did you rebuild cups -usb after you built into the kernel?

I always use the cups flag, as I only compile things into the kernel when they really need to be there. Is there something unsatisfactory with the performance of your usb printer when printing with cups +usb?


I did rebuild with cups -usb but it still didn't work.
The dissatisfaction stems from me being frustrated not managing to make it work. If the wiki says it should work through the kernel then that's the result I'm expecting.

Ok. I suppose you could 'make it work' if you really wanted to. CUPS +usb 'just works' for me when I need it - all I want is my printers to print. I'll caveat all that by saying I haven't had to mess with USB printers for a few years, since IPP/ethernet became an affordable option.
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1249

PostPosted: Tue Oct 25, 2016 4:52 pm    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

ian.au wrote:
So has that module ever been called?
If the module ends up loaded I'm guessing CUPS +usb will auger.

Code:
~ $ grep -i printer /boot/config-4.8.4-gentoo
CONFIG_USB_PRINTER=m
---------------------------------------------------------
~ $ lsmod | grep -i usblp
usblp                  10473  -2
---------------------------------------------------------
[ebuild   R    ] net-print/cups-2.1.4::gentoo  USE="X acl dbus pam ssl threads usb -debug -java -kerberos -lprng-compat -python (-selinux) -static-libs -systemd -xinetd -zeroconf" ABI_X86="(64) -32 (-x32)" LINGUAS="ru -ca -cs -de -es -fr -it -ja" PYTHON_TARGETS="python2_7" 0 KiB
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Tue Oct 25, 2016 6:41 pm    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

jhon987 wrote:
The dissatisfaction stems from me being frustrated not managing to make it work. If the wiki says it should work through the kernel then that's the result I'm expecting.

The Wiki is not the gospel truth, though.

What grumblebear wrote is my understanding too. In fact I had to switch to the CUPS USB backend's use of libusb several years ago to get my USB-connected printers to work. See, for example, the following e-mail from CUPS developer Till Kamppeter in 2006:

http://lists.cups.org/pipermail/cups-devel/2006-April/003175.html
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
jhon987
Apprentice
Apprentice


Joined: 18 Nov 2013
Posts: 297

PostPosted: Tue Oct 25, 2016 7:34 pm    Post subject: Reply with quote

Guys, focus, focus.

The question is how to get USB attached printer to work via the kernel?
Fitzcarraldo, you're right the Wiki is not the gospel truth, it doesn't matter, as long as there's a way to make it work through the kernel (regardless of the wiki) I want to know how.

Someone has to know how it's done, otherwise, there's no reason of having that setting in the kernel at all, wouldn't y'all agree?
Back to top
View user's profile Send private message
grumblebear
Apprentice
Apprentice


Joined: 26 Feb 2008
Posts: 202

PostPosted: Tue Oct 25, 2016 8:17 pm    Post subject: Reply with quote

Read my previous message again. The usblp module is just an old driver for some legacy software. It is nothing you should have to deal with in a modern environment.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Oct 25, 2016 8:34 pm    Post subject: Reply with quote

jhon987,

Some history will be useful here.

Kernel support for usb printing was moved to user space libusb years ago.
At one time apps supported an either/or ... the two approaches do the same thing.

Apps are moving (have moved) to libusb, so may no longer work with kernel usb printing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Tue Oct 25, 2016 9:18 pm    Post subject: Re: Locally attached printer (USB) activated in the kernel?? Reply with quote

Perfect Gentleman wrote:
ian.au wrote:
So has that module ever been called?
If the module ends up loaded I'm guessing CUPS +usb will auger.

Code:
~ $ grep -i printer /boot/config-4.8.4-gentoo
CONFIG_USB_PRINTER=m
---------------------------------------------------------
~ $ lsmod | grep -i usblp
usblp                  10473  -2
---------------------------------------------------------
[ebuild   R    ] net-print/cups-2.1.4::gentoo  USE="X acl dbus pam ssl threads usb -debug -java -kerberos -lprng-compat -python (-selinux) -static-libs -systemd -xinetd -zeroconf" ABI_X86="(64) -32 (-x32)" LINGUAS="ru -ca -cs -de -es -fr -it -ja" PYTHON_TARGETS="python2_7" 0 KiB


All that lsmod really tells you there is that CONFIG_MODULE_UNLOAD=n. From memory lsmod always returns -2 in such cases as there's no need to count the number of load/unloads. Having that set to n used to be a bit of a gotcha too.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Wed Oct 26, 2016 2:26 am    Post subject: Reply with quote

Someone with a Wiki account needs to fix that Wiki article so other users who are unaware of the history use the preferred CUPS USB backend libusb, unless they are sure their particular legacy printer specifically requires usblp.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
jhon987
Apprentice
Apprentice


Joined: 18 Nov 2013
Posts: 297

PostPosted: Wed Oct 26, 2016 5:24 am    Post subject: Reply with quote

I see,
grumblebear, NeddySeagoon, thanks for your input.
Too bad I had wasted half my day trying to make it print using the kernel driver...

I agree with Fitzcarraldo the wiki should be modified to reflect that.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Wed Oct 26, 2016 11:59 am    Post subject: Reply with quote

jhon987 wrote:

Too bad I had wasted half my day trying to make it print using the kernel driver...

Too bad the original post contained no information on the printer you were trying to install, the hardware and arch upon which you were trying to install it or any single snippet of a fail log. What it did include was the fact that you had a printer that worked, if set up as recommended. So in the light of that, maybe a LART would save your obviously valuable time.

usblp is exactly that, line printing to a usb device. Sorry for assuming that was what you wanted to achieve.
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1249

PostPosted: Wed Oct 26, 2016 2:32 pm    Post subject: Reply with quote

@ian.au, now got CONFIG_MODULE_UNLOAD=y, printer still works

Last edited by Perfect Gentleman on Tue Jan 03, 2017 11:04 am; edited 1 time in total
Back to top
View user's profile Send private message
jhon987
Apprentice
Apprentice


Joined: 18 Nov 2013
Posts: 297

PostPosted: Wed Oct 26, 2016 4:00 pm    Post subject: Reply with quote

ian.au wrote:

maybe a LART would save your obviously valuable time.


Urban Dictionary:" LART
Luser Attitude Readjustment Tool "

ian.au why like that? I don't recall offending you mate
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Wed Oct 26, 2016 9:41 pm    Post subject: Reply with quote

Perfect Gentleman wrote:
@ian.au, now got CONFIG_MODULE_UNLOAD=m, printer still works

On all my machines this is set to y - I don't recall there being an option to build this as a module.

Anyway, I'm not too sure how we got here? I wouldn't expect the kernel driver to interfere with / break your printer set up like this, although if the module ends up loaded I doubt cups +usb will behave. I don't have anything that uses the usblp module so don't take the overhead to build it and can't test it.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Thu Oct 27, 2016 6:21 am    Post subject: Reply with quote

jhon987 wrote:
ian.au wrote:

maybe a LART would save your obviously valuable time.


Urban Dictionary:" LART
Luser Attitude Readjustment Tool "

ian.au why like that? I don't recall offending you mate

You supplied no information at all in your either your original or subsequent posts, and closed out complaining about having half your day wasted discovering that your printer isn't supported by the kernel driver. Even when it was suggested politely that CUPS +usb is the way to go, you wouldn't accept it (ie. focus on my question, I wanna use the kernel driver etc..). Then when you find out your printer isn't supported by the kernel module you moan about wasting half a day of your time trying to make it work.

I'll suggest that had you stated the make and model of printer, use-case, hardware and kernel version at the outset, you wouldn't have 'wasted' that half-day - ie.:
Quote:
Hey my usb attached printer <make: foo, model: bar> on <arch, kernel, env> works fine with cups +usb, but won't work with the in-kernel driver. I tried <things I tried> but they failed with <the resulting messages> - does anyone know if this printer can be made to work with the in-kernel module.
That would have supplied the information required for someone to respond without guessing, and probably have elicited a response in line with what you needed, ie.:
Quote:
Sorry mate, that printer isn't compatible with the usblp driver, not many are, it's there for legacy stuff not supported by the modern user-space drivers... and this thread ends within a couple of posts, or: <some specific help for your legacy printer>, had that been the resolution.
I should have ignored that last post of yours, but it seemed an unfair complaint to me in the circumstances, you're not a noob.
Anyway, no offence intended - I was a bit raw yesterday after having to have my 12yo labrador put down. I should have just let it slide.
Back to top
View user's profile Send private message
Lokesh
Apprentice
Apprentice


Joined: 01 Apr 2012
Posts: 161

PostPosted: Tue Jan 03, 2017 10:59 am    Post subject: Reply with quote

I would like to comment on this thread even though it is a few months old. It has ended a several years lasting annoyance with CUPS. Thanks a million to the commenters, particularly NeddySeagoon, ian.au and fitzcarraldo.

My printer is the excellent Kyocera-Mita FS 1010 (the old one, dating back maybe 10 years?), attached through usb.Some years ago I began to experience severe problems with printing from "progressive" Linuxes like Arch, Ubuntu etc. With a conservative Debian I could still use the printer, though. But this has also come to an end a few years ago.

How did I print? Using Windows and Apple machines! Works flawlessly :evil:

When I stumbled across this thread I thought I would give it a try. First check revealed that the Kernel driver was permanently loaded. Kicked it out and: YEAH!

In conclusion some (older) printer have severe problems with the default settings of the kernel for usb printing and parallel usage uf the libusb driver. In my case, removing kernel support solved the problem.
Code:
lsusb
Bus 002 Device 009: ID 0482:0003 Kyocera Corp.

Code:
sudo grep -i printer /boot/config-4.4.26-gentoo
# CONFIG_USB_PRINTER is not set

Code:
sudo eix -info libusb
[I] virtual/libusb                                                                                                                 
     Verfügbare Versionen:                                                                                                         
     (0)    0-r2                                                                                                                   
     (1)    1-r1 1-r2                                                                                                               
       {udev ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}                                           
     Installierte Versionen: 1-r2(1)(22:30:51 14.11.2016)(udev ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")                                                                                                                   
     Beschreibung:           Virtual for libusb


I have read so many posts from people with similar problems, thats why I thought it may be of help to report this.

Thanks again
Lokesh
_________________
Sometimes frustrated Linux User
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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