I have a physical server where Ubuntu 8.04 LTS is installed as the Dom0. I also use Ubuntu 8.04 LTS for the DomU domain as well. In the DomU, I want to run a print server. The current printer I have has a USB interface which is plugged into the Dom0 machine. The output of uname -r is 2.6.24-23-xen. Below is the output of lspci | grep USB on the Dom0 machine. 00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) Currently, I have all of these devices forwarded to the DomU machine using the pciback.hide syntax in the /boot/grub/menu.lst file. Below is the output of lspci | grep USB on the DomU machine. 00:00.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02) 00:00.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02) 00:00.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02) 00:00.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02) 00:00.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) So it appears that the devices are being hidden and passed through appropriately. Below is the output of lsusb on the DomU machine. Bus 005 Device 001: ID 0000:0000 Bus 004 Device 002: ID 03f0:6204 Hewlett-Packard DeskJet 5150c Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000 However, in CUPS, the printer is installed always reports as not being connected. So print jobs sent to the printer from other Windows client on the network are sent to the queue and are never printed. Any suggestions on where I should look to resolve this issue? Thanks. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matt Richardson
2009-Feb-11 16:35 UTC
Re: [Xen-users] Passing a USB printer to a Linux DomU
I have gotten to the same point and suspect that an entry isn''t being made in /dev for the printer, but had to move on to another project. What does lpinfo -v report? Mine does not show the usb printer, although lsusb does. -- Matt _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
There is actually a pretty decent explanation of how to do USB printing on the OpenVZ site. I figured that the differences for passthrough can''t be that different. That How To really focuses on the issue you are referring to about entries in the /dev directory. It was one of the first places I looked when I encountered my problem. I have the following entry in the /dev directory: lrwxrwxrwx 1 root root 7 Feb 10 23:19 usblp0 -> usb/lp0 ls -l /dev/usb shows: crw-rw---- 1 root lp 180, 0 Feb 10 23:19 lp0 Further more, my USB printer is on the fourth device as a result of lsusb: Bus 005 Device 001: ID 0000:0000 Bus 004 Device 002: ID 03f0:6204 Hewlett-Packard DeskJet 5150c Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000 A ls -l /dev/bus/usb/004 shows: crw-rw-r-- 1 root root 189, 384 Feb 10 23:19 001 crw-rw---- 1 lp lp 189, 385 Feb 11 12:17 002 I did not manually create any of these entries in the /dev directory. I presume they are all created as a result of the pci passthrough. Furthermore, my printer is displayed in the output of lpinfo -v: network socket network beh direct usb://hp/deskjet%205100?serial=MY3AN4J3337A direct hp:/usb/deskjet_5100?serial=MY3AN4J3337A direct hpfax network http network ipp network lpd direct scsi Any other suggestions? It appears that it is very close to working as anticipated. Quoting Matt Richardson <shortpath@gmail.com>:> I have gotten to the same point and suspect that an entry isn''t being > made in /dev for the printer, but had to move on to another project. > What does lpinfo -v report? Mine does not show the usb printer, > although lsusb does. > > > -- > Matt > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matt Richardson
2009-Feb-11 18:45 UTC
Re: [Xen-users] Passing a USB printer to a Linux DomU
On Wed, Feb 11, 2009 at 10:28 AM, Thomas Jensen <tom.jensen@digitaltoolbox-inc.com> wrote: <snip>> > I did not manually create any of these entries in the /dev directory. I > presume they are all created as a result of the pci passthrough. > Furthermore, my printer is displayed in the output of lpinfo -v: > > network socket > network beh > direct usb://hp/deskjet%205100?serial=MY3AN4J3337A > direct hp:/usb/deskjet_5100?serial=MY3AN4J3337A > direct hpfax > network http > network ipp > network lpd > direct scsi > > Any other suggestions? It appears that it is very close to working as > anticipated.That looks like a CUPS problem, like the queue is enabled but not accepting or something to that effect. Are you using the usb or hp socket to connect to the printer? Also, my apologies if this is straying off topic. I''m happy to take it off list. -- Matt _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I guess the solution I was hoping for from the list would be to confirm that Xen is handling the passthrough of the USB correctly. I am not an expert by any means, but since the devices are created in /dev and the printer shows up in lsusb and lpinfo, it appears that I should begin troubleshooting elsewhere. Would you agree that USB is being passed correctly? As part of this test rig, I have eBox installed which is managing the sharing of the printer. I am pretty sure it uses CUPS, so I could begin troubleshooting the issue there and report back. Quoting Matt Richardson <shortpath@gmail.com>:> On Wed, Feb 11, 2009 at 10:28 AM, Thomas Jensen > <tom.jensen@digitaltoolbox-inc.com> wrote: > <snip> >> >> I did not manually create any of these entries in the /dev directory. I >> presume they are all created as a result of the pci passthrough. >> Furthermore, my printer is displayed in the output of lpinfo -v: >> >> network socket >> network beh >> direct usb://hp/deskjet%205100?serial=MY3AN4J3337A >> direct hp:/usb/deskjet_5100?serial=MY3AN4J3337A >> direct hpfax >> network http >> network ipp >> network lpd >> direct scsi >> >> Any other suggestions? It appears that it is very close to working as >> anticipated. > > That looks like a CUPS problem, like the queue is enabled but not > accepting or something to that effect. Are you using the usb or hp > socket to connect to the printer? > > Also, my apologies if this is straying off topic. I''m happy to take > it off list. > > -- > Matt > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I created a test DomU and installed only the base Ubuntu Server OS and CUPS. I then installed my printer and tried printing a test page all through the CUPS browser based administration. When I tried printing a test page, the following appeared on the console. I have no idea how to interpret this, but it seems very coincidental. [ 2242.157407] Fatal DMA error! Please use ''swiotlb=force'' [ 2242.157438] ------------[ cut here ]------------ [ 2242.157446] kernel BUG at /build/buildd/linux-2.6.24/debian/build/custom-source-xen/arch/x86/kernel/ pci-dma_32-xen.c:405! [ 2242.157452] invalid opcode: 0000 [1] SMP [ 2242.157459] CPU 0 [ 2242.157463] Modules linked in: ppdev parport_pc lp parport usblp ipv6 evdev ext3 jbd mbcache ehci_hc d uhci_hcd usbcore raid10 raid456 async_xor async_memcpy async_tx xor raid1 raid0 multipath linear md_m od dm_mirror dm_snapshot dm_mod fuse [ 2242.157511] Pid: 14093, comm: usb Not tainted 2.6.24-23-xen #1 [ 2242.157515] RIP: e030:[<ffffffff802144b0>] [<ffffffff802144b0>] dma_map_single+0x1a0/0x1e0 [ 2242.157532] RSP: e02b:ffff88001e71bd88 EFLAGS: 00010292 [ 2242.157536] RAX: 000000000000003e RBX: 0000000000051125 RCX: 0000000000000001 [ 2242.157541] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffff8058ce20 [ 2242.157545] RBP: ffff88001ee38000 R08: 0000000b57416844 R09: 0000000000000000 [ 2242.157549] R10: ffff880001ce4fe0 R11: 0000000000000001 R12: 0000000000002000 [ 2242.157554] R13: ffff88001e046070 R14: 0000000000000000 R15: 0000000000000000 [ 2242.157562] FS: 00007f82398d2700(0000) GS:ffffffff805c7000(0000) knlGS:0000000000000000 [ 2242.157566] CS: e033 DS: 0000 ES: 0000 [ 2242.157570] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2242.157575] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 2242.157580] Process usb (pid: 14093, threadinfo ffff88001e71a000, task ffff8800016d7800) [ 2242.157584] Stack: 0000000000000000 ffff8800016f23c0 00000000000000d0 ffff8800205da400 [ 2242.157594] ffff8800016f23d0 ffffffff8809a07b 0000000000000030 0000000000000020 [ 2242.157603] 00000000000000d0 ffffffff80299dbc ffff88001fc04940 000000001ee38000 [ 2242.157612] Call Trace: [ 2242.157647] [<ffffffff8809a07b>] :usbcore:usb_hcd_submit_urb+0x1bb/0x8f0 [ 2242.157660] [<ffffffff80299dbc>] kmem_cache_alloc+0xfc/0x120 [ 2242.157669] [<ffffffff80299e6e>] cache_alloc_refill+0x8e/0x5f0 [ 2242.157697] [<ffffffff8809ad0e>] :usbcore:usb_get_urb+0xe/0x20 [ 2242.157713] [<ffffffff88163026>] :usblp:usblp_write+0x196/0x370 [ 2242.157725] [<ffffffff8029e34d>] vfs_write+0xed/0x190 [ 2242.157733] [<ffffffff8029ea53>] sys_write+0x53/0x90 [ 2242.157742] [<ffffffff8020c698>] system_call+0x68/0x6d [ 2242.157752] [<ffffffff8020c630>] system_call+0x0/0x6d [ 2242.157759] [ 2242.157761] [ 2242.157762] Code: 0f 0b eb fe 48 c7 c1 f0 9d 48 80 ba 8e 01 00 00 48 c7 c6 38 [ 2242.157788] RIP [<ffffffff802144b0>] dma_map_single+0x1a0/0x1e0 [ 2242.157796] RSP <ffff88001e71bd88> [ 2242.157807] ---[ end trace 471a18a5df10d8e5 ]--- -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Matt Richardson Sent: Wednesday, February 11, 2009 12:45 PM To: xen-users@lists.xensource.com Subject: Re: [Xen-users] Passing a USB printer to a Linux DomU On Wed, Feb 11, 2009 at 10:28 AM, Thomas Jensen <tom.jensen@digitaltoolbox-inc.com> wrote: <snip>> > I did not manually create any of these entries in the /dev directory. > I presume they are all created as a result of the pci passthrough. > Furthermore, my printer is displayed in the output of lpinfo -v: > > network socket > network beh > direct usb://hp/deskjet%205100?serial=MY3AN4J3337A > direct hp:/usb/deskjet_5100?serial=MY3AN4J3337A > direct hpfax > network http > network ipp > network lpd > direct scsi > > Any other suggestions? It appears that it is very close to working as > anticipated.That looks like a CUPS problem, like the queue is enabled but not accepting or something to that effect. Are you using the usb or hp socket to connect to the printer? Also, my apologies if this is straying off topic. I''m happy to take it off list. -- Matt _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users