Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 121973 - /dev/usb missing but (some) usb work
Summary: /dev/usb missing but (some) usb work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-07 05:38 UTC by Joel Metelius
Modified: 2006-02-07 23:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
kernel config file (.config,36.70 KB, text/plain)
2006-02-07 13:01 UTC, Joel Metelius
Details
/etc/conf.d/rc (rc,4.43 KB, text/plain)
2006-02-07 13:26 UTC, Joel Metelius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Metelius 2006-02-07 05:38:16 UTC
The problem is that the printer is named /dev/lp0 and not /dev/usb/lp0 (or /dev/usblp0) which is expected by the printer/scanner driver hplip. I can print (with the usb printer driver pointing to /dev/lp0) and the the USB harddrive is working.

* I used to have /dev/usb working until I updated recently. But the problem is that I updated a lot and don't know what caused the problem.
* I know the baselayout is new (1.11.14-r3), the kernel is new (from 2.6.11 to 2.6.15) and about everything else as well.
* I only used UHCI and not EHCI before (from what I remember but they where compiled as modules).

Tried to write an udev rule to fix it but it didn't work...
BUS="usb", SYSFS{serial}="MY56RCB2800498", NAME="%k", SYMLINK="psc1510"
Comment 1 Joel Metelius 2006-02-07 05:39:12 UTC
> sane-find-scanner
found USB scanner (vendor=0x03f0, product=0x4c11) at libusb:004:002

> tail -F /var/log/messages
Feb  5 22:42:56 p4 python: hpssd [WARN] Inrecognized URI: usb:/dev/lp0
Feb  5 22:45:26 p4 saned[25223]: saned (AF-indep+IPv6) from sane-backends 1.0.15 ready
Feb  5 22:45:27 p4 saned[25223]: check_host: getpeername failed: Socket operation on non-socket
Feb  5 22:45:27 p4 saned[25223]: init: access by host [error] denied
Feb  5 22:45:27 p4 saned[25223]: quit: exiting
Feb  5 22:46:23 p4 python: hpssd [WARN] Inrecognized URI: usb:/dev/lp0

> ls -l /dev/usb*
crw-rw----  1 root root 189, 385 Feb  5 12:09 /dev/usbdev4.2
> ls -l /dev/lp*
crw-rw----  1 root root 180, 0 Feb  5 12:09 /dev/lp0
> lsusb
Bus 005 Device 002: ID 056a:0062 Wacom Co., Ltd
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 002: ID 03f0:4c11 Hewlett-Packard
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 006: ID 059b:007e Iomega Corp.
Bus 001 Device 001: ID 0000:0000

> grep usb /var/log/messages
Feb  5 12:10:17 p4 usbcore: registered new driver usbfs
Feb  5 12:10:17 p4 usbcore: registered new driver hub
Feb  5 12:10:17 p4 usbmon: debugfs is not available
Feb  5 12:10:17 p4 usb 1-5: new high speed USB device using ehci_hcd and address 2
Feb  5 12:10:17 p4 usb 4-2: new full speed USB device using uhci_hcd and address 2
Feb  5 12:10:17 p4 usb 5-2: new low speed USB device using uhci_hcd and address 2
Feb  5 12:10:17 p4 usbcore: registered new driver usbhid
Feb  5 12:10:17 p4 drivers/usb/input/hid-core.c: v2.6:USB HID core driver
Feb  5 12:10:17 p4 drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x4C11
Feb  5 12:10:17 p4 usbcore: registered new driver usblp
Feb  5 12:10:17 p4 drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Feb  5 12:10:17 p4 usbcore: registered new driver wacom
Feb  5 12:10:17 p4 drivers/usb/input/wacom.c: v1.44:USB Wacom Graphire and Wacom Intuos tablet driver


> grep USB .config | grep -v '#'
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_PRINTER=m
CONFIG_USB_STORAGE=m
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
CONFIG_USB_WACOM=m
CONFIG_USB_MON=y 
Comment 2 SpanKY gentoo-dev 2006-02-07 06:13:20 UTC
neglected to post `emerge info`

also, what version of udev
Comment 3 Joel Metelius 2006-02-07 09:52:52 UTC
sys-fs/udev-079-r1

Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.2.3-r6, 2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.4.19-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/sound/events /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.easynet.nl/mirror/gentoo/ ftp://mirror.pudas.net/gentoo ftp://trumpetti.atm.tut.fi/gentoo/"
LINGUAS="en sv"
MAKEOPTS="-j2 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d a52 aac aalib afs alsa ansi apache2 apm arts artswrappersuid asf auctex audiofile avi berkdb bitmap-fonts blas bonobo browserplugin bzip2 cairo cdda cddb cdr crypt cups curl directfb dvd dvdr eds emacs emboss encode esd ethereal exif expat fam fbcon ffmpeg firebird flac foomaticdb fortran gcl gd gdbm gif glitz glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile i8x0 idn imagemagick imlib ipv6 java jikes jpeg junit kde lcms libcaca libg++ libwww mad mhash mikmod mmx mmx2 mmxext mng motif mozilla mp3 mpeg musicbrainz mysql ncurses nls nptl nptlonly nsplugin ogg oggvorbis openal opengl oss pam pcre pdflib perl png python qt quicktime readline real samba scanner sdk sdl slang spell sqlite sse sse2 ssl svg svga tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev usb vlm vorbis win32codecs wmf xine xinerama xml xml2 xmms xosd xv xvid xvmc zlib video_cards_radeon linguas_en linguas_sv userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 4 SpanKY gentoo-dev 2006-02-07 10:31:43 UTC
/dev/usb/ is a devfsism i'm pretty sure, and /dev/usblp0 is a stupid name imho

gregkh would know for sure whether this is a udev issue or a sucky printer driver issue
Comment 5 Joel Metelius 2006-02-07 12:06:20 UTC
I've usbfs and the name could just as well be /dev/usb/lp0 i guess...

> ls -R /proc/bus/usb
/proc/bus/usb: 001  002  003  004  005  devices
/proc/bus/usb/001: 001  005
/proc/bus/usb/002: 001
/proc/bus/usb/003: 001
/proc/bus/usb/004: 001  002
/proc/bus/usb/005: 001  002

> scanimage -L
Gives the following in /var/log/messages
 Feb  7 21:01:14 p4 python: hpssd [WARN] Inrecognized URI: usb:/dev/lp0
Comment 6 Greg Kroah-Hartman (RETIRED) gentoo-dev 2006-02-07 12:30:13 UTC
/dev/usb/lp0 is the proper name for a usb printer.

I just tested this on my box and it works just fine.

Can you attach your whole kernel .config file?
Comment 7 Joel Metelius 2006-02-07 13:01:29 UTC
Created attachment 79157 [details]
kernel config file
Comment 8 Joel Metelius 2006-02-07 13:04:26 UTC
This might be it:

> dmesg | grep usblp
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x03F0 pid 0x4C11
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
drivers/usb/class/usblp.c: usblp0: removed
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 1 alt 0 proto 2 vid 0x03F0 pid 0x4C11
Comment 9 Joel Metelius 2006-02-07 13:26:28 UTC
Created attachment 79161 [details]
/etc/conf.d/rc

I tried
> rm /lib/modules/2.6.15-gentoo-r1/kernel/drivers/usb/class/usblp.ko
and rebooted but it didn't help.

Is this how it is supposed to be with udev?
> ls /dev/ | wc
    655     655    3885
> ls -l /dev/ | grep -v ty | wc
     59     588    3302
Comment 10 Greg Kroah-Hartman (RETIRED) gentoo-dev 2006-02-07 14:01:57 UTC
Why would you remove the usb printer driver?

Ok, let's take baby steps...

What does the kernel log show when you plug in the printer to the system?  You 
can get this information from dmesg.



Comment 11 Joel Metelius 2006-02-07 14:25:11 UTC
> What does the kernel log show when you plug in the printer to the system?  

usb 4-2: USB disconnect, address 3
drivers/usb/class/usblp.c: usblp0: removed
usb 4-2: new full speed USB device using uhci_hcd and address 4
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 4 if 1 alt 0 proto 2 vid 0x03F0 pid 0x4C11
Comment 12 Joel Metelius 2006-02-07 14:28:51 UTC
(In reply to comment #10)
> Why would you remove the usb printer driver?
I though that when I had the hplip driver maybe the usblp wasn't supposed to be loaded. I those line from #8 indicated that /dev/usblp0 didn't exist because of the usblp:
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
drivers/usb/class/usblp.c: usblp0: removed
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 1 alt 0
Comment 13 Joel Metelius 2006-02-07 22:42:39 UTC
Now it seems that my udev rule is working:
# cat /etc/udev/rules.d/20-local.rules
BUS="usb", SYSFS{serial}="MY56RCB2800498", NAME="usb/lp0", SYMLINK="psc1510"
# ls /dev/usb
lp0
# ls /dev/psc* -l
lrwxrwxrwx  1 root root 7 Feb  8 07:27 /dev/psc1510 -> usb/lp0

But I still get:
> scanimage -L
Feb  8 07:29:06 p4 hpiod: unable to read uri:hp:/usb/ANY?device=/dev/usb/lp0 Device::DeviceID: Inappropriate ioctl for device
Feb  8 07:29:06 p4 python: hpssd [WARN] Inrecognized URI: usb:/dev/lp0

But when I removed my ruled and dis-reconnected the psc15100 the scanning actually works.
scanimage -L
device `hpaio:/usb/PSC_1500_series?serial=MY56RCB2800498' is a hp PSC_1500_series multi-function peripheral
Feb  8 07:34:45 p4 python: hpssd [WARN] Inrecognized URI: usb:/dev/lp0

I will reboot and check again
Comment 14 Joel Metelius 2006-02-07 23:38:54 UTC
Now, it works. I removed the rule which I created to fix the problem... I don't know what really fixed it? I emerged coldplug, recompiled kernel modules, and updated hplip and 2 other package from portage. As I figure hplip isn't rensponsible for creating /dev/usb/lp0 so that couldn't fix it. I still don't have anything alse under /dev/usb but maybe that's OK?

> ls /dev/usb
lp0

$ scanimage -L
device `hpaio:/usb/PSC_1500_series?serial=MY56RCB2800498' is a hp PSC_1500_series multi-function peripheral