1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Force USB2 controller to use USB1 for virtualbox usage

Discussion in 'Peripheral Hardware' started by cduret, Feb 22, 2013.

  1. cduret

    cduret New Member

    Messages:
    17
    Likes Received:
    0
    Hello all,

    I try to change my USB 2.0 devices (USB stick, Android phone) to USB 1.1 in order to use it with VirtualBox running Windows seven 64.

    I see some hints on the web but had no success with the sysctl hw.usb.ehci.no_hs.
    -> http://www.clearchain.com/blog/posts/how-to-use-freebsd-virtualbox-and-usb2-0-devices

    I tried two solutions without success.

    1) I put this command in /boot/loader.conf:
    Code:
    hw.usb.ehci.no_hs=1
    
    My USB device not work anymore (see /var/log/messages below).

    2) I put this command in /etc/sysctl.conf:
    Code:
    hw.usb.ehci.no_hs=1
    
    My USB device works but it is still in HIGH speed.

    Code:
    @ sudoi sysctl hw.usb.ehci.no_hs
    hw.usb.ehci.no_hs: 1
    
    @ sudoi usbconfig
    ugen0.1: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen0.2: <product 0x0024 vendor 0x8087> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.3: <Cruzer SanDisk> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
    
    My device speed is still HIGH and cannot see it to FULL.

    Any experiences?
    Thanks.

    My config:

    Code:
    FreeBSD darkstar 9.1-STABLE FreeBSD 9.1-STABLE #2: Thu Jan 31 20:41:22 CET 2013 root@darkstar:/usr/obj/usr/src/sys/THINKPKERNEL  amd64
    
    My devices:

    From pciconf ->
    Code:
    ehci0@pci0:0:26:0:      class=0x0c0320 card=0x21d217aa chip=0x1c2d8086 rev=0x04 hdr=0x00
        vendor     = 'Intel Corporation'
        device     = '6 Series/C200 Series Chipset Family USB Enhanced Host Controller'
        class      = serial bus
        subclass   = USB
    
    
    ehci1@pci0:0:29:0:      class=0x0c0320 card=0x21d217aa chip=0x1c268086 rev=0x04 hdr=0x00
        vendor     = 'Intel Corporation'
        device     = '6 Series/C200 Series Chipset Family USB Enhanced Host Controller'
        class      = serial bus
        subclass   = USB
    
    
    none2@pci0:13:0:0:      class=0x0c0330 card=0x21d217aa chip=0x01941033 rev=0x04 hdr=0x00
        vendor     = 'NEC Corporation'
        device     = 'uPD720200 USB 3.0 Host Controller'
        class      = serial bus
        subclass   = USB
    
    From /var/log/messages:

    Code:
    kernel: ehci0: <EHCI (generic) USB 2.0 controller> mem 0xf432a000-0xf432a3ff irq 16 at device 26.0 on pci0
    kernel: usbus0: EHCI version 1.0
    kernel: usbus0 on ehci0
    kernel: ehci1: <EHCI (generic) USB 2.0 controller> mem 0xf4329000-0xf43293ff irq 23 at device 29.0 on pci0
    kernel: usbus1: EHCI version 1.0
    kernel: usbus1 on ehci1
    kernel: usbus0: 480Mbps High Speed USB v2.0
    kernel: usbus1: 480Mbps High Speed USB v2.0
    kernel: ugen0.1: <Intel> at usbus0
    kernel: uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
    kernel: ugen1.1: <Intel> at usbus1
    kernel: uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
    kernel: Root mount waiting for: usbus1 usbus0
    kernel: Root mount waiting for: usbus1 usbus0
    kernel: uhub0: 3 ports with 3 removable, self powered
    kernel: uhub1: 3 ports with 3 removable, self powered
    
    -- If I put hw.usb.ehci.no_hs=1 in /boot/loader.conf the following lines does not appear in /var/log/messages:
    Code:
    kernel: Root mount waiting for: usbus1 usbus0
    kernel: ugen0.2: <vendor 0x8087> at usbus0
    kernel: uhub2: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus0
    kernel: ugen1.2: <vendor 0x8087> at usbus1
    kernel: uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1
    kernel: Root mount waiting for: usbus1 usbus0
    kernel: uhub2: 6 ports with 6 removable, self powered
    kernel: uhub3: 8 ports with 8 removable, self powered
    
     
  2. Naught0

    Naught0 New Member

    Messages:
    6
    Likes Received:
    0
    sysctl hw.usb.ehci.no_hs=1 is a terminal command to disable high speed transfer on USB2.0 controllers. First unplug the devices. Then as root open a terminal and run usbconfig. It should show all of the USB ports and the bus speeds they are at. Enter the command, as root: sysctl hw.usb.ehci.no_hs=1. Then running usbconfig again should not report and ports at spd=HIGH only spd=FULL or spd=LOW. Then plug in the devices.
     
  3. cduret

    cduret New Member

    Messages:
    17
    Likes Received:
    0
    It does not work. I unplugged all devices:

    Code:
    @ su -
    Password:
    # sysctl hw.usb.ehci.no_hs
    hw.usb.ehci.no_hs: 0
    # usbconfig
    ugen0.1: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen0.2: <product 0x0024 vendor 0x8087> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    # sysctl hw.usb.ehci.no_hs=1
    hw.usb.ehci.no_hs: 0 -> 1
    # usbconfig
    ugen0.1: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen0.2: <product 0x0024 vendor 0x8087> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    Then I plugged my phone:

    Code:
    # usbconfig
    ugen0.1: <EHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen0.2: <product 0x0024 vendor 0x8087> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE
    ugen1.3: <Android Phone HTC> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
     
  4. Naught0

    Naught0 New Member

    Messages:
    6
    Likes Received:
    0