Restart USB-C command?

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
axrusar
Level 7
Level 7
Posts: 1508
Joined: Sat Jan 30, 2021 5:30 pm

Restart USB-C command?

Post by axrusar »

I have an USB-C external SSD flash drive that i am able to use in my laptop.
I am able to plug it on the usb-c port and it works. But if i eject it, and try to plug it again, it will not be read anymore
by the system. I need to restart the computer in order to detect it again.

Here is my system report: Right now the disk is plugged in to my laptop and is not being seen. But if i use a usb-c to usb3 adapter, it works.

Code: Select all

 $inxi -Fxxz
System:
  Kernel: 5.11.0-34-generic x86_64 bits: 64 compiler: N/A 
  Desktop: Cinnamon 4.8.6 wm: muffin dm: LightDM 
  Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: LENOVO product: 20L70025US v: ThinkPad T480s 
  serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: LENOVO model: 20L70025US v: SDK0J40697 WIN serial: <filter> 
  UEFI: LENOVO v: N22ET68W (1.45 ) date: 05/06/2021 
Battery:
  ID-1: BAT0 charge: 29.0 Wh condition: 30.2/57.0 Wh (53%) volts: 12.6/11.6 
  model: LGC 01AV478 serial: <filter> status: Unknown 
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard 
  serial: <filter> charge: 55% (should be ignored) status: Discharging 
CPU:
  Topology: Quad Core model: Intel Core i7-8650U bits: 64 type: MT MCP 
  arch: Kaby Lake rev: A L2 cache: 8192 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 33599 
  Speed: 732 MHz min/max: 400/4200 MHz Core speeds (MHz): 1: 743 2: 997 
  3: 729 4: 967 5: 700 6: 700 7: 752 8: 730 
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:5917 
  Display: x11 server: X.Org 1.20.11 driver: modesetting 
  unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.0.3 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:9d71 
  Sound Server: ALSA v: k5.11.0-34-generic 
Network:
  Device-1: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel 
  port: efa0 bus ID: 00:1f.6 chip ID: 8086:15d7 
  IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: efa0 
  bus ID: 3d:00.0 chip ID: 8086:24fd 
  IF: wlp61s0 state: down mac: <filter> 
  IF-ID-1: ipv6leakintrf0 state: unknown speed: N/A duplex: N/A 
  mac: <filter> 
  IF-ID-2: virbr0 state: down mac: <filter> 
  IF-ID-3: virbr0-nic state: down mac: <filter> 
Drives:
  Local Storage: total: 931.51 GiB used: 730.22 GiB (78.4%) 
  ID-1: /dev/nvme0n1 vendor: Sabrent model: Rocket Q size: 931.51 GiB 
  speed: 31.6 Gb/s lanes: 4 serial: <filter> 
Partition:
  ID-1: / size: 49.09 GiB used: 26.04 GiB (53.0%) fs: ext4 
  dev: /dev/nvme0n1p5 
  ID-2: /home size: 351.65 GiB used: 170.30 GiB (48.4%) fs: ext4 
  dev: /dev/nvme0n1p7 
  ID-3: swap-1 size: 16.00 GiB used: 37.6 MiB (0.2%) fs: swap 
  dev: /dev/nvme0n1p6 
Sensors:
  System Temperatures: cpu: 42.0 C mobo: N/A 
  Fan Speeds (RPM): cpu: 0 
Info:
  Processes: 348 Uptime: 1d 22h 32m Memory: 23.24 GiB used: 7.88 GiB (33.9%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: terminator inxi: 3.0.38 
and

Code: Select all

 $lsusb
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 002: ID 0bda:0316 Realtek Semiconductor Corp. USB3.0-CRW
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 06cb:009a Synaptics, Inc. 
Bus 001 Device 004: ID 04f2:b604 Chicony Electronics Co., Ltd Integrated Camera (1280x720@30)
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
is there a command to restart the usb-c part of the computer so i do not have to do a full reboot?

My disk:

Image

Thank you
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
t42
Level 11
Level 11
Posts: 3742
Joined: Mon Jan 20, 2014 6:48 pm

Re: Restart USB-C command?

Post by t42 »

Open Disks from Menu ->Accessories.
To dismount click Stop button.
25-06.png
25-06.png (8.76 KiB) Viewed 577 times
To remount click Play button
25-30c.png
25-30c.png (11.17 KiB) Viewed 577 times
If you click Power Off button above you'd need to reinsert cable.
-=t42=-
User avatar
axrusar
Level 7
Level 7
Posts: 1508
Joined: Sat Jan 30, 2021 5:30 pm

Re: Restart USB-C command?

Post by axrusar »

I see..
So in Mint if you ONLY click the eject button on the file manager, the usb-c port freezes rendering it useless until the next restart of the computer.

Image

But i see there is a "Power off disk" button in the disks applet that ejects it properly, then i can use the port for anything else. An extra unnecesary step just to eject a disk IMO

BUG?
What is the point of the Eject button in the file manager then?

Image
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
t42
Level 11
Level 11
Posts: 3742
Joined: Mon Jan 20, 2014 6:48 pm

Re: Restart USB-C command?

Post by t42 »

axrusar wrote: Sat Sep 25, 2021 8:09 pm What is the point of the Eject button in the file manager then?
If you are asking me, sorry, I was just trying to supply (hopefully) practical workaround to the fellow forum user.
In fact these Nemo buttons are capable to unmount most of partitions and USB pen-drives. Bad luck your device turned out to be nasty.
Buttons are just interface to system commands, and in that department there are several for eject, unmount and power off actions.
Probably the good way to remove some device would be a sequence of two commands

Code: Select all

sudo umount /dev/sdb1
sudo udisksctl power-off -b /dev/sdb
change sdb1 and sdb for real values
-=t42=-
Locked

Return to “Hardware Support”