Finding where my USB device is in /dev

System:
Kernel: 5.17.3-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=d84d1289-1918-4cb8-b260-dc86d66875da rw rootflags=subvol=@
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
loglevel=3
Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: Micro-Star product: MS-7A38 v: 2.0
serial: <superuser required>
Mobo: Micro-Star model: B350M PRO-VDH (MS-7A38) v: 2.0
serial: <superuser required> UEFI: American Megatrends v: A.E0
date: 09/21/2018
CPU:
Info: model: AMD Ryzen 5 1400 bits: 64 type: MT MCP arch: Zen
family: 0x17 (23) model-id: 1 stepping: 1 microcode: 0x8001137
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 384 KiB desc: d-4x32 KiB; i-4x64 KiB L2: 2 MiB desc: 4x512 KiB
L3: 8 MiB desc: 2x4 MiB
Speed (MHz): avg: 3324 high: 3400 min/max: N/A cores: 1: 3400 2: 3400
3: 2795 4: 3400 5: 3400 6: 3400 7: 3400 8: 3400 bogomips: 54398
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Retpolines, IBPB: conditional, STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA GP106 [GeForce GTX 1060 3GB] vendor: eVga.com.
driver: nvidia v: 510.60.02 alternate: nouveau,nvidia_drm pcie: gen: 3
speed: 8 GT/s lanes: 16 bus-ID: 1f:00.0 chip-ID: 10de:1c02 class-ID: 0300
Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1
compositor: kwin_x11 driver: X: loaded: nvidia
unloaded: modesetting,nouveau alternate: fbdev,nv,vesa gpu: nvidia
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 92 s-size: 530x301mm (20.87x11.85")
s-diag: 610mm (24")
Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 92
size: 531x299mm (20.91x11.77") diag: 609mm (23.99") modes: N/A
OpenGL: renderer: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2
v: 4.6.0 NVIDIA 510.60.02 direct render: Yes
Audio:
Device-1: NVIDIA GP106 High Definition Audio vendor: eVga.com.
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 1f:00.1 chip-ID: 10de:10f1 class-ID: 0403
Device-2: AMD Family 17h HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 21:00.3 chip-ID: 1022:1457 class-ID: 0403
Device-3: Razer USA Kraken Kitty Edition type: USB
driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-3.2.3:16
chip-ID: 1532:0521 class-ID: 0300 serial: <filter>
Sound Server-1: ALSA v: k5.17.3-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.50 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: f000 bus-ID: 1b:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp27s0 state: down mac: <filter>
Device-2: Intel Wireless 8260 driver: iwlwifi v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 bus-ID: 1d:00.0 chip-ID: 8086:24f3 class-ID: 0280
IF: wlp29s0 state: up mac: <filter>
Drives:
Local Storage: total: 1.02 TiB used: 161.09 GiB (15.4%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Silicon Power
model: SPCC Solid State Disk size: 111.79 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 21.1
scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WD10EZEX-08WN4A0 size: 931.51 GiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>
rev: 1A01 scheme: GPT
Partition:
ID-1: / raw-size: 111.49 GiB size: 111.49 GiB (100.00%)
used: 38.17 GiB (34.2%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 576 KiB (0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 111.49 GiB size: 111.49 GiB (100.00%)
used: 38.17 GiB (34.2%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 111.49 GiB size: 111.49 GiB (100.00%)
used: 38.17 GiB (34.2%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 111.49 GiB size: 111.49 GiB (100.00%)
used: 38.17 GiB (34.2%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.64 GiB used: 2.2 MiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 36.0 C mobo: 38.0 C
Fan Speeds (RPM): fan-1: 0 fan-2: 1901 fan-3: 1220 fan-4: 854 fan-5: 0
Power: 12v: N/A 5v: N/A 3.3v: 3.39 vbat: 3.25
Info:
Processes: 301 Uptime: 11h 31m wakeups: 9 Memory: 15.64 GiB
used: 3.36 GiB (21.5%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 Packages: pacman: 1782 lib: 537 Shell: fish v: 3.4.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.15
Garuda (2.6.1-3):
System install date:     2022-03-21
Last full system update: 2022-04-18 ↻
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Snapper
Failed units:            bluetooth-autoconnect.service

I'm trying to map a usb device to a com port for a wine program. To do that however, I need to find the name and path of the device, which I am having trouble with. I have no devices named ttyUSB, ttyACM or anything like that and I'm unfamiliar with what it would be in Garuda. Also, the system does recognize the device.

Try lsusb command in terminal. Also, post the output here, as text, enclosed in ~~~

Also, what type of device it is? Brand and exact device name and model would be helpful too.

8 Likes

I'm specifically trying to map the HK GK61 keyboard to a com port. Thank you for your response. Still have a lot to learn about linux in general so I appreciate it. I'm not sure if it would even work anyway but knowing this in general would be nice. Thank you!

Bus 004 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 32e3:00f7    GK61 Gaming Keyboard
Bus 003 Device 008: ID 1532:0f20 Razer USA, Ltd Razer Base Station V2 Chroma
Bus 003 Device 006: ID 1532:48f0 Razer USA, Ltd Razer Base Station V2 Chroma
Bus 003 Device 009: ID 1532:0521 Razer USA, Ltd Kraken Kitty Edition
Bus 003 Device 007: ID 1532:0f19 Razer USA, Ltd Razer Kraken Kitty Chroma Control
Bus 003 Device 005: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 003 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 003 Device 002: ID 04d9:fc38 Holtek Semiconductor, Inc. Gaming Mouse [Redragon M602-RGB]
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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
1 Like

From

https://wiki.winehq.org/Wine_User’s_Guide#Serial_and_Parallel_Ports

Serial and parallel ports are detected automatically when Wine starts. Windows serial ports follow a naming convention of the word COM followed by a number, such as COM1, COM2, etc. Similarly, parallel ports use LPT followed by a number, such as LPT1. Linux, Mac, and BSD each have their own device naming conventions, but in every case the serial or parallel device is located somewhere in /dev. You can see the mapping of Windows devices to Unix devices by looking in ~/.wine/dosdevices.

You can either test all of these ports, or another smarter approach is first unplug the keyboard and pipe the output to a text file, then plug in the keyboard and pipe the output to a new file and compare the difference between two.
I hope you can now find the right com port.

2 Likes

I have already used grep and monitored the output after reconnecting the keyboard which I should have already stated, my bad. When I look under dosdevices there are 0 comports., and I've manually tested just to make sure. Just the two storage drives. Using the registry editor from wine, I can specifically map the device to a comport which it seems like I'll have to do since it didn't auto detect any.

My issue is that to do that, I need to provide the direct path to the device which is located in /dev, which I cannot find. Monitoring using grep, outputting it to a text file, using any command to get usb info, etc...none of it tells me the path in /dev and there is nothing in there labeled usb anything so I don't even know where to start.

I would...

Unplugged, run lsblk
Plugged, run lsblk

Compare the two.

https://man7.org/linux/man-pages/man8/lsblk.8.html

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.