Bug 9713 - 2.6.24: usb printer fails to print or work
Summary: 2.6.24: usb printer fails to print or work
Status: REJECTED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks: USB
  Show dependency tree
 
Reported: 2008-01-08 00:05 UTC by Jesse Brandeburg
Modified: 2008-06-04 23:32 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.24
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
/proc/bus/usb/devices (896 bytes, text/plain)
2008-01-08 00:08 UTC, Jesse Brandeburg
Details
lsusb -v (3.83 KB, text/plain)
2008-01-08 00:08 UTC, Jesse Brandeburg
Details
grep usb /var/log/messages (9.45 KB, text/plain)
2008-01-08 00:09 UTC, Jesse Brandeburg
Details
debugfs usbmon output (3.79 KB, text/plain)
2008-01-08 00:09 UTC, Jesse Brandeburg
Details
2.6.21 proc/bus/usb/devices (895 bytes, text/plain)
2008-01-13 15:50 UTC, Jesse Brandeburg
Details
messages after unplug replug (3.14 KB, text/plain)
2008-01-13 15:50 UTC, Jesse Brandeburg
Details
lsusb 2.6.21 (3.82 KB, text/plain)
2008-01-13 15:51 UTC, Jesse Brandeburg
Details
dmesg (17.51 KB, text/plain)
2008-01-13 15:51 UTC, Jesse Brandeburg
Details
usbmon 2.6.21 (3.89 KB, text/plain)
2008-01-13 15:52 UTC, Jesse Brandeburg
Details

Description Jesse Brandeburg 2008-01-08 00:05:21 UTC
Latest working kernel version:
2.6.21.6
Earliest failing kernel version:
2.6.23.12
Distribution:
CentOS 4
Hardware Environment:
P3,1Ghz, HP VL400, 384MB ram
00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82815 Chipset Graphics Controller (CGC) (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801AA PCI Bridge (rev 02)
00:1f.0 ISA bridge: Intel Corporation 82801AA ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801AA IDE Controller (rev 02)
00:1f.2 USB Controller: Intel Corporation 82801AA USB Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801AA SMBus Controller (rev 02)
01:01.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
01:02.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)

Software Environment:
Firewall/Print server

Problem Description:
Canon IP1500 printer fails to work any more to print over samba, or otherwise.

Steps to reproduce:
boot system, try to print over network
printer never does anything.
printer shows up in lsusb -v (attached)
enabled DEBUG_FS and followed usbmon.txt instructions while unplug/replug the printer.
also got timeout from hal:
Jan  7 23:46:45 nfw hal.hotplug[4949]: timout(10000 ms) waiting for /devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2:1.0


Expected:
system was working just fine with 2.6.21.6
should be able to use my printer, don't know why others aren't failing too.

I can rebuild kernels but it takes a long time, and this machine would like to be stable otherwise the wife acceptance factor goes WAAAAY down.
Comment 1 Jesse Brandeburg 2008-01-08 00:08:23 UTC
Created attachment 14352 [details]
/proc/bus/usb/devices
Comment 2 Jesse Brandeburg 2008-01-08 00:08:48 UTC
Created attachment 14353 [details]
lsusb -v
Comment 3 Jesse Brandeburg 2008-01-08 00:09:13 UTC
Created attachment 14354 [details]
grep usb /var/log/messages
Comment 4 Jesse Brandeburg 2008-01-08 00:09:59 UTC
Created attachment 14355 [details]
debugfs usbmon output

this is starting while device is plugged in, powering off device with power switch, and powering it back on.
Comment 5 Anonymous Emailer 2008-01-08 01:09:18 UTC
Reply-To: akpm@linux-foundation.org

On Tue,  8 Jan 2008 00:05:21 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=9713
> 
>            Summary: 2.6.23.12: usb printer fails to print or work
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.23.12
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: blocking
>           Priority: P1
>          Component: USB
>         AssignedTo: greg@kroah.com
>         ReportedBy: jesse.brandeburg@intel.com
> 
> 
> Latest working kernel version:
> 2.6.21.6
> Earliest failing kernel version:
> 2.6.23.12

regression..

> Distribution:
> CentOS 4
> Hardware Environment:
> P3,1Ghz, HP VL400, 384MB ram
> 00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and
> Memory
> Controller Hub (rev 02)
> 00:02.0 VGA compatible controller: Intel Corporation 82815 Chipset Graphics
> Controller (CGC) (rev 02)
> 00:1e.0 PCI bridge: Intel Corporation 82801AA PCI Bridge (rev 02)
> 00:1f.0 ISA bridge: Intel Corporation 82801AA ISA Bridge (LPC) (rev 02)
> 00:1f.1 IDE interface: Intel Corporation 82801AA IDE Controller (rev 02)
> 00:1f.2 USB Controller: Intel Corporation 82801AA USB Controller (rev 02)
> 00:1f.3 SMBus: Intel Corporation 82801AA SMBus Controller (rev 02)
> 01:01.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet
> Controller (rev 02)
> 01:02.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet
> Controller (rev 02)
> 
> Software Environment:
> Firewall/Print server
> 
> Problem Description:
> Canon IP1500 printer fails to work any more to print over samba, or
> otherwise.
> 
> Steps to reproduce:
> boot system, try to print over network
> printer never does anything.
> printer shows up in lsusb -v (attached)
> enabled DEBUG_FS and followed usbmon.txt instructions while unplug/replug the
> printer.
> also got timeout from hal:
> Jan  7 23:46:45 nfw hal.hotplug[4949]: timout(10000 ms) waiting for
> /devices/pci0000:00/0000:00:1f.2/usb1/1-2/1-2:1.0
> 
> 
> Expected:
> system was working just fine with 2.6.21.6
> should be able to use my printer, don't know why others aren't failing too.
> 
> I can rebuild kernels but it takes a long time, and this machine would like
> to
> be stable otherwise the wife acceptance factor goes WAAAAY down.
> 
Comment 6 Alan Stern 2008-01-08 07:43:43 UTC
How about providing a usbmon trace showing what happens when you try to print something?

Also, when you attach text files to the bug report please tell Bugzilla that they really are text/plain, not application/octet-stream.
Comment 7 Jesse Brandeburg 2008-01-08 09:01:20 UTC
Apologies about the mime type.
I tried a usbmon trace when printing, but didn't attach it because nothing came out.
What else can I provide for debug information?
Comment 8 Alan Stern 2008-01-08 10:55:39 UTC
Can you collect an analogous usbmon trace under 2.6.21 for comparison?
Comment 9 Jesse Brandeburg 2008-01-13 15:50:01 UTC
Created attachment 14438 [details]
2.6.21 proc/bus/usb/devices
Comment 10 Jesse Brandeburg 2008-01-13 15:50:28 UTC
Created attachment 14439 [details]
messages after unplug replug
Comment 11 Jesse Brandeburg 2008-01-13 15:51:03 UTC
Created attachment 14440 [details]
lsusb 2.6.21
Comment 12 Jesse Brandeburg 2008-01-13 15:51:44 UTC
Created attachment 14441 [details]
dmesg
Comment 13 Jesse Brandeburg 2008-01-13 15:52:18 UTC
Created attachment 14442 [details]
usbmon 2.6.21

last but not least usbmon output, as requested
Comment 14 Alan Stern 2008-01-17 14:04:59 UTC
I don't see any significant different in the two usbmon traces.  In particular, neither trace shows any data being sent to the printer.  This must mean that printing doesn't work under 2.6.21 either!
Comment 15 Jesse Brandeburg 2008-01-17 15:05:01 UTC
It was just unplug/replug, as I said before.  It seems like there is some difference to udev such that the usblp0 doesn't get created with the latest kernel.  Do I need a udev upgrade, if so that will be harder than it should be since I'm on an RPM based system.
Comment 16 Jesse Brandeburg 2008-03-02 20:24:49 UTC
tested 2.6.24 as requested.  Alan, I'm not pulling your chain here and as a fellow kernel driver developer I can give you some good information if you tell me what to look for.  I apologize for the crawl pace of this bug but I need help to figure out what is wrong.  Is there a way for me to test the usb communication part without samba?  I just tried printing using lpr (which I'm not sure ever worked) with no luck, but I did get some error about a missing /dev/usb/lp0 file.

I still cannot print with 2.6.24.  I am running Centos4, and it appears to be some udev compatibility problem, where the /dev/usb/lp0 is not created.
Comment 17 Jesse Brandeburg 2008-03-02 21:35:31 UTC
okay, here is what I found:

on 2.6.24 /dev/usb existed and was a device file
crw-rw---- ... /dev/usb

so /dev/usb/lp0 was not created by udev

after deleting /dev/usb
system created /dev/usb/, but with permissions
d---------  2 root root         60 Mar  2 20:52 usb
the /dev/usb/lp0 device was created successfully the next time I plugged in the printer, but still couldn't be printed to:
[root@nfw udev]# lpstat -pbubblejet -v
system for all: localhost
system for bubblejet: localhost
printer bubblejet@nfw unknown state. enabled since Mar 02 20:55:41 2008. available
Printer: bubblejet@nfw 'Canon Pixima ip1500'
 Queue: 1 printable job
 Server: pid 7129 active
 Unspooler: pid 7233 active
 Status: cannot open '/dev/usb/lp0' - 'Permission denied', attempt 3, sleeping 40 at 20:55:10.491
 Rank   Owner/ID               Pr/Class Job Files                 Size Time
active(attempt-2) jesse@nfw+127     A   127 smbprn.00000744.TUxP 32497 20:53:20

----------

note the Status: line above

I changed permissions for /dev/usb to 
chmod 777 /dev/usb

and the printer worked!

I checked 2.6.21, and udev DOES NOT create the /dev/usb, but instead just correctly creates the /dev/usb/lp0 device.

udevtest /class/usb
and
udevtest /class/usb/lp0

both return the same thing in both cases.  Something is created in a different order or contains something different in 2.6.21 vs 2.6.23/24

I don't understand any of "why" /dev/usb is being created except that it seems I'm not alone[1].  As to why 2.6.21.6 works okay.... umm, any ideas?

[1] http://www.felipe-alfaro.org/blog/2005/08/18/problems-with-udev-and-my-usb-printer/

this was major progress for me on this issue tonight.
Comment 18 Greg Kroah-Hartman 2008-03-02 22:27:55 UTC
Ah, so this is a udev issue on a very old userspace, right?

Is CONFIG_USB_DEVICE_CLASS set in your kernel configuration?  If not, please set it, and make sure that CONFIG_SYSFS_DEPRECATED is also set until you upgrade to a modern userspace.

Can you let me know if that solves the issue?
Comment 19 Jesse Brandeburg 2008-03-04 12:56:50 UTC
bugme-daemon@bugzilla.kernel.org wrote:
> ------- Comment #18 from greg@kroah.com  2008-03-02 22:27 -------
> Ah, so this is a udev issue on a very old userspace, right?

yes, 0.39 from Centos 4 aka Redhat EL4.
 
> Is CONFIG_USB_DEVICE_CLASS set in your kernel configuration?  If not,
> please set it, and make sure that CONFIG_SYSFS_DEPRECATED is also set
> until you upgrade to a modern userspace.

I don't know yet, I'll check for you.

> Can you let me know if that solves the issue?

I will update this as soon as I can test, will be a couple of days.
Comment 20 Jesse Brandeburg 2008-03-11 21:55:20 UTC
# grep CONFIG_USB_DEVICE_CLASS .config
CONFIG_USB_DEVICE_CLASS=y

# grep SYSFS .config
CONFIG_SYSFS_DEPRECATED=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_SYSFS=y

so those were already set and it still didn't work. :-(

# rpm -qa |grep udev
udev-039-10.19.el4

any other ideas?  upgrading udev in an RPM based os is hard and I'd rather not obliterate the device tree by screwing up the upgrade.  I tried for a bit but ran into too many issues.
Comment 21 Greg Kroah-Hartman 2008-03-11 22:05:02 UTC
On Tue, Mar 11, 2008 at 09:55:20PM -0700, bugme-daemon@bugzilla.kernel.org wrote:
> # rpm -qa |grep udev
> udev-039-10.19.el4

Please read the Documentation/Changes file, you need a new version of
udev, that is _VERY_ old and incompatible.
Comment 22 Jesse Brandeburg 2008-03-24 09:44:38 UTC
okay, well if it comes down to upgrade udev vs upgrade kernel, I guess I
will just close this bug and leave my kernel as is.  

I'm not familiar enough with udev to be able to upgrade it within my
distros' requirements, and unfortunately it is hard to justify the
change just to test a new kernel, as it is my home server and my wife
depends on it to be working.

Thanks for your assistance and time.

Note You need to log in before you can comment on or make changes to this bug.