# Locally attached printer (USB) activated in the kernel??

## jhon987

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

----------

## ian.au

 *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)
> ...

 

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?

----------

## jhon987

 *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.

----------

## Perfect Gentleman

 *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.

----------

## Zucca

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?

----------

## grumblebear

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.

----------

## ian.au

 *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.

----------

## ian.au

 *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? 
> ...

 

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.

----------

## Perfect Gentleman

 *ian.au wrote:*   

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

 

```
~ $ 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
```

----------

## Fitzcarraldo

 *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

----------

## jhon987

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?

----------

## grumblebear

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.

----------

## NeddySeagoon

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.

----------

## ian.au

 *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. 
> 
> ```
> ...

 

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.

----------

## Fitzcarraldo

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.

----------

## jhon987

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.

----------

## ian.au

 *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.

----------

## Perfect Gentleman

@ian.au, now got CONFIG_MODULE_UNLOAD=y, printer still worksLast edited by Perfect Gentleman on Tue Jan 03, 2017 11:04 am; edited 1 time in total

----------

## jhon987

 *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

----------

## ian.au

 *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.

----------

## ian.au

 *jhon987 wrote:*   

>  *ian.au wrote:*   
> 
> maybe a LART would save your obviously valuable time. 
> 
> Urban Dictionary:"  LART
> ...

 

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.

----------

## Lokesh

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 or Very Mad: 

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.

```
lsusb

Bus 002 Device 009: ID 0482:0003 Kyocera Corp.
```

```
sudo grep -i printer /boot/config-4.4.26-gentoo

# CONFIG_USB_PRINTER is not set
```

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

----------

