Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
5
votes
1
answers
4453
views
USB devices not authorized for usage after Debian upgrade
I am running Debian on a Lenovo Thinkpad X240. Some time ago I upgraded from Stretch to Buster. Since then the USB-Keyboard and the USB-Mouse don't work. I can't read or access any USB-Sticks either. The system is up to date and I've rebooted it several times. The keyboard and the mouse are recogniz...
I am running Debian on a Lenovo Thinkpad X240. Some time ago I upgraded from Stretch to Buster. Since then the USB-Keyboard and the USB-Mouse don't work. I can't read or access any USB-Sticks either. The system is up to date and I've rebooted it several times.
The keyboard and the mouse are recognized (I see them when running
lsusb
), but running dmesg
I get a *Device is not authorized for usage* message. I also get this message when plugin in any USB-memory.
> dmesg
[10599.977463] usb 2-2: new low-speed USB device number 10 using xhci_hcd
[10600.134705] usb 2-2: New USB device found, idVendor=XXXX, idProduct=XXXX, bcdDevice= 1.07
[10600.134709] usb 2-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[10600.135024] usb 2-2: Device is not authorized for usage
What should I do to continue troubleshooting and get the USBs working?
Gypaets
(427 rep)
Jul 31, 2019, 06:45 PM
• Last activity: May 15, 2025, 05:07 PM
0
votes
1
answers
52
views
Change bluetooth peripheral's broadcast name on peripheral, not just alias on computer
I have three Lenovo Thinkpad Trackpoint Keyboard IIs. I would like to change the names that these three devices broadcast to the computers around them so that I know which one is which from the list of Bluetooth devices. The solutions I have found on StackExchange, [Changing Bluetooth Device Name][1...
I have three Lenovo Thinkpad Trackpoint Keyboard IIs. I would like to change the names that these three devices broadcast to the computers around them so that I know which one is which from the list of Bluetooth devices. The solutions I have found on StackExchange, Changing Bluetooth Device Name and How to Change Bluetooth Broadcast Device Name , seem to only change information locally on the computer that I run these commands on. Other computers still see the device as "Thinkpad Trackpoint keyboard II"; the name the keyboard broadcasts to other computers has not changed.
1) Is it possible to change the broadcast information on the peripheral device itself?
2) If so, what is the software and usages to make this change?
brett stevens
(101 rep)
Feb 27, 2025, 05:10 PM
• Last activity: Feb 28, 2025, 07:18 AM
1
votes
0
answers
375
views
Mouse Scrolling "deadzone" in Ubuntu, Debian
Apologies if this is a redundant post - I haven't found one specific name for the issue, nor one post describing the same triggers to the problem or solutions that work on my end. **Symptoms**: any mouse connected to the laptop will have a "deadzone"/null zone in scrolling whereas scrolling up and d...
Apologies if this is a redundant post - I haven't found one specific name for the issue, nor one post describing the same triggers to the problem or solutions that work on my end.
**Symptoms**: any mouse connected to the laptop will have a "deadzone"/null zone in scrolling whereas scrolling up and down by one click repeatedly won't do anything - e.g. in order to reverse my scrolling direction, I'll have to click the wheel *twice* in order to scroll once in the opposite direction. When scrolling continuously in any direction (after escaping the deadzone), each scroll notch corresponds correctly to one movement; the issue is purely when switching directions.
This behavior seems to only ever happen in Firefox and Minecraft. I have yet to find other problematic programs.
**Hardware**:
The laptop is an Asus Zenbook 14 (UX3402ZA) dual booted, Windows 10 and Ubuntu, though I've had the same issue with Debian 12. The mouse I'm troubleshooting with is a Corsair Katar Wireless (paired via bluetooth), though the issue seems to behave exactly the same with other bluetooth, 2.4GHz, and wired mice.
**Triggers**:
As far as I can tell with bluetooth; once I pair the mouse successfully, all behavior is as expected *until* the touchpad is used to scroll. From that point, the above symptoms begin. A reboot and repairing of the mouse seems to revert behavior to normal (until the touchpad scrolls). Oddly, I could not replicate this behavior when booted to the Ubuntu live ISO which I had used for installation. When running Windows 10, the problem doesn't exist.
**My Troubleshooting:**
I've asked/searched around to no success, but I've read a few things;
- The computer may not have enough resources or wiggle room to allocate (almost the same words I read - I didn't really understand this one)
- According to this post , a user started experiencing this problem after upgrading to kernel 6.1. I subsequently installed Ubuntu 22.04.1 with kernel 5.15.0-43, in which the behavior remains unresolved.
- Previously, when I had Debian 12 installed, I ran
evtest
while triggering the behavior - both before and and after, the mouse scroll appeared to be detected the exact same, whereas one click, regardless of "direction," showed one positive or negative reaction (for lack of better terminology) - like the normal behavior I would expect in Firefox/Minecraft.
Below is an evtest
clip from scrolling the mouse down/up/down/up, while the behavior was present;
Event: time 1722654009.094229, -------------- SYN_REPORT ------------
Event: time 1722654009.701843, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1722654009.701843, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
Event: time 1722654009.701843, -------------- SYN_REPORT ------------
Event: time 1722654010.519376, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1722654010.519376, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 120
Event: time 1722654010.519376, -------------- SYN_REPORT ------------
Event: time 1722654011.299353, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1722654011.299353, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value -120
Event: time 1722654011.299353, -------------- SYN_REPORT ------------
Event: time 1722654012.102271, type 2 (EV_REL), code 8 (REL_WHEEL), value 1
Event: time 1722654012.102271, type 2 (EV_REL), code 11 (REL_WHEEL_HI_RES), value 120
As mentioned in the linked reddit post, there seems to be both high resolution and "normal" inputs being registered. My guess would be that using only the "normal" inputs would solve the problem, but I'm still a linux beginner and wouldn't want to start an XY problem lol.
While I currently have Ubuntu installed, I'm also having this issue in Debian 12 (and possibly some other distros as well?) so I wouldn't mind having the issue resolved in either OS. Again, note that the issue was somehow not present in the live ISO before installation.
**Update 1:** when using Xorg [X11?], the issue doesn't seem to exist (although I also realized that gestures only work in Wayland). I'll be troubleshooting the issue in Wayland.
**Update 2:** firefox decided to update itself and it's no longer affected by the bug (while Minecraft is still affected). Smooth ["pixel-perfect"?] touchpad scrolling is also working in Firefox (as opposed to 3 lines at a time), which I think is new behavior. So maybe the problem is that Minecraft just doesn't properly recognize/handle high resolution scroll events?
Galaxy
(111 rep)
Aug 3, 2024, 04:26 AM
• Last activity: Aug 5, 2024, 05:41 PM
2
votes
2
answers
189
views
Switch buttons on only the left-handed mouse (input devices)
I've got two Logitech M650 Mice hooked to by Debian 12 Gnome 44 Machine. One is a "Left-Handed" mouse. I would like to swap the buttons on just the left mouse so that I can use my index finger as primary click. The right mouse should remain the same. When I `cat /proc/bus/input/devices` here are the...
I've got two Logitech M650 Mice hooked to by Debian 12 Gnome 44 Machine. One is a "Left-Handed" mouse. I would like to swap the buttons on just the left mouse so that I can use my index finger as primary click. The right mouse should remain the same.
When I
cat /proc/bus/input/devices
here are the results:
I: Bus=0005 Vendor=046d Product=b02a Version=0013
N: Name="Logitech Signature M650 L Mouse"
P: Phys=4c:1d:96:47:de:e2
S: Sysfs=/devices/virtual/misc/uhid/0005:046D:B02A.0022/input/input46
U: Uniq=d5:55:b1:dd:b7:7f
H: Handlers=mouse3 event15
B: PROP=0
B: EV=17
B: KEY=1f0000 0 0 0 0
B: REL=1943
B: MSC=10
I: Bus=0005 Vendor=046d Product=b02a Version=0013
N: Name="Logitech Signature M650 L Left-Handed Mouse"
P: Phys=4c:1d:96:47:de:e2
S: Sysfs=/devices/virtual/misc/uhid/0005:046D:B02A.0023/input/input47
U: Uniq=de:9d:c9:d8:74:fc
H: Handlers=mouse4 event16
B: PROP=0
B: EV=17
B: KEY=1f0000 0 0 0 0
B: REL=1943
B: MSC=10
Can some one point me in the right direction. Thanks!
gavstar
(21 rep)
Jul 31, 2023, 11:07 AM
• Last activity: Apr 12, 2024, 02:56 PM
2
votes
1
answers
76
views
Plugging in an external DVD drive causes ls, sudo, new SSH connections refused.... what happened?
Title says it all. But I plugged in an external DVD drive into my Raspberry Pi running Raspbian. It says its Linux compatible However when I actually plug it into the device. Everything goes wrong in incomprehensible ways. SSH says "kex_exchange_identification: read: Connection reset by peer. Connec...
Title says it all. But I plugged in an external DVD drive into my Raspberry Pi running Raspbian. It says its Linux compatible
However when I actually plug it into the device. Everything goes wrong in incomprehensible ways.
SSH says "kex_exchange_identification: read: Connection reset by peer. Connection reset by 192.168.50.2 port 22"
Or when I do "ls" it says "-bash: /usr/bin/ls: Input/output error"
Or when I do "sudo" it says "-bash: sudo: command not found"
Nothing really works with it plugged in.
However when I reboot the RaspberryPi all is well... up until I plug in the DVD drive.
What is going on? How can I troubleshoot or fix it given so many commands are down? What might've happened?
**Investigation updates**
$PATH
Before
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
After - Same
BUT this is odd to me. This is a newly configured version of the OS. Why is it pointing to games and all of these other things? Odd?
DVD drive "hyripe external cd/dvd drive"
Another thing that seems potentially relevant. Device is booting and using an external SSD plugged in via a USB port as memory.
dmesg output
[ 19.657310] Initializing XFRM netlink socket
[ 87.772696] usb 2-2: USB disconnect, device number 2
[ 87.775097] device offline error, dev sda, sector 135274584 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775132] Buffer I/O error on dev sda2, logical block 16777227, lost async page write
[ 87.775164] device offline error, dev sda, sector 177217664 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775179] Buffer I/O error on dev sda2, logical block 22020112, lost async page write
[ 87.775195] device offline error, dev sda, sector 177221200 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775208] Buffer I/O error on dev sda2, logical block 22020554, lost async page write
[ 87.775223] device offline error, dev sda, sector 177221456 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775236] Buffer I/O error on dev sda2, logical block 22020586, lost async page write
[ 87.775250] device offline error, dev sda, sector 177225992 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775262] Buffer I/O error on dev sda2, logical block 22021153, lost async page write
[ 87.775276] device offline error, dev sda, sector 177309888 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775288] Buffer I/O error on dev sda2, logical block 22031640, lost async page write
[ 87.775302] device offline error, dev sda, sector 1056768 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775314] Buffer I/O error on dev sda2, logical block 0, lost async page write
[ 87.775328] device offline error, dev sda, sector 1056840 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775340] Buffer I/O error on dev sda2, logical block 9, lost async page write
[ 87.775354] device offline error, dev sda, sector 1056856 op 0x1:(WRITE) flags 0x103000 phys_seg 1 prio class 2
[ 87.775366] Buffer I/O error on dev sda2, logical block 11, lost async page write
[ 87.776903] device offline error, dev sda, sector 123307176 op 0x1:(WRITE) flags 0x9800 phys_seg 3 prio class 2
[ 87.776946] Aborting journal on device sda2-8.
[ 87.777003] Buffer I/O error on dev sda2, logical block 15237120, lost sync page write
[ 87.777038] JBD2: I/O error when updating journal superblock for sda2-8.
[ 87.778325] EXT4-fs error (device sda2): ext4_journal_check_start:84: comm systemd-journal: Detected aborted journal
[ 87.778377] EXT4-fs (sda2): previous I/O error to superblock detected
[ 87.780733] EXT4-fs (sda2): I/O error while writing superblock
[ 87.780759] EXT4-fs (sda2): Remounting filesystem read-only
[ 87.932676] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 87.946770] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 87.960681] EXT4-fs warning (device sda2): dx_probe:822: inode #11752: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 87.960788] EXT4-fs warning (device sda2): dx_probe:822: inode #11752: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 87.996669] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gvfs-udisks2-vo: error -5 reading directory block
[ 87.996739] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gvfs-udisks2-vo: error -5 reading directory block
[ 87.997338] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gvfs-udisks2-vo: error -5 reading directory block
[ 88.036652] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=DRIVER_OK
[ 88.036752] scsi 0:0:0:0: rejecting I/O to dead device
[ 88.036853] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gvfs-udisks2-vo: error -5 reading directory block
[ 88.036936] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gvfs-udisks2-vo: error -5 reading directory block
[ 88.036961] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gvfs-udisks2-vo: error -5 reading directory block
[ 88.036980] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gvfs-udisks2-vo: error -5 reading directory block
[ 89.272857] usb usb2-port1: over-current change #1
[ 89.347052] usb 1-1-port1: over-current change #1
[ 89.488839] usb usb2-port2: over-current change #1
[ 89.567467] usb 1-1-port2: over-current change #1
[ 89.704835] usb usb2-port3: over-current change #1
[ 89.785661] usb 1-1-port3: over-current change #1
[ 89.920848] usb usb2-port4: over-current change #1
[ 90.005647] usb 1-1-port4: over-current change #1
[ 91.216972] usb usb2-port1: over-current change #2
[ 91.432929] usb usb2-port2: over-current change #2
[ 91.648944] usb usb2-port3: over-current change #2
[ 91.864930] usb usb2-port4: over-current change #2
[ 92.353317] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd
[ 92.381049] usb 2-2: New USB device found, idVendor=0bda, idProduct=9210, bcdDevice=20.01
[ 92.381060] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 92.381064] usb 2-2: Product: RTL9210
[ 92.381068] usb 2-2: Manufacturer: Realtek
[ 92.381071] usb 2-2: SerialNumber: 012345678904
[ 92.386529] usb 2-2: Enable of device-initiated U1 failed.
[ 92.387180] usb 2-2: Enable of device-initiated U2 failed.
[ 92.396633] usb 2-2: Enable of device-initiated U1 failed.
[ 92.397227] usb 2-2: Enable of device-initiated U2 failed.
[ 92.400265] scsi host1: uas
[ 92.403800] scsi 1:0:0:0: Direct-Access Realtek RTL9210 NVME 1.00 PQ: 0 ANSI: 6
[ 92.434380] sd 1:0:0:0: Attached scsi generic sg0 type 0
[ 92.439587] sd 1:0:0:0: [sdb] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[ 92.441039] sd 1:0:0:0: [sdb] Write Protect is off
[ 92.441052] sd 1:0:0:0: [sdb] Mode Sense: 37 00 00 08
[ 92.444215] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 92.445600] sd 1:0:0:0: [sdb] Preferred minimum I/O size 512 bytes
[ 92.445610] sd 1:0:0:0: [sdb] Optimal transfer size 33553920 bytes
[ 92.456256] sdb: sdb1 sdb2
[ 92.456687] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 93.009059] EXT4-fs warning: 152 callbacks suppressed
[ 93.009080] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gmain: error -5 reading directory block
[ 93.946572] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 93.946708] EXT4-fs warning (device sda2): dx_probe:822: inode #11752: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 93.946748] EXT4-fs warning (device sda2): dx_probe:822: inode #11752: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 93.996856] usb 1-1.4: new high-speed USB device number 3 using xhci_hcd
[ 94.097995] usb 1-1.4: New USB device found, idVendor=13fd, idProduct=1040, bcdDevice= 1.06
[ 94.098020] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 94.098032] usb 1-1.4: Product: UJDA755 DVD/CDRW
[ 94.098042] usb 1-1.4: Manufacturer: Initio
[ 94.098050] usb 1-1.4: SerialNumber: 0000000000000000W
[ 94.102518] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 94.104036] scsi host2: usb-storage 1-1.4:1.0
[ 94.947221] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 94.947358] EXT4-fs warning (device sda2): dx_probe:822: inode #11752: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 94.947400] EXT4-fs warning (device sda2): dx_probe:822: inode #11752: lblock 0: comm wf-panel-pi: error -5 reading directory block
[ 95.009150] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm gmain: error -5 reading directory block
[ 95.197299] scsi 2:0:0:0: CD-ROM MATSHITA UJDA755 DVD/CDRW 1.00 PQ: 0 ANSI: 0
[ 95.198097] scsi 2:0:0:0: Attached scsi generic sg1 type 5
[ 95.198889] EXT4-fs warning (device sda2): htree_dirblock_to_tree:1082: inode #4195975: lblock 0: comm systemd-udevd: error -5 reading directory block
[ 95.199149] EXT4-fs warning (device sda2): htree_dirblock_to_tree:1082: inode #11102: lblock 0: comm systemd-udevd: error -5 reading directory block
[ 96.695423] usb usb2-port1: over-current change #3
[ 96.909249] usb usb2-port2: over-current change #3
[ 97.126132] usb 2-2: USB disconnect, device number 3
[ 97.156984] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[ 97.384973] sd 1:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=DRIVER_OK
[ 97.685449] usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd
[ 97.713108] usb 2-2: New USB device found, idVendor=0bda, idProduct=9210, bcdDevice=20.01
[ 97.713134] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 97.713147] usb 2-2: Product: RTL9210
[ 97.713157] usb 2-2: Manufacturer: Realtek
[ 97.713166] usb 2-2: SerialNumber: 012345678904
[ 97.716723] usb 2-2: Enable of device-initiated U1 failed.
[ 97.717440] usb 2-2: Enable of device-initiated U2 failed.
[ 98.256005] usb 2-2: Enable of device-initiated U1 failed.
[ 98.256581] usb 2-2: Enable of device-initiated U2 failed.
[ 98.262045] EXT4-fs warning: 73 callbacks suppressed
[ 98.262062] EXT4-fs warning (device sda2): htree_dirblock_to_tree:1082: inode #4195975: lblock 0: comm systemd-udevd: error -5 reading directory block
[ 98.262332] EXT4-fs warning (device sda2): htree_dirblock_to_tree:1082: inode #11102: lblock 0: comm systemd-udevd: error -5 reading directory block
[ 98.262441] EXT4-fs warning (device sda2): dx_probe:822: inode #4194305: lblock 0: comm systemd-udevd: error -5 reading directory block
[ 98.262888] scsi host1: uas
CalebK
(121 rep)
Mar 27, 2024, 05:26 PM
• Last activity: Mar 28, 2024, 04:42 AM
1
votes
1
answers
790
views
My Thunderbolt4 port is not working, how to verify that this is a hardware or OS problem?
I am using Fedora 38 on Lenovo ThinkPad P1 Gen 4. Kernel version is 6.3.11. It seems that my Thunderbolt 4 ports are powered on, but whatever I plug to them I get no output. Is there any way to verify that this is due to hardware or lack of support in the operating system? ### More background The po...
I am using Fedora 38 on Lenovo ThinkPad P1 Gen 4. Kernel version is 6.3.11. It seems that my Thunderbolt 4 ports are powered on, but whatever I plug to them I get no output. Is there any way to verify that this is due to hardware or lack of support in the operating system?
### More background
The port used to work, which is why I am suspecting a hardware failure. I used to connect Lenovo dock to it, but one day it just stopped working. Here are some commands I used to check the port is still seen by the OS:
boltctl list -a
● Lenovo ThinkPad P1 Gen 4i
├─ type: host
├─ name: ThinkPad P1 Gen 4i
├─ vendor: Lenovo
├─ uuid: 10dae28f-c8a8-8780-ffff-ffffffffffff
├─ generation: USB4
├─ status: authorized
│ ├─ domain: 10dae28f-c8a8-8780-ffff-ffffffffffff
│ └─ authflags: none
├─ authorized: Sat 08 Jul 2023 22:00:14 UTC
├─ connected: Sat 08 Jul 2023 22:00:14 UTC
└─ stored: no
● Lenovo ThinkPad P1 Gen 4i
├─ type: host
├─ name: ThinkPad P1 Gen 4i
├─ vendor: Lenovo
├─ uuid: 21c8aa24-1319-8780-ffff-ffffffffffff
├─ generation: USB4
├─ status: authorized
│ ├─ domain: 21c8aa24-1319-8780-ffff-ffffffffffff
│ └─ authflags: none
├─ authorized: Sat 08 Jul 2023 22:00:14 UTC
├─ connected: Sat 08 Jul 2023 22:00:14 UTC
└─ stored: no
The dock is the only T4 device I have and I get a blank output from boltctl list
if I plug it in. I also tried plugging a standard USB-C pendrive and that doesn’t get detected either.
Running journalctl -u bolt
gives me:
bolt 0.9.5 starting up.
manager: initializing store
store: located at: /var/lib/boltd
config: loading user config
bouncer: initializing polkit
watchdog: enabled [pulse: 90s]
udev: initializing udev
store: loading domains
store: loading devices
power: state located at: /run/boltd/power
power: force power support: no
udev: enumerating devices
[10dae28f-c8a8-domain0 ] newly connected [iommu] (/sys/devices/pci0000:00/0000:00:0d.2/domain0/0-0)
security level set to 'none'
[10dae28f-c8a8-domain0 ] domain: registered (bootacl: 0/0)
[10dae28f-c8a8-domain0 ] bootacl: bootacl not supported, no sync
[10dae28f-c8a8-domain0 ] udev: failed to determine if uid is stable: unknown NHI PCI id '0x9a1f'
[10dae28f-c8a8-domain0 ] udev: uuid is stable: no (for NHI: 0x9a1f)
global 'generation' set to '4'
[10dae28f-c8a8-ThinkPad P1 Gen 4i ] device added, status: authorized, at /sys/devices/pci0000:00/0000:00:0d.2/domain0/0-0
[10dae28f-c8a8-ThinkPad P1 Gen 4i ] labeling device: Lenovo ThinkPad P1 Gen 4i
[21c8aa24-1319-domain1 ] newly connected [iommu] (/sys/devices/pci0000:00/0000:00:0d.3/domain1/1-0)
[21c8aa24-1319-domain1 ] domain: registered (bootacl: 0/0)
[21c8aa24-1319-domain1 ] bootacl: bootacl not supported, no sync
[21c8aa24-1319-domain1 ] udev: failed to determine if uid is stable: unknown NHI PCI id '0x9a21'
[21c8aa24-1319-domain1 ] udev: uuid is stable: no (for NHI: 0x9a21)
[21c8aa24-1319-ThinkPad P1 Gen 4i ] device added, status: authorized, at /sys/devices/pci0000:00/0000:00:0d.3/domain1/1-0
[21c8aa24-1319-ThinkPad P1 Gen 4i ] labeling device: Lenovo ThinkPad P1 Gen 4i
[10dae28f-c8a8-domain0 ] dbus: exported domain at /org/freedesktop/bolt/domains/10dae28f_c8a8_8780_ffff_ffffffffffff
[21c8aa24-1319-domain1 ] dbus: exported domain at /org/freedesktop/bolt/domains/21c8aa24_1319_8780_ffff_ffffffffffff
[10dae28f-c8a8-ThinkPad P1 Gen 4i ] dbus: exported device at /org/freedesktop/bolt/devices/10dae28f_c8a8...
[21c8aa24-1319-ThinkPad P1 Gen 4i ] dbus: exported device at /org/freedesktop/bolt/devices/21c8aa24_1319...
Started bolt.service - Thunderbolt system service.
Please let me know if you have any suggestions of what else can I run to investigate the problem.
Robert Manson-Sawko
(145 rep)
Jul 19, 2023, 09:19 AM
• Last activity: Aug 18, 2023, 09:28 AM
0
votes
1
answers
1799
views
WiFi, Ethernet, USB and HDMI not working after update Ubuntu 22.04 on Lenovo ideapad 510-15ikb
Yesterday night (16 feb 2023) my Ubuntu autoupdated some packages and after restart, most of my periperals are not working anymore. HDMI port, ethernet and wifi do not work at all, USB ports did not detect my phone/wifi dongle, but does detect a mouse. After some searching I did find posts suggestin...
Yesterday night (16 feb 2023) my Ubuntu autoupdated some packages and after restart, most of my periperals are not working anymore. HDMI port, ethernet and wifi do not work at all, USB ports did not detect my phone/wifi dongle, but does detect a mouse.
After some searching I did find posts suggesting to try out an earlier kernel - this works, on the old kernel (old: 5.15.0-60-generic, new: 5.19.0-32-generic), everything works again.
My laptop is a Lenovo Ideapad 510-15iKB
Other answers suggest updating packages and reloading network services, but those answers are a couple years old and often talking about upgrades from <20 to 20.04. Could someone provide me with some assistance on how to debug this issue? I will update the questions with output when people ask.
Many thanks in advance.
RickB
(5 rep)
Feb 17, 2023, 07:50 AM
• Last activity: Aug 8, 2023, 04:51 AM
1
votes
0
answers
36
views
Which component of the Linux (OS) stack handle BT speakers and smartwatches?
I reverse engineered Bluetooth interfaces of the [UE Boom 3][1] speaker and [Pebble 2][2] smartwatch, documented them and made Python scripts to use all the same features of their official iOS apps. I could make UIs etc. for my scripts, but I would like to add support for this more wide in Linux (OS...
I reverse engineered Bluetooth interfaces of the UE Boom 3 speaker and Pebble 2 smartwatch, documented them and made Python scripts to use all the same features of their official iOS apps. I could make UIs etc. for my scripts, but I would like to add support for this more wide in Linux (OS). To which software/component of the Linux (OS) stack should I do a PR? To the kernel?
user568853
(11 rep)
Apr 13, 2023, 05:15 PM
• Last activity: Apr 13, 2023, 05:18 PM
6
votes
3
answers
17338
views
Get the device path of USB given device ID
After plugging the USB to the port of my machine, if I do `lsusb` I see the device I am looking for: `Bus 001 Device 004: ID 04f2:b573 Some Manufacturer` If I list the devices under `/dev/`, I can see lots of device paths, such as `/dev/tty0`, `/dev/ttyUSB0`... etc. For what I understand, one of the...
After plugging the USB to the port of my machine, if I do
lsusb
I see the device I am looking for:
Bus 001 Device 004: ID 04f2:b573 Some Manufacturer
If I list the devices under /dev/
, I can see lots of device paths, such as /dev/tty0
, /dev/ttyUSB0
... etc. For what I understand, one of these paths will be my USB device, or be where my USB device is connected to.
How do I know which one is the one with the ID 04f2:b573
?
---
This question is similar to mine, however (referring to the accepted answer ) I don't know what exactly is $ID_SERIAL
, or how to I set it to be equal to the Id I'm looking for, or even what is the correct path (since his example shows multiple device paths, such as /dev/ttyACM0
, /dev/sdb
, /dev/input/event5
...)
Also, the second answer assumes that I know the device is connected to /dev/ttyUSB0
, which I don't know beforehand (testing it on this specific path gives me no device, by the way).
Bersan
(162 rep)
Feb 9, 2020, 11:50 PM
• Last activity: Feb 21, 2023, 05:53 AM
6
votes
2
answers
3370
views
Scrolling impossible while moving mouse - Fedora 28 VM guest on Win10
I have been searching awhile before asking my question here, but still cannot find any answer. I have noticed that mouse scrolling is generally poorly handled on Linux (maybe just Gnome tho). I am running my Fedora 28 on a VirtualBox VM, under a Windows 10 host. I noticed that scrolling using mouse...
I have been searching awhile before asking my question here, but still cannot find any answer.
I have noticed that mouse scrolling is generally poorly handled on Linux (maybe just Gnome tho).
I am running my Fedora 28 on a VirtualBox VM, under a Windows 10 host.
I noticed that scrolling using mouse wheel works perfectly when mouse is immobile, but whenever I start moving it, scroll doesn't work at all until mouse gets immobile again.
Does any of you know how to make it work even while moving the mouse ?
Am I missing some configuration or something ?
I must confess I am not a solid Linux user and I don't know much about peripherals configuration.
Vincent C.
(173 rep)
May 27, 2018, 01:41 PM
• Last activity: Jan 6, 2023, 01:51 PM
0
votes
0
answers
87
views
Two Mice Invert Click Of One Mouse Debian Bullseye
I have two Logitech M650 mice connected to my Debian Bullseye machine running Gnome and SID repos. I would like to invert the click buttons on just one of the mice. They are both connected to bluetooth, and have the same name "M650 Logitech Mouse" in bluetooth config. So use a "left" and a "right" m...
I have two Logitech M650 mice connected to my Debian Bullseye machine running Gnome and SID repos. I would like to invert the click buttons on just one of the mice. They are both connected to bluetooth, and have the same name "M650 Logitech Mouse" in bluetooth config.
So use a "left" and a "right" mouse sharing the cursor.
The functionality I'd like to have is something similar to "Either Mouse" on Windows.
/usr/share/X11/xorg.conf.d/40-libinput.conf
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
egrep "Name|Handlers" /proc/bus/input/devices | egrep -B1 'Handlers.*mouse'
N: Name="TPPS/2 Elan TrackPoint"
H: Handlers=mouse2 event6
--
N: Name="SYNA8004:00 06CB:CD8B Mouse"
H: Handlers=mouse0 event5
N: Name="SYNA8004:00 06CB:CD8B Touchpad"
H: Handlers=mouse1 event7
--
N: Name="Logi M650 L Mouse"
H: Handlers=mouse3 event18
N: Name="Logi M650 L Mouse"
H: Handlers=mouse4 event19
xinput list
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ xwayland-pointer:16 id=6 [slave pointer (2)]
⎜ ↳ xwayland-relative-pointer:16 id=7 [slave pointer (2)]
⎜ ↳ xwayland-pointer-gestures:16 id=8 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ xwayland-keyboard:16 id=9 [slave keyboard (3)]
sudo libinput list-devices
Device: Power Button
Kernel: /dev/input/event3
Group: 1
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Video Bus
Kernel: /dev/input/event9
Group: 2
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Lid Switch
Kernel: /dev/input/event2
Group: 3
Seat: seat0, default
Capabilities: switch
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Sleep Button
Kernel: /dev/input/event1
Group: 4
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Integrated Camera: Integrated C
Kernel: /dev/input/event10
Group: 5
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Integrated Camera: Integrated I
Kernel: /dev/input/event11
Group: 5
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: SYNA8004:00 06CB:CD8B Mouse
Kernel: /dev/input/event5
Group: 6
Seat: seat0, default
Capabilities: pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: *button
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive
Rotation: n/a
Device: SYNA8004:00 06CB:CD8B Touchpad
Kernel: /dev/input/event7
Group: 6
Seat: seat0, default
Size: 97x53mm
Capabilities: pointer gesture
Tap-to-click: disabled
Tap-and-drag: enabled
Tap drag lock: disabled
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: *two-finger edge
Click methods: *button-areas clickfinger
Disable-w-typing: enabled
Disable-w-trackpointing: enabled
Accel profiles: flat *adaptive
Rotation: n/a
Device: Lenovo ThinkPad Thunderbolt 3 Dock USB Audio
Kernel: /dev/input/event19
Group: 7
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: sof-hda-dsp Headphone
Kernel: /dev/input/event13
Group: 8
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: AT Translated Set 2 keyboard
Kernel: /dev/input/event0
Group: 9
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: TPPS/2 Elan TrackPoint
Kernel: /dev/input/event6
Group: 10
Seat: seat0, default
Capabilities: pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: *button
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive
Rotation: n/a
Device: ThinkPad Extra Buttons
Kernel: /dev/input/event4
Group: 11
Seat: seat0, default
Capabilities: keyboard switch
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: n/a
Device: Logi M650 L Mouse
Kernel: /dev/input/event17
Group: 12
Seat: seat0, default
Capabilities: pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: disabled
Calibration: n/a
Scroll methods: button
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: flat *adaptive
Rotation: n/a
Seems like it detects both mice as the same?
Device: Logi M650 L Mouse
Kernel: /dev/input/event17
Is there a way to separate them? How would I separate the two mice, then invert the click of one?
gavstar
(21 rep)
Oct 15, 2022, 09:38 AM
• Last activity: Oct 16, 2022, 05:00 PM
0
votes
1
answers
1257
views
How to make a KVM (built into the monitor) connection work , using a DisplayPort/Usb-C cable connected to a thinkpad dock
In this setup, the other device connected to the KVM works well with HDMI + Usb-B connection. Video signal, mouse and keyboard are ok. But on the other side, I have an Thinkpad T470S with Linux 5.16 and it's dock. Fist, I tried with usb-c(T470s) to usb-c(monitor) connection, xrandr couldn't detect t...
In this setup, the other device connected to the KVM works well with HDMI + Usb-B connection. Video signal, mouse and keyboard are ok.
But on the other side, I have an Thinkpad T470S with Linux 5.16 and it's dock.
Fist, I tried with usb-c(T470s) to usb-c(monitor) connection, xrandr couldn't detect the interface.
With Displayport from dock, video signal works but usb-c for inputs don't.(I configured the KVM).
Then I bought and tried with an adapter DisplayPort(dock) to usb-c(monitor DP Alt Mode), the result was the same as in the previous case.
Y tried to activate typec_displayport kernel module unsuccessfully.
Any idea how I can make it work?
Thanks.
dlag
(15 rep)
Feb 24, 2022, 08:03 PM
• Last activity: Feb 25, 2022, 11:38 PM
0
votes
0
answers
36
views
Is it possible to partially virtualize the physical address space?
I'm currently working on systems that include FPGAs. We've various [IP cores][1] that support the [AXI-Bus][2]. To communicate with the IP cores of PL *(programable logic)*, we need to map them onto the address space of the PS *(processing system)*. For example, for the widely used [Zynq PS][3] the...
I'm currently working on systems that include FPGAs. We've various IP cores that support the AXI-Bus . To communicate with the IP cores of PL *(programable logic)*, we need to map them onto the address space of the PS *(processing system)*. For example, for the widely used Zynq PS the address space is as follows *(UG585 - Section 4.1: Address Map) *
- **0x0000_0000 to 0x7FFF_FFFF:** Mapped to the physical memory. Either external DDR or on-chip memory
- **0x8000_0000 to 0xBFFF_FFFF**: Mapped to the PL explained above
- **0xE000_0000 to 0xFFFF_FFFF:** Various other devices on the chip
As you can see, only the first 1GB of the address space is reserved to the physical memory, and the rest is occupied by the devices either in PL or PS. So, if possible, the virtualization range can be applied only for the first 1GB to allow faster access to devices on the chip by skipping the MMU.
I know that by doing such a modification we allow any kind of process to access the physical devices of the system without any control of its privileges. So, the questions are
- Is it possible to partially virtualize the physical address space?
- If it is possible, would it be rational to do it?
Caglayan Dokme
(139 rep)
Jan 21, 2022, 10:56 AM
3
votes
0
answers
1392
views
Cannot scroll while moving mouse in Ubuntu VirtualBox guest
Applications in Ubuntu, such as Chromium or the GNOME Terminal, are not responsive to mouse wheel scroll events when moving the mouse cursor at the same time. I am running Ubuntu 18.04.6 LTS as guest OS using VirtualBox 6.1 with a Windows 10 host. I am facing the exact same problem, as described in...
Applications in Ubuntu, such as Chromium or the GNOME Terminal, are not responsive to mouse wheel scroll events when moving the mouse cursor at the same time. I am running Ubuntu 18.04.6 LTS as guest OS using VirtualBox 6.1 with a Windows 10 host.
I am facing the exact same problem, as described in this question . I have tried to apply its accepted solution but it is not working: When running
xev | grep -e "ButtonPress" -e "ButtonRelease"
, I can see that scrolling events are indeed recorded while moving the mouse cursor.
I am also getting the exact same output with xinput
:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ VirtualBox mouse integration id=9 [slave pointer (2)]
⎜ ↳ VirtualBox USB Tablet id=10 [slave pointer (2)]
⎜ ↳ ImExPS/2 Generic Explorer Mouse id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Sleep Button id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
However, while disabling VirtualBox mouse integration
with xinput disable 9
, as suggested by the accepted solution, does make my applications more responsive to mouse wheel scroll events, it also has the undesirable side effect of disabling mouse pointer movement altogether (clicking still works though).
Bonilla
(131 rep)
Nov 20, 2021, 01:48 PM
1
votes
0
answers
392
views
Bluetooth Keyboard not functioning properly Arch Linux
I recently bought a Bluetooth keyboard (when I still had Windows) and then decided to upgrade my laptop `HP Envy x360 Convertible 15-aq055na` to Arch Linux (KDE Plasma if that helps). Everything is working fine (mouse), except my keyboard. I've installed Blueman, and I've managed to connect the keyb...
I recently bought a Bluetooth keyboard (when I still had Windows) and then decided to upgrade my laptop
HP Envy x360 Convertible 15-aq055na
to Arch Linux (KDE Plasma if that helps). Everything is working fine (mouse), except my keyboard.
I've installed Blueman, and I've managed to connect the keyboard to my PC, the number keys and numeric keypad, all seem to work, just not the letter keys. Can someone please help me fix this problem because I don't want my keyboard gathering dust?
EvilSquirrelGuy
(111 rep)
Dec 19, 2020, 08:51 AM
• Last activity: Dec 19, 2020, 06:16 PM
3
votes
0
answers
747
views
Linux, at what point a device can write to the main memory through DMA?
I am trying to figure out how and when Linux gives the permission to perform direct memory access (DMA) to the peripheral devices on PCIe. I have read how DMA is initiated in the kernel's ["DMA API HOWTO"](https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt), but still would like to clarify a...
I am trying to figure out how and when Linux gives the permission to perform direct memory access (DMA) to the peripheral devices on PCIe. I have read how DMA is initiated in the kernel's ["DMA API HOWTO"](https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt) , but still would like to clarify a couple points.
This question is related to the question [How to harden linux against DMA attacks?](https://unix.stackexchange.com/questions/93582/how-to-harden-linux-against-dma-attacks) Maybe [the comment about IOMMU](https://unix.stackexchange.com/questions/93582/how-to-harden-linux-against-dma-attacks#comment142345_93582) is the answer. The HOWTO mentions the IOMMU in passing, saying that
> I/O devices use a third kind of address: a "bus address". If a device has
registers at an MMIO address, or if it performs DMA to read or write system
memory, the addresses used by the device are bus addresses. In some
systems, bus addresses are identical to CPU physical addresses, but in
general they are not. IOMMUs and host bridges can produce arbitrary
mappings between physical and bus addresses.
But since the answers to the question about DMA attacks suggest to mitigate the attacks without referring to IOMMU, I wonder how common are systems with IOMMU? Is it the usual architecture for servers, but not so for PCs?
If the access is defined by the IOMMU mappings, then when are they set up?
In "What memory is DMA'able?" of the HOWTO they write
> The first piece of information you must know is what kernel memory can
be used with the DMA mapping facilities. There has been an unwritten
set of rules regarding this, and this text is an attempt to finally
write them down.
>
> If you acquired your memory via the page allocator
(i.e. __get_free_page*()) or the generic memory allocators
(i.e. kmalloc() or kmem_cache_alloc()) then you may DMA to/from
that memory using the addresses returned from those routines.
But they do not mention giving some permissions to the devices and actually enabling the DMA. This makes me wonder if a device can write to this memory immediately without any permission given to it. If so, it should mean that a device can write to any other memory too, since the allocations are software business in the OS.
The question is when a chunk of main memory is enabled to be written to from the PCIe bus?
But next goes something that could be the answer:
> For correct operation, you must set the DMA mask to inform the kernel about your devices DMA addressing capabilities.
>
> This is performed via a call to
dma_set_mask_and_coherent()
::
>
> int dma_set_mask_and_coherent(struct device *dev, u64 mask);
> which will set the mask for both streaming and coherent APIs together.
>
> These calls usually return zero to indicated your device can perform DMA
properly on the machine given the address mask you provided, but they might return an error if the mask is too small to be supportable on the given system. **If it returns non-zero, your device cannot perform DMA properly on this platform, and attempting to do so will result in undefined behavior**. You must not use DMA on this device unless the dma_set_mask
family of functions has returned success.
Aha! So, does the DMA mask define the access to the memory? Is the dma_set_mask
family of functions the API that enables the DMA to the main memory, whatever the way it is allocated? Basically, what do they mean by "For correct operation, you must set the DMA mask to inform the kernel about your devices DMA addressing capabilities", what are you informing the kernel about with the DMA mask? Does it define the access to the physical memory from the PCIe bus, with some software or hardware technology (like IOMMU), or it just informs the kernel that a chunk of memory can be used by external devices, therefore the kernel must not use it for its own purposes, like for the virtual memory of the system. The last case seems more likely, since you only "inform .. about your devices DMA addressing capabilities". Then the system is still open to random DMA access from the external devices.
Also, do I understand right that IOMMU works just like MMU: it sets a memory mapping for each device? Therefore, the IOMMU will just block any device that tries to access the memory outside the allowed mapping. Does it send some interrupt to the CPU, like segfault? In this case there is no "undefined behavior", the access is just blocked and that is all.
Probably, the question is also related to [Can't access RAM from PCIe device](https://unix.stackexchange.com/questions/554738/cant-access-ram-from-pcie-device) , where the RAM is accessible from an FPGA on PCIe when the CPU runs Windows or under Linux on another PC, but there is no access on the main PC under Linux. Hence, Windows somehow allows the access to RAM, but Linux does not. What must Linux do to allow the DMA?
xealits
(2267 rep)
Sep 21, 2020, 01:54 PM
• Last activity: Sep 21, 2020, 05:18 PM
0
votes
0
answers
433
views
Configure connection to 2nd monitor on dual boot menu
I have my laptop "docked" (meaning, the lid is closed, so the laptop's monitor and keyboard are inaccessible) in a stand and am currently using 2 monitors and an external keyboard. Would I be able to configure grub such that: It outputs to one of the two monitors and accepts input from the external...
I have my laptop "docked" (meaning, the lid is closed, so the laptop's monitor and keyboard are inaccessible) in a stand and am currently using 2 monitors and an external keyboard.
Would I be able to configure grub such that:
It outputs to one of the two monitors and accepts input from the external keyboard **IF and only IF my laptop's lid is closed and both peripherals (monitor+keyboard) are plugged in**?
Thank you :)
Laura Salas
(1 rep)
Jun 2, 2020, 05:17 PM
0
votes
0
answers
173
views
Logitech M185 Wireless Mouse Not Fully Functional After Upgrading to Fedora 31
I upgraded from Fedora 29 to Fedora 31 and now my logitech M185 mouse is only partially functional. The middle and right buttons do nothing, and the left button appears to only be able to make a window active but can do nothing within a window. For example, I cannot click on any links in a web brows...
I upgraded from Fedora 29 to Fedora 31 and now my logitech M185 mouse is only partially functional. The middle and right buttons do nothing, and the left button appears to only be able to make a window active but can do nothing within a window. For example, I cannot click on any links in a web browser, I cannot highlight text, nor can I even drag or resize a window. The kernel is 5.5.7-200.fc31 and I am using fedora release 31. I tried booting with older kernels but it does not change anything. The mouse worked just fine with plug-and-play behavior on fedora 29. Moreover, I have a logitech wireless keyboard that seems to be working just fine after the upgrade.
I have searched the web for any description of a similar problem, but have had no luck.
AnonSubmitter85
(251 rep)
Mar 4, 2020, 02:14 AM
• Last activity: Mar 4, 2020, 02:40 AM
1
votes
0
answers
6229
views
SD card not showing up under /dev
I'm trying to mount a 2gb Kingston SD card on a Lenovo ThinkPad t420s running Arch Gnu/Linux with kernel version 5.2.6. It has a removable SD card reader connected with an ExpressCard slot. I've previously found this reader to be fully functional, and the SD card worked fine in a camera. When I inse...
I'm trying to mount a 2gb Kingston SD card on a Lenovo ThinkPad t420s running Arch Gnu/Linux with kernel version 5.2.6. It has a removable SD card reader connected with an ExpressCard slot. I've previously found this reader to be fully functional, and the SD card worked fine in a camera.
When I insert the SD card into the reader it is not visible when I run
or look under /dev
with
. In the past when I've had this problem with the SD reader or my (currently functional) USB ports, a reboot fixed it.
I would like to figure out a solution that does not require me to reboot my machine. Is it possible to re-detect hardware on the fly? Something with
perhaps?
I ran
before and after inserting the card, and a
of the outputs yielded this:
> [55367.604387] mmc0: error -110 whilst initialising SD card
> [55367.604769] sdhci-pci 0000:05:00.0: Will use DMA mode even though HW doesn't fully claim to support it.
> [55367.867535] mmc0: new high speed SD card at address 0002
user366493
Aug 11, 2019, 07:34 PM
• Last activity: Aug 11, 2019, 08:01 PM
1
votes
0
answers
654
views
Wireless Mouse doesn't work after upgrading packages - Debian
My wireless optical mouse has stopped working after upgrades performed with `# apt-get upgrade`. This is the output of `# tail -f /var/log/syslog` May 23 10:30:00 GaboPC /usr/lib/gdm3/gdm-x-session[596]: (II) config/udev: removing device MOSART Semi. 2.4G Wireless Mouse May 23 10:30:00 GaboPC /usr/l...
My wireless optical mouse has stopped working after upgrades performed with
# apt-get upgrade
.
This is the output of # tail -f /var/log/syslog
May 23 10:30:00 GaboPC /usr/lib/gdm3/gdm-x-session: (II) config/udev: removing device MOSART Semi. 2.4G Wireless Mouse
May 23 10:30:00 GaboPC /usr/lib/gdm3/gdm-x-session: (**) Option "fd" "57"
May 23 10:30:00 GaboPC /usr/lib/gdm3/gdm-x-session: (II) UnloadModule: "libinput"
May 23 10:30:00 GaboPC /usr/lib/gdm3/gdm-x-session: (II) systemd-logind: releasing fd for 13:65
May 23 10:30:21 GaboPC gnome-terminal: Failed to load module "unity-gtk-module"
May 23 10:30:21 GaboPC gnome-terminal: Failed to load module "unity-gtk-module"
May 23 10:30:39 GaboPC kernel: [ 1676.972546] usb 3-4: new full-speed USB device number 7 using xhci_hcd
May 23 10:30:39 GaboPC kernel: [ 1677.114694] usb 3-4: New USB device found, idVendor=3938, idProduct=1031
May 23 10:30:39 GaboPC kernel: [ 1677.114702] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 23 10:30:39 GaboPC kernel: [ 1677.114707] usb 3-4: Product: 2.4G Wireless Mouse
May 23 10:30:39 GaboPC kernel: [ 1677.114712] usb 3-4: Manufacturer: MOSART Semi.
May 23 10:30:39 GaboPC kernel: [ 1677.118349] input: MOSART Semi. 2.4G Wireless Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:3938:1031.0006/input/input19
May 23 10:30:39 GaboPC kernel: [ 1677.118994] hid-generic 0003:3938:1031.0006: input,hiddev0,hidraw0: USB HID v1.10 Mouse [MOSART Semi. 2.4G Wireless Mouse] on usb-0000:00:14.0-4/input0
May 23 10:30:39 GaboPC mtp-probe: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4"
May 23 10:30:39 GaboPC mtp-probe: bus: 3, device: 7 was not an MTP device
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) config/udev: Adding input device MOSART Semi. 2.4G Wireless Mouse (/dev/input/mouse0)
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) No input driver specified, ignoring this device.
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) This device may have been added with another device file.
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) config/udev: Adding input device MOSART Semi. 2.4G Wireless Mouse (/dev/input/event1)
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) MOSART Semi. 2.4G Wireless Mouse: Applying InputClass "libinput pointer catchall"
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) Using input driver 'libinput' for 'MOSART Semi. 2.4G Wireless Mouse'
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 59 paused 0
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) MOSART Semi. 2.4G Wireless Mouse: always reports core events
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) Option "Device" "/dev/input/event1"
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) Option "_source" "server/udev"
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) input device 'MOSART Semi. 2.4G Wireless Mouse', /dev/input/event1 is tagged by udev as: Mouse
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) input device 'MOSART Semi. 2.4G Wireless Mouse', /dev/input/event1 is a pointer caps
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:3938:1031.0006/input/input19/event1"
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) XINPUT: Adding extended input device "MOSART Semi. 2.4G Wireless Mouse" (type: MOUSE, id 9)
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) Option "AccelerationScheme" "none"
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) MOSART Semi. 2.4G Wireless Mouse: (accel) selected scheme none/0
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) MOSART Semi. 2.4G Wireless Mouse: (accel) acceleration factor: 2.000
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (**) MOSART Semi. 2.4G Wireless Mouse: (accel) acceleration threshold: 4
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) input device 'MOSART Semi. 2.4G Wireless Mouse', /dev/input/event1 is tagged by udev as: Mouse
May 23 10:30:39 GaboPC /usr/lib/gdm3/gdm-x-session: (II) input device 'MOSART Semi. 2.4G Wireless Mouse', /dev/input/event1 is a pointer caps
Specifically, some lines say UnloadModule: "libinput"
and No input driver specified, ignoring this device.
That is why I think there's a conflict between the drivers and the upgrades I made.
The command udevadm info -q all -n /dev/input/event1
returns this:
P: /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:3938:1031.0005/input/input18/event1
N: input/event1
S: input/by-id/usb-MOSART_Semi._2.4G_Wireless_Mouse-event-mouse
S: input/by-path/pci-0000:00:14.0-usb-0:4:1.0-event-mouse
E: DEVLINKS=/dev/input/by-path/pci-0000:00:14.0-usb-0:4:1.0-event-mouse /dev/input/by-id/usb-MOSART_Semi._2.4G_Wireless_Mouse-event-mouse
E: DEVNAME=/dev/input/event1
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:3938:1031.0005/input/input18/event1
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_MODEL=2.4G_Wireless_Mouse
E: ID_MODEL_ENC=2.4G\x20Wireless\x20Mouse
E: ID_MODEL_ID=1031
E: ID_PATH=pci-0000:00:14.0-usb-0:4:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_4_1_0
E: ID_REVISION=0108
E: ID_SERIAL=MOSART_Semi._2.4G_Wireless_Mouse
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030102:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=MOSART_Semi.
E: ID_VENDOR_ENC=MOSART\x20Semi.
E: ID_VENDOR_ID=3938
E: LIBINPUT_DEVICE_GROUP=3/3938/1031/110:usb-0000:00:14.0-4
E: MAJOR=13
E: MINOR=65
E: SUBSYSTEM=input
E: USEC_INITIALIZED=1124309036
Of course the mouse is not listed in the output of lsusb
This is the log of apt
libavutil55:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Preparing to unpack .../3-libswresample2_7%3a3.2.14-1~deb9u1_amd64.deb ...
Unpacking libswresample2:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Preparing to unpack .../4-libavcodec57_7%3a3.2.14-1~deb9u1_amd64.deb ...
Unpacking libavcodec57:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Preparing to unpack .../5-libavformat57_7%3a3.2.14-1~deb9u1_amd64.deb ...
Unpacking libavformat57:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Preparing to unpack .../6-libavresample3_7%3a3.2.14-1~deb9u1_amd64.deb ...
Unpacking libavresample3:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Preparing to unpack .../7-libpostproc54_7%3a3.2.14-1~deb9u1_amd64.deb ...
Unpacking libpostproc54:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Preparing to unpack .../8-libswscale4_7%3a3.2.14-1~deb9u1_amd64.deb ...
Unpacking libswscale4:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Preparing to unpack .../9-libavfilter6_7%3a3.2.14-1~deb9u1_amd64.deb ...
Unpacking libavfilter6:amd64 (7:3.2.14-1~deb9u1) over (7:3.2.12-1~deb9u1) ...
Setting up libavutil55:amd64 (7:3.2.14-1~deb9u1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Setting up libswresample2:amd64 (7:3.2.14-1~deb9u1) ...
Processing triggers for bamfdaemon (0.5.3-2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up libswscale4:amd64 (7:3.2.14-1~deb9u1) ...
Setting up firefox-esr (60.7.0esr-1~deb9u1) ...
Setting up libpostproc54:amd64 (7:3.2.14-1~deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-9) ...
Setting up google-chrome-stable (74.0.3729.169-1) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Setting up libavresample3:amd64 (7:3.2.14-1~deb9u1) ...
Setting up libavcodec57:amd64 (7:3.2.14-1~deb9u1) ...
Setting up libavformat57:amd64 (7:3.2.14-1~deb9u1) ...
Setting up libavfilter6:amd64
EDIT:
This is the output of lsusb
Bus 002 Device 003: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 5986:0295 Acer, Inc
Bus 001 Device 007: ID 3938:1031
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
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
This are the last lines of the output dmesg
[Jun13 12:43] usb 1-1.2: USB disconnect, device number 6
[ +8.249459] usbcore: deregistering interface driver usbhid
[ +3.350851] usb 1-1.2: new full-speed USB device number 7 using ehci-pci
[ +0.110577] usb 1-1.2: New USB device found, idVendor=3938, idProduct=1031
[ +0.000009] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ +0.000004] usb 1-1.2: Product: 2.4G Wireless Mouse
[ +0.000004] usb 1-1.2: Manufacturer: MOSART Semi.
[ +0.029435] input: MOSART Semi. 2.4G Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:3938:1031.0004/input/input17
[ +0.000881] hid-generic 0003:3938:1031.0004: input,hiddev0,hidraw0: USB HID v1.10 Mouse [MOSART Semi. 2.4G Wireless Mouse] on usb-0000:00:1a.0-1.2/input0
[ +0.000081] usbcore: registered new interface driver usbhid
[ +0.000001] usbhid: USB HID core driver
Gabriel Sandoval
(53 rep)
May 23, 2019, 03:47 PM
• Last activity: Jun 13, 2019, 06:00 PM
Showing page 1 of 20 total questions