Questions tagged [udev]
Udev is a Linux process that manages device file entries under /dev
1,099
questions
0
votes
0
answers
8
views
Udev rule to adjust mouse speed not working (but executing)
Summary
I want to use a udev rule to adjust the speed of a certain mouse when I attach it.
I can get the udev rule to fire, but it does not successfully adjust the mouse speed. However, when I ...
0
votes
1
answer
30
views
How to change default automount USB path to /mnt/sdXX?
Default mount path with udisks2, udiskie is /media/XXXXX
On some distributions /media/user/XXXXXX
How to change automount path for USB drives to a shorter /mnt/sdb1 /mnt/sdc2 etc.
With udisks2, ...
-3
votes
0
answers
26
views
why does udev create device nodes? [duplicate]
so i understand why device nodes need to exist, but why does udev make them?
can someone explain to me the relationship between udev and device nodes?
how does udev make device nodes? why does udev ...
0
votes
0
answers
21
views
Emulate ttyS0 on Ubuntu 22 or link it to ttyUSB0
I have a JAVA code that checks if ttyS0 is present. I dont have a serial port, so Im getting:
Exception in thread "main" java.lang.RuntimeException:
Error opening "/dev/ttyS0"
...
-2
votes
1
answer
51
views
why does a device node need to be made in udev when you plug in a device into your computer?
Why does a device node need to be made in udev when you plug in a device into your computer?
Why does a device node need to exist?
0
votes
1
answer
42
views
Create symbolic links to block devices by partition table UUID
Within /dev/disk, there are the folders by-id, by-label, by-partlabel, by-partuuid, by-path, and by-uuid. Is there a way to make what software responsible for this create a directory called by-ptuuid ...
1
vote
0
answers
13
views
udev rule not work for my usb-stick
i try to setup udev rules for my usb stick, to get always the same path.
this is my rule:
ACTION=="add|change", KERNEL=="ttyUSB[0-9]*", SUBSYSTEMS=="usb", ATTRS{...
0
votes
1
answer
20
views
Udevadm doesn't auto trigger after suspended
I set up my USB modem with Ubuntu, so that it automatically switches to modem mode every time it suspends and resumes from sleep mode.
Following the instructions from here [1], I was able to do it, ...
1
vote
0
answers
52
views
How to ignore/disable all USB HID devices except a certain one using udev rules?
I would like to ignore/disable all USB HID devices except a certain one, using udev rule(s). I have the idVendor and idProduct attributes of the USB HID device I want to allow.
I am able to disable ...
3
votes
1
answer
749
views
What is a device manager in the context of Linux?
What is a device manager in the context of Linux?
That is, what is it that a device manager actually does?
https://en.wikipedia.org/wiki/Udev says
udev (userspace /dev) is a device manager for the ...
1
vote
0
answers
33
views
Unable to send automated mail using udev and msmtp
I am trying to write a script to send an email whenever a usb device is connected to my computer (Arch Linux). The code I wrote is
#!/bin/bash
if [[ ! -z "$1" ]]; then
echo "USB ...
0
votes
1
answer
33
views
Udev Block iPhone
I'm trying to block my iPhone from being used when I connect it so that I can pass it through to a VM. So far, I have this udev rule but I still get an error about the device being used whenever I try ...
0
votes
0
answers
32
views
Is it possible to reconnect a disconnected Linux boot device without rebooting?
I am using a live image of Debian GNU/Linux 12.2 (“bookworm”; kernel 6.1.0). I booted from a USB memory stick and used the system for several days without problem. Then, upon resuming from standby, it ...
2
votes
0
answers
38
views
Can I simulate power supply getting offline using udev or in other ways under Linux?
I have created the rule /etc/udev/rules.d/80.power.rules:
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/root/test.sh"
Then I execute the command ...
0
votes
0
answers
21
views
How do I map buttons for libwacom
I would like to add a wacom tablet. I have created /etc/libwacom/vendor-model.tablet. libwacom-list-local-devices returns the following
(libwacom-list-local-devices:20048): libwacom-WARNING **: 21:17:...
-3
votes
1
answer
235
views
Why am I not allowed to access files in /usr/bin/?
I have this machine. I am the sole user of the machine. I cannot access files in /usr/bin/ because of a location issue with /usr/lib/python3/dist-packages/printrun/ and am currently receiving errors.
...
0
votes
2
answers
84
views
I messed /dev/tty ownership and permissions [closed]
I was flashing a Flipper Zero Wifi Dev Board and I needed to have /dev/ttyACM0 owned by dialout group...
The thing is now I have tried to revert the stuff, making a chown root:tty /dev/tty*, and chmod ...
2
votes
0
answers
36
views
Generate upper-case in a udev rule?
I have a use case with cross-platform context which makes me want to generate symlinks under a /dev/disk/by-X directory that have an uppercase version of data returned by blkid.
Is there a built-in ...
0
votes
0
answers
23
views
The best way to configure an unused Ethernet socket (RJ45)
I have a machine (QNAP TS412 ..server, no GUI, indeed no screen) with 2 Ethernet ports. Now the usual setup is I have ETH0 plugged in and getting its address via DHCP, ETH1 empty. But there 2 other ...
0
votes
0
answers
53
views
How do I identify the connected USB device?
If I write the rules, for example, in this form:
ACTION=="remove", GOTO="serial_end"
SUBSYSTEM!="tty", GOTO="serial_end"
KERNEL=="ttyUSB[0-9]*", RUN+=...
1
vote
1
answer
124
views
50-udev-default.rules: Unknown builtin command: net_driver, lost internet connection
I'm running an Arch-based distro, and after doing a substantial update lost my internet connection (both wifi and ethernet). I'm able to roll back all of the changes and get it back, but would ...
0
votes
0
answers
16
views
How do you find what module loaded by (e)udev is hanging the system?
I have two different kernels, one built with a bunch of device support and another with not as much device support. The one with less device support boots fine on an older P5K Pro motherboard, the ...
0
votes
0
answers
39
views
Using different layout for each keyboard
I've seen similar questions here, but I don't think I'm duplicating any of them. I've been making progress on this matter for years, but there's still some way to go. The latest stage is that I use ...
0
votes
0
answers
29
views
UDEV rule not working - can't create symlink
So, I confess I'm actually trying to study for the Linux+ exam
I have a USB device. Information about it looks like:
looking at parent device '/devices/pci0000:00/0000:00:0b.0/usb1/1-2':
KERNELS==...
0
votes
1
answer
318
views
How does modprobe.d blacklist work, exactly?
Problem
I have conflicting drivers: xpad which comes standard with Arch, and xone which I installed from AUR. Both claim to support my Xbox One wireless controller even though only the xone driver ...
1
vote
0
answers
67
views
Udev rule randomly failing on boot
I have an embedded system with ubuntu running on it. Inside its /etc/udev/rules.d directory i put a file named 99-mydevice.rules:
KERNEL=="video0", SUBSYSTEM=="video4linux", ...
0
votes
0
answers
93
views
Serial interfaces and sysfs. How to get a unique identifier for each serial port
I want to enumerate the serial ports on a Linux system and get unique and stable (across reboots) identifiers for them. Stable in the sense that when I plug and unplug serial USB devices (same USB ...
0
votes
0
answers
47
views
Automatically run kpartx during boot after 2022
I'm trying to detect and run partitions on top of jMicron fakeRAID, which is discovered by dmraid. How far I'm stuck with making this automatically during boot.
hopungo@hopungo-pc:~$ sudo kpartx -l /...
0
votes
0
answers
218
views
(udev-worker)[352]: nvidia: Process
I get the following error messages, from the udev rules written in the 60-nvidia.rules
Nov 07 08:03:57 I-NET kernel: Secure boot disabled
Nov 07 08:03:58 I-NET kernel: nvidia: loading out-of-tree ...
0
votes
0
answers
54
views
Why are /dev/sdX not persistent and we have to use udev rules? [duplicate]
Why are the /dev/sdX names not persistent and we have to use udev rules or something else? Why the name changes? Is it only the name and permissions or does something else change as well? Why?
0
votes
0
answers
100
views
dependency issue at wpa_supplicant service startup
I have an issue during the bootup sequence of our toradex board (more info here) with wpa_supplicant service failing on "dependency" reason.
I am using pure systemd network setup, with this ...
0
votes
1
answer
63
views
Run display dependent command in a system setting event
I am working on a systemd/udev setting that I would like to share upstream, however I can't get it to work in a non-hacky way. Essentially, I have this script as the exec of a systemd service:
...
0
votes
0
answers
159
views
Rename a USB device for static name without udev rule
I have an Arduino board connected to a USB port and recognized by Ubuntu as the ttyACM0 device. For programming reasons on the Arduino site, the device should be visible on Linux as the ttyUB0 device.
...
0
votes
0
answers
58
views
How to address two different touch screens when they have the same name
I have recently bought a new computer with two touchscreens (yoga book 9) and installed linux (Ubuntu 22.04) on it, but it has some issues with automatically managing touch/stylus.
I've worked out how ...
1
vote
1
answer
151
views
udev rule works with command echo but not with cp command
I wrote a udev rule for automatic copy files from my USB key to my computer.
ACTION=="add",KERNEL=="sd[d-z][1-9]",ATTRS{serial}=="0701278A8DAE6B42",RUN+="/home/marco/...
1
vote
1
answer
48
views
Why does udev rule not work on `DEVPATH=="/kernel"`?
I'm testing udev rules with a file /etc/udev/rules.d/10-test.rules.
This line:
DEVPATH=="/devices/system/node/node0", ATTR{hugepages/hugepages-1048576kB/nr_hugepages}="4"
makes /...
0
votes
0
answers
31
views
How to remove the IP address assigned to tap0 creating an udev rule
I would like to remove the IP address (169.254.149.209) that's assigned to tap0 on Linux host os (Devuan 5) at a certain point of the booting process of FreeBSD (the guest os / vm),creating an udev ...
0
votes
1
answer
51
views
Map usb devices to static addresses on boot
I have a couple of USB devices connected to my computer:
An FT232 based USB-UART converter : Used to send and receive data between a microcontroller and the computer using the Serial protocol.
A ...
0
votes
0
answers
37
views
How to run script after input device is added?
I want to run a script, when I add an input device. On the one hand I need to run xmodmap, when an external keyboard is added to get there my key bindings. I achieved that already partial with a udev ...
0
votes
0
answers
26
views
Problem with screen autorotation - systemd hwdb
I want to get my Spectre x360 screen rotation to work.
iio-sensor-proxy correctly find the normal orientation, but when I rotate the laptop, it doesn't register any movement.
I found somewhere that ...
1
vote
1
answer
83
views
Problems adding rules.d rule for unit with multiple tty devices
I want to add a rule under /etc/udev/rules.d for a Texas Instruments CC1352P-2 development board. On my Ubuntu server it creates two ttyACM devices:
crw-rw-rw- 1 root dialout 166, 1 Sep 28 10:37 /dev/...
0
votes
0
answers
37
views
Cannot start link in /dev with LD_PRELOAD and ffmpeg
I successfully start ffmpeg on my old webcam with:
ssh my_host "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l2convert.so ffmpeg -f video4linux2 -i /dev/video0 -f matroska -" | mplayer - -...
0
votes
0
answers
149
views
HID events are received, but mouse input still not working
I'd like to understand what I'm missing between HID events and libinput. I have a device that is sending correct mouse events, recorded from hid-recorder:
e.g. For a left-click:
# ReportID: 11 / ...
0
votes
0
answers
51
views
How v4l2loopback makes a previously ignored udev rule work?
I've found the "how", but am curious about "why".
I've got an udev rule for a Sony camera that didn't work:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="054c", ATTRS{...
0
votes
0
answers
57
views
Detecting bluetooth headphones connection with udev / bluez
What I'm trying to achieve: set bluetooth headphones as the default sink in pulseaudio when they are connected, and set back to laptop speakers when disconnected.
Why: my laptop detects all four ...
1
vote
0
answers
30
views
udev: renaming nic name may occur even after multi-user.target begin?
I am investigating a Linux server(CentOS7.9 kernel 5.4.179-1.el7.elrepo.x86_64) for a weird issue:
There is a pretty normal service:
# /etc/systemd/system/test.service
[Unit]
Description=tet
Before=...
0
votes
1
answer
436
views
UDev rule for removing device not triggered
I am having a monitor with an integrated USB hub (and a physical power-switch) attached to my pi and want to execute two different scripts, when the monitor is turned on and off.
The first part for ...
0
votes
1
answer
30
views
Schedule IO problem via udev by-id
As the title, i'm trying to set the scheduler from boot by inserting the various disks using the udev rules. The problem is that indicating the disk by id (/dev/disk/by-id) in the udev rules (in the ...
1
vote
0
answers
131
views
extra udev rule to keep Wacom stylus turned on while disabling Wacom touchscreen?
I turned off the touchscreen as described here and here on my Lenovo ThinkPad with Debian and Wayland/libinput.
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="056a", ATTRS{idProduct}==&...
3
votes
1
answer
877
views
What's the reason to add a symlink to /dev directory with udev rules?
I understand that you can write custom udev rules to create a symlink in /dev directory.
But what is the use of having a symlink in /dev?
What is the symlink linking to?
I know you can interact with ...