[Solved] udev rules: serial for persistent device naming disappeared

Hello,
since the latest upgrade of udev and kmod I cant't mount my external e-SATA hard disk with my working udev rules.
This is my udev rule:
$ cat /etc/udev/rules.d/66-persistent_esata.rules
KERNEL=="sd?1", SUBSYSTEMS=="block", ENV{ID_SERIAL_SHORT}=="S1VSJ1LS301247", NAME="aluguard"
When plugged in, I could decrypt and mount it with "sudo cryptsetup luksOpen /dev/aluguard aluguard && mount /mnt/aluguard".
Since the update above I get "Device /dev/aluguard doesn't exist or access denied."
While I re-checked https://wiki.archlinux.org/index.php/Ma … _with_udev, I discovered, that the serial entry in the output of udevadm has vanished:
$ udevadm info -a -p $(udevadm info -q path -n /dev/sdg)
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg':
KERNEL=="sdg"
SUBSYSTEM=="block"
DRIVER==""
ATTR{range}=="16"
ATTR{ext_range}=="256"
ATTR{removable}=="0"
ATTR{ro}=="0"
ATTR{size}=="1953525168"
ATTR{alignment_offset}=="0"
ATTR{discard_alignment}=="0"
ATTR{capability}=="50"
ATTR{stat}==" 96 24 762 780 0 0 0 0 0 780 780"
ATTR{inflight}==" 0 0"
ATTR{events}==""
ATTR{events_async}==""
ATTR{events_poll_msecs}=="-1"
looking at parent device '/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0':
KERNELS=="3:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{device_blocked}=="0"
ATTRS{type}=="0"
ATTRS{scsi_level}=="6"
ATTRS{vendor}=="ATA "
ATTRS{model}=="SAMSUNG HD103SI "
ATTRS{rev}=="1AG0"
ATTRS{state}=="running"
ATTRS{timeout}=="30"
ATTRS{iocounterbits}=="32"
ATTRS{iorequest_cnt}=="0xa2"
ATTRS{iodone_cnt}=="0x98"
ATTRS{ioerr_cnt}=="0xc"
ATTRS{evt_media_change}=="0"
ATTRS{queue_depth}=="31"
ATTRS{queue_ramp_up_period}=="120000"
ATTRS{queue_type}=="simple"
looking at parent device '/devices/pci0000:00/0000:00:09.0/host3/target3:0:0':
KERNELS=="target3:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:09.0/host3':
KERNELS=="host3"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:09.0':
KERNELS=="0000:00:09.0"
SUBSYSTEMS=="pci"
DRIVERS=="ahci"
ATTRS{vendor}=="0x10de"
ATTRS{device}=="0x0554"
ATTRS{subsystem_vendor}=="0x1849"
ATTRS{subsystem_device}=="0x0554"
ATTRS{class}=="0x010601"
ATTRS{irq}=="23"
ATTRS{local_cpus}=="00000000,00000003"
ATTRS{local_cpulist}=="0-1"
ATTRS{numa_node}=="0"
ATTRS{dma_mask_bits}=="64"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
What is the reason for this strange behaviour, and how can I get back the serial entry?
Thank in advance!
Last edited by indianahorst (2012-01-31 13:03:20)

$ udevadm info -q all -n /dev/sdg1
P: /devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg/sdg1
N: sdg1
S: disk/by-id/ata-SAMSUNG_HD103SI_S1VSJ1LS301247-part1
S: disk/by-id/scsi-SATA_SAMSUNG_HD103SIS1VSJ1LS301247-part1
S: disk/by-id/wwn-0x50024e900136a03e-part1
S: disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0-part1
S: disk/by-uuid/bb024e1b-78a5-4ed0-9e80-aaa7633aa493
E: DEVLINKS=/dev/disk/by-id/ata-SAMSUNG_HD103SI_S1VSJ1LS301247-part1 /dev/disk/by-id/scsi-SATA_SAMSUNG_HD103SIS1VSJ1LS301247-part1 /dev/disk/by-id/wwn-0x50024e900136a03e-part1 /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0-part1 /dev/disk/by-uuid/bb024e1b-78a5-4ed0-9e80-aaa7633aa493
E: DEVNAME=/dev/sdg1
E: DEVPATH=/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg/sdg1
E: DEVTYPE=partition
E: ID_ATA=1
E: ID_ATA_DOWNLOAD_MICROCODE=1
E: ID_ATA_FEATURE_SET_AAM=1
E: ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=254
E: ID_ATA_FEATURE_SET_AAM_ENABLED=1
E: ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=254
E: ID_ATA_FEATURE_SET_APM=1
E: ID_ATA_FEATURE_SET_APM_ENABLED=0
E: ID_ATA_FEATURE_SET_HPA=1
E: ID_ATA_FEATURE_SET_HPA_ENABLED=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_FEATURE_SET_PUIS=1
E: ID_ATA_FEATURE_SET_PUIS_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY=1
E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=194
E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=194
E: ID_ATA_FEATURE_SET_SMART=1
E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_FS_TYPE=crypto_LUKS
E: ID_FS_USAGE=crypto
E: ID_FS_UUID=bb024e1b-78a5-4ed0-9e80-aaa7633aa493
E: ID_FS_UUID_ENC=bb024e1b-78a5-4ed0-9e80-aaa7633aa493
E: ID_FS_VERSION=1
E: ID_MODEL=SAMSUNG_HD103SI
E: ID_MODEL_ENC=SAMSUNG\x20HD103SI\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_PART_ENTRY_TYPE=0x83
E: ID_PART_TABLE_TYPE=dos
E: ID_PATH=pci-0000:00:09.0-scsi-3:0:0:0
E: ID_PATH_TAG=pci-0000_00_09_0-scsi-3_0_0_0
E: ID_REVISION=1AG01131
E: ID_SCSI_COMPAT=SATA_SAMSUNG_HD103SIS1VSJ1LS301247
E: ID_SERIAL=SAMSUNG_HD103SI_S1VSJ1LS301247
E: ID_SERIAL_SHORT=S1VSJ1LS301247
E: ID_TYPE=disk
E: ID_WWN=0x50024e900136a03e
E: ID_WWN_WITH_EXTENSION=0x50024e900136a03e
E: MAJOR=8
E: MINOR=97
E: PART_ENTRY_DISK=8:96
E: PART_ENTRY_NUMBER=1
E: PART_ENTRY_OFFSET=63
E: PART_ENTRY_SCHEME=dos
E: PART_ENTRY_SIZE=1953520002
E: SUBSYSTEM=block
E: UDEV_LOG=3
E: UDISKS_PARTITION=1
E: UDISKS_PARTITION_ALIGNMENT_OFFSET=0
E: UDISKS_PARTITION_NUMBER=1
E: UDISKS_PARTITION_OFFSET=32256
E: UDISKS_PARTITION_SCHEME=mbr
E: UDISKS_PARTITION_SIZE=1000202241024
E: UDISKS_PARTITION_SLAVE=/sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg
E: UDISKS_PARTITION_TYPE=0x83
E: UDISKS_PRESENTATION_NOPOLICY=0
E: USEC_INITIALIZED=6897248001
OK, there is the serial.... but the problem persists - udev doesn't execute the rule and doesn't create /dev/aluguard.

Similar Messages

  • [SOLVED] udev rule no longer working

    I have a udev rule set up to automatically mount an ext4 filesystem when I plug a certain thumb drive in.  It was working fine until yesterday (probably due to updates).  Here is the rule, in file /etc/udev/rules.d/99-gfk.rules:
    KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", SYMLINK+="gfshare"
    ACTION=="add", KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", RUN+="/bin/mkdir /media/gfshare"
    ACTION=="add", KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", RUN+="/bin/mount -t ext4 -o ro,nosuid,nodev,noexec,noatime /dev/gfshare /media/gfshare"
    The symlink and the mkdir command are both working fine, but the mount command is not being run for some reason.  If I manually run the mount command it works fine.  Some possibly helpful output:
    # pacman -Qo $(which udevadm)
    /usr/bin/udevadm is owned by systemd 212-1
    # dmesg |tail -16
    [26458.120628] usb 7-1.3: new high-speed USB device number 7 using ehci-pci
    [26458.223059] usb-storage 7-1.3:1.0: USB Mass Storage device detected
    [26458.223825] scsi10 : usb-storage 7-1.3:1.0
    [26459.311607] scsi 10:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
    [26460.834081] sd 10:0:0:0: [sdd] 15240576 512-byte logical blocks: (7.80 GB/7.26 GiB)
    [26460.834931] sd 10:0:0:0: [sdd] Write Protect is off
    [26460.834935] sd 10:0:0:0: [sdd] Mode Sense: 23 00 00 00
    [26460.835617] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.835621] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.839455] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.839460] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.860579] sdd: sdd1 sdd2
    [26460.867111] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.867115] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.867118] sd 10:0:0:0: [sdd] Attached SCSI removable disk
    [26461.041982] EXT4-fs (sdd2): mounted filesystem with ordered data mode. Opts: (null)
    # udevadm test /sys/bus/usb/devices/7-1.3
    calling: test
    version 212
    This program is for debugging only, it does not run any program
    specified by a RUN key. It may show incorrect results, because
    some values may be different, or not available at a simulation run.
    load module index
    timestamp of '/etc/systemd/network' changed
    timestamp of '/usr/lib/systemd/network' changed
    Parsed configuration file /usr/lib/systemd/network/99-default.link
    Created link configuration context
    timestamp of '/etc/udev/rules.d' changed
    Skipping overridden file: /usr/lib/udev/rules.d/80-net-setup-link.rules.
    read rules file: /usr/lib/udev/rules.d/10-dm.rules
    read rules file: /usr/lib/udev/rules.d/11-dm-lvm.rules
    read rules file: /etc/udev/rules.d/12-android.rules
    read rules file: /usr/lib/udev/rules.d/13-dm-disk.rules
    read rules file: /usr/lib/udev/rules.d/40-hpet-permissions.rules
    read rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules
    read rules file: /usr/lib/udev/rules.d/42-usb-hid-pm.rules
    read rules file: /usr/lib/udev/rules.d/50-firmware.rules
    read rules file: /usr/lib/udev/rules.d/50-udev-default.rules
    read rules file: /usr/lib/udev/rules.d/51-android.rules
    read rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules
    read rules file: /usr/lib/udev/rules.d/60-drm.rules
    read rules file: /usr/lib/udev/rules.d/60-keyboard.rules
    read rules file: /usr/lib/udev/rules.d/60-pcmcia.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-input.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-serial.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
    read rules file: /usr/lib/udev/rules.d/60-vboxdrv.rules
    read rules file: /usr/lib/udev/rules.d/61-accelerometer.rules
    read rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules
    read rules file: /usr/lib/udev/rules.d/64-btrfs.rules
    read rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules
    read rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules
    read rules file: /usr/lib/udev/rules.d/69-dm-lvm-metad.rules
    read rules file: /usr/lib/udev/rules.d/69-libmtp.rules
    read rules file: /usr/lib/udev/rules.d/70-infrared.rules
    read rules file: /usr/lib/udev/rules.d/70-power-switch.rules
    read rules file: /usr/lib/udev/rules.d/70-uaccess.rules
    read rules file: /usr/lib/udev/rules.d/71-seat.rules
    read rules file: /usr/lib/udev/rules.d/73-seat-late.rules
    read rules file: /usr/lib/udev/rules.d/75-net-description.rules
    read rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules
    read rules file: /usr/lib/udev/rules.d/75-tty-description.rules
    read rules file: /usr/lib/udev/rules.d/78-sound-card.rules
    read rules file: /usr/lib/udev/rules.d/80-drivers.rules
    read rules file: /etc/udev/rules.d/80-net-setup-link.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks2.rules
    read rules file: /usr/lib/udev/rules.d/85-usbmuxd.rules
    read rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules
    read rules file: /usr/lib/udev/rules.d/95-cd-devices.rules
    read rules file: /usr/lib/udev/rules.d/95-dm-notify.rules
    read rules file: /usr/lib/udev/rules.d/95-udev-late.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-dell.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-gateway.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-ibm.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-csr.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-hid.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-wup.rules
    read rules file: /etc/udev/rules.d/99-gfk.rules
    read rules file: /usr/lib/udev/rules.d/99-systemd.rules
    read rules file: /usr/lib/udev/rules.d/kino.rules
    rules contain 98304 bytes tokens (8192 * 12 bytes), 22360 bytes strings
    10092 strings (88570 bytes), 8317 de-duplicated (67986 bytes), 1776 trie nodes used
    IMPORT builtin 'usb_id' /usr/lib/udev/rules.d/50-udev-default.rules:9
    IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:9
    MODE 0664 /usr/lib/udev/rules.d/50-udev-default.rules:37
    GROUP 1002 /usr/lib/udev/rules.d/51-android.rules:387
    MODE 0660 /usr/lib/udev/rules.d/51-android.rules:387
    RUN '/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers' /usr/lib/udev/rules.d/60-vboxdrv.rules:6
    PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7' /usr/lib/udev/rules.d/69-libmtp.rules:1204
    starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7'
    '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7'(out) '0'
    '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7' [24644] exit with return code 0
    IMPORT builtin 'path_id' /usr/lib/udev/rules.d/71-seat.rules:43
    RUN 'uaccess' /usr/lib/udev/rules.d/73-seat-late.rules:15
    handling device node '/dev/bus/usb/007/007', devnum=c189:774, mode=0660, uid=0, gid=1002
    preserve permissions /dev/bus/usb/007/007, 020660, uid=0, gid=1002
    preserve already existing symlink '/dev/char/189:774' to '../bus/usb/007/007'
    ACTION=add
    BUSNUM=007
    DEVNAME=/dev/bus/usb/007/007
    DEVNUM=007
    DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3
    DEVTYPE=usb_device
    DRIVER=usb
    ID_BUS=usb
    ID_DRIVE_THUMB=1
    ID_FOR_SEAT=usb-pci-0000_00_1a_7-usb-0_1_3
    ID_MODEL=DataTraveler_2.0
    ID_MODEL_ENC=DataTraveler\x202.0
    ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
    ID_MODEL_ID=6545
    ID_PATH=pci-0000:00:1a.7-usb-0:1.3
    ID_PATH_TAG=pci-0000_00_1a_7-usb-0_1_3
    ID_REVISION=0100
    ID_SERIAL=Kingston_DataTraveler_2.0_1C6F654E4041ED601910053F
    ID_SERIAL_SHORT=1C6F654E4041ED601910053F
    ID_USB_INTERFACES=:080650:
    ID_VENDOR=Kingston
    ID_VENDOR_ENC=Kingston
    ID_VENDOR_FROM_DATABASE=Toshiba Corp.
    ID_VENDOR_ID=0930
    MAJOR=189
    MINOR=774
    PRODUCT=930/6545/100
    SUBSYSTEM=usb
    TAGS=:seat:uaccess:
    TYPE=0/0/0
    USEC_INITIALIZED=26452326568
    adb_user=yes
    run: '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 774 00 vboxusers'
    run: 'uaccess'
    unload module index
    Unloaded link configuration context
    # udevadm test /sys/bus/usb/devices/7-1.3:1.0
    calling: test
    version 212
    This program is for debugging only, it does not run any program
    specified by a RUN key. It may show incorrect results, because
    some values may be different, or not available at a simulation run.
    load module index
    timestamp of '/etc/systemd/network' changed
    timestamp of '/usr/lib/systemd/network' changed
    Parsed configuration file /usr/lib/systemd/network/99-default.link
    Created link configuration context
    timestamp of '/etc/udev/rules.d' changed
    Skipping overridden file: /usr/lib/udev/rules.d/80-net-setup-link.rules.
    read rules file: /usr/lib/udev/rules.d/10-dm.rules
    read rules file: /usr/lib/udev/rules.d/11-dm-lvm.rules
    read rules file: /etc/udev/rules.d/12-android.rules
    read rules file: /usr/lib/udev/rules.d/13-dm-disk.rules
    read rules file: /usr/lib/udev/rules.d/40-hpet-permissions.rules
    read rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules
    read rules file: /usr/lib/udev/rules.d/42-usb-hid-pm.rules
    read rules file: /usr/lib/udev/rules.d/50-firmware.rules
    read rules file: /usr/lib/udev/rules.d/50-udev-default.rules
    read rules file: /usr/lib/udev/rules.d/51-android.rules
    read rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules
    read rules file: /usr/lib/udev/rules.d/60-drm.rules
    read rules file: /usr/lib/udev/rules.d/60-keyboard.rules
    read rules file: /usr/lib/udev/rules.d/60-pcmcia.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-input.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-serial.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
    read rules file: /usr/lib/udev/rules.d/60-vboxdrv.rules
    read rules file: /usr/lib/udev/rules.d/61-accelerometer.rules
    read rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules
    read rules file: /usr/lib/udev/rules.d/64-btrfs.rules
    read rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules
    read rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules
    read rules file: /usr/lib/udev/rules.d/69-dm-lvm-metad.rules
    read rules file: /usr/lib/udev/rules.d/69-libmtp.rules
    read rules file: /usr/lib/udev/rules.d/70-infrared.rules
    read rules file: /usr/lib/udev/rules.d/70-power-switch.rules
    read rules file: /usr/lib/udev/rules.d/70-uaccess.rules
    read rules file: /usr/lib/udev/rules.d/71-seat.rules
    read rules file: /usr/lib/udev/rules.d/73-seat-late.rules
    read rules file: /usr/lib/udev/rules.d/75-net-description.rules
    read rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules
    read rules file: /usr/lib/udev/rules.d/75-tty-description.rules
    read rules file: /usr/lib/udev/rules.d/78-sound-card.rules
    read rules file: /usr/lib/udev/rules.d/80-drivers.rules
    read rules file: /etc/udev/rules.d/80-net-setup-link.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks2.rules
    read rules file: /usr/lib/udev/rules.d/85-usbmuxd.rules
    read rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules
    read rules file: /usr/lib/udev/rules.d/95-cd-devices.rules
    read rules file: /usr/lib/udev/rules.d/95-dm-notify.rules
    read rules file: /usr/lib/udev/rules.d/95-udev-late.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-dell.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-gateway.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-ibm.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-csr.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-hid.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-wup.rules
    read rules file: /etc/udev/rules.d/99-gfk.rules
    read rules file: /usr/lib/udev/rules.d/99-systemd.rules
    read rules file: /usr/lib/udev/rules.d/kino.rules
    rules contain 98304 bytes tokens (8192 * 12 bytes), 22360 bytes strings
    10092 strings (88570 bytes), 8317 de-duplicated (67986 bytes), 1776 trie nodes used
    IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:11
    RUN 'kmod load $env{MODALIAS}' /usr/lib/udev/rules.d/80-drivers.rules:5
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3/7-1.3:1.0
    DEVTYPE=usb_interface
    DRIVER=usb-storage
    ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
    ID_VENDOR_FROM_DATABASE=Toshiba Corp.
    INTERFACE=8/6/80
    MODALIAS=usb:v0930p6545d0100dc00dsc00dp00ic08isc06ip50in00
    PRODUCT=930/6545/100
    SUBSYSTEM=usb
    TYPE=0/0/0
    USEC_INITIALIZED=452326811
    run: 'kmod load usb:v0930p6545d0100dc00dsc00dp00ic08isc06ip50in00'
    unload module index
    Unloaded link configuration context
    Last edited by bentglasstube (2014-04-03 20:51:36)

    I see.  That is somewhat aggravating but I will find another way to achieve what I wanted I suppose.
    Thank you.  Should I mark this is solved or unsolvable or something?  Sorry, I'm new to posting on these forums.
    Edit:  I was able to achieve what I wanted with udevil as recommended by the wiki.
    Last edited by bentglasstube (2014-04-03 20:55:45)

  • Persistent device naming - cannot mount root as rw

    hello people,
    i started using persistent block device naming but quickly realized i can only use it for non-root (/) partitions in fstab otherwise it will only get mounted as readonly and my system (arch current) will cease to boot.
    # this line only mounts fs as ro
    #/dev/disk/by-uuid/d02a0ef4-8cb3-460c-a48a-471f2798e4ad / ext3 default 0 1
    # i get stuck while mounting fs as ro when using this line
    #UUID=d02a0ef4-8cb3-460c-a48a-471f2798e4ad / ext3 default 0 1
    # so i have to use the old format (non persistent device naming)
    /dev/sda6 / ext3 defaults 0 1
    # the other partitions (same disk) work just fine
    /dev/disk/by-uuid/cc295f7d-3927-433d-bcc0-2d2267e0d672 /home ext3 defaults 0 1
    /dev/disk/by-uuid/936823be-b9bb-4a9d-a4e4-b4d62972f0af swap swap defaults 0 0
    /dev/disk/by-uuid/E8A04533A0450A10 /mnt/win-c ntfs-3g locale=sk_SK.utf8,nls=utf8,users 0 0
    snippet from menu.lst:
    kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/d02a0ef4-8cb3-460c-a48a-471f2798e4ad ro
    initrd /boot/kernel26.img
    does anyone have an idea what may be causing this?
    thanks.
    jozef

    Both of the UUID fstab lines for your root filesystem have 'default' instead of 'defaults'. Is that intentional, or is it a typo in your post?.
    I don't know offhand whether 'default' is even a valid option, or what effect it would have if it is.

  • [Solved] Persistent Device Naming for Full Disk Encryption & USB Boot

    Using the following boot option does not work while using FDE (dm-crypt plain) due to the filesystem being unreachable until decryption.
    cryptdevuce=UUID=xxxx-xxxx:root
    sda
    └   root   /
    sdb
    └  sdb1   /boot
    This forces the use of /dev/sda for booting, but occasionally a USB device is mapped to sda instead.
    Is there a way to use Persistent Block Device Naming for this type of FDE?
    Last edited by easton741 (2015-02-05 01:42:57)

    MSC wrote:What exactly is not working? It shouldn't matter if the USB device maps to /dev/sda because the partition with that UUID still resides on the same disk.
    I guess I should be more clear. The entire sda device is encrypted. This meas that during the initialization there is no UUID is read from the disk because the filesystem cannot be read until it is unencrypted.
    This leaves me in a catch 22 where I cannot use UUID until the device is unencrypted, but I need UUID to boot & decrypt the device properly. Here is an example of what the computer sees in the Arch Install.
    NAME            FSTYPE   LABEL                UUID                                 MOUNTPOINT
    sda                                                                       
    sdb                iso9660     ARCH_201501    2015-01-01-09-54-22-00               
    ├─sdb1          iso9660    ARCH_201501     2015-01-01-09-54-22-00       /run/archiso/bootmnt
    └─sdb2          vfat           ARCHISO_EFI    9051-9287                           
    sdc                                                                       
    └─sdc1          vfat                                     4EC5-5B7D                        (normally /boot)
    As you can see, sda has no uuid.
    So I guess what I'm asking is if there is any alternative method because it does not look like I can use anything in the wiki.

  • [solved] udev-rules for bluetooth PCMCIA

    My plan:
    get my bluetooth-PCMCIA card to work:
    CONCEPTONIC CBT100C
    Problem:
    I have to issue the following command for it to work:
    #hciattach ttyS0 bcsp
    Therefor I wrote following udev-rule that doesn't work:
    ##/etc/udev/rules.d/05-bluez-pcmcia-support.rules
    SUBSYSTEMS=="pcmcia", ATTRS{prod_id2}=="Bluetooth Card", RUN+="/usr/sbin/hciattach ttyS0 bcsp"
    My Question:
    Could someone explain to me why this rule does not work?
    Info:
    #pccardctl info
    PRODID_1="PCMCIA"
    PRODID_2="Bluetooth Card"
    PRODID_3=""
    PRODID_4=""
    MANFID=0279,950b
    FUNCID=2
    after #hciattach ttyS0 bcsp
    #udevinfo -a -p /sys/devices/pci0000\:00/0000\:00\:1e.0/0000\:06\:09.0/0.0/tty/ttyS0/
    KERNEL=="ttyS0"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{dev}=="4:64"
    looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:06:09.0/0.0/tty':
    KERNELS=="tty"
    SUBSYSTEMS==""
    DRIVERS==""
    looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:06:09.0/0.0':
    KERNELS=="0.0"
    SUBSYSTEMS=="pcmcia"
    DRIVERS=="serial_cs"
    ATTRS{modalias}=="pcmcia:m0279c950Bf02fn00pfn00pa281F1C5Dpb7664FB1Dpc00000000pd00000000"
    ATTRS{prod_id2}=="Bluetooth Card"
    ATTRS{prod_id1}=="PCMCIA"
    ATTRS{card_id}=="0x950b"
    ATTRS{manf_id}=="0x0279"
    ATTRS{func_id}=="0x02"
    ATTRS{pm_state}=="on"
    ATTRS{function}=="0x00"
    looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:06:09.0':
    KERNELS=="0000:06:09.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="yenta_cardbus"
    ATTRS{msi_bus}=="1"
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="2"
    ATTRS{modalias}=="pci:v00001180d00000476sv0000144Dsd0000C01Ebc06sc07i00"
    ATTRS{local_cpus}=="f"
    ATTRS{irq}=="16"
    ATTRS{class}=="0x060700"
    ATTRS{subsystem_device}=="0xc01e"
    ATTRS{subsystem_vendor}=="0x144d"
    ATTRS{device}=="0x0476"
    ATTRS{vendor}=="0x1180"
    looking at parent device '/devices/pci0000:00/0000:00:1e.0':
    KERNELS=="0000:00:1e.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{msi_bus}=="1"
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{modalias}=="pci:v00008086d00002448sv00000000sd00000000bc06sc04i01"
    ATTRS{local_cpus}=="f"
    ATTRS{irq}=="0"
    ATTRS{class}=="0x060401"
    ATTRS{subsystem_device}=="0x0000"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{device}=="0x2448"
    ATTRS{vendor}=="0x8086"
    looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""
    #dmesg
    pccard: PCMCIA card inserted into slot 0
    cs: memory probe 0xb4000000-0xb40fffff: excluding 0xb4000000-0xb400ffff
    pcmcia: registering new device pcmcia0.0
    ttyS0: detected caps 00000700 should be 00000100
    0.0: ttyS0 at I/O 0x400 (irq = 3) is a 16C950/954
    Last edited by mehldutt (2007-08-07 18:04:37)

    I called it
    05-bluez-pcmcia-support.rules
    I rebooted but still no success.
    I also tried this:
    ACTION=="add", SUBSYSTEMS=="pcmcia", ATTRS{prod_id2}=="Bluetooth Card", RUN+="aplay /usr/share/sounds/phone.wav"
    But still no success

  • [SOLVED] udev rules for U2F FIDO Plug-up key

    I just received a cheap U2F FIDO key (http://www.amazon.com/Plug-up-Internati … 00OGPO3ZS/) but couldn't use it under Chrome 38. I had to add the following rule to /etc/udev/rules.d/45-u2f.rules
    SUBSYSTEM=="hidraw", MODE="0666", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0"
    and then issued a
    # sudo udevadm trigger
    Should work with other vendors assuming you change the idVendor and idProduct.
    Have fun!

    LukeHandle wrote:Was thinking about the same device, what are you thoughts on it so far? I was mostly concerned with the price and how that translated to the quality, or lack thereof.
    The device for which I sent a link for is cheap one and when you receive it actually looks cheap but does the job. Initially I thought I needed to install the FIDO U2F Chrome extension https://chrome.google.com/webstore/deta … ionmgcdmne but it works just fine without it assuming you are using Chrome or Chromium 38+ and the above udev rule on ArchLinux (not required on Windows and MAC OS).
    Use case is fairly limited so far since it can only be used on Google account. I tried to use this Plug-Up U2F dongle on Yubico U2F demo page http://demo.yubico.com/start/u2f/neo but it doesn't work and thus even with the FIDO U2F Chrome extension...Weird since I thought all U2F will all be compatible. Since the protocol is open I hope other use cases will arise such as more major supported websites, easy integration in existing frameworks such as Wordpress, Roundcube... but also alternative uses such as 2nd factor authentication for disk encryption (LUKS).

  • [SOLVED] udev rule launch graphical app

    How can I make a udev rule launch a graphical application, like, for instance, feh?
    I've tried creating a rule detects when a specific mass storage device is connected and executes a script (/root/.scripts/feh-camera.sh). The script exports DISPLAY and XAUTHORITY and everything seems to work.
    However when I restarted a black screen appeared right after Loading Modules (that appears after Starting udev events). Removing the udev rule solved the problem, so I must be doing something wrong.
    What's the right way of doing this?
    Thanks in advance.
    Last edited by Vieira (2010-05-06 22:38:49)

    Device was not connected at boot but I'll try what you suggested anyway. Thanks for your help.
    EDIT:
    It's solved. It turns out the underlying problem was that exporting DISPLAY breaks the udev environment. For future reference solved it with:
    45-foobar.rules
    ATTRS{product}=="DSLR-A330", ATTR{removable}=="1", ENV{REMOVE_CMD}="/bin/umount /media/camera", RUN+="/bin/mount <bla bla>", RUN+="/bin/su vieira -c '/etc/udev/rules.d/45-foobar.sh'"
    and the script, where the problem was, must not export anything, just set inline, i.e.
    #!/bin/sh
    HOME=/home/vieira DISPLAY=:0 /usr/bin/feh -r /mnt/camera
    Last edited by Vieira (2010-05-06 22:35:39)

  • [SOLVED] udev-rules

    My plan is to write a udev-rule that automatically starts a backup script as soon as I plugin a specific usb-harddrive.
    For testing purposes I'm trying to run /usr/bin/gedit and create the symlink /dev/backup-drive
    here's my rule:
    ## /etc/udev/rules.d/95-backup.rules
    SUBSYSTEM=="usb", ATTRS{serial}=="100", SYMLINK="backup_drive", RUN+="/usr/bin/gedit"
    The symlink works fine.  However, gedit does not start.
    What am I missing?
    Last edited by mehldutt (2007-04-26 18:12:44)

    here some more information:
    # udevinfo -a -p $(udevinfo -q path -n /dev/sdb)
    Udevinfo starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.
      looking at device '/block/sdb':
        KERNEL=="sdb"
        SUBSYSTEM=="block"
        DRIVER==""
        ATTR{stat}=="      69      193     1022      352       14        4      144       68        0      332      420"
        ATTR{size}=="156301488"
        ATTR{removable}=="0"
        ATTR{range}=="16"
        ATTR{dev}=="8:16"
      looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-4/5-4:1.0/host2/target2:0:0/2:0:0:0':
        KERNELS=="2:0:0:0"
        SUBSYSTEMS=="scsi"
        DRIVERS=="sd"
        ATTRS{ioerr_cnt}=="0x0"
        ATTRS{iodone_cnt}=="0x5a"
        ATTRS{iorequest_cnt}=="0x5a"
        ATTRS{iocounterbits}=="32"
        ATTRS{timeout}=="30"
        ATTRS{state}=="running"
        ATTRS{rev}=="AD00"
        ATTRS{model}=="MK8032GAX       "
        ATTRS{vendor}=="TOSHIBA "
        ATTRS{scsi_level}=="3"
        ATTRS{type}=="0"
        ATTRS{queue_type}=="none"
        ATTRS{queue_depth}=="1"
        ATTRS{device_blocked}=="0"
        ATTRS{max_sectors}=="240"
      looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-4/5-4:1.0/host2/target2:0:0':
        KERNELS=="target2:0:0"
        SUBSYSTEMS==""
        DRIVERS==""
      looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-4/5-4:1.0/host2':
        KERNELS=="host2"
        SUBSYSTEMS==""
        DRIVERS==""
      looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-4/5-4:1.0':
        KERNELS=="5-4:1.0"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb-storage"
        ATTRS{interface}=="Mass Storage Class"
        ATTRS{modalias}=="usb:v04CFp8818dB008dc00dsc00dp00ic08isc05ip50"
        ATTRS{bInterfaceProtocol}=="50"
        ATTRS{bInterfaceSubClass}=="05"
        ATTRS{bInterfaceClass}=="08"
        ATTRS{bNumEndpoints}=="02"
        ATTRS{bAlternateSetting}==" 0"
        ATTRS{bInterfaceNumber}=="00"
      looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-4':
        KERNELS=="5-4"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb"
        ATTRS{serial}=="100"
        ATTRS{product}=="USB Mass Storage Device"
        ATTRS{manufacturer}=="Myson Century, Inc."
        ATTRS{maxchild}=="0"
        ATTRS{version}==" 2.00"
        ATTRS{devnum}=="2"
        ATTRS{speed}=="480"
        ATTRS{bMaxPacketSize0}=="64"
        ATTRS{bNumConfigurations}=="1"
        ATTRS{bDeviceProtocol}=="00"
        ATTRS{bDeviceSubClass}=="00"
        ATTRS{bDeviceClass}=="00"
        ATTRS{bcdDevice}=="b008"
        ATTRS{idProduct}=="8818"
        ATTRS{idVendor}=="04cf"
        ATTRS{bMaxPower}==" 10mA"
        ATTRS{bmAttributes}=="c0"
        ATTRS{bConfigurationValue}=="1"
        ATTRS{bNumInterfaces}==" 1"
        ATTRS{configuration}=="USB Mass Storage"
      looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5':
        KERNELS=="usb5"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb"
        ATTRS{serial}=="0000:00:1d.7"
        ATTRS{product}=="EHCI Host Controller"
        ATTRS{manufacturer}=="Linux 2.6.20-ARCH ehci_hcd"
        ATTRS{maxchild}=="8"
        ATTRS{version}==" 2.00"
        ATTRS{devnum}=="1"
        ATTRS{speed}=="480"
        ATTRS{bMaxPacketSize0}=="64"
        ATTRS{bNumConfigurations}=="1"
        ATTRS{bDeviceProtocol}=="01"
        ATTRS{bDeviceSubClass}=="00"
        ATTRS{bDeviceClass}=="09"
        ATTRS{bcdDevice}=="0206"
        ATTRS{idProduct}=="0000"
        ATTRS{idVendor}=="0000"
        ATTRS{bMaxPower}=="  0mA"
        ATTRS{bmAttributes}=="e0"
        ATTRS{bConfigurationValue}=="1"
        ATTRS{bNumInterfaces}==" 1"
        ATTRS{configuration}==""
      looking at parent device '/devices/pci0000:00/0000:00:1d.7':
        KERNELS=="0000:00:1d.7"
        SUBSYSTEMS=="pci"
        DRIVERS=="ehci_hcd"
        ATTRS{msi_bus}==""
        ATTRS{broken_parity_status}=="0"
        ATTRS{enable}=="1"
        ATTRS{modalias}=="pci:v00008086d0000265Csv0000144Dsd0000C01Ebc0Csc03i20"
        ATTRS{local_cpus}=="f"
        ATTRS{irq}=="19"
        ATTRS{class}=="0x0c0320"
        ATTRS{subsystem_device}=="0xc01e"
        ATTRS{subsystem_vendor}=="0x144d"
        ATTRS{device}=="0x265c"
        ATTRS{vendor}=="0x8086"
      looking at parent device '/devices/pci0000:00':
        KERNELS=="pci0000:00"
        SUBSYSTEMS==""
        DRIVERS==""

  • Udev: add mountpoints for removable devices

    Yet another solution to the removable devices problem.
    After a minor system overhaul I finally decided to get rid of a bunch of static mountpoints I had in /mnt. I checked Arch wiki, and what I saw there, well, raised some questions. I mean, it's udev, it's not supposed to be pretty, but pmount with a fixed user, as a recommended solution? Ugh.
    So I came up with a perl script that modifies /etc/fstab dynamically and creates mountpoints under /mnt, but doesn't actually mount anything. This way user mounts do not require any specific handling, and overall it looks nice and simple.
    To my slight surprise I couldn't find any good scripts that would do this even outside of the wiki (which is strange, btw, because the solution is obvious), so I decided to put it here. Maybe I'm not the only one who thinks auto-mounting is never a good thing.
    https://raw.github.com/nkf/udevh/master/udevh-sd | https://raw.github.com/nkf/udevh/master/README
    Comments, suggestions etc. are welcome.
    Please check the source and udev rules before doing anything, it's fstab after all.

    tomk wrote:As long as you're happy.....
    Well, yeah. I'm not a big fan of the current udev implementation, but this time it all worked very well.
    As for the man page, well, it's not really set in stone. Ok, I admit I didn't read it, in Arch at least, but anyway, there must be reasons to call it static. mount is a simple tool, it's clear how it works, that's the only file it reads, and I see no intrinsic features in mount that would require fstab to be static. I'd say it's more of an self-imposed challenge to treat it as static, and not a necessity. At least for current implementation of mount, and current format of fstab, with "user", "users" etc.
    Also, the kludgy automount suggestions on the udev page - pmount with fixed user ZOMG - are deprecated now in favour of udisks-based setups.
    Maybe it should be removed then, or at least clearly labeled as deprecated?
    Because when you read the page, it comes as a suggested solution. And udisks, well, I skipped that section at all, partly because it was above "Auto mounting USB devices", and party because it talks about KDE, Gnome and automounting.
    Oh, and btw: I've just noticed that the fixed user in that example is "tomk" ;-)
    falconindy wrote:I think you're in the minority of folks who think dynamically modifying a system config file as crucial as /etc/fstab is a good thing.
    Somewhat off-topic, but /etc/fstab is one of the least critical files in the system, and one of the easiest to fix.
    I didn't check with the current version, but if I'd was unable to boot without fstab, I'd call it a bug in initscripts.
    .:B:. wrote:There's nothing more easy than udisks - and there are plenty of frontends to it, like udiskie. (...) Reinventing the wheel is not always necessary.
    Well, I'm reading about udisks now, and the problem is, when I want a wheel, I want a wheel, not a Segway.
    I like my system to be simple (arch way and all), while this thing wants d-bus, polkit, some frontends and org.freedesktop.stuff.die.must.java style configuration variables just to be able to type "mount /mnt/sda1". Easy, maybe, for a given values of "easy"; simple, anything but.

  • [Solved] udev rule not working

    Hi!
    I'm trying to set my trackpoint sensitivity and speed using an udev rule:
    [jeroen@zechs ~]$ ls -l /etc/udev/rules.d/
    total 4
    -rw-r--r-- 1 root root 113 Sep 14 01:54 10-trackpoint.rules
    [jeroen@zechs ~]$ cat /etc/udev/rules.d/10-trackpoint.rules
    # Set trackpoint option
    KERNEL=="serio2", ATTR{speed}="180", ATTR{sensitivity}="255", RUN+="touch /tmp/udevtest"
    When I test the rule, everything seems to be working as planned:
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/speed
    97
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/sensitivity
    128
    [jeroen@zechs ~]$ sudo udevadm test /sys/devices/platform/i8042/serio1/serio2/
    calling: test
    version 216
    timestamp of '/etc/udev/rules.d' changed
    Reading rules file: /etc/udev/rules.d/10-trackpoint.rules
    ATTR '/sys/devices/platform/i8042/serio1/serio2/speed' writing '180' /etc/udev/rules.d/10-trackpoint.rules:2
    ATTR '/sys/devices/platform/i8042/serio1/serio2/sensitivity' writing '255' /etc/udev/rules.d/10-trackpoint.rules:2
    RUN 'touch /tmp/udevtest' /etc/udev/rules.d/10-trackpoint.rules:2
    ACTION=add
    DEVPATH=/devices/platform/i8042/serio1/serio2
    DRIVER=psmouse
    MODALIAS=serio:ty05pr00id00ex00
    SERIO_EXTRA=00
    SERIO_ID=00
    SERIO_PROTO=00
    SERIO_TYPE=05
    SUBSYSTEM=serio
    USEC_INITIALIZED=284056746
    run: 'touch /tmp/udevtest'
    run: 'kmod load serio:ty05pr00id00ex00'
    unload module index
    Unloaded link configuration context.
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/sensitivity
    255
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/speed
    180
    But when I boot the system, the rule has not been applied
    [BOOT]
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/speed
    97
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/sensitivity
    128
    [jeroen@zechs ~]$ sudo udevadm trigger
    [jeroen@zechs ~]$ ls -l /tmp/udevtest
    ls: cannot access /tmp/udevtest: No such file or directory
    So the rule runs fine when I do `udevadm test` but fails to run on boot or `udevadm trigger`
    Any hints or ideas, or probably some basic stuff I missed, to get this working?
    Thank you for reading this far!
    Last edited by jeroentbt (2014-10-07 11:42:58)

    There is not much to go with.
    I'll try adding the 'description' attribute maybe.
    $ udevadm info -a -p /sys/devices/platform/i8042/serio1/serio2
    Udevadm info starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.
    looking at device '/devices/platform/i8042/serio1/serio2':
    KERNEL=="serio2"
    SUBSYSTEM=="serio"
    DRIVER=="psmouse"
    ATTR{resolution}=="200"
    ATTR{rate}=="100"
    ATTR{bind_mode}=="auto"
    ATTR{resync_time}=="0"
    ATTR{jenks}=="135"
    ATTR{reach}=="10"
    ATTR{speed}=="180"
    ATTR{ztime}=="38"
    ATTR{draghys}=="255"
    ATTR{description}=="Synaptics pass-through"
    ATTR{mindrag}=="20"
    ATTR{ext_dev}=="1"
    ATTR{skipback}=="0"
    ATTR{upthresh}=="255"
    ATTR{resetafter}=="5"
    ATTR{thresh}=="8"
    ATTR{protocol}=="TPPS/2"
    ATTR{press_to_select}=="0"
    ATTR{sensitivity}=="255"
    ATTR{inertia}=="6"
    ATTR{firmware_id}==""
    looking at parent device '/devices/platform/i8042/serio1':
    KERNELS=="serio1"
    SUBSYSTEMS=="serio"
    DRIVERS=="psmouse"
    ATTRS{resolution}=="200"
    ATTRS{rate}=="80"
    ATTRS{bind_mode}=="auto"
    ATTRS{resync_time}=="0"
    ATTRS{description}=="i8042 AUX port"
    ATTRS{resetafter}=="5"
    ATTRS{protocol}=="SynPS/2"
    ATTRS{firmware_id}=="PNP: LEN0015 PNP0f13"
    looking at parent device '/devices/platform/i8042':
    KERNELS=="i8042"
    SUBSYSTEMS=="platform"
    DRIVERS=="i8042"
    looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    EDIT:
    tried with these two rules, no dice:
    KERNEL=="serio2", ATTR{description}=="Synaptics pass-through", ATTR{speed}="180", ATTR{sensitivity}="255", RUN+="touch /tmp/udevtest"
    ATTR{description}=="Synaptics pass-through", ATTR{speed}="180", ATTR{sensitivity}="255", RUN+="touch /tmp/udevtest"
    Last edited by jeroentbt (2014-09-14 21:23:33)

  • [SOLVED] udev rules: cannot run command

    I want to run a scipt everytime I plug in my external harddrive. I read the documentation and create a file called /etc/udev/rules.d/extern_hd.rules:
    SUBSYSTEMS=="usb", SYSFS{serial}=="33504D315647585A", SYMLINK+="ExternHD", RUN+="/root/scripts/test.sh"
    The symlink "ExternHD" gets created. The permissions of test.sh are rwxr-xr-x root root, but it never gets executed. What am I doing wrong?
    Last edited by Kei (2007-09-18 11:30:35)

    Solution was easy... Udev doesn't want to start anything from within /root, so I put a hardlink to /usr/local/bin/ and now everything works fine.

  • [SOLVED] Udev rule to hibernate my laptop at certain battery level

    Hi!
    I'm needing this kind of udev rule, to have my laptop automatically hibernate when battery level is about 3% (or 5, it doesn't matter).
    I don't want to have a little script running in the background that every eg 5 seconds polls my battery level, because i find it a really rough system.
    I guess i can use udev to reach what i want.
    udevadm info --path=/sys/class/power_supply/BAT0
    P: /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0f/PNP0C09:00/PNP0C0A:00/power_supply/BAT0
    E: DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:0f/PNP0C09:00/PNP0C0A:00/power_supply/BAT0
    E: POWER_SUPPLY_CHARGE_FULL=4800000
    E: POWER_SUPPLY_CHARGE_FULL_DESIGN=4800000
    E: POWER_SUPPLY_CHARGE_NOW=4800000
    E: POWER_SUPPLY_CURRENT_NOW=0
    E: POWER_SUPPLY_CYCLE_COUNT=0
    E: POWER_SUPPLY_MANUFACTURER=SANYO
    E: POWER_SUPPLY_MODEL_NAME=AS07B32
    E: POWER_SUPPLY_NAME=BAT0
    E: POWER_SUPPLY_PRESENT=1
    E: POWER_SUPPLY_SERIAL_NUMBER= 7210
    E: POWER_SUPPLY_STATUS=Full
    E: POWER_SUPPLY_TECHNOLOGY=Li-ion
    E: POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14800000
    E: POWER_SUPPLY_VOLTAGE_NOW=16142000
    E: SUBSYSTEM=power_supply
    Any help?
    Thank you very much!
    Last edited by nierro (2012-09-21 20:36:45)

    It is indeed udev, displaying device info from its database in response to a query - that's what 'udevadm info' does. But you can't write a udev rule against that info - you need a uevent.
    man udev wrote:The udev daemon, systemd-udevd.service(8), receives device uevents directly from the kernel whenever a device is added or removed from the system, or it changes its state. When udev receives a device event, it matches its configured set of rules against various device attributes to identify the device. Rules that match may provide additional device information to be stored in the udev database or to be used to create meaningful symlink names.
    If you run cybertorture's 'udevadm monitor' command above, as your battery is running down, you will not see any uevents. If you connect or disconnect your AC adapter, you will see uevents - in fact, you're using those ones already, to trigger your powersave script. So although the general description I've quoted mentions kernel uevents generated when a device "changes its state", this does not cover all possible changes, and in this particular case, it does not cover changes in battery charge level.

  • Solved: Udev rules not working

    I have file called "/etc/udev/rules.d/99-monitor-hotplug.rules" with this rule:
    ACTION=="change", SUBSYSTEM=="drm", RUN+="/root/scripts/hotPlugMonitor.sh"
    But hotPlugMonitor.sh-script is not ran even thought it has permission to be ran and
    udevadm monitor --property
    gives:
    KERNEL[69983.904205] change /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
    ACTION=change
    DEVNAME=/dev/dri/card0
    DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
    DEVTYPE=drm_minor
    HOTPLUG=1
    MAJOR=226
    MINOR=0
    SEQNUM=1885
    SUBSYSTEM=drm
    UDEV [69983.905420] change /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0 (drm)
    ACTION=change
    DEVNAME=/dev/dri/card0
    DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
    DEVTYPE=drm_minor
    HOTPLUG=1
    ID_FOR_SEAT=drm-pci-0000_01_00_0
    ID_PATH=pci-0000:01:00.0
    ID_PATH_TAG=pci-0000_01_00_0
    MAJOR=226
    MINOR=0
    SEQNUM=1885
    SUBSYSTEM=drm
    TAGS=:seat:uaccess:
    USEC_INITIALIZED=6
    when I detach my monitor.
    Last edited by oilgame (2013-08-31 09:10:08)

    You got the command slightly wrong. See the right command:
    udevadm control --reload
    From:
    $ udevadm control --help | grep reload
    --reload reload rules and databases

  • Persistent device naming

    hi, I have two network adapters. one is internal and one is a pci card. I used this https://wiki.archlinux.org/index.php/Ud … ork_device and added udev rules to make sure the correct one is always eth0 and the other one is eth1. but they still occasionally switch after a reboot,
    my /etc/udev/rules.d/10-network.rules looks like this:
    SUBSYSTEM=="net", ATTR{address}=="74:ea:3a:83:86:5e", NAME="eth0"
    SUBSYSTEM=="net", ATTR{address}=="00:1c:c0:88:0b:3f", NAME="eth1"
    I am using a full systemd environment. no classic initscripts or sysvinit installed (just in case that affects things).
    Any idea how I can tell why this is happening?

    Try with NAME:= rather than NAME=
    From "man udev":
    Assign a value to a key finally; disallow any later changes.
    However, I always saw the recommended method as being to assign a SYMLINK, and not change the name. E.g.:
    SUBSYSTEM=="net", ATTR{address}=="00:c3:d1:a5:e4:09", SYMLINK+="eth-router"

  • [SOLVED] ALSA not working for "default" device

    If I try to use alsamixer I get a "cannot open mixer: No such file or directory" error but if I try alsamixer -c 1 to select card 1, it works but seems to be causing issues with applications that are using default.  Doing lspci shows that there are two entries labeled "Audio Device:", one an "intel series 8 HD audio controller" and one an "intel haswell-ult audio controller"
    Any thoughts?
    Last edited by 3mpach3r (2014-09-19 02:39:18)

     Several. What are your Alsa configuration files? Did you change the default setup in any way? Do you use card 1 as default? Do you use Pulseaudio?
     To change the default sound cards control for alsa only use defaults.ctl node:
    $ cat ~/.asoundrc
    defaults.ctl.card 1; # although the name identifier
    # should be preferred
    # execute
    echo defaults.ctl.card \"$(cat /proc/asound/card1/id)\"\; > ~/.asoundrc
     To change the default sound card using the preferred way, use modprobe options. In your case most probably:
    $ cat /etc/modprobe.d/50-alsa.conf
    options snd-hda-intel index=1,0
    Edit: Added ";".
    Last edited by emeres (2014-09-18 23:00:21)

Maybe you are looking for

  • Help!! I need to recover my photos on my failed iMac hard disk

    I need some help in recovering my photo's on a failed imac hard disk...... The history to this is that I received the cursed flashing folder with a question mark (?) when I tried to boot into my normal OSX Maverck on my imac - I researched this and t

  • Can't sync Samsung SCH-u740 with Mac

    Anyone know when/if Apple will add a plugin or provide docs on how to create a plugin for the SCH-u740? I have scoured the web to no avail. Just got this great phone, but if I can't sync to it ... loses a lot of utility. Please help ...

  • Problems selecting bootdisc

    To be able to run multiple systems, I've created several partitions. When booting up the machine I should be able to select which partition to boot by holding down the option/alt key. But when I do that with my Apple Aluminium Keyboard (wired) nothin

  • Clearing out lov field

    Hi all I have a radio button and 2 other fields field1 and field2 besides it. Field1 and field2 are both LOV's. Based on the radio button value my cursor goes either to field1 or field2. I then bring up the lov and everything works fine. I'm having p

  • IPhoto Slideshows not working

    On my new Gen2 ATV I am sharing my iphoto library all items checked but only events and albums will display. None of the slideshows are available on the ATV. All movies and other photos work justy fine. I have 6 of these with extensive slideshow libr