Could not open /proc/bus/usb/devices

Reported by TJ on 2007-10-23
240
This bug affects 14 people
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned
Virtualbox
Fix Released
Unknown
apcupsd (Ubuntu)
High
Scott James Remnant (Canonical)
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Undecided
Unassigned
Jaunty
High
Scott James Remnant (Canonical)
fxload (Ubuntu)
Undecided
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Undecided
Unassigned
Jaunty
Undecided
Unassigned
kvm (Ubuntu)
Medium
Dustin Kirkland 
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Low
Unassigned
Jaunty
Medium
Dustin Kirkland 
madfuload (Ubuntu)
Undecided
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Undecided
Unassigned
Jaunty
Undecided
Unassigned
midisport-firmware (Ubuntu)
High
Scott James Remnant (Canonical)
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Undecided
Unassigned
Jaunty
High
Scott James Remnant (Canonical)
qemu (Ubuntu)
Medium
Dustin Kirkland 
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Low
Unassigned
Jaunty
Medium
Dustin Kirkland 
qemu (openSUSE)
Fix Released
Critical
sysvinit (Ubuntu)
High
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
High
Unassigned
Jaunty
High
Unassigned
usbview (Debian)
Fix Released
Unknown
usbview (Ubuntu)
Medium
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Undecided
Unassigned
Jaunty
Medium
Unassigned
vmware-server (Ubuntu)
High
Unassigned
Declined for Intrepid by Dustin Kirkland 
Gutsy
Undecided
Unassigned
Hardy
Undecided
Unassigned
Jaunty
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) on 2007-10-23
description: updated
Christopher Blay (blayde) wrote :

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

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?

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
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)"

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
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.

TJ (tj) wrote :
TJ (tj) wrote :
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) on 2007-10-29
Changed in kvm:
status: Fix Committed → In Progress
TJ (tj) on 2007-10-29
Changed in qemu:
assignee: intuitivenipple → nobody
status: Fix Committed → Confirmed
Changed in kvm:
assignee: intuitivenipple → nobody
status: In Progress → Confirmed
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) on 2007-11-08
Changed in qemu:
assignee: nobody → persia
status: Confirmed → In Progress
Changed in kvm:
assignee: nobody → persia
status: Confirmed → In Progress
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) on 2007-11-08
Changed in qemu:
assignee: persia → intuitivenipple
Changed in sysvinit:
status: New → Invalid
TJ (tj) wrote :
description: updated
Changed in qemu:
assignee: intuitivenipple → nobody
status: In Progress → Confirmed
Changed in kvm:
status: Fix Committed → Fix Released
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).

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!

Daniel Hahler (blueyed) wrote :

Reported also for usbview in bug #151585.

Changed in usbview:
status: New → Confirmed
Daniel Hahler (blueyed) on 2007-11-14
Changed in usbview:
status: New → Confirmed
3 comments hidden view all 123 comments
Daniel Hahler (blueyed) wrote :
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
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.

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
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
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).

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) on 2007-11-15
description: updated
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?

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) on 2007-12-08
description: updated

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.

Brian Pitts (bpitts) wrote :

Reported for lsusb at Bug #159189

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
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
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%.

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) on 2008-03-21
Changed in sysvinit:
milestone: ubuntu-8.04-beta → ubuntu-8.04

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

Changed in sysvinit:
status: Triaged → Won't Fix

/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) on 2008-04-11
Changed in sysvinit:
status: Triaged → Won't Fix
Changed in sysvinit:
milestone: ubuntu-8.04 → none
John Cottier (john-cottier) wrote :

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

UnNaturalHigh (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

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) on 2008-09-03
Changed in kvm:
assignee: nobody → intuitivenipple
importance: Low → Medium
TJ (tj) on 2008-09-04
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) on 2009-02-13
Changed in qemu:
assignee: intuitivenipple → nobody
Matt Zimmerman (mdz) on 2009-02-19
Changed in kvm:
status: In Progress → Fix Released
43 comments hidden view all 123 comments
Michael (michaeljt) wrote :

FWIW, this is fixed upstream in VirtualBox 2.1.2.

Changed in virtualbox:
status: New → Fix Released
mlg7 (mlg7) wrote :

For end users like me:
the workaround suggested at
https://bugs.launchpad.net/ubuntu/hardy/+source/usbview/+bug/156085/+viewstatus
worked for me, at least, usbview works again.

>To re-enable it edit the file '/etc/init.d/mountdevsubfs.sh' and uncomment the code after line 40
(4 lines, up to the closing brace)

mlg7 (mlg7) wrote :

to Scott (and others):
>/proc/bus/usb has GONE.
>It has been marked deprecated for over a year...
>Code should be changed

I will tell thou a clever thing, only don't get offended.

With each such incompatibility you lose 3% of users.
If you have only two users, it's not even a whole number,
so there is no problem. For 30 users, it may be explained
as a personal choice. And if you were employed by a
capitalist with at least 1K customers, that capitalist
would wash your brains after 2nd found incompatibility.
But you are a free developer...
Well, each lost user is extra $90 in Bill Gates' pocket.
Please think, how immoral it is to give away other
people's money to a rich guy!

Now, a real story.
The GCC guys changed the C++ compiler (4.2) so that it is
incompatible with 3.4. Some projects cannot be compiled
(warnings as errors), while others (warnings ignored)
compile but crash at run-time. (Example: SUN's CLDC.)
VMWare tools, another example, also could not be
fully compiled, and the distribution included a broken
package (!). So I tried 8.10 and decided not to use it.
Nor will I recommend it to anybody else. I use an old version.

Danny Wood (danwood76) wrote :

GCC 4.2 had bugs in it which are fixed in 4.3.
But you can always get the 3 series of the compiler anyway.

Also I don't think most devs care about bill and his millions, he is slowly loosing the battle of world domination and the EU are constantly trying to break him.
OOO is constantly gaining popularity and OOO 3.0 has some great new usability features which I like.

But this bug has been fixed in qemu, virtualbox, kvm and works correctly in jaunty, it supports all types of the usb system so it will work if you are running on an old system with an old OS that uses /proc/bus/usb also.

This isn't a thread but a bug report so your stupid rant is just wasting space, fortunately the bug has been fixed.

Noel J. Bergman (noeljb) wrote :

mig7 has a point. Over a year ago, Scott James Remnant commented that "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." But Scott's wrong in the sense that it isn't "our" (users') software that is broken, it is "your" (Ubuntu's) software that is broken.

Dimitrios' point is that packages should either be fixed or removed from the repository.

usbview does not work. If you look at the upstream bug for usbview, Debian seems to consider it Ubuntu's problem, and they are not making upstream fixes.

apcupsd is broken in Hardy and Intrepid without manual intervention by mounting usbfs. I've gone through that on Hardy, and will be checking Intrepid, although I've found reports that it does work. That does not appear to be an option with Jaunty, so unless there's a fix in there that I'm not finding so far, there is another broken package.

Look, I have no problem with removing usbfs, but Ubuntu is not making the necessary fixes to dependent packages, leaving users with broken packages. Agreeing with Dimitrios -- such packages should be removed, fixed, or moved to a broken-packages repository if you want a place to put them aside for interested community members to take a shot at fixing them.

A bit of good news is that libusb-1.0 can hide the change, for applications written to use libusb instead of processing the device space themselves.

Noel J. Bergman (noeljb) wrote :

> That does not appear to be an option with Jaunty

Actually, it is. So that workaround still applies for users who search around to find it.

Colin Watson (cjwatson) on 2009-03-11
Changed in apcupsd:
importance: Undecided → High
Colin Watson (cjwatson) on 2009-03-12
Changed in vmware-server:
importance: Undecided → High
Changed in midisport-firmware:
importance: Undecided → High
Colin Watson (cjwatson) wrote :

Noel, could you please describe the breakage with apcupsd in Jaunty in detail? Shirish's comments earlier were purely about documentation, as far as I've been able to tell. apcupsd does not appear to refer to /proc/bus/usb/ anywhere other than documentation, and seems to just open /dev/usb/hiddev* etc.

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

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.

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>

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

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>

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 123 comments
Noel J. Bergman (noeljb) wrote :

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

Changed in apcupsd:
status: New → Invalid
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.

Noel J. Bergman (noeljb) wrote :

As promised: bug 343869

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

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

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
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

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?

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

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

Changed in qemu (Ubuntu Jaunty):
assignee: scott → kirkland

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
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! :)

Dan Bishop (danbishop) wrote :

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

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

Confirmation for Midisport 4x4 working as well. :)

Steve Langasek (vorlon) wrote :

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

Changed in vmware-server:
status: New → Invalid
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
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
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 123 comments

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) on 2009-09-19
Changed in qemu:
status: Fix Released → Fix Committed
Steve Langasek (vorlon) on 2009-09-20
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
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!

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.

mahogeni muse (dkeeling0419) wrote :

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

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

/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

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
Displaying first 40 and last 40 comments. View all 123 comments or add a comment.