Could not open /proc/bus/usb/devices

Bug #156085 reported by TJ
238
This bug affects 15 people
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned
Virtualbox
Fix Released
Unknown
apcupsd (Ubuntu)
Invalid
High
Scott James Remnant (Canonical)
Declined for Intrepid by Dustin Kirkland 
Gutsy
Invalid
Undecided
Unassigned
Hardy
Invalid
Undecided
Unassigned
Jaunty
Invalid
High
Scott James Remnant (Canonical)
fxload (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned
kvm (Ubuntu)
Fix Released
Medium
Dustin Kirkland 
Declined for Intrepid by Dustin Kirkland 
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Won't Fix
Low
Unassigned
Jaunty
Fix Released
Medium
Dustin Kirkland 
madfuload (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned
midisport-firmware (Ubuntu)
Fix Released
High
Scott James Remnant (Canonical)
Declined for Intrepid by Dustin Kirkland 
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
Jaunty
Fix Released
High
Scott James Remnant (Canonical)
qemu (Ubuntu)
Fix Released
Medium
Dustin Kirkland 
Declined for Intrepid by Dustin Kirkland 
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Won't Fix
Low
Unassigned
Jaunty
Fix Released
Medium
Dustin Kirkland 
qemu (openSUSE)
Fix Released
Critical
sysvinit (Ubuntu)
Won't Fix
High
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Invalid
Undecided
Unassigned
Hardy
Won't Fix
High
Unassigned
Jaunty
Won't Fix
High
Unassigned
usbview (Debian)
Fix Released
Unknown
usbview (Ubuntu)
Triaged
Medium
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
Jaunty
Won't Fix
Medium
Unassigned
vmware-server (Ubuntu)
Invalid
High
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Won't Fix
Undecided
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
Jaunty
Invalid
High
Unassigned

Bug Description

On Gutsy 64-bit using qemu/kvm (also VirtualBox and, I believe, VMWare) and the "-usb" switch no USB devices are available since qemu/kvm looks for the description of them in the 'devices' file of a usbfs mount at

/proc/bus/usb/

but the code previously providing the usbfs mount that is created at start-up via /etc/rcS/S11mountdevsubfs.sh --> /etc/init.d/mountdevsubfs.sh was commented out. The USB devices are now reported at

/dev/bus/usb/

but currently there is no usbfs file-system mounted/linked there to provide the 'devices' text-file.

qemu/kvm reports:

qemuctl -qemu vdeq kvm -boot c -m 512 -hda /home/all/VirtualMachines/WindowsXP-SP2.ovl -net nic,vlan=0 -soundhw es1370 -usb -net vde

info usbhost
Could not open /proc/bus/usb/devices

$ ls -l /proc/bus/usb
total 0

WORKAROUND:
To re-enable it edit the file '/etc/init.d/mountdevsubfs.sh' and uncomment the code after line 40 so it reads:
 # Magic to make /proc/bus/usb work
  #
  mkdir -p /dev/bus/usb/.usbfs
  domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
  ln -s .usbfs/devices /dev/bus/usb/devices
  mount --rbind /dev/bus/usb /proc/bus/usb
Execute the script manually to enable the change before a system reboot:
$ sudo /etc/init.d/mountdevsubfs.sh start

TJ (tj)
description: updated
Revision history for this message
Christopher Blay (blayde) wrote :

would making a symbolic link to /sys/bus/usb from /proc/bus/usb help or just screw everything up?

Revision history for this message
Christopher Blay (blayde) wrote :

alright, i take back my previous comment (i learned something new today). anyways, would it be possible for whoever maintains this package to add TJ's patch and update the repos?

Revision history for this message
TJ (tj) wrote :

Your initial comment made me smile - it was the first thing I tried. When I realised that wouldn't work I got smarter and did

mount --bind /sys/bus/usb /proc/bus/usb

and felt mighty pleased it worked! However qmeu/kvm still couldn't find any devices and I realised it was because in

/sys/bus/usb/devices all the device-links are relative, and begin ../../../devices Unfortunately, in the /proc/bus/usb tree that takes us to /proc/devices which is a regular file and already exists - drat, foiled again!

If other's can confirm this is a problem on 32-bit and 64-bit qemu and kvm I'll post apply the patch and post an SRU debdiff.

Changed in qemu:
assignee: nobody → intuitivenipple
importance: Undecided → Low
status: New → In Progress
Changed in kvm:
assignee: nobody → intuitivenipple
importance: Undecided → Low
status: New → In Progress
Revision history for this message
TJ (tj) wrote :

There is a work-around that re-enables /proc/bus/usb/devices:

Support for /proc/bus/usb/* was removed in the initscripts package (part of sysvinit), as per this changelog entry:

sysvinit (2.86.ds1-14.1ubuntu22) gutsy; urgency=low

  * Drop /proc/bus/usb again; software should all be ported to check
    /dev/bus/usb first by now.

 -- Scott James Remnant <email address hidden> Wed, 11 Jul 2007 13:47:24 +0100

To re-enable it edit the file '/etc/init.d/mountdevsubfs.sh' and uncomment the code after line 40 so it reads:

 # Magic to make /proc/bus/usb work
 #
 mkdir -p /dev/bus/usb/.usbfs
 domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
 ln -s .usbfs/devices /dev/bus/usb/devices
 mount --rbind /dev/bus/usb /proc/bus/usb

Execute the script manually to enable the change before a system reboot:

$ sudo /etc/init.d/mountdevsubfs.sh start

I'm adding the sysvinit package to this bug-report since the changelog entry says applications should now use /dev/bus/usb, but it seems that usb is the only 'bus' using that location. Everything else uses /sys/bus/. Therefore it directly causes the qemu/kvm problem. It seems illogical to require all applications that access USB to be patched for this.

There's a related bug report for VirtualBox with a comment by Scott, but no rationale to why it was done.

Bug #151585 "USB Devices unrecognised by virtualbox (/proc/bus/usb missing)"

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Support for /proc/bus/usb has been dropped because it is racey, and permissions are difficult to set -- compared with /dev/bus/usb which is maintained by udev and doesn't have these issues.

Ubuntu is not the only distribution to have dropped it.

If your software is using /proc/bus/usb, it is broken -- you've had over a year to change it, and you've failed to do so. Please change your software to use /dev/bus/usb now.

I've rejected your sysvinit bug; this is deliberate and is definitely not a bug.

Also your assertion about using /sys is entirely bogus - no devices exist under /sys.

Changed in sysvinit:
status: New → Invalid
Revision history for this message
TJ (tj) wrote :

Scott, thanks for the explanation. When I'd re-aimed kvm at /sys/bus/usb/ I hadn't realised that it looks a for a file 'devices'. I thought it was looking for the base of a directory-tree containing the devices, which is what /sys/bus/usb/devices is.

I'm not sure who is primary maintainer at Ubuntu - several people are listed as adding patches, and it's a MOTU package. I'm an end-user that wants the fix.
I've withdrawn the previous patch and created patches for kvm and qemu that use /dev/bus/usb/ and attached the debdiffs for Hardy and Gutsy-proposed here.

Revision history for this message
TJ (tj) wrote :
Revision history for this message
TJ (tj) wrote :
Revision history for this message
TJ (tj) wrote :

These patches fix an issue where qemu/kvm expects to find the USB devices file at /proc/bus/usb/devices and reports an error when started with the -usb flag as result. The location was changed in July as a result of a patch to sysvinit and is now /dev/bus/usb/devices.

Changed in kvm:
status: In Progress → Fix Committed
Changed in qemu:
status: In Progress → Fix Committed
TJ (tj)
Changed in kvm:
status: Fix Committed → In Progress
TJ (tj)
Changed in qemu:
assignee: intuitivenipple → nobody
status: Fix Committed → Confirmed
Changed in kvm:
assignee: intuitivenipple → nobody
status: In Progress → Confirmed
Revision history for this message
TJ (tj) wrote :

This is the kind of output to expect from the kvm/qemu debug shell (easily accessible when using qemuctl). The attachment is a screen-shot of qemuctl after doing Connect > USB > Renew.

(qemu) show usbhost
  Device 4.2, speed 12 Mb/s

    Class e0: USB device 044e:300d, UGX

  Device 2.8, speed 480 Mb/s

    Hub: USB device 04cc:1521

  Device 2.13, speed 480 Mb/s

    Class 00: USB device 07ab:fcc7, Freecom Mobile Drive

  Device 2.9, speed 480 Mb/s

    Hub: USB device 05e3:0606, USB2.0 Hub

  Device 2.12, speed 480 Mb/s

    Class 00: USB device 058f:6362, Mass Storage Device

  Device 2.11, speed 480 Mb/s

    Class 00: USB device 05ac:120a, iPod

  Device 2.10, speed 12 Mb/s

    Class 00: USB device 054c:002c, USB Floppy Drive

  Device 2.3, speed 480 Mb/s

    Class ef: USB device 05ca:1836

Emmet Hikory (persia)
Changed in qemu:
assignee: nobody → persia
status: Confirmed → In Progress
Changed in kvm:
assignee: nobody → persia
status: Confirmed → In Progress
Revision history for this message
Emmet Hikory (persia) wrote :

KVM Uploaded to hardy. Thanks. Waiting on patch refresh for qemu.

Changed in kvm:
status: In Progress → Fix Committed
Emmet Hikory (persia)
Changed in qemu:
assignee: persia → intuitivenipple
Changed in sysvinit:
status: New → Invalid
Revision history for this message
TJ (tj) wrote :
description: updated
Changed in qemu:
assignee: intuitivenipple → nobody
status: In Progress → Confirmed
Changed in kvm:
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote :

We'd really prefer your original one-line patch to the new version (although qemu upstream would probably be interested in the new, general patch). We don't have to care about kernel backwards-compatibility :).

Also, you have the wrong version numbers for your gutsy-proposed debdiffs. The versioning of SRUs are a bit different to normal development versioning. For these packages I'd suggest 0.9.0-2ubuntu4.1 for qemu and 1:28-4ubuntu2.1 for kvm. (One of the reasons for the different versioning is to make sure it doesn't conflict with the versioning in the development release - otherwise you could have a 0.9.0-2ubuntu5 in gutsy-updates and a *different* 0.9.0-2ubuntu5 in hardy).

Revision history for this message
TJ (tj) wrote :

And there I was thinking packaging a bug-fix was a quick thing! So far I've spent 5 minutes creating the source-code patch and several hours messing about with packaging!

Revision history for this message
Daniel Hahler (blueyed) wrote :

Reported also for usbview in bug #151585.

Changed in usbview:
status: New → Confirmed
Daniel Hahler (blueyed)
Changed in usbview:
status: New → Confirmed
3 comments hidden view all 131 comments
Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

The three gutsy-proposed patches for usbview, qemu, and kvm look good, please go ahead and get them uploaded. Please upload them into hardy first, though.

Changed in usbview:
status: Unknown → New
Revision history for this message
Michael Bienia (geser) wrote :

Are you sure that the patch for usbview is correct? I don't have a /dev/bus/usb/devices file here. I have only subdirs in /dev/bus/usb.

Revision history for this message
Emmet Hikory (persia) wrote :

The list that was /proc/bus/usb/devices is no longer available, either in /dev or in /sys. The information must be gleaned in another manner.

Changed in usbview:
assignee: nobody → blueyed
status: Confirmed → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

Sorry, I've only applied the logic of the kvm patch, which should be invalid then, too!?

Apparently I still have the "Magic to make /proc/bus/usb work" uncommented in /etc/init.d/mountdevsubfs.sh and the "ln -s .usbfs/devices /dev/bus/usb/devices" from there seems to create this file.

It appears that for usbview the whole "LoadUSBTree stuff" would have to get rewritten to use the directory/filesystem layout instead of the the "devices" file. I'm not going to work on this though.

Changed in usbview:
assignee: blueyed → nobody
status: In Progress → Confirmed
Revision history for this message
Emmet Hikory (persia) wrote :

My test of KVM worked with the patch: I don't believe it depends on the presence of the devices file. usbview may be different (I have not investigated this package).

Revision history for this message
TJ (tj) wrote :

Emmet is, unfortunately, correct. I had forgotten to re-disable the section in /etc/init.d/mountdevsubfs.sh too.

The devices file itself is created when a usbfs mount is created, using:

$ mkdir .usbfs
$ sudo mount -n -t usbfs -obusmode=0700,devmode=0600,listmode=0644 usbfs .usbfs
$ ls .usbfs
001 002 003 004 005 devices
$ cat devices
$ cat .usbfs/devices

T: Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 8
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.22-14-generic ehci_hcd
...

Unless there is some over-arching reason *not* to use usbfs then the best solution is, I think, to amend /etc/init.d/mountdevsubfs.sh so instead of:

 #
 # Magic to make /proc/bus/usb work
 #
 #mkdir -p /dev/bus/usb/.usbfs
 #domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
 #ln -s .usbfs/devices /dev/bus/usb/devices
 #mount --rbind /dev/bus/usb /proc/bus/usb

we have

 #
 # Magic to give virtual machines (KVM/QEMU, VirtualBox, VMWare, etc) access to host USB devices
 #
 mkdir -p /dev/bus/usb/.usbfs
 domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
 ln -s .usbfs/devices /dev/bus/usb/devices

This could be added as an additional stanza (which takes the solution back to amending the "sysvinit" package).

The alternative is to add a complete new set of scripts and links, either:

/etc/rc.S/S12mountdevusbfs -> /etc/init.d/mountdevusbfs.sh

or

/etc/rc2.d/S20mountdevusbfs -> /etc/init.d/mountdevusbfs.sh

That, coupled with the alteration to KVM/QEMU would solve the issue.

Comments please?

TJ (tj)
description: updated
Revision history for this message
TJ (tj) wrote :

Emmet. I just realised you seem to be suggest it worked with the patch (for KVM on Hardy wasn't it?) but the patch simply replaces /proc/bus/usb/ with /dev/bus/usb/ but there is no 'devices' file link there *unless* the uncommented magic in /etc/init.d/mountdevsubfs.sh (or equivalent) has created a usbfs and linked /dev/bus/usb/devices into it.

I've tested the KVM Gutsy patch here. Without mounting the usbfs (using my new mountdevusbfs.sh script) I get:

$ ls -a /dev/bus/usb
. .. 001 002 003 004 005

info usbhost
Could not open /dev/bus/usb/devices

But once the usbfs is mounted and the 'devices' link created, it works:

$ sudo /etc/init.d/mountdevusbfs.sh start
$ ls -a /dev/bus/usb
. .. 001 002 003 004 005 devices .usbfs

info usbhost
 Device 5.4, speed 480 Mb/s

    Class 00: USB device 0781:5151, Cruzer Micro

  Device 5.3, speed 480 Mb/s

    Class ef: USB device 05ca:1836

  Device 3.3, speed 12 Mb/s

    Class e0: USB device 044e:300d, UGX

Is it possible the Hardy init is creating the usbfs and linking devices, or is there some confusion here?

Revision history for this message
perpetualrabbit (perpetualrabbit) wrote :

I have a Trust media center keyboard with builtin trackball. After a reboot, suddenly the trackball responded very sluggish, like with a ball-mouse (not optical I mean) with dirty wheels inside. But it couldn't be dirty yet, it is brand new. I noticed earlier that usbview did not work, but used to under Gutsy. I mounted the /proc/bus/usb filesystem, with mount -t usbfs procbususb /proc/bus/usb and instantly the trackball is working again. Usbview too.

Whatever the thinking is about /proc/bus/usb, the change that was made to it broke my mouse (well trackball) and probably breaks the X window experience for lots of Gutsy users.

Also there should be a better program than just usbview in Gnome to work with usb devices. usbview is very limited. And ugly.

Daniel Hahler (blueyed)
description: updated
Revision history for this message
Saúl Romero (spacetree) wrote : New to the patching stuff

Hi!

I am new to all this stuff about patching, and i want to ask you some things. I am using ubuntu gustsy gibbon with qemu/kvm and experiencing the described bug:

I followed this guide in order to use the debdiff file from TJ's post (qemu -2ubuntu5 gutsy-proposed debdiff ) : https://wiki.ubuntu.com/UbuntuPackagingGuide/BuildFromDebdiff.

Until the installation of the package it all seemed ok, but if i use qemu alone, my win VM keeps on rebooting. It also keeps on showing the message "Could not open /proc/bus/usb/devices". Same with KVM

What could I have missed? Any help is appreciated. I shall say that a message telling "applying debdiff ..." when i was downloading the source called my attention.

Revision history for this message
Brian Pitts (bpitts) wrote :

Reported for lsusb at Bug #159189

Revision history for this message
Martin Pitt (pitti) wrote :

I do not see anything to do for ubuntu-sru here. Please get the fixes uploaded and tested in hardy, and attach tested debdiffs for the packages you think should be fixed in gutsy. Feel free to immediately upload clean and obvious patches like http://launchpadlibrarian.net/10207748/kvm_28-4ubuntu3-gutsy.debdiff without prior written approval. After that, please resubscribe ubuntu-sru.

Thank you!

Changed in virtualbox:
status: Unknown → New
Revision history for this message
Emmet Hikory (persia) wrote :

Apparently that patch didn't actually work. Sorry for sitting on this task so long. Open for all takers :)

Changed in kvm:
assignee: persia → nobody
status: Fix Released → Confirmed
Revision history for this message
Rui Bernardo (epimeteo) wrote :

I was trying to use QEMU with USB in Ubuntu 7.10 Gutsy when I found this bug. I comment out the magic lines in /etc/init.d/mountdevsubfs.sh, started it, but still couldn't use USB in QEMU. Everything inside /proc/bus/usb/ and /dev/bus/usb was owned by root and QEMU couldn't read/write in it. I searched the web for something to change /dev/bus/usb/ and /proc/bus/usb/ permissions. QEMU docs says to "chown -R" all /proc/bus/usb/ and this was a problem since it "doesn't exist".

I found this: http://www.ubuntu1501.com/2007/12/installing-virtualbox-with-usb-support.html and adapted it to QEMU.

Basicaly, I added a new system group called "usbusers", added my username to that new system group and added a line in /etc/fstab setting the GID of /proc/bus/usb. I didn't need to change /etc/udev/rules.d/40-permissions.rules! All the process:

# Edit, uncomment "magic" and start the file /etc/init.d/mountdevsubfs.sh

# Create a system group for usb users:
sudo addgroup --system usbusers
# Output was GID 128

# Add user to usbusers group:
sudo adduser $USER usbusers

# With the lines in /etc/init.d/mountdevsubfs.sh comment out,
# edit /etc/fstab:
sudo nano /etc/fstab

# Add the following line:
# 128 is the GID of the group "usbusers".
none /proc/bus/usb usbfs devgid=128,devmode=664 0 0

# Reboot. After restarting the group owner of the devices were "usbusers":
$ ls -la /proc/bus/usb/
total 0
drwxr-xr-x 7 root root 0 2008-03-11 14:45 .
dr-xr-xr-x 5 root root 0 2008-03-11 14:46 ..
dr-xr-xr-x 2 root root 0 2008-03-11 14:45 001
dr-xr-xr-x 2 root root 0 2008-03-11 14:45 002
dr-xr-xr-x 2 root root 0 2008-03-11 14:45 003
dr-xr-xr-x 2 root root 0 2008-03-11 14:45 004
dr-xr-xr-x 2 root root 0 2008-03-11 14:45 005
-r--r--r-- 1 root root 0 2008-03-11 14:45 devices

$ ls -la /proc/bus/usb/003
total 0
dr-xr-xr-x 2 root root 0 2008-03-11 14:45 .
drwxr-xr-x 7 root root 0 2008-03-11 14:45 ..
-rw-rw-r-- 1 root usbusers 43 2008-03-11 14:45 001

# Eject the USB device in Gnome before using QEMU!
# Run QEMU with the option "-usb" or "-usbdevice host:1234:5678".

This was the way I got this working 100%.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Was there really no process during Gutsy (and Hardy nearly already) for these bugs?

Re-opening the sysvinit task:
I'm not affected by it myself, but I wonder why we cannot just enable the magic to make it work by default, from /etc/init.d/mountdevsubfs.sh (code commented out by default):
        #
        # Magic to make /proc/bus/usb work
        #
        mkdir -p /dev/bus/usb/.usbfs
        domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
        ln -s .usbfs/devices /dev/bus/usb/devices
        mount --rbind /dev/bus/usb /proc/bus/usb

Scott wrote:
> Support for /proc/bus/usb has been dropped because it is racey, and permissions are difficult to set --
> compared with /dev/bus/usb which is maintained by udev and doesn't have these issues.

It does not appear to be really frown to permission issues, because it links to the udev controlled interface.

Changed in sysvinit:
importance: Undecided → High
milestone: none → ubuntu-8.04-beta
status: Invalid → Triaged
Steve Langasek (vorlon)
Changed in sysvinit:
milestone: ubuntu-8.04-beta → ubuntu-8.04
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Please do not reopen tasks when it has been made clear that the removal was deliberate

Changed in sysvinit:
status: Triaged → Won't Fix
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

/proc/bus/usb has GONE.

It has been marked deprecated for over a year in multiple Linux distributions, and has been removed by more than one.

Code should be changed to use /dev/bus/usb.

That's all there is to it.

Steve Langasek (vorlon)
Changed in sysvinit:
status: Triaged → Won't Fix
Changed in sysvinit:
milestone: ubuntu-8.04 → none
Revision history for this message
John Cottier (john-cottier) wrote :

that reminds me of something from Hitch hikers guide to the galaxy ;-)

Revision history for this message
Trent Telfer (unnaturalhigh) wrote :

Curious if these proposed patch's have actually been applied to the qemu package in the hardy repository? As to date qemu still does not function properly.

Could not open /proc/bus/usb/devices
Could not add USB device 'host:0fca:0006

Package: qemu
New: yes
State: installed
Automatically installed: yes
Version: 0.9.1-1ubuntu1

Revision history for this message
J C Nash (nashjc) wrote :

As far as I can tell, this also affects xsane for some scanners. I've a Canon Canoscan LiDE 60 that used to work fine in Feisty, but now doesn't get found. Since usbview is complaining about /proc/bus/usb/devices, I suspect the same issue. Seems like there's been a long trail on this one. Can we expect a fix soon? As someone who tries to promote Linux and Open Source, bugs like this really take the rug out from under us and send folk rushing to spend $100s with M$.

JN

Changed in qemu:
status: Unknown → Fix Released
TJ (tj)
Changed in kvm:
assignee: nobody → intuitivenipple
importance: Low → Medium
TJ (tj)
Changed in qemu:
assignee: nobody → intuitivenipple
importance: Low → Medium
Changed in kvm:
assignee: intuitivenipple → kirkland
status: Confirmed → In Progress
status: New → Won't Fix
Changed in midisport-firmware:
status: New → Won't Fix
Changed in qemu:
status: New → Won't Fix
Changed in usbview:
status: Confirmed → Won't Fix
Changed in vmware-server:
status: New → Won't Fix
Changed in usbview:
importance: Undecided → Medium
status: Confirmed → Triaged
TJ (tj)
Changed in qemu:
assignee: intuitivenipple → nobody
Matt Zimmerman (mdz)
Changed in kvm:
status: In Progress → Fix Released
Changed in virtualbox:
status: New → Fix Released
Colin Watson (cjwatson)
Changed in apcupsd:
importance: Undecided → High
Colin Watson (cjwatson)
Changed in vmware-server:
importance: Undecided → High
Changed in midisport-firmware:
importance: Undecided → High
Changed in apcupsd (Ubuntu Jaunty):
assignee: nobody → scott
Changed in midisport-firmware (Ubuntu Jaunty):
assignee: nobody → scott
Changed in qemu (Ubuntu Jaunty):
assignee: nobody → scott
Changed in usbview (Ubuntu Jaunty):
assignee: nobody → scott
51 comments hidden view all 131 comments
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 156085] Re: Could not open /proc/bus/usb/devices

On Mon, 2009-03-16 at 16:56 +0000, Max Romantschuk wrote:

> I have a Midisport 4x4 which is affected by this issue, package
> midisport-firmware. Will happily test to verify that all is well once a
> fix is available.
>
Which part doesn't work?

If you have the device plugged in during boot - could you
attach /var/log/udev from that boot.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Max Romantschuk (max-romantschuk) wrote :

Scott James Remnant wrote:
> Which part doesn't work?
>
> If you have the device plugged in during boot - could you
> attach /var/log/udev from that boot.

I'm running Intrepid at the moment, should this work in Jaunty by now? I
just ran across this bug after the earlier midisport-specific bug was
marked as a duplicate of this one.

So do I need to upgrade to Jaunty to test?

.max

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

On Mon, 2009-03-16 at 19:04 +0000, Max Romantschuk wrote:

> Scott James Remnant wrote:
> > Which part doesn't work?
> >
> > If you have the device plugged in during boot - could you
> > attach /var/log/udev from that boot.
>
> I'm running Intrepid at the moment, should this work in Jaunty by now? I
> just ran across this bug after the earlier midisport-specific bug was
> marked as a duplicate of this one.
>
Logs from intrepid will be fine.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Noel J. Bergman (noeljb) wrote :

apcupsd works without /proc/bus/usb/devices -- documentation error

Changed in apcupsd:
status: New → Invalid
status: New → Invalid
1 comments hidden view all 131 comments
Revision history for this message
Noel J. Bergman (noeljb) wrote :

apcupsd works without /proc/bus/usb/devices --- documentation error

Changed in apcupsd:
status: New → Invalid
Revision history for this message
Noel J. Bergman (noeljb) wrote :

Colin,

I pulled the apcupsd and gapcmon sources for Gutsy, Hardy and Intrepid, and combed over them. As you say, no references. So I went back and re-tested without usbfs on both Hardy and Intrepid (I no longer have Gutsy handy for testing).

To my chagrin (but not dismay :-)), it works. So you're right: I got caught by a documentation error, and did not try running it without first trying to meet the documented requirements, although even there the documentation is ambiguous enough that one can interpret it in multiple ways. In this case, RTFM might be construed to have a slight twist on the usual meaning.

I've marked the apcupsd entries as invalid, and will open a separate bug for the documentation.

By the way, I see that vmware-server is mentioned here. Has anyone tried VMware Server 2 (I am downloading it now, so I can take a look), or is this just about version 1? VMware Workstation 6.5.x has had no problem with USB devices on any of these versions of Ubuntu.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

As promised: bug 343869

Revision history for this message
Max Romantschuk (max-romantschuk) wrote :

As per Scott's request I'm attaching /var/log/udev from a boot with my Midisport device plugged in.

My Intrepid system works to the extent that I do get the device up and running by hotplugging after boot, as described in
https://bugs.launchpad.net/bugs/215081

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The midisport-firmware problem is that fxload uses the wrong environment variable to get the device name

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fxload - 0.0.20020411-1.1ubuntu1

---------------
fxload (0.0.20020411-1.1ubuntu1) jaunty; urgency=low

  * Use DEVNAME from the environment in preference to DEVICE, the former
    contains the modern /dev/bus/usb path. LP: #156085.

 -- Scott James Remnant <email address hidden> Tue, 17 Mar 2009 10:02:33 +0000

Changed in fxload:
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package midisport-firmware - 1.2+dsfg1-0ubuntu6

---------------
midisport-firmware (1.2+dsfg1-0ubuntu6) jaunty; urgency=low

  * 42-midisport-firmware.rules.in: Correct rules to act on the USB raw
    device, rather than the first interface. LP: #156085.

 -- Scott James Remnant <email address hidden> Tue, 17 Mar 2009 10:06:10 +0000

Changed in midisport-firmware:
status: New → Fix Released
Revision history for this message
Max Romantschuk (max-romantschuk) wrote :

Scott James Remnant wrote:
> The midisport-firmware problem is that fxload uses the wrong environment
> variable to get the device name

If I understood the fxload docs correctly there is a command line
argument to specify the device as well. Could this be used for a
work-around in the midisport-firmware package's udev rules?

Revision history for this message
Max Romantschuk (max-romantschuk) wrote :

I just noticed a fix was released already. I will upgrade to Jaunty and verify that everything works for midisport-firmware.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Dustin: could you look at QEMU, it should be the same basic patch as KVM right?

Changed in qemu (Ubuntu Jaunty):
assignee: scott → kirkland
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

usbview will be removed from the archive, it's functionality is available from lsusb or gnome-device-manager

Changed in usbview (Ubuntu Jaunty):
status: Triaged → Won't Fix
Revision history for this message
Dan Bishop (danbishop) wrote :

I have a midisport 2x2 which I have just tried and found not to be working, however, I've just realised that the latest package hasn't made it to me yet, only 0.0.20020411-1.1 and not 0.0.20020411-1.1ubuntu1. Make sure you check this before testing the 4x4! :)

Revision history for this message
Dan Bishop (danbishop) wrote :

Can confirm this fix works perfectly for midisport 2x2 :D

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I'm marking QEMU as 'fix released' as well.

The relevant patch that we were carrying for kvm has been included in QEMU upstream, and is already present in qemu 0.10.0 in Jaunty.

:-Dustin

Changed in qemu (Ubuntu Jaunty):
status: Confirmed → In Progress
status: In Progress → Fix Released
Changed in qemu:
status: New → Fix Released
Revision history for this message
Max Romantschuk (max-romantschuk) wrote :

Confirmation for Midisport 4x4 working as well. :)

Revision history for this message
Steve Langasek (vorlon) wrote :

there is no vmware-server package in jaunty; marking this task invalid.

Changed in vmware-server:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package madfuload - 1.2-2ubuntu2

---------------
madfuload (1.2-2ubuntu2) jaunty; urgency=low

  * 42-madfuload.rules.in: Add -D $root/$name to madfuload calls so we use
    /dev/bus/usb paths. LP: #156085.

 -- Scott James Remnant <email address hidden> Wed, 01 Apr 2009 09:40:00 +0100

Changed in madfuload:
status: New → Fix Released
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

The 18 month support period for Gutsy Gibbon 7.10 has reached its end of life -
http://www.ubuntu.com/news/ubuntu-7.10-eol . As a result, we are closing the
Gutsy task.

Changed in fxload (Ubuntu Gutsy):
status: New → Won't Fix
Changed in madfuload (Ubuntu Gutsy):
status: New → Won't Fix
Revision history for this message
toaste (toaste) wrote :

A slight change to the mountdevsubfs.sh workaround is necessary in Jaunty (9.04)

The commented out magic in mountdevsubfs.sh was removed sometime after Hardy, probably because it didn't work anymore since domount no longer likes "" as a parameter.

Add code below immediately after the line that reads:
domount devpts "" /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE

 #insert the following below the line above (line 41 for me)
        #
 # Magic to make /proc/bus/usb work
 # These following 4 lines were added to make USB devices avabilable in vmware
        #
 mkdir -p /dev/bus/usb/.usbfs
 domount usbfs none /dev/bus/usb/.usbfs -o busmode=0700,devmode=0600,listmode=0644
 ln -s .usbfs/devices /dev/bus/usb/devices
 mount --rbind /dev/bus/usb /proc/bus/usb

1 comments hidden view all 131 comments
Revision history for this message
Daniele Cruciani (daniele-smartango) wrote :

info in https://bugs.launchpad.net/bugs/331331
solve all my problem in Jaunty

> -------Original Message-------
> From: Cas Craven <email address hidden>
> Subject: [Bug 156085] Re: Could not open /proc/bus/usb/devices
> Sent: 11 May '09 05:26
>
> A slight change to the mountdevsubfs.sh workaround is necessary in
> Jaunty (9.04)
>
> The commented out magic in mountdevsubfs.sh was removed sometime after
> Hardy, probably because it didn't work anymore since domount no longer
> likes "" as a parameter.
>
> Add code below immediately after the line that reads:
> domount devpts "" /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
>
> #insert the following below the line above (line 41 for me)
>         #
> # Magic to make /proc/bus/usb work
> # These following 4 lines were added to make USB devices avabilable in vmware
>         #
> mkdir -p /dev/bus/usb/.usbfs
> domount usbfs none /dev/bus/usb/.usbfs -o busmode=0700,devmode=0600,listmode=0644
> ln -s .usbfs/devices /dev/bus/usb/devices
> mount --rbind /dev/bus/usb /proc/bus/usb
>
> --
> Could not open /proc/bus/usb/devices
> https://bugs.launchpad.net/bugs/156085
> You received this bug notification because you are a direct subscriber
> of the bug.
>

ivan vucic (systema-hr)
Changed in qemu:
status: Fix Released → Fix Committed
Steve Langasek (vorlon)
Changed in qemu:
status: Fix Committed → Fix Released
Changed in usbview (Ubuntu Jaunty):
assignee: Scott James Remnant (scott) → nobody
Changed in usbview (Ubuntu):
assignee: Scott James Remnant (scott) → nobody
Revision history for this message
mahogeni muse (dkeeling0419) wrote :

Ok, I am totally new to linux so I also am a novice when it comes to updating patches. I downloaded Ubuntu Desktop 9 and of course it won't recognize the USB Devices on my laptop. I have a Toshiba Satellite A215-S5818 with Windows Vista (build 6). Ubuntu 9 is the guest OS on VMWare Workstation 7.0 (build 203739). I've tried to mount usbfs manually using

mount -t usbfs none /proc/bus/usb

I've tried modifying /etc/fstab by adding the following code at the bottom:

usbfs /proc/bus/usb usbfs auto 0 0

The last thing I read was to modify the etc/init.d/mountdevsubfs.sh and uncomment

mkdir -p /dev/bus/proc/usb/.usbfs
domount usbfs ""/dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln-s .usbfs/devices/dev/bus/usb/devices
mount --rbind/dev/bus/usb/proc/bus/usb
$ sudo /etc/etc/init.d/nountdevsubfs.sh.start

However, when I went to the /etc/init.d directory there was no mountdevsubfs.sh file so I created one and added the code above with no luck. What am I doing wrong? Any help would be sincerely appreciated...

Thanks!

Revision history for this message
Danny Wood (danwood76) wrote :

Your problem sounds more like a bug in VMware and as it is a paid product I would ask them about it.
It sounds like VMware is not passing the USB devices on.

Revision history for this message
mahogeni muse (dkeeling0419) wrote :

Thanks danwood76...I'll give it a try...*sigh* back to the drawing board....

Revision history for this message
Kip Warner (kip) wrote :

I contacted the developer of USBView and this is the dialogue.

On Sat, Apr 03, 2010 at 09:19:43PM -0700, Kip Warner wrote:
> Hey Greg,
>
> Thanks for your great application USBView. I'd like to use it and I am
> running Ubuntu Karmic. The problem is it looks as though they dropped
> support for /proc/bus/usb a while ago and your app needs to be changed
> to use /dev/bus/usb instead, as I understand it:
>
> https://bugs.launchpad.net/ubuntu/+source/usbview/+bug/156085/comments/6
>
> Is this possible?

Please contact ubuntu about this, there is nothing I can do about it.

good luck,

greg k-h

Revision history for this message
Karri Kaksonen (karri-kaksonen) wrote :

/proc/usb is also needed for all users that use Aladdin HASP technology. What affects me is nautical chart subscriptions that require the HASP to work. These HASP keys will still be around for the next 10 years. So I feel that there should be a work-around for this.

The work-arounds presented in this thread do not work because the domount command is also dropped together with all the mount-shell scripts from the initscripts packages.

The last working system is Ubuntu 9.04

Revision history for this message
Michael (michaeljt) wrote :

Karri: I can see at least two ways of solving this in more recent Ubuntus. One is virtualisation (e.g. VirtualBox with USB virtualisation, since that no longer depends on /proc/bus/usb :) ). The other would be a preloaded libary which emulated /proc/bus/usb while actually accessing /dev/bus/usb and sysfs. Much like the way that OSS was emulated in user space over ALSA. The second solution should also work for USBView by the way.

Such a library is in my opinion a correct way of dealing with legacy devices which are lacking in current kernels (keeping the support in the kernel after its sell-by date is rather ugly, it seems to me) and it shouldn't be too much work to write as long as you don't have to support polling on files, although I hasten to add that I'm not volunteering for the job :)

Changed in qemu (openSUSE):
importance: Unknown → Critical
Changed in usbview (Debian):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in vmware-server (Ubuntu Hardy):
status: New → Won't Fix
Rolf Leggewie (r0lf)
Changed in midisport-firmware (Ubuntu Hardy):
status: New → Won't Fix
Changed in fxload (Ubuntu Hardy):
status: New → Won't Fix
Changed in madfuload (Ubuntu Hardy):
status: New → Won't Fix
Rolf Leggewie (r0lf)
Changed in kvm (Ubuntu Hardy):
status: Confirmed → Won't Fix
Changed in qemu (Ubuntu Hardy):
status: Confirmed → Won't Fix
Changed in usbview (Ubuntu Hardy):
status: Confirmed → Won't Fix
Displaying first 40 and last 40 comments. View all 131 comments or add a comment.