Did I not say it right? Or perhaps a kernel or some other issue? ===== (no need to CC I'm subscribed to list), Hello, My USB keyboard is being dropped by the kernel at various times and I cannot figure out how to fix this. Maybe I have messed up somewhere but I think I'm reading the documents right. :) I'm using a recent Debian kernel and running Debian Testing/Unstable but the kernel is coming from Experimental. Linux ant 4.17.0-rc3-amd64 #1 SMP Debian 4.17~rc3-1~exp1 (2018-04-29) x86_64 GNU/Linux And I've also tried kernel straight from Linus tree, doesn't seem to be any different. I've also made sure the keyboard is plugged into various USB ports and of versions both 2.0 and 3.1 and also tried changing through the bios any legacy and handoff settings to verify that they didn't solve this problem. I've captured logs from journalctl and udevadm which makes me think that this is coming from the kernel (they are at the end). If it helps I have a combined log from the console captured by script command. I've tried setting kernel parameters for power control in sys/bus/usb and sys/bus/hid to stop any autosuspend and I've used the usbhid.quirks in my kernel boot parameters like: net.ifnames=0 usbhid.quirks=0x17f6:0x0830:0x00000400 I've also made sure that udev has rules like: ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="17f6", ATTR{idProduct}=="0830", TEST=="power/control", ATTR{power/control}="on" ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="17f6", ATTR{idProduct}=="0830", TEST=="power/autosuspend_delay_ms", ATTR{power/autosuspend_delay_ms}="-1" and the following script shows they seem to be set: ----- echo -e "\nDev\tControl\tMs\tProduct\n" for d in /sys/bus/usb/devices/[0-9]* ; do if [[ -e $d/product ]] ; then echo -e "`basename $d`\t`cat $d/power/control`\t`cat $d/power/autosuspend_delay_ms`\t`cat $d/product`" ; fi ; done echo -e "\nDev\tControl\n" for d in /sys/bus/hid/devices/[0-9]* ; do echo -e "`basename $d`\t`cat $d/power/control`" ; done ----- Dev Control Ms Product 1-12 on 2000 2.4G Mouse 1-4 on 2000 DeskJet 930C 1-5 on 2000 ASC495 Speakers 1-6 on -1 Ruffian6_x Kbrd v3_16 1-8 on 2000 Cruzer Glide Dev Control 0003:17F6:0830.0002 auto 0003:1EA7:0064.0001 auto ----- lsusb finds device fine: Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 0781:5575 SanDisk Corp. Bus 001 Device 007: ID 17f6:0830 Unicomp, Inc Bus 001 Device 003: ID 04d2:ff05 Altec Lansing Technologies ADA-305 Speakers Bus 001 Device 002: ID 03f0:1204 Hewlett-Packard DeskJet 930c Bus 001 Device 006: ID 1ea7:0064 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub lsmod says: Module Size Used by cpufreq_powersave 16384 0 cpufreq_userspace 16384 0 cpufreq_conservative 16384 0 usblp 24576 0 snd_hda_codec_hdmi 57344 1 nls_ascii 16384 2 nls_cp437 20480 2 snd_hda_codec_realtek 106496 1 vfat 24576 2 intel_rapl 24576 0 snd_hda_codec_generic 86016 1 snd_hda_codec_realtek fat 77824 1 vfat x86_pkg_temp_thermal 16384 0 intel_powerclamp 16384 0 snd_hda_intel 45056 3 kvm_intel 233472 0 snd_hda_codec 151552 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek snd_usb_audio 229376 0 snd_usbmidi_lib 36864 1 snd_usb_audio kvm 724992 1 kvm_intel snd_hda_core 94208 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek mxm_wmi 16384 0 snd_rawmidi 40960 1 snd_usbmidi_lib irqbypass 16384 1 kvm crct10dif_pclmul 16384 0 crc32_pclmul 16384 0 snd_seq_device 16384 1 snd_rawmidi snd_hwdep 16384 2 snd_usb_audio,snd_hda_codec snd_pcm 118784 5 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core ghash_clmulni_intel 16384 0 i915 1708032 4 efi_pstore 16384 0 intel_cstate 16384 0 intel_uncore 131072 0 evdev 28672 6 snd_timer 36864 1 snd_pcm mei_me 45056 0 snd 94208 18 snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi iTCO_wdt 16384 0 drm_kms_helper 200704 1 i915 joydev 24576 0 intel_rapl_perf 16384 0 soundcore 16384 1 snd iTCO_vendor_support 16384 1 iTCO_wdt pcspkr 16384 0 efivars 20480 1 efi_pstore shpchp 40960 0 sg 36864 0 mei 110592 1 mei_me drm 462848 5 drm_kms_helper,i915 i2c_algo_bit 16384 1 i915 video 45056 1 i915 wmi 28672 1 mxm_wmi acpi_pad 24576 0 button 16384 1 i915 ip6t_REJECT 16384 1 nf_reject_ipv6 16384 1 ip6t_REJECT nf_log_ipv6 16384 5 xt_hl 16384 22 ip6t_rt 16384 3 binfmt_misc 20480 1 nf_conntrack_ipv6 16384 8 nf_defrag_ipv6 20480 1 nf_conntrack_ipv6 ipt_REJECT 16384 1 nf_reject_ipv4 16384 1 ipt_REJECT nf_log_ipv4 16384 5 nf_log_common 16384 2 nf_log_ipv4,nf_log_ipv6 xt_LOG 16384 10 xt_limit 16384 13 xt_tcpudp 16384 18 xt_addrtype 16384 4 nf_conntrack_ipv4 16384 8 nf_defrag_ipv4 16384 1 nf_conntrack_ipv4 xt_conntrack 16384 16 ip6table_filter 16384 1 ip6_tables 28672 1 ip6table_filter nf_conntrack_netbios_ns 16384 0 nf_conntrack_broadcast 16384 1 nf_conntrack_netbios_ns nf_nat_ftp 16384 0 nf_nat 36864 1 nf_nat_ftp nf_conntrack_ftp 20480 1 nf_nat_ftp nct6775 65536 0 hwmon_vid 16384 1 nct6775 nf_conntrack 155648 8 xt_conntrack,nf_conntrack_ipv6,nf_conntrack_ipv4,nf_nat,nf_nat_ftp,nf_conntrack_netbios_ns,nf_conntrack_broadcast,nf_conntrack_ftp coretemp 16384 0 iptable_filter 16384 1 parport_pc 32768 0 ppdev 20480 0 lp 20480 0 parport 57344 3 parport_pc,lp,ppdev efivarfs 16384 1 ip_tables 28672 1 iptable_filter x_tables 40960 13 ip6table_filter,xt_conntrack,iptable_filter,xt_LOG,xt_tcpudp,xt_addrtype,ip6t_rt,ip6_tables,ipt_REJECT,ip_tables,xt_limit,xt_hl,ip6t_REJECT autofs4 49152 2 ext4 737280 3 crc16 16384 1 ext4 mbcache 16384 1 ext4 jbd2 118784 1 ext4 fscrypto 32768 1 ext4 ecb 16384 0 hid_generic 16384 0 usbhid 57344 0 hid 135168 2 usbhid,hid_generic btrfs 1372160 0 xor 24576 1 btrfs zstd_decompress 94208 1 btrfs zstd_compress 188416 1 btrfs xxhash 16384 2 zstd_compress,zstd_decompress uas 28672 0 usb_storage 69632 3 uas raid6_pq 122880 1 btrfs libcrc32c 16384 3 nf_conntrack,nf_nat,btrfs crc32c_generic 16384 0 sr_mod 28672 0 cdrom 69632 1 sr_mod sd_mod 53248 8 crc32c_intel 24576 7 ahci 40960 4 aesni_intel 200704 1 aes_x86_64 20480 1 aesni_intel libahci 40960 1 ahci crypto_simd 16384 1 aesni_intel xhci_pci 16384 0 libata 278528 2 libahci,ahci xhci_hcd 262144 1 xhci_pci cryptd 28672 3 crypto_simd,ghash_clmulni_intel,aesni_intel glue_helper 16384 1 aesni_intel e1000e 282624 0 i2c_i801 28672 0 usbcore 290816 8 xhci_hcd,snd_usb_audio,usbhid,snd_usbmidi_lib,usblp,usb_storage,xhci_pci,uas scsi_mod 253952 6 sd_mod,usb_storage,uas,libata,sg,sr_mod usb_common 16384 1 usbcore ----- combined logs for udev and journalctl Script started on 2018-05-07 09:14:33-0400 root@ant(1)~/rlog# journalctl -f -o short-monotonic | tee jrnl-log & [1] 3051 root@ant(2)~/rlog# -- Logs begin at Sun 2018-05-06 11:34:03 EDT. -- root@ant(2)~/rlog# udevadm monitor -k -u | tee udev-log & [2] 3053 root@ant(3)~/rlog# monitor will print the received events for: UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent ... KERNEL[8256.344251] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::numlock (leds) KERNEL[8256.344319] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::numlock (leds) KERNEL[8256.344350] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::capslock (leds) KERNEL[8256.344371] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::capslock (leds) KERNEL[8256.344403] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::scrolllock (leds) KERNEL[8256.344424] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::scrolllock (leds) KERNEL[8256.344444] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::compose (leds) KERNEL[8256.344471] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::kana (leds) KERNEL[8256.344496] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::kana (leds) UDEV [8256.349824] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::numlock (leds) UDEV [8256.350101] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::capslock (leds) UDEV [8256.350390] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::compose (leds) UDEV [8256.350406] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::scrolllock (leds) UDEV [8256.350700] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::numlock (leds) UDEV [8256.350940] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::kana (leds) UDEV [8256.350965] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::capslock (leds) UDEV [8256.351178] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::scrolllock (leds) UDEV [8256.351716] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/input27::kana (leds) KERNEL[8256.372231] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/event4 (input) UDEV [8256.373878] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27/event4 (input) KERNEL[8256.400301] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27 (input) KERNEL[8256.400362] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/hidraw/hidraw1 (hidraw) KERNEL[8256.400405] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B (hid) KERNEL[8256.400452] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B (hid) KERNEL[8256.400497] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) KERNEL[8256.400565] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) KERNEL[8256.401102] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) KERNEL[8256.401183] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) UDEV [8256.404328] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/input/input27 (input) UDEV [8256.404750] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B/hidraw/hidraw1 (hidraw) UDEV [8256.407140] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B (hid) UDEV [8256.408950] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000B (hid) UDEV [8256.411027] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) UDEV [8256.412710] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) UDEV [8256.414787] unbind /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) UDEV [8256.416250] remove /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) [ 8256.041205] ant kernel: usb 1-6: USB disconnect, device number 16 [ 8260.357540] ant colord-sane[3477]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied [ 8260.357976] ant colord-sane[3477]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied KERNEL[8730.354901] add /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) KERNEL[8730.356469] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) KERNEL[8730.357620] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C (hid) KERNEL[8730.357980] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28 (input) KERNEL[8730.358030] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::numlock (leds) KERNEL[8730.358078] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::numlock (leds) KERNEL[8730.358112] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::capslock (leds) KERNEL[8730.358151] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::capslock (leds) KERNEL[8730.358185] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::scrolllock (leds) KERNEL[8730.358227] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::scrolllock (leds) KERNEL[8730.358262] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::compose (leds) KERNEL[8730.358297] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::kana (leds) KERNEL[8730.358335] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::kana (leds) KERNEL[8730.358384] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/event4 (input) KERNEL[8730.358455] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/hidraw/hidraw1 (hidraw) KERNEL[8730.358527] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C (hid) KERNEL[8730.358598] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) KERNEL[8730.358672] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) UDEV [8730.363427] add /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) UDEV [8730.364253] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) UDEV [8730.364982] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C (hid) UDEV [8730.366345] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/hidraw/hidraw1 (hidraw) UDEV [8730.366486] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28 (input) UDEV [8730.367575] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::numlock (leds) UDEV [8730.367679] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::capslock (leds) UDEV [8730.368156] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::scrolllock (leds) UDEV [8730.368254] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::compose (leds) UDEV [8730.368377] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::kana (leds) UDEV [8730.368876] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::capslock (leds) UDEV [8730.368902] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::numlock (leds) UDEV [8730.369335] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::scrolllock (leds) UDEV [8730.370287] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/input28::kana (leds) UDEV [8730.436906] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28/event4 (input) UDEV [8730.437861] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C (hid) UDEV [8730.438848] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) UDEV [8730.439900] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) [ 8729.925230] ant kernel: usb 1-6: new full-speed USB device number 17 using xhci_hcd [ 8730.075687] ant kernel: usb 1-6: New USB device found, idVendor=17f6, idProduct=0830, bcdDevice= 3.24 [ 8730.075696] ant kernel: usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 8730.075702] ant kernel: usb 1-6: Product: Ruffian6_x Kbrd v3_16 [ 8730.075708] ant kernel: usb 1-6: Manufacturer: Unicomp Inc [ 8730.079025] ant kernel: input: Unicomp Inc Ruffian6_x Kbrd v3_16 as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:17F6:0830.000C/input/input28 [ 8730.079596] ant kernel: hid-generic 0003:17F6:0830.000C: input,hidraw1: USB HID v1.11 Keyboard [Unicomp Inc Ruffian6_x Kbrd v3_16] on usb-0000:00:14.0-6/input0 [ 8730.362634] ant mtp-probe[3509]: checking bus 1, device 17: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6" [ 8730.362970] ant mtp-probe[3509]: bus: 1, device: 17 was not an MTP device [ 8734.273677] ant colord-sane[3510]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied [ 8734.274030] ant colord-sane[3510]: io/hpmud/musb.c 2101: Invalid usb_open: Permission denied ... root@ant(3)~/rlog# fg udevadm monitor -k -u | tee udev-log ^C root@ant(4)~/rlog# fg journalctl -f -o short-monotonic | tee jrnl-log ^C root@ant(6)~/rlog# exit Script done on 2018-05-07 12:16:41-0400 ----- Any help you can give will be greatly appreciated. Thank you, ant -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html