usbipd requires usbip_common_mod.ko and usbip.ko kernel modules, which are not available in any package
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
| usbip (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
I'm on Kubuntu oneiric (11.10), using usbip 0.1.7-3 and kernel linux-image-
I'm trying to set up USB/IP to share a USB-only printer/scanner over the LAN. However, whenever I try to start the demon, it gives the error message that the usbip_common_mod.ko and usbip.ko kernel modules are required:
root@curie:~# usbipd -D
usbip err: stub_driver.c: 33 (open_sysfs_
** ERROR **: driver open failed
Trace/breakpoint trap
The package description of usbip says:
" USB/IP requires kernel support which is included in Linux
kernels 2.6.28 or newer."
Unfortunately, I can't find a package that provides those kernel module.
I have also installed the usbip-source package, but
(1) its /usr/src/
"For newer kernels ( >=2.6.28 ), try linux-staging code!"
and (2) trying to build it with m-a also fails:
# Build the module
cd src && /usr/bin/make KSOURCE=
make[2]: Entering directory `/usr/src/
make -C /usr/src/linux LANG=C KBUILD_VERBOSE=0 M=`pwd` modules
make[3]: Entering directory `/usr/src/
CC [M] /usr/src/
/usr/src/
/usr/src/
make[4]: *** [/usr/src/
make[3]: *** [_module_
make[3]: Leaving directory `/usr/src/
make[2]: *** [default] Error 2
make[2]: Leaving directory `/usr/src/
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/
make: *** [kdist_build] Error 2
BUILD FAILED!
See /var/cache/
Build failed. Press Return to continue...
Status changed to 'Confirmed' because the bug affects multiple users.
This also affects me. I have Ubuntu 10.04 with installed kernels from the repo from 2.6.32-21-generic
to 3.0.0-15-generic. And looks like developes changed kernel config in 3.x branch to turn off usbip drivers compilation.
2.6.38 usbip Makefile is
1 obj-$(CONFIG_
2 usbip_common_mod-y := usbip_common.o usbip_event.o
3
4 obj-$(CONFIG_
5 vhci-hcd-y := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o
6
7 obj-$(CONFIG_
8 usbip-y := stub_dev.o stub_main.o stub_rx.o stub_tx.o
9
10 ccflags-
via http://
and 2.6.38-13-generic config has necessary values set:
$ egrep USB_IP /boot/config-
CONFIG_USB_IPHETH=m
CONFIG_
CONFIG_
CONFIG_
# CONFIG_
But if we look at 3.0 (and later) usbip Makefile:
1 ccflags-
2
3 obj-$(CONFIG_
4 usbip-core-y := usbip_common.o usbip_event.o
5
6 obj-$(CONFIG_
7 vhci-hcd-y := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o
8
9 obj-$(CONFIG_
10 usbip-host-y := stub_dev.o stub_main.o stub_rx.o stub_tx.o
via http://
and 3.0.0.13-generic config:
$ egrep USBIP /boot/config-
# CONFIG_USBIP_CORE is not set
there are no necessary values set and usbip is not build by default for 3.x generic kernels.
The problem is still in 12.04 beta2.
As the project does not have new releases since 2009, maybe it is already dead.
mkdir -p /usr/src/
make -f scripts/
gcc -Wp,-MD,
/usr/src/
/usr/src/
make[2]: *** [/usr/src/
make[1]: ** [_module_
make[1]: Saindo do diretório `/usr/src/
make: ** [default] Erro 2
@luizluca:
No, it's not dead.
I think development has moved from sourceforge.net to the mainline kernel (staging), as development there continues.
https:/
And yes, very disappointing to see 12.04 is probably not going to include it either before release.
Hi,
It appears the reason this was disabled in the Ubuntu kernel configs was because it is marked EXPERIMENTAL:
config USBIP_CORE
tristate "USB/IP support (EXPERIMENTAL)"
depends on USB && NET && EXPERIMENTAL
default N
---help---
This enables pushing USB packets over IP to allow remote
machines direct access to USB devices. It provides the
USB/IP core that is required by both drivers.
For more details, and to get the userspace utility
programs, please see http://
To compile this as a module, choose M here: the module will
be called usbip-core.
If unsure, say N.
The Ubuntu Kernel Team's config policy is to disable experimental options until it is requested they be enabled. Based on the information requested in this bug, I have enabled the following in the Precise 12.04 kernel:
CONFIG_
CONFIG_
CONFIG_
This change should be available in the next upload. Thanks.
Hi Leann,
That's some very good news you are bringing to us.
Just as a note to everyone who wants to use these modules. The usbip package has still to be upgraded though, in order to get the client side working as well. The current usbip package still expects the old modules. But that would be only a matter of building the client tools from source which is available in the linux-source package, package it up and release a new usbip package.
Thanks for making my day.
This bug was fixed in the package linux - 3.2.0-22.35
---------------
linux (3.2.0-22.35) precise; urgency=low
[ Andy Whitcroft ]
* Revert "SAUCE: hotkey quirks for various Zeptro Znote and Fujitsu Amilo
laptops"
* SAUCE: (no-up) elide some ioctl warnings which are known benign
- LP: #972355
[ Brad Figg ]
* SAUCE (no-up) Provide a param for allowing the BIOS to handle changing
the brightness on AC/battery status changes.
- LP: #949311
* SAUCE (drop after 3.4) Quirk for enabling backlight hotkeys on Samsung
N150P
- LP: #875893
[ Colin Ian King ]
* SAUCE: PCI: Allow pcie_aspm=force to work even when FADT indicates it
is unsupported
- LP: #962038
[ Daniel Vetter ]
* SAUCE: (drop after 3.5) drm/i915: reinstate GM45 TV detection fix
- LP: #638939
[ Kees Cook ]
* SAUCE: SECCOMP: audit: always report seccomp violations
* SAUCE: SECCOMP: adjust prctl constant
[ Leann Ogasawara ]
* [Config] Enable CONFIG_USBIP_CORE=m
- LP: #900384
* Rebase to v3.2.14
* [Config] Updateconfigs after rebase to v3.2.14
[ Stefan Bader ]
* d-i: Fix module name for dm-raid45
- LP: #969248
[ Tim Gardner ]
* SAUCE: remove __initdata from vesafb_fix
- LP: #969309
[ Upstream Kernel Changes ]
* Revert "sched: tg->se->load should be initialised to tg->shares"
* toshiba_acpi: make one-bit bitfields unsigned
- LP: #810015
* ACPI: EC: Add ec_get_handle()
- LP: #810015
* toshiba_acpi: Support alternate hotkey interfaces
- LP: #810015
* toshiba_acpi: Support additional hotkey scancodes
- LP: #810015
* toshiba_acpi: Refuse to load on machines with buggy INFO
implementations
- LP: #810015
* ata_piix: Add Toshiba Satellite Pro A120 to the quirks list due to
broken suspend functionality.
- LP: #886850
* sweep the floors and convert some .get_drvinfo routines to strlcpy
- LP: #921793
* be2net: init (vf)_if_
- LP: #921793
* be2net: stop checking the UE registers after an EEH error
- LP: #921793
* be2net: don't log more than one error on detecting EEH/UE errors
- LP: #921793
* be2net: stop issuing FW cmds if any cmd times out
- LP: #921793
* be2net: Fix TX queue create for Lancer
- LP: #921793
* be2net: add register dump feature for Lancer
- LP: #921793
* be2net: Add EEPROM dump feature for Lancer
- LP: #921793
* be2net: Fix VLAN promiscous mode for Lancer
- LP: #921793
* be2net: Use V1 query link status command for lancer
- LP: #921793
* be2net: Move to new SR-IOV implementation in Lancer
- LP: #921793
* be2net: Fix error recovery paths
- LP: #921793
* be2net: Add error handling for Lancer
- LP: #921793
* be2net: Use new hash key
- LP: #921793
* be2net: Fix non utilization of RX queues
- LP: #921793
* be2net: netpoll support
- LP: #921793
* be2net: update some counters to display via ethtool
- LP: #921793
* be2net: workaround to fix a bug in BE
- LP: #921793
* be2net: fix ethtool ringparam reporting
- LP: #921793
* be2net: refactor/cleanup vf configuration code
- LP: #921793
...
Why does my Ubuntu Precise still fail to start usbip daemon?
$ uname -a
Linux studio 3.2.0-24-
$ sudo usbipd -D
usbip err: stub_driver.c: 33 (open_sysfs_
** (process:25295): ERROR **: driver open failed
$ lsmod | grep usbip
usbip_host 22084 0
usbip_core 15296 1 usbip_host
The error message gives a good hint: you have to load the required modules, either by modprobing or adding these modules to your /etc/modules file before using the USBIP daemon:
sudo modprobe usbip-core
sudo modprobe usbip-host
- Script which builds the usbip userspace tools from in-tree source code. Edit (1.1 KiB, text/x-sh)
@Sah:
Because the usbip-package isn't updated yet. The usbip and usbipd executables will still expect the 'old' modules until they are recompiled and repackaged in a new usbip-package. See comment #6 for more info. Added usbip-package to the list of 'Affects' to make this need more visible.
@Thomas:
Sah's problem isn't the loading of the modules you suggest, but the executable which still expects the 'old' modules. ;-)
@All:
In the attachments I have added a script that I used to build the userspace tools from in-tree source code.
Disclaimer: Please note that it hasn't underwent decent testing, so check the script's code before running it to make sure your are comfortable with what the script will do. This script is provided "as is" and any ... (you (should) know the drill :) )
Thank you, @Linard. Now I get it. I'll just wait for the update.
Confirmed
user@host:~# uname -r
3.2.0-29-
user@host:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
user@host:~# lsmod | grep usbip
usbip_host 22084 0
usbip_core 15296 2 vhci_hcd,usbip_host
Hey Linard,
thanks for the script!
It throws me a "usbipd: symbol lookup error: usbipd: undefined symbol: host_driver" and exits. probeably no biggy, but I can't seem to find my way trough this.
lsmod | grep usbip
usbip_host 22084 0
usbip_core 15296 1 usbip_host
uname -a
Linux homeserver 3.2.0-23-
cheers!
Ed
got it the second time with correct modules loaded.
"modprobe vhci-hcd" , so no bug
after modprobe vhci-hcd my computer panic ....
Hi,
I have the same problem with Kubuntu 12.10:
Linux fil-Linux 3.5.0-21-generic #32-Ubuntu SMP Tue Dec 11 18:51:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
fil@fil-
FATAL: Error inserting vhci_hcd (/lib/modules/
If I try to insert the vhci-hcd using sudo, the machine freezes totally...
Thanks in advance for your help and a happy new year,
Phil
I am also getting the "undefined symbol: host_driver" error, even with vhci-hcd loaded. I'm stumped...
usbipd
usbipd: symbol lookup error: usbipd: undefined symbol: host_driver
lsmod | grep usbip
usbip_host 22084 0
usbip_core 15333 2 vhci_hcd,usbip_host
uname -a
Linux jacob-Ubuntu 3.2.0-35-
Fixed my problem- a friend pointed out that I had failed to remove my previous installation of usbip (the one throwing out the "usbip_
I have Ubuntu 12.04LTS and the problem appear to be the userspace program not inside the kernel.
$ uname -a
Linux HEX 3.2.0-36-
$ lsmod | grep usbip
usbip_host 22084 0
usbip_core 15333 2 usbip_host,vhci_hcd
usespace program are looking for:
$ sudo strace usbipd -d
....
munmap(0xb7798000, 4096) = 0
lstat64(
write(2, "usbip err: stub_driver.c: 33 (o"..., 103usbip err: stub_driver.c: 33 (open_sysfs_
) = 103
gettimeofday(
open("/
open("/
fstat64(3, {st_mode=
The userspace program are lookig for /sys/bus/
Usbip version
$ usbip -v
** (process:4498): WARNING **: running non-root?
usbip 0.1.7 ($Id: vhci_attach.c 42 2007年09月07日 12:07:51Z hirofuchi $)
Hi,
re-reading the usbip code I found that the previous patch (in comment #20) is incorrect.
Here a proof of concept patch for path change in usbip kernel driver.
usbip$ bzr diff
=== modified file 'src/cmd/
--- src/cmd/
+++ src/cmd/
@@ -29,7 +29,7 @@
};
static const char match_busid_path[] = "/sys/bus/
-
+static const char match_busid-
static void show_help(void)
{
@@ -62,7 +62,9 @@
fd = open(match_
if (fd < 0)
- return -1;
+ fd = open(match_
+ if (fd < 0)
+ return -1;
if (add)
snprintf(buff, BUS_ID_SIZE + 4, "add %s", busid);
This is not a wonderful solution but it is somethings.
How can I recompile the package? no configure, no makefile, autotools returns a lot of error... any tips?
Has there been further development in fixing this? In 13.04 the issue appears to still be unresolved. Is there some barrier keeping the newest usbip from being available downstream?
$ uname -a
Linux 3.8.0-23-generic #34-Ubuntu SMP Wed May 29 20:22:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ sudo usbip -v
usbip 0.1.7 ($Id: vhci_attach.c 42 2007年09月07日 12:07:51Z hirofuchi $)
$ usbipd -d
** (process:6004): WARNING **: running non-root?
usbip err: stub_driver.c: 33 (open_sysfs_
** (process:6004): ERROR **: driver open failed
Trace/breakpoint trap (core dumped)
$ sudo strace usbipd -d
execve(
brk(0) = 0x22dd000
access(
mmap(NULL, 8192, PROT_READ|
access(
open("/
fstat(3, {st_mode=
mmap(NULL, 167876, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f343e4c4000
close(3) = 0
access(
open("/
read(3, "177円ELF\
fstat(3, {st_mode=
mmap(NULL, 2148608, PROT_READ|
mprotect(
mmap(0x7f343e2c
close(3) = 0
access(
open("/
read(3, "177円ELF\
fstat(3, {st_mode=
mmap(NULL, 3126592, PROT_READ|
mprotect(
mmap(0x7f343e0b
mmap(0x7f343e0b
close(3) = 0
access(
open("/
read(3, "177円ELF\
fstat(3, {st_mode=
mmap(NULL, 4096, PROT_READ|
mmap(NULL, 2138416, PROT_READ|
mprotect(
mmap(0x7f343ddc
close(3) ...
As I was never able to run it, I'm no expert. However, it seems that the problem lies with the userland programs that might be outdated.
The kernel modules, vhci-hcd, usbip-core and usbip-host seems to be ok. They are upstream and compiled for ubuntu 13.04. However, running my own strace, I noticed that it still looks for the possiblely old names:
# strace usbipd -d
lstat("
write(2, "usbip err: stub_driver.c: 33 (o"..., 103usbip err: stub_driver.c: 33 (open_sysfs_
) = 103
open("/
open("/
There is no usbip module. Just usbip-core and usbip-host. FYI, the usbip, at least, runs if vhci-hcd is loaded but I don't know if it works.
Googling for some time I found the current userspace software. It is inside kernel source at:
https:/
But it is not compiled with ubuntu kernel anymore. So, I think that the usbip package should be deprecated and a new usbip should be generated while compiling the kernel source package.
If you installed the linux-source package and devel tools, you can compile it yourself. It might be somewhere like:
cd /usr/src/
./autogen.sh
make install
But I didn't tested it as my ISP bandwidth will not allow me to download kernel source today.
I'll report a bug about this problem.
Ops.. too late:
https:/
BUt it is still not fixed. It would be nice to mark that that bug affects you too.
As a temporary workaround I was able to install a .deb from the Debian repos which apparently installs the .ko files and the updated userspace binaries. It throws no errors when running but its behavior is not correct (probably best left for another bug report)
Is there a hope that the usbip package provided will be usable on Debian/Ubuntu one day? :-(
I'm hoping there will be a server daemon (usbipd) eventually.
For the client, it seems that usbip from the package usbip is no longer valid and is replaced by usbip in a package called linux-tools-
found this on usbip.sourcefor
Download
For Linux, the source code of usbip was merged into the staging tree, and finally has been moved to the mainline since Linux-3.17. Development is ongoing in the kernel community, not here. Linux distributions will provide binary packages of usbip. Just for historical records, the project page keeps old download files of the Linux version. Do not use them.
However, in newest kernel it don't work (4.4.0-12 / lubuntu 16.04) even if i can find:
./lib/modules/
./lib/modules/
./lib/modules/
As Torsten says in bug #28, this is still an issue in the latest kernel (4.4.0-45-generic):
graham@dorfl:~$ lsmod | grep usbip
usbip_host 24576 0
usbip_core 32768 1 usbip_host
graham@dorfl:~$ sudo usbipd
usbip err: stub_driver.c: 33 (open_sysfs_
** (process:38742): ERROR **: driver open failed
Trace/breakpoint trap (core dumped)
There's a workaround for this in the comments of Bug #900224, but that seems pretty shonky for an LTR release.
Follow up: the workaround in https:/
This issue seems to be still present on zesty.
The modules are present in the kernel and loaded, however usbipd fails loading:
# usbipd -d -D
usbip err: stub_driver.c: 33 (open_sysfs_
** (process:3248): ERROR **: driver open failed
Trace/breakpoint trap (core dumped)
I wrote too soon, sorry, usbipd works fine, it's just that the working binary is included in linux-tools-generic instead of usbip package.
Just tried it on Ubuntu 16.04 with kernel 4.4.0-112 and the problem persists. It is now more than 6 years - yes 6 YEARS - since this problem has been logged. And no, linux-tools-generic does not solve the problem. It does not contain libusb, libusbd, usbip_common_mod.ko or usbip.ko. According to ubuntu package search linux-tools-generic only contains a changelog.gz and copyright.
I think it is safe to say this project is dead in the water, since nobody seems interested in solving the actual problem.
Finally got it! linux-tools-generic needs to commands to be executed after install:
ln -s /usr/lib/
ln -s /usr/lib/
By doing this, root will have usbip and usbipd in its executable path
I want to know why no people to solve this question for so many years!