# /dev/usblp0 missing!

## ricochen

Hi all. I tried to get my hp deskjet 840C (uses usb connection) to work in gentoo by following the printing-howto guide. 

I emerged packages cups, foomatic, hpijs and downloaded a HP-DeskJet_840C-hpijs.ppd from http://www.linuxprinting.org to my /usr/share/cups/model

I had usb and usb printer supported as modules in my kernel (2.6.5). I got the following message when I plug my printer (after I modprobe usbcore; modprobe usblp):

drivers/usb/core/usb.c: registered new driver hub

drivers/usb/core/usb.c: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

seems like no printers are detected. I can't find usblp0 in my /dev or lp0 in my /dev/usb.

I worked on by configuring cups via the webadmin interface after

/etc/init.d/cupsd start

tried to print a test page, but nothing is printed.

the cups configuration file is as follow:

<DefaultPrinter hp840c>

Info hi

Location here

DeviceURI usb:/dev/usblp0

State Idle

Accepting Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

</Printer>

any help will be appreciated.

----------

## NeddySeagoon

ricochen,

A few things, if you don't get /dev/usb/lp0, your kernel is broken or missing at least one module.

Also, this line is wrong  *Quote:*   

> DeviceURI usb:/dev/usblp0

 

It needs a "/" between usb and lp0 like DeviceURI usb:/dev/usb/lp0[/quote]

Do you have any working USB attachments at all?

Note that the cat test in the guide won't work for you. The printer needs a line feed before it prints anything. Find or create a small text file to cat instead. As long as it has at least one linefeed.

----------

## boxofdeath

im having problems with my HP printer too. when do a modprobe of usblp or usbcore i get:

FATAL: Module usbcore not found.

FATAL: Module usblp not found.

and i have them built into my kernel. 

also my /dev/usb is empty and i have 4 usb devices pluged in. help?

----------

## NeddySeagoon

boxofdeath,

You cannot modprobe modules that are build into the kernel. They are loaded at boot time. They will not appear in lsmod either.

For USB printing you need to select the following in your kernel. I prefer modules, because you can see whats happening with lsmod and they can be added and removed without rebuilding the whole kernel.

Support for Host-side USB

USB device filesystem

One of 

OHCI HCD support

UHCI HCD (most Intel and VIA) support

USB Printer support

Its safe to build all five items as modules but if you want to build things into the kernel you must only choose the righ OHCI/UHCI for your hardware. Look at dmesg to see which one you need,

----------

## boxofdeath

alright ill give it a try and let you know, thanks for the fast reply

----------

## boxofdeath

alright i did that now dmesg  says

```

drivers/usb/core/usb.c: problem -17 when registering driver usblp

kobject_register failed for usblp (-17)

Call Trace:

 [<c021f947>] kobject_register+0x57/0x60

 [<c02759da>] bus_add_driver+0x4a/0xa0

 [<c0275e5f>] driver_register+0x2f/0x40

 [<c02e9d5f>] usb_register+0x3f/0xa0

 [<e1a11013>] usblp_init+0x13/0x37 [usblp]

 [<c0136af5>] sys_init_module+0x105/0x1d0

 [<c010917b>] syscall_call+0x7/0xb

drivers/usb/core/usb.c: problem -17 when registering driver usblp

```

whats going on there?

----------

## NeddySeagoon

boxofdeath,

Something is broken in the kernel or one of the modules.

What motherboard or USB card have you got and which kernel are you running?

The outout of lspci and uname -a will tell all.

----------

## boxofdeath

well first off lspci .... command not found :S 

and uname -a

```

Linux gentoo 2.6.5-gentoo-r1 #1 Thu May 13 10:21:15 CST 2004 i686 AMD Duron(tm) Processor AuthenticAMD GNU/Linux
```

----------

## NeddySeagoon

boxofdeath,

You need to 

```
emerge  pciutils
```

 then.

----------

## boxofdeath

alright done:

```

lspci

0000:00:00.0 Host bridge: Silicon Integrated Systems [SiS] 735 Host (rev 01)

0000:00:01.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)

0000:00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge)

0000:00:02.1 SMBus: Silicon Integrated Systems [SiS]: Unknown device 0016

0000:00:02.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)

0000:00:02.3 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)

0000:00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)

0000:00:02.6 Modem: Silicon Integrated Systems [SiS] AC'97 Modem Controller (rev a0)

0000:00:03.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 90)

0000:00:0b.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)

0000:00:0d.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08)

0000:00:0d.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 08)

0000:01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200] (rev 01)

0000:01:00.1 Display controller: ATI Technologies Inc RV280 [Radeon 9200] (Secondary) (rev 01)

```

----------

## lbrtuk

You need to emerge lspci.

----------

## boxofdeath

nothing is still comming up

----------

## ricochen

Hi Neddy,

I used genkernel to re-compiled my 2.6.5-gentoo-r1 kernel with EHCI HCD (USB 2.0) support as a module and I found somehing new in my /var/log/messages 

drivers/usb/core/usb.c: registered new driver hub

ehci_hcd 0000:00:10.3: VIA Technologies, Inc. USB 2.0

ehci_hcd 0000:00:10.3: irq 5, pci mem f8a29000

ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:10.3: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 6 ports detected

but I still don't get /dev/usb/lp0 or /dev/usblp0

the output of lsmod is:

ntfs                   86348  3

vfat                   12032  1

fat                    40128  1 vfat

usblp                  11264  0

via82cxxx_audio        26504  0

ac97_codec             17164  1 via82cxxx_audio

nls_utf8                1792  3

ehci_hcd               23812  0

usbcore                63008  2 usblp,ehci_hcd

and the output of lspci is:

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8235 PCI Bridge

0000:00:08.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)

0000:00:09.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 02)

0000:00:09.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 02)

0000:00:0a.0 RAID bus controller: Silicon Image, Inc. (formerly CMD Technology Inc) PCI0649 (rev 02)

0000:00:0b.0 VGA compatible controller: ATI Technologies Inc 3D Rage II+ 215GTB [Mach64 GTB] (rev 9a)

0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)

0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge

0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

0000:01:00.0 VGA compatible controller: nVidia Corporation NV28 [GeForce4 Ti 4200 AGP 8x] (rev a1)

by the way, my HP Deskjet 840C works well in both my SuSE 9.0 box  and my windows 2000 pro.

I still don't understand why /dev/usb/lp0 is missing in my gentoo box.

----------

## NeddySeagoon

ricochen,

You are the easy one - I think.

ehci is for USB 2.0 devices - be prepared to unload that.

Your lspci says *Quote:*   

> 0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80) 

 which shows that you need the UHCI_HCD driver, not the OHCI_HCD driver. They are for different hardware.

You are missing the module to drive your USB 1.1 hardware on the motherboard. It looks like everything else is there.

If the module is built but not loaded 

```
modprobe uhci_hcd
```

 will load it. Add it to /etc/modules autoload.

If its not built, go into the kerenl configuration, select UHCI_HCD as a module, do 

```
make modules 

make modules_install
```

then modprobe it. Thats much less painful than a full kernel rebuild and no reboot required either.

----------

## NeddySeagoon

boxofdeath,

You have a SiS chipset and they don't advertise which driver you need. Build both as modules and do some trial and error.

```
modprobe ohci_hcd
```

 then 

```
modprobe usblp
```

 and see if you get /dev/usb/lp0 with your printer plugged in.

Check what is actually loaded with lsmod.

If that fails do 

```
modprobe -r usblp

modprobe -r ohci_hcd
```

 to remove the modules and try with the other hardware driver.

Add the names to /etc/modules.autoload when you find out what works.

With both USB 1.1 drivers built as modules, you may find the kernel loads the right one at startup, so one may already be loaded for  you.

----------

## Vallentha

I seem to remember having this problem a while back with my deskjet950C. if i remember correctly the problem was in the kernel. 

/proc file system support & /dev file system support (obsolete) needed enabling.

Hope this helps

Chris

----------

## boxofdeath

I tried it with both drivers and nothing still shows up in the /dev/usb/ dir other than a directory calld hid/ I've never had this much trouble with any linux os.

----------

## NeddySeagoon

boxofdeath,

Are your USB ports disabled in the BIOS?

or even set to USB 2.0 only?

They need to be enabled and set to Auto or USB2.0/USB1.1.

What have you got in /proc/bus/usb/devices post its entire contents please.

----------

## boxofdeath

there isnt any directories in /proc/bus/usb my usb is enabled within my bios. i was recently testing Suse 9.1 on my box and had no trouble with  any of my usb devices.

----------

## ricochen

NeddySeagoon,

Hey thanks a lot man. I finally got my printer to work in gentoo by following your direction.

I load the ehci_hcd module (it was built as a module along with ohci_hcd while I asked you the second time) and hand-edit /etc/cups/printers.conf

by setting 

DeviceURI usb:/dev/usb/lp0

(it was DeviceURI usb://HP blabla)

then I restarted cupsd,  printed a test page  in http://127.0.0.1:631/

and it worked just like a charm!

I am going to check whether I can set my usb to 2.0 in my BIOS (They are v2.0 according to my motheboardr's manual)

Thanks again.

----------

## ricochen

there is a tryo in my last post:

ehci_hcd should be uhci_hcd

----------

## boxofdeath

im still having trouble with my /dev/usb/ directory/ there still isnt anything in the directory. what am i to do?

----------

## NeddySeagoon

boxofdeath,

Please post the usb section of your kernel .config file. Normally the file can be found at /usr/src/linux/.config. It may not be there if you have been upgrading your kernel and not updated the /usr/src/linux symlink.

You can post the whole file if you must but its abot 30kb

----------

## boxofdeath

```

#

# Device Drivers

#

#

# Generic Driver Options

#

CONFIG_FW_LOADER=m

CONFIG_BLK_DEV_INITRD=y

CONFIG_LBD=y

#

# USB support

#

CONFIG_USB=y

CONFIG_USB_DEBUG=y

#

# Miscellaneous USB options

#

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_BANDWIDTH is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

#

# USB Host Controller Drivers

#

# CONFIG_USB_EHCI_HCD is not set

CONFIG_USB_OHCI_HCD=m

CONFIG_USB_UHCI_HCD=y

#

# USB Device Class drivers

#

# CONFIG_USB_AUDIO is not set

# CONFIG_USB_BLUETOOTH_TTY is not set

# CONFIG_USB_MIDI is not set

# CONFIG_USB_ACM is not set

CONFIG_USB_PRINTER=m

CONFIG_USB_STORAGE=y

# CONFIG_USB_STORAGE_DEBUG is not set

# CONFIG_USB_STORAGE_DATAFAB is not set

# CONFIG_USB_STORAGE_FREECOM is not set

# CONFIG_USB_STORAGE_ISD200 is not set

# CONFIG_USB_STORAGE_DPCM is not set

# CONFIG_USB_STORAGE_HP8200e is not set

# CONFIG_USB_STORAGE_SDDR09 is not set

# CONFIG_USB_STORAGE_SDDR55 is not set

# CONFIG_USB_STORAGE_JUMPSHOT is not set

#

# USB Human Interface Devices (HID)

#

CONFIG_USB_HID=m

CONFIG_USB_HIDINPUT=y

# CONFIG_HID_FF is not set

# CONFIG_USB_HIDDEV is not set

#

# USB HID Boot Protocol drivers

#

# CONFIG_USB_KBD is not set

# CONFIG_USB_MOUSE is not set

# CONFIG_USB_AIPTEK is not set

# CONFIG_USB_WACOM is not set

# CONFIG_USB_KBTAB is not set

# CONFIG_USB_POWERMATE is not set

# CONFIG_USB_MTOUCH is not set

# CONFIG_USB_XPAD is not set

# CONFIG_USB_ATI_REMOTE is not set

#

# USB Imaging devices

#

# CONFIG_USB_MDC800 is not set

# CONFIG_USB_MICROTEK is not set

# CONFIG_USB_HPUSBSCSI is not set

#

# USB Multimedia devices

#

# CONFIG_USB_DABUSB is not set

# CONFIG_USB_VICAM is not set

# CONFIG_USB_DSBR is not set

# CONFIG_USB_IBMCAM is not set

# CONFIG_USB_KONICAWC is not set

# CONFIG_USB_OV511 is not set

# CONFIG_USB_PWC is not set

# CONFIG_USB_SE401 is not set

# CONFIG_USB_STV680 is not set

# CONFIG_USB_W9968CF is not set

#

# USB Network adaptors

#

# CONFIG_USB_CATC is not set

# CONFIG_USB_KAWETH is not set

# CONFIG_USB_PEGASUS is not set

# CONFIG_USB_RTL8150 is not set

# CONFIG_USB_USBNET is not set

#

# USB port drivers

#

# CONFIG_USB_USS720 is not set

#

# USB Serial Converter support

#

# CONFIG_USB_SERIAL is not set

#

# USB Miscellaneous drivers

#

# CONFIG_USB_EMI62 is not set

# CONFIG_USB_EMI26 is not set

# CONFIG_USB_TIGL is not set

# CONFIG_USB_AUERSWALD is not set

# CONFIG_USB_RIO500 is not set

# CONFIG_USB_LEGOTOWER is not set

# CONFIG_USB_LCD is not set

# CONFIG_USB_LED is not set

# CONFIG_USB_TEST is not set

#

# USB Gadget Support

#

# CONFIG_USB_GADGET is not set

```

[/code]

----------

## boxofdeath

Well i re-compiled my kernel and loaded the modules again, and volla! it worked some  how. but my sound itsnt working now. just another problem to deal with. thanks for your time!

----------

## NeddySeagoon

boxofdeath,

Turn off USB_DEBUG. If USB is working it will fill your log full of rubbish which you don't want to know about and slow down USB operations.

Since I'm writing anyway this is not a giood idea

 *Quote:*   

> CONFIG_USB_OHCI_HCD=m
> 
> CONFIG_USB_UHCI_HCD=y

  These are the two different drivers for your USB hardware. Building both as modules is OK, because they can be modprobed independantly. In this case  UHCI_HCD cannot be removed for USB_OHCI_HCD to get the hardware. I suspect that this was probably your problem,

Does dmesg mention ohci anywhere?

Start a new thread for your sould isssue if you need more help

----------

## Bigpoms

I'm having the same problems.  I configured the kernel for usb and usb printing.  When I try to modprobe usbcore or usblp I get an error "fatal usbcore not found".  I looked at the drivers directory and usbcore.o and usblp.o  are there.  Then I recompiled my kernel again changed grub rebooted and still the same error.  I followed along on this thread and still no go.  Kernel is 2.6.5.  Nvidia chip set, SN41G2.  Thanks in advance.

Dave

----------

## NeddySeagoon

Bigpoms,

If your kernel is 2.6.5, all your modules should end in .ko

emerge usbview or look in /proc/bus/usb/devices to see what is connected to your USB subsystem

```
dmesg | grep ohci
```

 and 

```
dmesg | grep uhci
```

 is also informative. One should produce no output.

Also 

```
grep EHCI /usr/src/linux/.config 

grep OHCI /usr/src/linux/.config 
```

and

```
grep UHCI /usr/src/linux/.config
```

 will show how your root hub drivers are set up in the kernel.

----------

## Bigpoms

NeddySeagoon,

  I did that and here is the outcome. Thanks again.

root@dave dave # dmesg | grep ohci

root@dave dave # dmesg | grep uhci

root@dave dave # grep EHCI /usr/src/linux/.config

CONFIG_USB_EHCI_HCD=y

# CONFIG_USB_EHCI_SPLIT_ISO is not set

root@dave dave # grep UHCI /usr/src/linux/.config

CONFIG_USB_UHCI_HCD=y

root@dave dave #

Dave

----------

## gmcle454

NeddySeagoon 

I'm haveing a similar problem with my usb printer. I've started this thread. If you have any suggestions, I would be very greatful.

----------

