https://wiki.archlinux.org/api.php?action=feedcontributions&user=Freonmonkey&feedformat=atomArchWiki - User contributions [en]2024-03-19T03:53:47ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Udev&diff=290515Udev2013-12-26T23:25:17Z<p>Freonmonkey: /* Running HAL */ Added link to Amazon Instant Video, and mentioned hal-flash as an alternative.</p>
<hr />
<div>[[Category:Hardware detection and troubleshooting]]<br />
[[cs:Udev]]<br />
[[de:Udev]]<br />
[[es:Udev]]<br />
[[it:Udev]]<br />
[[ja:Udev]]<br />
[[ru:Udev]]<br />
[[zh-CN:Udev]]<br />
[[zh-TW:Udev]]<br />
{{Lowercase title}}<br />
{{ic|udev}} replaces the functionality of both {{ic|hotplug}} and {{ic|hwdetect}}.<br />
<br />
From [[Wikipedia:Udev|Wikipedia article]]:<br />
:''"Udev is the device manager for the Linux kernel. Primarily, it manages device nodes in {{ic|/dev}}. It is the successor of devfs and hotplug, which means that it handles the {{ic|/dev}} directory and all user space actions when adding/removing devices, including firmware load."''<br />
<br />
Udev loads kernel modules by utilizing coding parallelism to provide a potential performance advantage versus loading these modules serially. The modules are therefore loaded asynchronously. The inherent disadvantage of this method is that udev does not always load modules in the same order on each boot. If the machine has multiple block devices, this may manifest itself in the form of device nodes changing designations randomly. For example, if the machine has two hard drives, {{ic|/dev/sda}} may randomly become {{ic|/dev/sdb}}. See below for more info on this.<br />
<br />
== Installation ==<br />
<br />
Udev is now part of {{Pkg|systemd}} and is installed by default on Arch Linux systems.<br />
<br />
== About udev rules ==<br />
<br />
Udev rules written by the administrator go in {{ic|/etc/udev/rules.d/}}, their file name has to end with {{ic|.rules}}. The udev rules shipped with various packages are found in {{ic|/usr/lib/udev/rules.d/}}. If there are two files by the same name under {{ic|/usr/lib}} and {{ic|/etc}}, the ones in {{ic|/etc}} take precedence.<br />
<br />
=== Writing udev rules === <br />
* To learn how to write udev rules, see [http://www.reactivated.net/writing_udev_rules.html Writing udev rules].<br />
* To see an example udev rule, see [https://soosck.wordpress.com/2011/01/19/improved-udev-rule-arch-linux/ Improved Udev Rule For Arch Linux].<br />
<br />
This is an example of a rule that places a symlink /dev/video-cam1 when a webcamera is connected. First, we have found out that this camera is connected and has loaded with the device /dev/video2. The reason for writing this rule is that at the next boot the device might just as well show up under a different name like /dev/video0.<br />
<br />
{{hc|# udevadm info -a -p $(udevadm info -q path -n /dev/video2)|<nowiki><br />
Udevadm info starts with the device specified by the devpath and then<br />
walks up the chain of parent devices. It prints for every device<br />
found, all possible attributes in the udev rules key format.<br />
A rule to match, can be composed by the attributes of the device<br />
and the attributes from one single parent device.<br />
<br />
looking at device '/devices/pci0000:00/0000:00:04.1/usb3/3-2/3-2:1.0/video4linux/video2':<br />
KERNEL=="video2"<br />
SUBSYSTEM=="video4linux"<br />
...<br />
looking at parent device '/devices/pci0000:00/0000:00:04.1/usb3/3-2/3-2:1.0':<br />
KERNELS=="3-2:1.0"<br />
SUBSYSTEMS=="usb"<br />
...<br />
looking at parent device '/devices/pci0000:00/0000:00:04.1/usb3/3-2':<br />
KERNELS=="3-2"<br />
SUBSYSTEMS=="usb"<br />
...<br />
ATTRS{idVendor}=="05a9"<br />
...<br />
ATTRS{manufacturer}=="OmniVision Technologies, Inc."<br />
ATTRS{removable}=="unknown"<br />
ATTRS{idProduct}=="4519"<br />
ATTRS{bDeviceClass}=="00"<br />
ATTRS{product}=="USB Camera"<br />
...<br />
</nowiki>}}<br />
<br />
From the video4linux device we use {{ic|<nowiki>KERNEL=="video2"</nowiki>}} and {{ic|<nowiki>SUBSYSTEM=="video4linux"</nowiki>}}, then we match the webcam using vendor and product ID's from the usb parent {{ic|<nowiki>SUBSYSTEMS=="usb"</nowiki>}}, {{ic|<nowiki>ATTRS{idVendor}=="05a9"</nowiki>}} and {{ic|<nowiki>ATTRS{idProduct}=="4519"</nowiki>}}.<br />
<br />
{{hc|/etc/udev/rules.d/83-webcam.rules|<nowiki><br />
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEM=="usb", \<br />
ATTRS{idVendor}=="05a9", ATTRS{idProduct}=="4519", SYMLINK+="video-cam1"<br />
</nowiki>}}<br />
<br />
In the example above we create a symlink using {{ic|<nowiki>SYMLINK+="video-cam1"</nowiki>}} but we could easily set user {{ic|<nowiki>OWNER="john"</nowiki>}} or group using {{ic|<nowiki>GROUP="video"</nowiki>}} or set the permissions using {{ic|<nowiki>MODE="0660"</nowiki>}}<br />
<br />
However, if you intend to write a rule to do something when a device is being removed, be aware that device attributes may not be accessible. In this case, you will have to work with preset device environment variables. To monitor those environment variables, execute the following command while unplugging your device:<br />
# udevadm monitor --environment --udev<br />
<br />
In this command's output, you will see value pairs such as ID_VENDOR_ID and ID_MODEL_ID, which match your previously used attributes "idVendor" and "idProduct". A rule that uses device environment variables may look like this:<br />
{{hc|/etc/udev/rules.d/83-webcam-removed.rules|<nowiki><br />
ACTION=="remove", SUBSYSTEM=="usb", \<br />
ENV{ID_VENDOR_ID}=="05a9", ENV{ID_MODEL_ID}=="4519", RUN+="/path/to/your/script"</nowiki>}}<br />
<br />
=== List attributes of a device ===<br />
To get a list of all of the attributes of a device you can use to write rules, run this command:<br />
# udevadm info -a -n [device name]<br />
<br />
Replace {{ic|[device name]}} with the device present in the system, such as {{ic|/dev/sda}} or {{ic|/dev/ttyUSB0}}.<br />
<br />
If you do not know the device name you can also list all attributes of a specific system path:<br />
<br />
# udevadm info -a -p /sys/class/backlight/acpi_video0<br />
<br />
=== Testing rules before loading ===<br />
# udevadm test $(udevadm info -q path -n [device name]) 2>&1<br />
This will not perform all actions in your new rules but it will however process symlink rules on existing devices which might come in handy if you are unable to load them otherwise. You can also directly provide the path to the device you want to test the udev rule for:<br />
# udevadm test /sys/class/backlight/acpi_video0/<br />
<br />
=== Loading new rules ===<br />
Udev automatically detects changes to rules files, so changes take effect immediately without requiring udev to be restarted. However, the rules are not re-triggered automatically on already existing devices. Hot-pluggable devices, such as USB devices, will probably have to be reconnected for the new rules to take effect, or at least unloading and reloading the ohci-hcd and ehci-hcd kernel modules and thereby reloading all USB drivers.<br />
<br />
If rules fail to reload automatically<br />
# udevadm control --reload-rules<br />
<br />
To manually force udev to trigger your rules<br />
# udevadm trigger<br />
<br />
== Udisks ==<br />
<br />
If you want to mount removable drives please do not call 'mount' from udev rule. In case of fuse filesystems (e.g. ntfs-3g) you'll get "Transport endpoint not connected" error. Instead use udisks that handles automount correctly.<br />
<br />
There are two incompatible versions, udisks and udisks2, a compatibility-breaking rewrite of udisks. Depending on your DE, one of the following version will be needed (should already be installed as a dependency):<br />
<br />
* For [[GNOME]] or [[KDE]] 4.10+, install {{Pkg|udisks2}}<br />
* For [[Xfce]] (Thunar), install {{Pkg|gvfs}} which will in turn install {{Pkg|udisks2}}<br />
<br />
There is no need for any additional rules either way. As an extra bonus you can remove HAL if you were only using that for auto mounting purposes.<br />
<br />
=== Automounting udisks wrappers ===<br />
<br />
A udisks wrapper has the advantage of being very easy to install and needing no (or minimal) configuration. The wrapper will automatically mount things like CDs and flash drives.<br />
<br />
* [http://ignorantguru.github.com/udevil/ udevil] - {{pkg|udevil}} "''mounts and unmounts removable devices without a password, shows device info, and monitors device changes''". It is written in C and can replace UDisks and includes [http://igurublog.wordpress.com/downloads/script-devmon/ devmon], which can be installed separately from the AUR ({{AUR|devmon}}). It can also selectively automatically start applications or execute commands after mounting, ignore specified devices and volume labels, and unmount removable drives.<br />
* {{AUR|ldm}} - A lightweight daemon that mounts usb drives, cds, dvds or floppys automagically. [https://bbs.archlinux.org/viewtopic.php?id=125918]<br />
* [[udiskie]] - Written in Python. Enables automatic mounting and unmounting by any user.<br />
* {{AUR|udisksevt}} - Written in Haskell. Enables automatic mounting by any user. Designed to be integrated with {{AUR|traydevice}}.<br />
* {{AUR|udisksvm}} - A GUI UDisks wrapper which uses the udisks2 dbus interface. It is written in python using the gobject introspection approach. It is independent of any file manager. It shows system tray icons with a right-click menu and notifications of action results. See [https://bbs.archlinux.org/viewtopic.php?id=112397 udisksvm community forum thread] for more explanations.<br />
* You can easily automount and eject removable devices with the combination of {{AUR|pmount}}, {{pkg|udisks2}} and {{pkg|spacefm}}. Note you have to run spacefm in daemon mode with {{ic|spacefm -d &}} in your startup scripts, {{ic|~/.xinitrc}} or {{ic|~/.xsession}}, to get automounting. You can also mount internal disks by adding them to {{ic|/etc/pmount.allow}}.<br />
<br />
=== Udisks shell functions ===<br />
<br />
While udisks includes a simple method of (un)mounting devices via command-line, it can be tiresome to type the commands out each time. These shell functions will generally shorten and ease command-line usage.<br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=109307 udisks_functions] - Written for Bash.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=117674 bashmount] - {{AUR|bashmount}} is a menu-driven Bash script with a configuration file that makes it easy to configure and extend.<br />
<br />
=== udisks2 - mount to /media ===<br />
<br />
By default, udisks2 mounts removable drives into {{ic|/run/media/$USER/}} instead of {{ic|/media/}}. If you don't like this behaviour, use this rule:<br />
<br />
{{hc|/etc/udev/rules.d/99-udisks2.rules|<nowiki><br />
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"<br />
</nowiki>}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Accessing firmware programmers and USB virtual comm devices ===<br />
<br />
The following ruleset will allow normal users (within the "users" group) the ability to access the [http://www.ladyada.net/make/usbtinyisp/ USBtinyISP] USB programmer for AVR microcontrollers and a generic (SiLabs [http://www.silabs.com/products/interface/usbtouart CP2102]) USB to UART adapter, the [http://www.atmel.com/tools/AVRDRAGON.aspx?tab=overview Atmel AVR Dragon] programmer, and the [http://www.atmel.com/tools/AVRISPMKII.aspx Atmel AVR ISP mkII]. Adjust the permissions accordingly. Verified as of 31-10-2012.<br />
<br />
{{hc|/etc/udev/rules.d/50-embedded_devices.rules|2=<nowiki><br />
# USBtinyISP Programmer rules<br />
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c9f", GROUP="users", MODE="0666"<br />
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0479", GROUP="users", MODE="0666"<br />
# USBasp Programmer rules http://www.fischl.de/usbasp/<br />
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="users", MODE="0666"<br />
<br />
# Mdfly.com Generic (SiLabs CP2102) 3.3v/5v USB VComm adapter<br />
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GROUP="users", MODE="0666"<br />
<br />
#Atmel AVR Dragon (dragon_isp) rules<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", GROUP="users", MODE="0666"<br />
<br />
#Atmel AVR JTAGICEMKII rules<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2103", GROUP="users", MODE="0666"<br />
<br />
#Atmel Corp. AVR ISP mkII<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2104", GROUP="users", MODE="0666"<br />
</nowiki>}}<br />
<br />
=== Execute on USB insert ===<br />
<br />
See the [[Execute on USB insert]] article or the [http://igurublog.wordpress.com/downloads/script-devmon/ devmon wrapper script].<br />
<br />
=== Detect new eSATA drives ===<br />
<br />
If your eSATA drive isn't detected when you plug it in, there are a few things you can try. You can reboot with the eSATA plugged in. Or you could try<br />
<br />
# echo 0 0 0 | tee /sys/class/scsi_host/host*/scan<br />
<br />
Or you could install scsiadd (from the AUR) and try<br />
<br />
# scsiadd -s<br />
<br />
Hopefully, your drive is now in /dev. If it doesn't, you could try the above commands while running<br />
<br />
# udevadm monitor<br />
<br />
to see if anything is actually happening.<br />
<br />
=== Mark internal SATA ports as eSATA ===<br />
<br />
If you connected a eSATA bay or an other eSATA adapter the system will still recognize this disk as an internal SATA drive. GNOME and KDE will ask you for your root password all the time. The following rule will mark the specified SATA-Port as an external eSATA-Port. With that, a normal GNOME user can connect their eSATA drives to that port like a USB drive, without any root password and so on.<br />
<br />
{{hc|/etc/udev/rules.d/10-esata.rules|2=<nowiki><br />
DEVPATH=="/devices/pci0000:00/0000:00:1f.2/host4/*", ENV{UDISKS_SYSTEM}="0"<br />
</nowiki>}}<br />
<br />
{{Note|The DEVPATH can be found after connection the eSATA drive with the following commands (replace {{ic|sdb}} accordingly):<br />
<br />
# udevadm info -q path -n /dev/sdb<br />
/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sdb<br />
<br />
# find /sys/devices/ -name sdb<br />
/sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sdb<br />
}}<br />
<br />
=== Setting static device names ===<br />
<br />
Because udev loads all modules asynchronously, they are initialized in a different order. This can result in devices randomly switching names. A udev rule can be added to use static device names: <br />
* See [[Persistent block device naming]] for block devices.<br />
* See [[Network Configuration#Device names]] for network devices<br />
<br />
==== iscsi device ====<br />
<br />
Test the output from scsi_id:<br />
<br />
# /usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdb<br />
3600601607db11e0013ab5a8e371ce111<br />
<br />
{{hc|/etc/udev/rules.d/75-iscsi.rules|2=<nowiki><br />
#The iscsi device rules.<br />
#This will create an iscsi device for each of the targets.<br />
KERNEL=="sd*", SUBSYSTEM=="block", \<br />
PROGRAM="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace /dev/$name", \ RESULT=="3600601607db11e0013ab5a8e371ce111", \<br />
NAME="isda"</nowiki>}}<br />
<br />
==== Video devices ====<br />
<br />
For setting up the webcam in the first place, refer to [[Webcam_Setup#Webcam configuration|Webcam configuration]].<br />
<br />
Using multiple webcams, useful for example with {{pkg|motion}} (software motion detector which grabs images from video4linux devices and/or from webcams), will assign video devices as /dev/video0..n randomly on boot. The recommended solution is to create symlinks using an udev rule (as in the example in [[Udev#Writing udev rules|Writing udev rules]]).<br />
<br />
{{hc|/etc/udev/rules.d/83-webcam.rules|<nowiki><br />
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTRS{idVendor}=="05a9", ATTRS{idProduct}=="4519", SYMLINK+="video-cam1"<br />
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="08f6", SYMLINK+="video-cam2"<br />
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0840", SYMLINK+="video-cam3"<br />
</nowiki>}}<br />
<br />
{{Note|Using names other than "/dev/video*" will break preloading of v4l1compat.so and perhaps v4l2convert.so.}}<br />
<br />
==== Printers ====<br />
<br />
If you use multiple printers, {{ic|/dev/lp[0-9]}} devices will be assigned randomly on boot, which will break e.g. [[CUPS]] configuration. <br />
<br />
You can create following rule, which will create symlinks under {{ic|/dev/lp/by-id}} and {{ic|/dev/lp/by-path}}, similar to [[Persistent block device naming]] scheme:<br />
<br />
{{hc|/etc/udev/rules.d/60-persistent-printer.rules|<nowiki><br />
ACTION=="remove", GOTO="persistent_printer_end"<br />
<br />
# This should not be necessary<br />
#KERNEL!="lp*", GOTO="persistent_printer_end"<br />
<br />
SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"<br />
ENV{ID_TYPE}!="printer", GOTO="persistent_printer_end"<br />
<br />
ENV{ID_SERIAL}=="?*", SYMLINK+="lp/by-id/$env{ID_BUS}-$env{ID_SERIAL}"<br />
<br />
IMPORT{builtin}="path_id"<br />
ENV{ID_PATH}=="?*", SYMLINK+="lp/by-path/$env{ID_PATH}"<br />
<br />
LABEL="persistent_printer_end"<br />
</nowiki>}}<br />
<br />
=== Running HAL ===<br />
<br />
Some programs still require HAL (like [[Amazon_Instant_Video|Flash DRM content]]). The full HAL package can be installed from {{AUR|hal}} and {{AUR|hal-info}}. If all you need is DRM content from Flash, you can use {{AUR|hal-flash}} to mimic HAL by using [[Udev#udisks|UDisks]] as described [[Amazon_Instant_Video#Using_the_modified_libhal_stub|here]].<br />
<br />
Using Systemd: one can start and stop the hal service using the following systemd commands:<br />
<br />
Start HAL: <br />
{{ic|# systemctl start hal.service}}<br />
<br />
Stop HAL: <br />
{{ic|# systemctl stop hal.service}}<br />
<br />
Alternatively, one can use the following script:<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
## written by Mark Lee <bluerider><br />
## using information from <https://wiki.archlinux.org/index.php/Chromium#Google_Play_.26_Flash><br />
<br />
## Start and stop Hal service on command for Google Play Movie service<br />
<br />
function main () { ## run the main insertion function<br />
clear-cache; ## remove adobe cache<br />
start-hal; ## start the hal daemon<br />
read -p "Press 'enter' to stop hal"; ## pause the command line with a read line<br />
stop-hal; ## stop the hal daemon<br />
}<br />
<br />
function clear-cache () { ## remove adobe cache<br />
cd ~/.adobe/Flash_Player; ## go to Flash player user directory<br />
rm -rf NativeCache AssetCache APSPrivateData2; ## remove cache<br />
}<br />
<br />
function start-hal () { ## start the hal daemon<br />
sudo systemctl start hal.service && ( ## systemd : start hal daemon<br />
echo "Started hal service..."<br />
) || (<br />
echo "Failed to start hal service!") <br />
}<br />
<br />
function stop-hal () { ## stop the hal daemon<br />
sudo systemctl stop hal.service && ( ## systemd : stop hal daemon<br />
echo "Stopped hal service..."<br />
) || (<br />
echo "Failed to stop hal service!"<br />
)<br />
}<br />
<br />
main; ## run the main insertion function<br />
</nowiki>}}<br />
<br />
=== Waking from suspend with USB device ===<br />
<br />
First, find vendor and product ID of your device, for example<br />
<br />
{{hc|<nowiki># lsusb | grep Logitech</nowiki>|Bus 007 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver}}<br />
<br />
Now change the {{ic|power/wakeup}} attribute of the device and the USB controller it's connected to, which is in this case {{ic|driver/usb7/power/wakeup}}. Use the following rule:<br />
<br />
{{hc|/etc/udev/rules.d/50-wake-on-device.rules|<nowiki><br />
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", ATTR{power/wakeup}="enabled", ATTR{driver/usb7/power/wakeup}="enabled"<br />
</nowiki>}}<br />
<br />
{{Note|Also make sure the USB controller is enabled in {{ic|/proc/acpi/wakeup}}.}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Blacklisting modules ===<br />
<br />
In rare cases, udev can make mistakes and load the wrong modules. To prevent it from doing this, you can blacklist modules. Once blacklisted, udev will never load that module. See [[blacklisting]]. Not at boot-time ''or'' later on when a hotplug event is received (eg, you plug in your USB flash drive).<br />
<br />
=== udevd hangs at boot ===<br />
<br />
After migrating to LDAP or updating an LDAP-backed system udevd can hang at boot at the message "Starting UDev Daemon". This is usually caused by udevd trying to look up a name from LDAP but failing, because the network is not up yet. The solution is to ensure that all system group names are present locally.<br />
<br />
Extract the group names referenced in udev rules and the group names actually present on the system:<br />
<br />
# fgrep -r GROUP /etc/udev/rules.d/ /usr/lib/udev/rules.d | perl -nle '/GROUP\s*=\s*"(.*?)"/ && print $1;' | sort | uniq > udev_groups<br />
# cut -f1 -d: /etc/gshadow /etc/group | sort | uniq > present_groups<br />
<br />
To see the differences, do a side-by-side diff:<br />
<br />
# diff -y present_groups udev_groups<br />
...<br />
network <<br />
nobody <<br />
ntp <<br />
optical optical<br />
power | pcscd<br />
rfkill <<br />
root root<br />
scanner scanner<br />
smmsp <<br />
storage storage<br />
...<br />
<br />
In this case, the pcscd group is for some reason not present in the system. Add the missing groups:<br />
<br />
# groupadd pcscd<br />
<br />
Also, make sure that local resources are looked up before resorting to LDAP. {{ic|/etc/nsswitch.conf}} should contain the following line:<br />
<br />
group: files ldap<br />
<br />
=== Known problems with hardware ===<br />
<br />
==== BusLogic devices can be broken and will cause a freeze during startup ====<br />
<br />
This is a kernel bug and no fix has been provided yet.<br />
<br />
==== Some devices, that should be treated as removable, are not ====<br />
<br />
Create a custom udev rule, setting {{ic|UDISKS_SYSTEM_INTERNAL<nowiki>=</nowiki>0}}. For more details, see the manpage of udisks.<br />
<br />
=== Known problems with auto-loading ===<br />
<br />
==== Sound problems with some modules not loaded automatically ====<br />
<br />
Some users have traced this problem to old entries in {{ic|/etc/modprobe.d/sound.conf}}. Try cleaning that file out and trying again.<br />
<br />
{{Note|Since {{ic|1=udev>=171}}, the OSS emulation modules ({{ic|snd_seq_oss}}, {{ic|snd_pcm_oss}}, {{ic|snd_mixer_oss}}) are not automatically loaded by default.}}<br />
<br />
=== Known problems for custom kernel users ===<br />
<br />
==== Udev doesn't start at all ====<br />
<br />
Make sure you have a kernel version later than or equal to 2.6.32. Earlier kernels do not have the necessary uevent stuff that udev needs for auto-loading.<br />
<br />
=== IDE CD/DVD-drive support ===<br />
<br />
Starting with version 170, udev doesn't support CD-ROM/DVD-ROM drives, which are loaded as traditional IDE drives with the {{ic|ide_cd_mod}} module and show up as {{ic|/dev/hd*}}. The drive remains usable for tools which access the hardware directly, like cdparanoia, but is invisible for higher userspace programs, like KDE.<br />
<br />
A cause for the loading of the ide_cd_mod module prior to others, like sr_mod, could be e.g. that you have for some reason the module piix loaded with your initramfs. In that case you can just replace it with ata_piix in your {{ic|/etc/mkinitcpio.conf}}.<br />
<br />
=== Optical drives have group ID set to "disk" ===<br />
<br />
If the group ID of your optical drive is set to {{ic|disk}} and you want to have it set to {{ic|optical}}, you have to create a custom udev rule:<br />
<br />
{{hc|/etc/udev/rules.d|2=<nowiki><br />
# permissions for IDE CD devices<br />
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", GROUP="optical"<br />
<br />
# permissions for SCSI CD devices<br />
SUBSYSTEMS=="scsi", KERNEL=="s[rg][0-9]*", ATTRS{type}=="5", GROUP="optical"</nowiki>}}<br />
<br />
== See also ==<br />
<br />
* [https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html Udev Homepage]<br />
* [http://www.linux.com/news/hardware/peripherals/180950-udev An Introduction to Udev]<br />
* [http://vger.kernel.org/vger-lists.html#linux-hotplug Udev mailing list information]</div>Freonmonkeyhttps://wiki.archlinux.org/index.php?title=Flash_DRM_content&diff=290514Flash DRM content2013-12-26T23:19:43Z<p>Freonmonkey: Changed AUR links to the proper format: {{AUR|pkgname}} instead of [external/link pkgname].</p>
<hr />
<div>[[Category:Player]]<br />
If you try to watch Amazon Instant Video, you may see the following error: '''''an error occurred and your player could not be updated'''''. This likely indicates that the video is protected with DRM and that the Flash Player could not perform some of the functions required to securely deliver the protected content.<br />
<br />
To deliver DRM-protected content, Flash calls several functions provided by the HAL daemon and its libraries. While Flash-based players remain popular, HAL has been deprecated and is not commonly installed on newer systems. To provide the necessary HAL functionality on such systems, you can either install the full HAL package and run the HAL daemon or install a modified HAL library 'stub' that uses the modern UDisks daemon instead.<br />
<br />
= Using the HAL package =<br />
To see if the system already has HAL installed, use this command:<br />
<br />
$ pacman -Qi hal<br />
<br />
== Installing HAL ==<br />
As {{AUR|hal}} is deprecated and not part of standard Arch systems, you will need to install it from the [[Arch User Repository|AUR]]. You will need to install {{AUR|hal-info}} first as it is a dependency for {{AUR|hal}}.<br />
<br />
== Running the HAL daemon ==<br />
Once you have confirmed that hal is installed (as above), start the daemon.<br />
<br />
'''sysvinit:'''<br />
# /etc/rc.d/hal start<br />
<br />
'''systemd:'''<br />
# systemctl start hal.service<br />
<br />
You may also wish to enable the daemon at boot, either by adding '''hal''' to your '''DAEMONS''' array in /etc/rc.conf (if using sysvinit), or by running '''systemctl enable hal.service''' as root (if running systemd).<br />
<br />
= Using the modified libhal stub =<br />
As an alternative to installing all of HAL, you can install a modified version of the libhal library from the [[Arch User Repository|AUR]] that uses the modern UDisks daemon instead of the deprecated HAL. Note that this libhal provides just enough of the HAL functionality to meet Flash's needs for copy-protected delivery: if you have other programs that require HAL, this stub probably won't satisfy them and you should use the full hal package instead.<br />
<br />
== Installing UDisks and hal-flash ==<br />
You will need to install {{AUR|hal-flash}} from the [[Arch User Repository|AUR]], which requires [[udev#udisks|UDisks]] if you don't already have installed. To verify udisks is already installed:<br />
$ pacman -Qi udisks<br />
<br />
== Running UDisks ==<br />
Since the libhal stub passes its calls to UDisks, UDisks should be running before you attempt to play DRM-protected Flash videos. To verify udisks is running using systemd:<br />
$ systemctl status udisks<br />
<br />
If it isn't running, run these commands to start UDisks now and enable it on future restarts:<br />
# systemctl start udisks<br />
# systemctl enable udisks<br />
<br />
= Remove Flash Player cached files =<br />
To get a fresh start after installing the package(s), remove some Flash Player cached files:<br />
<br />
$ cd ~/.adobe/Flash_Player<br />
$ rm -rf NativeCache AssetCache APSPrivateData2<br />
<br />
= See Also =<br />
* [[udev#Running_HAL]]</div>Freonmonkeyhttps://wiki.archlinux.org/index.php?title=Flash_DRM_content&diff=290513Flash DRM content2013-12-26T23:13:08Z<p>Freonmonkey: Moved content into sections, added information about hal-flash for those who don't want to install all of HAL</p>
<hr />
<div>[[Category:Player]]<br />
If you try to watch Amazon Instant Video, you may see the following error: '''''an error occurred and your player could not be updated'''''. This likely indicates that the video is protected with DRM and that the Flash Player could not perform some of the functions required to securely deliver the protected content.<br />
<br />
To deliver DRM-protected content, Flash calls several functions provided by the HAL daemon and its libraries. While Flash-based players remain popular, HAL has been deprecated and is not commonly installed on newer systems. To provide the necessary HAL functionality on such systems, you can either install the full HAL package and run the HAL daemon or install a modified HAL library 'stub' that uses the modern UDisks daemon instead.<br />
<br />
= Using the HAL package =<br />
To see if the system already has HAL installed, use this command:<br />
<br />
$ pacman -Qi hal<br />
<br />
== Installing HAL ==<br />
As HAL is deprecated and not part of standard Arch systems, you will need to install it from the [[Arch User Repository|AUR]]. You will need to install [https://aur.archlinux.org/packages.php?ID=51457 hal-info] first as it a dependency for [https://aur.archlinux.org/packages.php?ID=51454 hal].<br />
<br />
== Running the HAL daemon ==<br />
Once you have confirmed that hal is installed, start the daemon.<br />
<br />
'''sysvinit:'''<br />
# /etc/rc.d/hal start<br />
<br />
'''systemd:'''<br />
# systemctl start hal.service<br />
<br />
You may also wish to enable the daemon at boot, either by adding '''hal''' to your '''DAEMONS''' array in /etc/rc.conf (if using sysvinit), or by running '''systemctl enable hal.service''' as root (if running systemd).<br />
<br />
= Using the modified libhal stub =<br />
As an alternative to installing all of HAL, you can install a modified version of the libhal library from the [[Arch User Repository|AUR]] that uses the modern UDisks daemon instead of the deprecated HAL. Note that this libhal provides just enough of the HAL functionality to meet Flash's needs for copy-protected delivery: if you have other programs that require HAL, this stub probably won't satisfy them and you should use the full hal package instead.<br />
<br />
== Installing UDisks and hal-flash ==<br />
You will need to install [https://aur.archlinux.org/packages/hal-flash/ hal-flash] from the [[Arch User Repository|AUR]], which requires [[udev#udisks|UDisks]] if you don't already have installed. To verify udisks is already installed:<br />
$ pacman -Qi udisks<br />
<br />
== Running UDisks ==<br />
Since the libhal stub passes its calls to UDisks, UDisks should be running before you attempt to play DRM-protected Flash videos. To verify udisks is running using systemd:<br />
$ systemctl status udisks<br />
<br />
If it isn't running, run these commands to start UDisks now and enable it on future restarts:<br />
# systemctl start udisks<br />
# systemctl enable udisks<br />
<br />
= Remove Flash Player cached files =<br />
To get a fresh start after installing the package(s), remove some Flash Player cached files:<br />
<br />
$ cd ~/.adobe/Flash_Player<br />
$ rm -rf NativeCache AssetCache APSPrivateData2<br />
<br />
= See Also =<br />
* [[udev#Running_HAL]]</div>Freonmonkey