Re: After waking from suspend, USB devices are not recognized (Ubuntu 17.10)

2017-11-23 Thread Michael Shiloh
Not powertop, but yes tlp. Very interesting. I will uninstall and see if
that solves the problem.

Another observation I just made: If I suspend the laptop with USB devices
plugged in, they are still detected when I restart.

I guess I could work around by leaving some small USB device plugged in
(one of those wireless mouse things) but obviously that's a real hack.
Still, the observation may be a hint as to what's going on or what I might
look at next.

I will disable TLP and report back.

Michael

On Fri, Nov 24, 2017 at 2:38 AM, Efraim Flashner 
wrote:

> On Thu, Nov 23, 2017 at 06:15:03PM +0400, Michael Shiloh wrote:
> > Hi,
> >
> > I noticed that my old mouse didn't work all the time, and figured it was
> > time to replace the mouse. Then I had trouble programming some Arduinos,
> > and figured I had a bad Arduino. It wasn't until my system failed to see
> a
> > thumb drive that I finally realized the common element here: After waking
> > from suspend, no devices plugged in to the USB ports are recognized.
> >
>
> Do you run powertop or tlp on your laptop? Sometimes those can cause
> issues with the USB ports.
>
> --
> Efraim Flashner      אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: After waking from suspend, USB devices are not recognized (Ubuntu 17.10)

2017-11-23 Thread Efraim Flashner
On Thu, Nov 23, 2017 at 06:15:03PM +0400, Michael Shiloh wrote:
> Hi,
> 
> I noticed that my old mouse didn't work all the time, and figured it was
> time to replace the mouse. Then I had trouble programming some Arduinos,
> and figured I had a bad Arduino. It wasn't until my system failed to see a
> thumb drive that I finally realized the common element here: After waking
> from suspend, no devices plugged in to the USB ports are recognized.
> 

Do you run powertop or tlp on your laptop? Sometimes those can cause
issues with the USB ports.

-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


After waking from suspend, USB devices are not recognized (Ubuntu 17.10)

2017-11-23 Thread Michael Shiloh
Hi,

I noticed that my old mouse didn't work all the time, and figured it was
time to replace the mouse. Then I had trouble programming some Arduinos,
and figured I had a bad Arduino. It wasn't until my system failed to see a
thumb drive that I finally realized the common element here: After waking
from suspend, no devices plugged in to the USB ports are recognized.

$ uname -a
Linux x1 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux

Hardware details are at the end of this mail.

Here is the system in its failed state:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ lspci -nnk | grep -A2 USB
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0
xHCI Controller [8086:9d2f] (rev 21)
Subsystem: Lenovo Sunrise Point-LP USB 3.0 xHCI Controller [17aa:2238]
Kernel driver in use: xhci_hcd
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise
Point-LP

$ lsmod | grep usb
btusb  45056  0
btrtl  16384  1 btusb
btbcm  16384  1 btusb
btintel16384  1 btusb
bluetooth 540672  14 btrtl,btintel,bnep,btbcm,rfcomm,btusb
usbhid 49152  0
hid   118784  4 hid_sensor_hub,hid_generic,usb
hid,intel_ishtp_hid

After a reboot, when USB devices are recognized, the same commands look
like this:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 138a:0090 Validity Sensors, Inc.
Bus 001 Device 003: ID 04f2:b5c1 Chicony Electronics Co., Ltd
Bus 001 Device 002: ID 8087:0a2b Intel Corp.
Bus 001 Device 006: ID 046d:c404 Logitech, Inc. TrackMan Wheel
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ lspci -nnk | grep -A2 USB
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0
xHCI Controller [8086:9d2f] (rev 21)
Subsystem: Lenovo Sunrise Point-LP USB 3.0 xHCI Controller [17aa:2238]
Kernel driver in use: xhci_hcd
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise
Point-LP

$ lsmod | grep usb
usbhid 49152  0
btusb  45056  0
btrtl  16384  1 btusb
btbcm  16384  1 btusb
btintel16384  1 btusb
bluetooth 540672  31 btrtl,btintel,bnep,btbcm,rfcomm,btusb
hid   118784  4 hid_sensor_hub,hid_generic,
usbhid,intel_ishtp_hid



I'm not much of an expert with USB and udev, so I did a bit of reading and
learned about udevadm. After a reboot, when USB is working,

$ sudo apt-get install udevadm

shows activity when I plug or unplug a USB device. After a suspend,
nothing.

I googled expressions like "usb not recognized after wake from suspend" and
didn't find anything useful.

I don't know enough about this part of the system to know where to look
next. What do you suggest I do next in order to determine where the problem
might be?

System info below.

Thanks in advance for any guidance,
Michael

$ inxi -Fx
System:Host: x1 Kernel: 4.13.0-16-generic x86_64 bits: 64 gcc: 7.2.0
   Desktop: Gnome 3.26.2 (Gtk 3.22.25-0ubuntu1)
   Distro: Ubuntu Bionic Beaver (development branch)
Machine:   Device: laptop System: LENOVO product: 20FBCTO1WW v: ThinkPad X1
Carbon 4th serial: N/A
   Mobo: LENOVO model: 20FBCTO1WW v: SDK0J40709 WIN serial: N/A
   UEFI: LENOVO v: N1FET44W (1.18 ) date: 09/01/2016
BatteryBAT0: charge: 40.9 Wh 85.1% condition: 48.0/52.1 Wh (92%)
   model: SMP 00HW029 status: Charging
CPU:   Dual core Intel Core i7-6600U (-HT-MCP-)
   arch: Skylake rev.3 cache: 4096 KB
   flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11232
   clock speeds: max: 3400 MHz 1: 2800 MHz 2: 2800 MHz 3: 2800 MHz
   4: 2800 MHz
Graphics:  Card: Intel HD Graphics 520 bus-ID: 00:02.0
   Display Server: wayland (X.Org 1.19.5 )
   drivers: modesetting (unloaded: fbdev,vesa)
   Resolution: 1920x1080@59.96hz
   OpenGL: renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2)
   version: 4.5 Mesa 17.2.2 Direct Render: Yes
Audio: Card Intel Sunrise Point-LP HD Audio
   driver: snd_hda_intel bus-ID: 00:1f.3
   Sound: Advanced Linux Sound Architecture v: k4.13.0-16-generic
Network:   Card-1: Intel Ethernet Connection I219-LM
   driver: e1000e v: 3.2.6-k bus-ID: 00:1f.6
   IF: enp0s31f6 state: down mac: 54:ee:75:c2:96:f3
   Card-2: Intel Wireless 8260 driver: iwlwifi bus-ID: 04:00.0
   IF: wlp4s0 state: up mac: f4:8c:50:5d:a8:6d
Drives:HDD Total Size: 128.0GB (51.5% used)
   ID-1: /dev/nvme0n1 model: INTEL_SSDPEKKW128G7 size: 128.0GB
Partition: ID-1: / size: 101G used: 47G (49%) fs: ext4 dev: /dev/nvme0n1p2
   ID-2: swap-1 size: 17.04GB used: 0.00GB (0%)
   fs: swap dev: