Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [udev]

Udev is a Linux process that manages device file entries under /dev

0
votes
1answer
15 views

udev rule not working when adding bInterfaceNumber

This is my udev rule SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", ATTRS{serial}=="0", ATTRS{bInterfaceNumber}=="00",RUN+="/home/jamal/test.sh" The script is not running when ...
0
votes
2answers
54 views
+50

How to mount usb drive in udev rule?

I setup a rule in udev to run a script in background to automount the usb drive. It managed to run the script fine, but the mounting is failed for some reason. RULE: ACTION=="add", KERNEL=="sd[a-z]*"...
0
votes
0answers
12 views

Udev Rules Not Running

I'm playing with Udev Rules on OpenSuse Leap, and I'm trying to run a simple and small script once a USB device is plugged into my system. However, my script which I added in my keyword "RUN+=" does ...
1
vote
2answers
36 views

USB Device 'attached' several times

I got a problem when i am pluggin USB devices into my server. It looks like the USB devices repeatedly plugged in or re-assign the device letters sdb1: sdb1 The problem with that is that i execute a ...
1
vote
1answer
18 views

Dynamic Drive HotSwapping

Setup is simple. I have a rack-mounted server with 24 5" drive bays in the front. The server runs PLEX. Each HDD is NTFS partitioned and contain optional folders in root. Server is running Debian8 (3....
0
votes
2answers
44 views

How to mount my RFID reader as /dev/ttyUSB0

I've a USB RFID reader and main software I found on linux could use it through /dev/ttyUSB0 device When I connected it on my laptop I can see it with lsusb command returning : Bus 001 Device 012: ...
-1
votes
0answers
12 views

Repairing USB drive [migrated]

I'm attempting to repair a USB drive that I would like to use for booting Linux on my laptop. The drive was removed from the laptop while it was formatting and is unreadable now. However, if I open ...
1
vote
2answers
37 views

Automatically move physical network interfaces to namespace

I would like all of the physical interfaces on my system to live within a specific network namespace called "physical". It's easy enough to move devices over manually using commands like ip link set ...
0
votes
1answer
41 views

udev doesn't want to run chgrp and chmod

I want to change brightness of my monitor via the /sys/class/backlight/radeon_bl0/brightness file. But the file has -rw-r--r--. permissions, so only root can write to it. This article says, that I can ...
0
votes
0answers
18 views

udev in debian LXC Container not working

I have to use udev in Debian because I want to have persistant device names to access always to the right device. I have two COM devices via USB. At first I created a simple rule which was not ...
1
vote
1answer
36 views

USB drive not detected

I had an USB on a headless raspberry pi running debian, but after rebooting without unmounting (there were programs running on the mounted folder), I couldn't use the USB anymore. The following is the ...
3
votes
2answers
102 views

Where does kernel define the SD card naming index?

I'm running an embedded board that is booted from an SDCard. The location of the rootfs gets passed to the kernel via kernel parameters: Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 ...
1
vote
0answers
10 views

Execute script on external keyboard connection [duplicate]

I'm performing two modifications on my keyboard on startup: xset r rate 160 50 setxkbmap -option "ctrl:nocaps" However, they seem to be lost whenever I disconnect my external USB keyboard (...
0
votes
0answers
18 views

Udev inhibits auto mount

I have been running Ubuntu 14.04 until I installed 18.04. On 14.04 I successfully created a udev rule that upon certain USB stick insertion it run a script AND the system used to auto-mount the stick (...
0
votes
0answers
16 views

UDEV issue.. USB triggers script but USB doesn't mount properly

On Raspbarian. So I have the UDEV rule: ACTION=="add", SUBSYSTEMS=="block", KERNEL=="sd[a-z]1", RUN+="/usr/local/bin/script.sh" This is saved in /etc/udev/rules.d/10-usb.rules I want it to ...
1
vote
1answer
38 views

what is DEVLINKS in the output of udevadm info --query=property --name=/dev/mmcblk0

I was looking at the udev information but couldn't find out anywhere. What does DEVLINKS signify also what are these values dev/disk/by-id/mmc-008G30_0xf281d20d & /dev/disk/by-path/platform-...
0
votes
0answers
12 views

Check in a udev RUN script whether Shift is held down [duplicate]

I setup an action to lock my computer on unplugging a USB device via udev. I want to suppress that action by holding down a key. How could I achieve that? Grub has keystatus for detecting Shift/Ctrl/...
1
vote
1answer
30 views

/lib/udev/findkeyboards missing

I'm trying to follow the answer here to set up some key swaps (Capslock as CTRL) on external keyboards (Microsoft Natural Ergonomic 4000). First step is this. Get the details of your USB keyboard. ...
1
vote
0answers
59 views

Trigger script to run when USB drive connected with no user logged on on Ubuntu 18.04

I'm working on a DIY NAS project running on Ubuntu 18.04. I want to implement the following feature: when an external USB disk is connected (could be a specific disk identified by UUID or ...
0
votes
0answers
49 views

dmesg and udevadm info do not show expected attributes for usb device in a custom Ubuntu kernel

I have a custom Linux kernel and a user mode driver to detect USB barcode scanner. Driver is getting the device information (PID, VID, Serial Number, etc.) using udev but in this environment driver is ...
0
votes
1answer
161 views

udev rules for USB-serial devices with the same product ID, vendor ID, and serial number

I am trying to assign unique symlinks to USB hubs with the same vendor ID and product ID with no serial numbers assigned to them. I read this, which is a similar problem: Fixed udev rules for USB ...
0
votes
0answers
30 views

udev rule executing bot not mounting (raspbian stretch)

I've been able to automount on previous Raspbian versions, but the rule is not executing the "mount" on stretch. The Rule: KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end" # Import FS ...
0
votes
2answers
67 views

Can't wipe partition table after messing with dd

Context: Today I was trying to figure out how to install NixOS live usb with a writeable filesystem (dd-ing the iso results in read-only iso9660 fs). I split my usb into two partitions, one empty and ...
0
votes
0answers
17 views

udev rule with KERNELS argument does not work

I'm using a USB <-> Serial box and would like to have a custom symlink for the serial ports. Based on the output of udevadm I know each port has a different KERNELS value: KERNELS=="1-3:1.0" (...
0
votes
0answers
20 views

Is it possible to link the device and other things (like null, random and urandom) in the subdirectory /dev in MSYS2?

Q1: Is there any program or command which initialize all the accessible device to %MSYS_Root%\dev? Q2: If the answer to Q1 is positive, can I access them in bash.exe without Administrator prior? Q3: ...
-1
votes
1answer
28 views

How do you wii-u-gc-adapter working on 64-bit debian?

Following these guides (https://github.com/ToadKing/wii-u-gc-adapter/blob/master/README.md and https://dolphin-emu.org/docs/guides/how-use-official-gc-controller-adapter-wii-u/#Linux) - I've tried ...
0
votes
0answers
62 views

Define udev rule for disk by id or uuid?

I want to define a udev rule for a particular block device (or partition). I currently do it by defining a 91-my-custom-rules.rules configuration file as follows: computer:/etc/udev/rules.d # cat 91-...
1
vote
1answer
27 views

Where does udev get the model and vendor strings?

I am creating a udev rule which simply logs the usb storage devices. I have a usb flash disc with ID_MODEL_ID==1234 and ID_VENDOR_ID==abcd. udev shows that this is: ID_MODEL=UDisk ID_VENDOR=General ...
0
votes
1answer
36 views

How to detect USB insertion and log current user

I need to write a script that logs what user inserted what USB, and sends information to a server. I created a udev rule that runs a python script when it detects a USB insertion. The script writes to ...
3
votes
1answer
89 views

Mounting exfat with udev rules automatically

I'm trying to mount various SD cards automatically with udev rules. I started with these rules, solved a problem with the help of this question, and now I have the following situation: ext4 and vfat ...
1
vote
1answer
55 views

How to find sysfs directory for a specific device?

I have an input class device (accelerometer) bound to a driver which exposes sysfs attributes that I need to access from userland. Using a udev rule, I have provided an alias that unambiguously ...
0
votes
0answers
21 views

Reset ifindex number assignment

I need to reset the ifindex interator when creating new interfaces. I'm using OVS and it requires that an interface index less than 65535. Here is an example command and error. I thought I could do ...
2
votes
0answers
57 views

udev device group permissions not behaving as expected

I have a USB device with a serial interface that masquerades as a USB modem. It gets assigned to /dev/ttyACM0, and udev rules set the group and mode as noted: amm@AMM:~$ ls -l /dev/ttyACM0 crw-rw----...
1
vote
1answer
54 views

Udev rule to alias device depending on USB port number

I want to write a UDEV rule that alias USB sticks depending on which port it is connected on my Raspberry Pi (which has 4 USB ports). Is this possible?
4
votes
1answer
192 views

udevadm rule works using “udevadm test” but not with “udevadm trigger”

I have created a simple rule called "99-usb.rules" that simply names a tty port of a specific device KERNEL=="ttyACM*", ATTRS{idVendor}=="2341", NAME="mydevice" This rule works fine when I run a ...
0
votes
1answer
277 views

Debian 9: Which package is required to automount USB-drives?

I successfully installed Debian 9 (Stretch) together with desktop environment LXQt. To keep the system minimal and clean I disabled auto-installation of all recommended and suggested packages via APT:...
0
votes
1answer
42 views

linux + how to change disks name to other names

we have disk devices as ( on redhat machine version 7.2 ) sdb sdc sdd sde we want to change the names to vxb vxc vxd vxe is it possible expected results from lsblk output we need to see vxb ...
0
votes
0answers
37 views

Linux Mint live USB boot flash drive not found

I am attempting to get a live USB boot of Linux mint Cinnamon 18.3 onto my Lenovo Y510P working. When I perform the boot from USB, linux successfully initializes, but then outputs many errors of the ...
0
votes
0answers
27 views

HASP key does not work over ssh

I am using a software product that uses a HASP USB dongle. The software runs on a Linux box and I would like to run it remotely via ssh (it is a command line software tool). When I am physically on ...
0
votes
0answers
125 views

systemd-udevd fails to start triggerhappy upon boot

When I boot my Raspberry Pi3 (4.14.34-v7+), I find the following error in the dmesg and other logs, after boot up. However, I am not currently using triggerhappy, so could probably disable that ...
1
vote
1answer
46 views

How to change default permission for usb devices filesystem

On Debian, when automounted, all files and directories in USB drives have 777 permissions. I don't like it very much. I know a bit of udev rules, and I think I could write a rule of mine to override ...
0
votes
1answer
78 views

How to set xinput properties triggered by udev device connection?

I'm trying to set xinput properties for a USB input device whenever it is connected. I have seen solutions that require a script to run in the background and poll USB devices, but I would like to find ...
0
votes
1answer
26 views

network troubles on ASUS Maximus Hero VII

I've installed my old desktop's motherboard and cpu in my server and I'm having some troubles with network interfaces. The eth0 interface fails to start and gets renamed to eno1 and since my router ...
1
vote
1answer
57 views

Set usb flash drive as non rotational drive

I'm trying to optimize the IO schedulers and to use a proper scheduler for rotational and for non rotational drives (different). When I run: cat /sys/block/sd*/queue/rotational I get: 1 <-- ...
1
vote
2answers
94 views

dd command in script not running when executed from udev rule

I would like to setup a Raspberry Pi 3 running Rasbian to automatically copy a DVD disk when a disk is inserted in a coupled disk station. To achieve this, I have written a udevrule and a script to ...
1
vote
0answers
295 views

udev high cpu problem

i just reinstalled KUbuntu 16.04.4 64bits on my toshiba. Here https://pastebin.com/qKVpp0re is the result of the udevadm monitor command. KERNEL[8960.854968] change /devices/pci0000:00/0000:00:...
1
vote
2answers
790 views

systemd-udevd high cpu usage

Few days ago I installed Antergos on my old Dell laptop with Broadcom BCM2046 Bluetooth. Since then I'm having issues with bluetooth. First, no adapters were found. This was somehow solved (I'm not ...
0
votes
2answers
212 views

run mount as root inside udev rule

A while ago I got an udev script to run when an usb-stick is inserted into Ubuntu 16.04 (server) machine. (I've been using that to mount stick to virtualbox guest.) Now I want to do something ...
4
votes
1answer
74 views

udev rule for mapping dot to ctrl-enter

I need to remap the key with scancode 070037 to left ctrl + enter. So far I succeeded in remapping it to enter by creating a file 90-custom-presenter.hwdb with the following content. # Logitech ...
0
votes
0answers
44 views

What is wrong with this Udev rule?

I am trying to rename the USB device to be able to better access it through a script I am writing. It shows up as /dev/ttyACM0 right now and I wanted to change it to /dev/Roboteq1. I followed this ...