Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB not unregistering
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jesse_m
n00b
n00b


Joined: 14 Mar 2018
Posts: 28
Location: Grand Rapids, MI

PostPosted: Sun Apr 05, 2020 10:17 pm    Post subject: USB not unregistering Reply with quote

My main issue here is that when I plug a usb serial device in to my laptop, it registers and creates the device in /dev/. When I unplug it though I don't see any messages in dmesg or udevadm monitor and the entry in /dev/ is still there.
I have used genkernel for 5.6 and I can confirm just about all of the usb serial drivers are built as modules. The device is a Prolific USB Serial Device.

When monitoring plugging in the device I have two terminals open. One with "dmesg -w" and one with "udevadm monitor".
Of the three devices the Prolific USB Serial device has the most activity. I can see the following when plugging it in:

udevadm monitor:
Code:

KERNEL[14883.498409] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1 (usb)
KERNEL[14883.498661] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0 (usb)
KERNEL[14883.498707] bind     /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1 (usb)
UDEV  [14884.178694] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1 (usb)
KERNEL[14884.318427] add      /module/usbserial (module)
KERNEL[14884.318474] add      /bus/usb-serial (bus)
KERNEL[14884.318509] add      /bus/usb/drivers/usbserial_generic (drivers)
KERNEL[14884.318535] add      /bus/usb-serial/drivers/generic (drivers)
UDEV  [14884.320003] add      /module/usbserial (module)
UDEV  [14884.320490] add      /bus/usb-serial (bus)
UDEV  [14884.321001] add      /bus/usb-serial/drivers/generic (drivers)
UDEV  [14884.321520] add      /bus/usb/drivers/usbserial_generic (drivers)
KERNEL[14884.332148] add      /module/pl2303 (module)
KERNEL[14884.332197] add      /bus/usb/drivers/pl2303 (drivers)
KERNEL[14884.332223] add      /bus/usb-serial/drivers/pl2303 (drivers)
UDEV  [14884.332690] add      /module/pl2303 (module)
UDEV  [14884.332926] add      /bus/usb/drivers/pl2303 (drivers)
UDEV  [14884.333319] add      /bus/usb-serial/drivers/pl2303 (drivers)
KERNEL[14884.334178] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0 (usb-serial)
KERNEL[14884.334305] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0/tty/ttyUSB0 (tty)
KERNEL[14884.334350] bind     /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0 (usb-serial)
KERNEL[14884.334399] bind     /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0 (usb)
UDEV  [14884.334570] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0 (usb)
UDEV  [14884.343261] bind     /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1 (usb)
UDEV  [14884.344423] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0 (usb-serial)
UDEV  [14884.347042] add      /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0/tty/ttyUSB0 (tty)
UDEV  [14884.349027] bind     /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0 (usb-serial)
UDEV  [14884.350083] bind     /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0 (usb)


dmesg -w:
Code:

[14883.420723] usb 1-1.1: new full-speed USB device number 7 using ehci-pci
[14883.519004] usb 1-1.1: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
[14883.519008] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[14883.519011] usb 1-1.1: Product: USB-Serial Controller
[14883.519013] usb 1-1.1: Manufacturer: Prolific Technology Inc.
[14884.339456] usbcore: registered new interface driver usbserial_generic
[14884.339482] usbserial: USB Serial support registered for generic
[14884.353132] usbcore: registered new interface driver pl2[14883.420723] usb 1-1.1: new full-speed USB device number 7 using ehci-pci
[14883.519004] usb 1-1.1: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
[14883.519008] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[14883.519011] usb 1-1.1: Product: USB-Serial Controller
[14883.519013] usb 1-1.1: Manufacturer: Prolific Technology Inc.
[14884.339456] usbcore: registered new interface driver usbserial_generic
[14884.339482] usbserial: USB Serial support registered for generic
[14884.353132] usbcore: registered new interface driver pl2303
[14884.353162] usbserial: USB Serial support registered for pl2303
[14884.353205] pl2303 1-1.1:1.0: pl2303 converter detected
[14884.355247] usb 1-1.1: pl2303 converter now attached to ttyUSB0
[14884.353162] usbserial: USB Serial support registered for pl2303
[14884.353205] pl2303 1-1.1:1.0: pl2303 converter detected
[14884.355247] usb 1-1.1: pl2303 converter now attached to ttyUSB0


However, when I unplug the device, nothing happens. The /dev/ttyUSB0 is still there and I expected the device to be unregistered.

The udev rule I have for the device is:
Code:

SUBSYSTEM=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE:="0666", GROUP="dialout"


The udevadm for the device is:
Code:

  % udevadm info --attribute-walk --path=$(udevadm info --query=path --name=/dev/ttyUSB0) 

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0/tty/ttyUSB0':
    KERNEL=="ttyUSB0"
    SUBSYSTEM=="tty"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/ttyUSB0':
    KERNELS=="ttyUSB0"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="pl2303"
    ATTRS{port_number}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0':
    KERNELS=="1-1.1:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="pl2303"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{authorized}=="1"
    ATTRS{bInterfaceSubClass}=="00"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bNumEndpoints}=="03"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1':
    KERNELS=="1-1.1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bcdDevice}=="0300"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{manufacturer}=="Prolific Technology Inc."
    ATTRS{bNumConfigurations}=="1"
    ATTRS{authorized}=="1"
    ATTRS{speed}=="12"
    ATTRS{idProduct}=="2303"
    ATTRS{urbnum}=="23"
    ATTRS{devnum}=="7"
    ATTRS{product}=="USB-Serial Controller"
    ATTRS{maxchild}=="0"
    ATTRS{bmAttributes}=="80"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{rx_lanes}=="1"
    ATTRS{removable}=="removable"
    ATTRS{idVendor}=="067b"
    ATTRS{version}==" 1.10"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{tx_lanes}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{devpath}=="1.1"
    ATTRS{busnum}=="1"
    ATTRS{quirks}=="0x0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1':
    KERNELS=="1-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0000"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{authorized}=="1"
    ATTRS{speed}=="480"
    ATTRS{idProduct}=="0020"
    ATTRS{urbnum}=="118"
    ATTRS{devnum}=="2"
    ATTRS{maxchild}=="6"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{rx_lanes}=="1"
    ATTRS{removable}=="fixed"
    ATTRS{idVendor}=="8087"
    ATTRS{version}==" 2.00"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{tx_lanes}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{devpath}=="1"
    ATTRS{busnum}=="1"
    ATTRS{quirks}=="0x0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{configuration}==""
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bcdDevice}=="0506"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{manufacturer}=="Linux 5.6.0-gentoo-x86_64 ehci_hcd"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{authorized}=="1"
    ATTRS{speed}=="480"
    ATTRS{idProduct}=="0002"
    ATTRS{urbnum}=="68"
    ATTRS{devnum}=="1"
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{maxchild}=="3"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{rx_lanes}=="1"
    ATTRS{removable}=="unknown"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{version}==" 2.00"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{serial}=="0000:00:1a.0"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{tx_lanes}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{devpath}=="0"
    ATTRS{busnum}=="1"
    ATTRS{quirks}=="0x0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.0':
    KERNELS=="0000:00:1a.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="ehci-pci"
    ATTRS{broken_parity_status}=="0"
    ATTRS{subsystem_device}=="0x2163"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{vendor}=="0x8086"
    ATTRS{local_cpus}=="f"
    ATTRS{companion}==""
    ATTRS{class}=="0x0c0320"
    ATTRS{numa_node}=="-1"
    ATTRS{msi_bus}=="1"
    ATTRS{device}=="0x3b3c"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{driver_override}=="(null)"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{irq}=="23"
    ATTRS{revision}=="0x06"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{ari_enabled}=="0"
    ATTRS{uframe_periodic_max}=="100"
    ATTRS{enable}=="0"
    ATTRS{subsystem_vendor}=="0x17aa"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""


Is there some other hotplugging setting that I need to set?
This is my first time using genkernel too but non of my other hand configured kernels were giving me any other behavior and I really wanted WireGuard built in.

Any advice or further investigation tips would be appreciated. [/list][/list]
Back to top
View user's profile Send private message
meltdown03
n00b
n00b


Joined: 06 Apr 2020
Posts: 2

PostPosted: Mon Apr 06, 2020 11:09 pm    Post subject: Reply with quote

I'm having the same issue on Archlinux. It started with kernel 5.5.7. I found a redhat bug report of the same thing: https://bugzilla.redhat.com/show_bug.cgi?id=1813530
Try downgrading the kernel to 5.5.6
Back to top
View user's profile Send private message
meltdown03
n00b
n00b


Joined: 06 Apr 2020
Posts: 2

PostPosted: Thu Apr 30, 2020 10:45 pm    Post subject: Reply with quote

Updating to Kernel 5.6.7 seems to have fixed this issue for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum