USB Mouse not working

Hi,

Fresh install FreeBSD 11.1 (Guided ZFS Stripe MBR Bios),
usb wired mouse is not working.

There isn't any /dev/ums* device.

USB Dump:
Code:
usbconfig -u 4 -a 2 dump_info
ugen4.2: <vendor 0x275d USB OPTICAL MOUSE> at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)

usbconfig -u 4 -a 2 dump_curr_config_desc
ugen4.2: <vendor 0x275d USB OPTICAL MOUSE> at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)


 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x0022
    bNumInterfaces = 0x0001
    bConfigurationValue = 0x0001
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x00a0
    bMaxPower = 0x0032

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0003  <HID device>
      bInterfaceSubClass = 0x0001
      bInterfaceProtocol = 0x0002
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x09
      bDescriptorType = 0x21
      bDescriptorSubType = 0x11
       RAW dump:
       0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x40,
       0x08 | 0x00

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0005
        bInterval = 0x000a
        bRefresh = 0x0000
        bSynchAddress = 0x0000

/var/log/message
Code:
Jan 22 13:08:25 skalar kernel: Rebooting...
Jan 22 13:08:25 skalar kernel: cpu_reset: Stopping other CPUs
Jan 22 13:08:25 skalar kernel: Copyright (c) 1992-2017 The FreeBSD Project.
Jan 22 13:08:25 skalar kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Jan 22 13:08:25 skalar kernel: The Regents of the University of California. All rights reserved.
Jan 22 13:08:25 skalar kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
Jan 22 13:08:25 skalar kernel: FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017
Jan 22 13:08:25 skalar kernel: root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Jan 22 13:08:25 skalar kernel: FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
...
Jan 22 13:08:25 skalar kernel: uhub4: 2 ports with 2 removable, self powered
Jan 22 13:08:25 skalar kernel: uhub0: 2 ports with 2 removable, self powered
Jan 22 13:08:25 skalar kernel: uhub6: 2 ports with 2 removable, self powered
Jan 22 13:08:25 skalar kernel: uhub1: 2 ports with 2 removable, self powered
Jan 22 13:08:25 skalar kernel: Trying to mount root from zfs:zroot/ROOT/default []...
Jan 22 13:08:25 skalar kernel: uhub5: 2 ports with 2 removable, self powered
Jan 22 13:08:25 skalar kernel: uhub3: 2 ports with 2 removable, self powered
Jan 22 13:08:25 skalar kernel: Root mount waiting for: usbus7 usbus3
Jan 22 13:08:25 skalar kernel: Root mount waiting for: usbus7 usbus3
Jan 22 13:08:25 skalar kernel: uhub2: 6 ports with 6 removable, self powered
Jan 22 13:08:25 skalar kernel: uhub7: 6 ports with 6 removable, self powered
Jan 22 13:08:25 skalar kernel: Root mount waiting for: usbus7 usbus3
Jan 22 13:08:25 skalar kernel: ugen4.2: <vendor 0x275d USB OPTICAL MOUSE> at usbus4
Jan 22 13:08:25 skalar kernel: ugen0.2: <Microsoft Wired Keyboard 600> at usbus0
Jan 22 13:08:25 skalar kernel: ukbd0 on uhub6
Jan 22 13:08:25 skalar kernel: ukbd0: <Microsoft Wired Keyboard 600, class 0/0, rev 2.00/3.00, addr 2> on usbus0
Jan 22 13:08:25 skalar kernel: kbd2 at ukbd0
Jan 22 13:08:25 skalar kernel: re0: link state changed to DOWN
Jan 22 13:08:25 skalar kernel: re0: link state changed to UP
Jan 22 13:08:28 skalar dbus[622]: [system] Activating service name='org.freedesktop.ConsoleKit' (using servicehelper)
Jan 22 13:08:28 skalar dbus[622]: [system] Activating service name='org.freedesktop.PolicyKit1' (using servicehelper)
Jan 22 13:08:28 skalar dbus[622]: [system] Successfully activated service 'org.freedesktop.ConsoleKit'
Jan 22 13:08:28 skalar dbus[622]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'

And /etc/rc.conf

Code:
sendmail_enable="NONE"
hostname="skalar"
keymap="pl_PL.ISO8859-2.kbd"
ifconfig_re0="DHCP"
sshd_enable="YES"
#moused_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
dbus_enable="YES"
hald_enable="YES"

It's strange for me (I'm not advanced user) but I can't find /boot/loader.conf.

Can you help me?
 
If you run tail -f /var/log/messages and unplug and re-plug the mouse, what messages do you see?
 
Jan 22 13:08:25 skalar kernel: ugen4.2: <vendor 0x275d USB OPTICAL MOUSE> at usbus4
I can see in your /var/log/messages that mouse is discovered but probably not identified as vendor 0x275d hex manufacturer code is displayed instead of its name.

additionally in /etc/rc.conf file, you have commented out moused deamon. Can you try to uncomment this line?
Code:
---> #moused_enable="YES"
remove leading # sign and save changes
Code:
moused_enable="YES"

Regards,
Krzysztof
 
additionally in /etc/rc.conf file, you have commented out moused deamon. Can you try to uncomment this line?
Enabling it is only required for PS/2 mice, for USB mice it's automatically loaded by devd(8). If it's correctly recognized.
 
If you run tail -f /var/log/messages and unplug and re-plug the mouse, what messages do you see?

Code:
Jan 22 16:48:59 skalar kernel: ugen4.2: <vendor 0x275d USB OPTICAL MOUSE> at usbus4 (disconnected)
Jan 22 16:49:06 skalar kernel: ugen4.2: <vendor 0x275d USB OPTICAL MOUSE> at usbus4
 
I went back to the installer and noticed that mouse did work there. Reinstall.
And again mouse is not working.

I took also wireless keyboard with mousepad - logitech k400 plus - which I was using with FreeBSD 10.x without any problem.

Keyboard is working touchpad not.

usbconfig -u 4 -a 2 dump_curr_config_desc resulted:

Code:
ugen4.2: <Logitech USB Receiver> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (98mA)


 Configuration index 0

    bLength = 0x0009
    bDescriptorType = 0x0002
    wTotalLength = 0x0054
    bNumInterfaces = 0x0003
    bConfigurationValue = 0x0001
    iConfiguration = 0x0004  <RQR24.01_B0023>
    bmAttributes = 0x00a0
    bMaxPower = 0x0031

    Interface 0
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0000
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0003  <HID device>
      bInterfaceSubClass = 0x0001
      bInterfaceProtocol = 0x0001
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x09
      bDescriptorType = 0x21
      bDescriptorSubType = 0x11
       RAW dump:
       0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x3b,
       0x08 | 0x00

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0008
        bInterval = 0x0008
        bRefresh = 0x0000
        bSynchAddress = 0x0000


    Interface 1
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0001
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0003  <HID device>
      bInterfaceSubClass = 0x0001
      bInterfaceProtocol = 0x0002
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x09
      bDescriptorType = 0x21
      bDescriptorSubType = 0x11
       RAW dump:
       0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x94,
       0x08 | 0x00

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0082  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0008
        bInterval = 0x0002
        bRefresh = 0x0000
        bSynchAddress = 0x0000


    Interface 2
      bLength = 0x0009
      bDescriptorType = 0x0004
      bInterfaceNumber = 0x0002
      bAlternateSetting = 0x0000
      bNumEndpoints = 0x0001
      bInterfaceClass = 0x0003  <HID device>
      bInterfaceSubClass = 0x0000
      bInterfaceProtocol = 0x0000
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x09
      bDescriptorType = 0x21
      bDescriptorSubType = 0x11
       RAW dump:
       0x00 | 0x09, 0x21, 0x11, 0x01, 0x00, 0x01, 0x22, 0x62,
       0x08 | 0x00

     Endpoint 0
        bLength = 0x0007
        bDescriptorType = 0x0005
        bEndpointAddress = 0x0083  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0020
        bInterval = 0x0002
        bRefresh = 0x0000
        bSynchAddress = 0x0000

I read USB Device class specification: http://www.usb.org/developers/hidpage/HID1_11.pdf
Description by usbconfig:
Code:
Inteface # 0 - default // ok
Interface # 1:
      bInterfaceClass = 0x0003  <HID device> // ok
      bInterfaceSubClass = 0x0001 // devices requiring BIOS support
      bInterfaceProtocol = 0x0002 // mouse???
Interface # 2:
      bInterfaceClass = 0x0003  <HID device> //ok
      bInterfaceSubClass = 0x0000 // No subclass
      bInterfaceProtocol = 0x0000 // protocol none???

However according to specification - protocol Codes:
Code:
Protocol Code
0 None
1 Keyboard
2 Mouse
3 - 255
Reserved

My conclusion is - data presented by usbconfig are not consistent.
It should looks like:
Code:
Interface # 1:
      bInterfaceClass = 0x0003  <HID device> // ok
      bInterfaceSubClass = 0x0001 // devices requiring BIOS support
      bInterfaceProtocol = 0x0001 // keyboard

Interface # 2:
      bInterfaceClass = 0x0003  <HID device> //ok
      bInterfaceSubClass = 0x0000 // No subclass
      bInterfaceProtocol = 0x0002 // mouse

Can someone tell me how to check which interface is connected to /dev/ukbd node?
 
I went back to installer again to check if it my mouse problem was related to zfs installation.

I installed FreeBSD with standard configuration. And mouse is working now.
I connected also wireless keyboard with touchpad and is working too.

ls /dev/u* results:
Code:
...
/dev/uhid0
/dev/uhid1
/dev/ukbd0
/dev/ukbd1
/dev/ums0
/dev/ums1
...

So it is something related to zfs installation.
And I did zfs installation to benchmark it and check how it works as desktop.
What shall I do next ? Who should I ask for help?
 
After upgrade from 10.4 to 12.0 via # freebsd-update,
my USB mouse stopped working... I see nothing strange or unusual
in /var/log/messages / # dmesg, OS recognizes it well, but it isn't working…
Anyone had this issue? Mouse isn't working in console also.
 
I've had that happen once, not due to a reinstall though, and either rebooted the machine, or re-plugged in the mouse. Sorry if no help. here.
 
Thanks, but I tried to plug/unplug, reboot, spells, black magic... :D
But none of this helped.
 
Noticed that moused is unable to start.
When I'm trying to start it manually it prints
Code:
Starting default mousedmoused: unable to open /dev/psm0: No such file or directory
Now the only info that I can find about my mouse via # dmesg is
Code:
Dec 19 03:09:52 HOME kernel: ugen4.2: <PixArt USB Optical Mouse> at usbus4

P.S.: mouse works fine - 100%, tested on another machine.
 
I can't help you, if you don't cooperate (I ask you for some output)

When I'm trying to start it manually it prints
Code:
Starting default mousedmoused: unable to open /dev/psm0: No such file or directory

What command did you use?

/dev/psm0 is a device file for PS/2 mouse, your is USB, it requires /dev/ums0

Now the only info that I can find about my mouse via # dmesg is
Code:
Dec 19 03:09:52 HOME kernel: ugen4.2: <PixArt USB Optical Mouse> at usbus4

With the mouse connected, what is the output of dmesg | grep ^ums

USB mice are initialized by devd(8), try removing everything related to moused in /etc/rc.conf and reboot
 
With the mouse connected, what is the output of dmesg | grep ^ums

USB mouses are initialized by devd(8), try removing everything related to moused in /etc/rc.conf and reboot
1. Empty output.

2. I already tried that, the situation is the same.

BTW, google search suggestions shows "freebsd 12 mouse", so probably someone had this problem, but I cannot find any solution.
 
SOLVED :D
The solution was very easy, I just had to execute # kldload ums.

So, it seems, starting from 12-RELEASE, this kernel module is not in GENERIC kernel anymore
(why? may be it is a bug?).

So, if someone also have this issue, add ums_load="YES" to /boot/loader.conf and reboot.
 
Last edited by a moderator:
Same problem - same solution. Upgraded from an old (working) 12-CURRENT to 12-STABLE and the mouse device failed to be populated in /dev/ ... kldload ums fixes it.

Code:
Feb 10 22:44:29 citadel kernel: ums0 on uhub3
Feb 10 22:44:29 citadel kernel: ums0: <EP2> on usbus0
Feb 10 22:44:29 citadel kernel: ums0: 3 buttons and [XYZ] coordinates ID=0
 
I spent a few hours on this, but finally got it to work for me.

My Mouse: a USB wireless WM123 Dell/Logitech, 2 button w/wheel&button combo.

Symptoms: left button select and right button region worked, but middle button copy did nothing, both console and X11 xterm

Solution: Added line moused_flags="-c" to my rc.conf file. This flag is for mice that send a combo of a left and right button together when the middle button is pressed. The change fixed the console and X11 xterm. I have to HOLD the middle mouse button for longer than a left or right click, but it works.

My rc.conf does NOT have: hald_enabled="YES", dbus_enabled="YES", moused_enabled="YES", moused_type="YES"
I did NOT add kern.evdev.rcpt_mask=12 to /etc/sysctl.conf.
I did NOT change anything in any X11 configure file. I only followed the steps in the Handbook, 5.4.1 Quick Start.
I am running FreeBSD 12.1-RELEASE-p10 GENERIC amd64.
 
Back
Top