You are not logged in.

#1 2016-12-02 01:44:20

waynew
Member
Registered: 2012-05-20
Posts: 37

[SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

This old Ubuntu thread suggests that usbmon should be on my system. This othe thread suggests that not having `/boot` mounted when I've done an upgrade could be the problem, but I've definitely got boot mounted. I'm not sure how I could tell when the last kernel upgrade was but it *looks* like it was probably Nov 27, at least according to

-rw-r--r-- 1 root root  64M Nov 27 07:49 linux-4.8.11-1-x86_64.pkg.tar.xz

found in my `/var/cache/pacman/pkg`. I would be surprised if magically `/boot` wasn't mounted then but is now because I've done nothing (as far as I know) that would have changed that.

I was trying to usbmon to debug the adapter, but

☭ mount -t debugfs none /sys/kernel/debug                                                                                                                                                                                                            19:38:42
mount: none is already mounted or /sys/kernel/debug busy
☭ cat /sys/kernel/debug/usb/usbmon/3u                                                                                                                                                                                                         $? 32  19:38:47
cat: /sys/kernel/debug/usb/usbmon/3u: No such file or directory

I know the mouse works - I plugged it into my mac and it works just fine. And it *looks* like everything is cool with it:

⚘ dmesg | tail                                                                                                                                                                                                                                 $? 1  19:40:31
[715914.574895] usb 5-1: new full-speed USB device number 3 using xhci_hcd
[716255.441511] usb 3-2: new low-speed USB device number 7 using ohci-pci
[716255.626260] input: Dell Premium USB Optical Mouse as /devices/pci0000:00/0000:00:12.0/usb3/3-2/3-2:1.0/0003:413C:3016.0018/input/input21
[716255.626630] hid-generic 0003:413C:3016.0018: input,hidraw0: USB HID v1.11 Mouse [Dell Premium USB Optical Mouse] on usb-0000:00:12.0-2/input0
[716293.260096] usb 5-1: USB disconnect, device number 3
[716301.849530] usb 3-1: new full-speed USB device number 8 using ohci-pci
[716687.999149] usb 3-1: USB disconnect, device number 8
[716744.769157] usb 3-1: new full-speed USB device number 9 using ohci-pci
[717882.287040] usb 3-1: USB disconnect, device number 9
[717884.962403] usb 3-1: new full-speed USB device number 10 using ohci-pci
⚘ lsusb                                                                                                                                                                                                                                              19:40:42
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
Bus 004 Device 002: ID 056a:0016 Wacom Co., Ltd CTE-640 [Graphire4 (6x8)]
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 010: ID 0bda:0184 Realtek Semiconductor Corp. RTS5182 Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 007: ID 413c:3016 Dell Computer Corp. Optical 5-Button Wheel Mouse
Bus 003 Device 010: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 002: ID 04b4:0101 Cypress Semiconductor Corp. Keyboard/Hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

It just doesn't appear to work.

How do I install usbmon and/or how can I figure out why my mouse isn't working?

Last edited by waynew (2016-12-02 03:43:55)

Offline

#2 2016-12-02 02:08:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

Er ... you've not show the output of attempting to load the module.

What are the outputs of `uname -a` and `pacman -Q linux`?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-12-02 02:16:32

waynew
Member
Registered: 2012-05-20
Posts: 37

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

Ah, yeah, I thought I was missing something:

modprobe usbmon
modprobe: FATAL: Module usbmon not found in directory /lib/modules/4.8.6-1-ARCH

And

⚘ find /lib/modules -name usbmon.ko

Returned nothing.

⚘ uname -a
Linux arglefraster 4.8.6-1-ARCH #1 SMP PREEMPT Mon Oct 31 18:51:30 CET 2016 x86_64 GNU/Linux
⚘ pacman -Q linux
linux 4.8.11-1

Offline

#4 2016-12-02 02:27:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

Sooo ... did you read the short thread you linked to?  Reboot.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-12-02 03:43:36

waynew
Member
Registered: 2012-05-20
Posts: 37

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

I did, and I *had* since I upgraded the kernel (well, specifically I lost power), but apparently I needed to reboot with the USB key plugged in. Now usbmon exists (at least `sudo modprobe usbmon`).

I have absolutely no clue *why* that worked, but apparently it did because my mouse works. Even unplugging the receiver and plugging it back in a different port works. I don't like not knowing -_-

But... it works now, so thanks!

Offline

#6 2016-12-02 03:49:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

When you updated the kernel, you also updated the modules, but until you rebooted you were still running the older kernel.  As the modules for that running kernel were no longer present on disk, the usbmon modules couldn't be loaded either automatically when the new hardware was plugged in nor manually with modprobe.  Once you rebooted, the module matching the running kernel was availble and could be loaded.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2016-12-02 15:22:31

waynew
Member
Registered: 2012-05-20
Posts: 37

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

But the posts I read were back in like... v3 of the kernel. I've updated the kernel and had *actual* reboots several times since then. Surely it wasn't just this most recent kernel release that includes usbmon? That's the part that I don't understand.

Offline

#8 2016-12-02 16:14:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

Those other posts are similar occurrences of a general issue - there was no kernel version specific error at all.

The issue is you can only load modules built for the specific version of the kernel you are currently running.  Regardless of the actual version, you cannot load new modules in a previous kernel.  There are two reasons for this: 1) there will often (but not always) be an actual incompatibility there the usbmon.ko.gz is different between kernel versions and a mismatched kernel and module version can cause problems, and 2) at least in archlinux, when you try to load a module, the kernel looks under /lib/modules/<CURRENTLY-RUNNING-VERSION>/... for the .ko or .ko.gz file.  If that path no longer exists because it has been replaced with /lib/modiles<CURRENT+PLUS+ONE>/... then the module will not be found.  This is the exact error message you are getting.

The first reason above may cause problems and is why it is generally ill-advised to mix-and-match kernels and modules.  The second reason makes this entirely impossible in archlinux.  You'll face the same problem with all sorts of other things that require kernel modules that have not already been loaded.  Even trying to mount a flash drive can show this problem if the flash drive uses a filesystem not already loaded in the currently running kernel.  The modules for that filesystem must be loaded, and the running kernel must be able to find them.

So in direct response to the last part of your question: the most recent kernel release includes usbmon for the most recent kernel only.  The most recent kernel release (or the archlinux package at least) does not include the usbmon module for the previous kernel release.

More specifically, look at your command output in post #3.  You were running kernel version 4.8.6-1-ARCH, so whenever you tried to load a module, the kernel would look for the module in /lib/modules/4.8.6-1-ARCH/... this worked well, until you upgraded the kernel to 4.8.11-1.  When you updated, all the files under /lib/modules/4.8.6-1-ARCH/ were removed as they belong to an old package that was being updated.  The new package replaced these with similar files under /lib/modules/4.8.11-1-ARCH/.  So the old kernel couldn't find it's old modules as they no longer existed on your disk.  When you rebooted, you booted into the new kernel, and the new kernel could find it's modules on disk.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2016-12-02 18:01:17

waynew
Member
Registered: 2012-05-20
Posts: 37

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

Ahhhhh. Now I understand - especially the `.ko.gz` part. The other things that I read only mentioned `.ko` and I didn't think to just try

find /lib/modules -name usbmon.ko*

Without the star, it didn't find anything. With the star:

⚘ find /lib/modules -name usbmon.ko*
/lib/modules/4.8.11-1-ARCH/kernel/drivers/usb/mon/usbmon.ko.gz

That the idea of mixing and matching kernels and modules is a bad idea makes perfect sense to me. As well as deleting modules for old kernels.


I confess, I didn't pay attention to the `.11` vs `.6` version - I just noticed the 4.8 vs 3.x or 2.x or whatever kernel the other folks had.

I think you've answered all the questions that I had - especially the .ko.gz thing, that really cleared up I think the main point of confusion. Thanks so much!

Offline

#10 2016-12-02 18:26:07

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] How do I get usbmon/Logitech Unifying Receiver working?

Whenever you're using a character that is considered 'special' by the shell - for example '*', '?', '^' - that you actually want to be passed verbatim to the command, it's good practice to escape it or put it in quotes:

find /lib/modules -name "usbmon.ko*"

In this case, suppose you had a file named 'usbmon.kob' in the current directory. If you don't use quotes, the command would be 'transformed' to:

find /lib/modules -name usbmon.kob

That's still valid syntax, so you wouldn't find anything or get an error. If you also had a file named 'usbmon.kog' the command would be transformed to:

find /lib/modules -name usbmon.kob usbmon.kog

and you'd get an error.

This is an infinitely improbable scenario, but it's still worth it to get in the habit of always escaping or quoting.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB