@sofistisoftware
I see these points of interest (assuming its the port 2 on "USB 2.0 Hub" which you're talking about as occasionally detaching and re-attaching - it describes itself as "Logitech"/"USB Receiver"):
> ...
> I: [23:28:46] hub.usbfd | HUB | Device found on port 2 of hub "USB 2.0 Hub" (ifc 0x6EDB0E90)
> ...
> I: [23:42:48] hub.usbfd | HUB | Detaching Function removed from hub port 2 (ifc 0x6edb0e90)
> ...
> I: [23:42:50] hub.usbfd | HUB | Device found on port 2 of hub "USB 2.0 Hub" (ifc 0x6edb0e90)
> ...
These basically states that
- at 23:28:46 the hub driver got a notification from the hub that the "USB Receiver" device was detected at a hub port and started attaching it to the USB stack
- at 23:42:48 the hub driver got a notification from the hub that the "USB Receiver" device has been electrically (if not physically) removed, and told the USB stack to clean up after it. I.e. responding to a state change in the hub hardware.
- at 23:42:50 the hub driver got a notification from the hub that the "USB Receiver" device was again detected at a hub port and started attaching it to the USB stack
So, from this it doesn't seem to be a software issue (which is not the same as ruling it out completely, though

, rather a hardware thing. The hub driver is basically polling port state changes from the hub hardware and reacts when the hardware tells there's a state change from "nothing connected" to "something connected", or the other way back.
Are you sure there's not an electrical problem either in the hub port or with the connector on the "USB Receiver" itself?
Does other USB devices in the same hub port behave this way, and does the "USB Receiver" have similar behavior in another hub port?