summaryrefslogtreecommitdiff
path: root/rules
AgeCommit message (Collapse)Author
2015-02-13rules: simplify mmc RPMB handlingMartin Pitt
We don't actually want a by-path/ symlink for MMC RPMB devices, so just add them to the blacklist. This will prevent creating wrong by-path links and blkid'ing those.
2015-02-13rules: Fix by-path of mmc RPMB partitions and don't blkid themMartin Pitt
Linux 3.10+ exposes RPMB (Replay Protected Memory Block) partitions of MMC devices [1] ; trying to read them with blkid or other unspecific means will cause kernel buffer I/O errors and timeouts. So don't run blkid on these. Also ensure that /dev/disk/by-path creates proper symlinks and exposes the -rpmb partition separately, instead of letting the "normal" partition symlink point to the rpbm device (this is a race condition). [1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=090d25fe224c0 https://launchpad.net/bugs/1333140
2015-01-29hwdb: add a touchpad hwdbPeter Hutterer
Currently used to tag devices in the new Lenovo *50 series and the X1 Carbon 3rd. These laptops re-introduced the physical trackpoint buttons that were missing from the *40 series but those buttons are now wired up to the touchpad. The touchpad now sends BTN_0, BTN_1 and BTN_2 for the trackpoint. The same button codes were used in older touchpads that had dedicated scroll up/down buttons. Input drivers need to work around this and thus know what they're dealing with. For the previous gen we introduced INPUT_PROP_TOPBUTTONPAD in the kernel, but the resulting mess showed that these per-device quirks should really live in userspace. The list currently includes the X1 Carbon 3rd PNPID, others will be added as get to know which PNPID they have.
2015-01-28rules: clean up stale CD drive mounts after ejectionMartin Pitt
Ejecting a CD with the hardware drive button only causes a change uevent, but the device node stays around (just without a medium). Pick up these uevents and mark the device as SYSTEMD_READY=0 on ejection, so that systemd stops the device unit and consequently all mount units on it. On media insertion, mark the device as SYSTEMD_READY=1 again. https://bugs.freedesktop.org/show_bug.cgi?id=72206 https://bugzilla.opensuse.org/show_bug.cgi?id=909418 https://bugs.archlinux.org/task/42071 https://bugs.launchpad.net/bugs/1168742
2015-01-15udev: merge evdev_id into input_idDavid Herrmann
There is no reason to keep both separated. We want to avoid API specific tools and instead keep generic terms like 'input'.
2015-01-11udev: Add builtin/rule to export evdev information as udev propertiesCarlos Garnacho
This rule is only run on tablet/touchscreen devices, and extracts their size in millimeters, as it can be found out through their struct input_absinfo. The first usecase is exporting device size from tablets/touchscreens. This may be useful to separate policy and application at the time of mapping these devices to the available outputs in windowing environments that don't offer that information as readily (eg. Wayland). This way the compositor can stay deterministic, and the mix-and-match heuristics are performed outside. Conceivably, size/resolution information can be changed through EVIOCSABS anywhere else, but we're only interested in values prior to any calibration, this rule is thus only run on "add", and no tracking of changes is performed. This should only remain a problem if calibration were automatically applied by an earlier udev rule (read: don't). v2: Folded rationale into commit log, made a builtin, set properties on device nodes themselves v3: Use inline function instead of macro for mm. size calculation, use DECIMAL_STR_MAX, other code style issues v4: Made rule more selective v5: Minor style issues, renamed to a more generic builtin, refined rule further.
2014-12-24hwdb: add rule and first entry for PS/2 micePeter Hutterer
https://bugs.freedesktop.org/show_bug.cgi?id=87037
2014-11-27hwdb: add a new db for the DPI/frequency settings of micePeter Hutterer
Pointer acceleration for relative input devices (mice, trackballs, etc.) applies to the deltas of the device. Alas, those deltas have no physical reference point - a delta of 10 may be caused by a large movement of a low-dpi mouse or by a minute movement of a high-dpi mouse. Which makes pointer acceleration a bit useless and high-dpi devices essentially unusable. In an ideal world, we could read the DPI from the device directly and work with that. In the world we actually live in, we need to compile this list manually. This patch introduces the database, with the usual match formats and a single property to be set on a device: MOUSE_DPI That is either a single value for most mice, or a list of values for mice that can change resolution at runtime. The exact format is detailed in the hwdb file. Note that we're explicitly overshooting the requirements we have for libinput atm. Frequency could be detected in software and we don't actually use the list of multiple resolutions (because we can't detect when they change anyway). However, we might as well collect those values from the get-go, adding/modifying what will eventually amount to hundreds of entries is a bit cumbersome. Note: we rely on the input_id builtin to tag us as mouse first, ordering of the rules is important. (David: fixed up typos and moved hwdb file into ./hwdb/)
2014-11-21units: make sure rfkill service is bount to the actual hardwareLennart Poettering
2014-10-07/proc/sys prefixes are not necessary for sysctl anymoreZbigniew Jędrzejewski-Szmek
2014-09-09udev: import the full db on MOVE events for devices without dev_tTom Gundersen
2014-09-08rules: net-setup-link - remove stray linebreakMantas Mikulėnas
If not backslash-escaped, it splits the rule in two.
2014-09-08rules: net-setup-link - preserve ID_NET_LINK_FILE and ID_NET_NAME after MOVETom Gundersen
2014-09-01rules: remove firmware loading rulesZbigniew Jędrzejewski-Szmek
blueness> poettering, was there a reason for not removing 50-firmware.rules when you nuked userland firmware loading? Followup for v216-119-gbe2ea723b1.
2014-07-31rules: allow systemd to manage loop device partitionsKevin Wells
SYSTEMD_READY is currently set to 0 for all loop devices (loop[0-9]*) that do not have a backing_file. Partitioned loop devices (ex. loop0p1), however, are matched by this rule and excluded by systemd even though they are active devices. This change adds an additional check to the rule, ensuring that only top level loop devices (loop[0-9]+$) are excluded from systemd.
2014-07-15rules: consistently use "?*" instead of "*?"Kay Sievers
2014-06-27rules: don't enable usb pm for Avocent devicesTom Hirst
The Avocent KVM over IP devices doesn't work correctly with USB power management enabled.
2014-06-18rules: add loop-control and btrfs-control to "disk" groupKay Sievers
2014-06-12udev: assign group "input" to all input devicesKay Sievers
2014-06-11udev: stop using "floppy" groupKay Sievers
2014-05-26udev: keyboard - also hook into "change" eventsKay Sievers
Re-apply the keymaps when "udevadm trigger" is called. Hooking into "add" only would just remove all keymap content from the udev database instead of applying the new config.
2014-03-24rules: update qemu hid rulesGerd Hoffmann
Update comment to be a bit more specific. Change match to blacklist the serial number of the broken devices instead of whitelisting the serial number of the fixed devices. This allows to do something useful with the serial number in the future.
2014-03-13getty: Start getty on 3270 terminals available on Linux on System zHendrik Brueckner
Add the first 3270 terminal device that is associated with the Linux preferred console to the list of virtualization consoles. This is required to automatically start a getty if the conmode=3270 kernel parameter is specified for Linux on z/VM instances. Note that a queued upstream patch also enable the 3270 terminal device if it is associated with the Linux preferred console. How To successfully start agetty on a 3270 terminal, a change in the agetty parameter order is required. Previously, agetty would started like this: /sbin/agetty --keep-baud 3270/tty1 115200,38400,9600 TERM The agetty program interprets the "3270/tty1" as baud rate and fails to start with the "bad speed: 3270/tty1" error message. Fixing this in agetty is more complex rather than reordering the command line parameters like this: /sbin/agetty --keep-baud 115200,38400,9600 3270/tty1 TERM According to agetty sources and "agetty --help", agetty accepts the "tty", "baudrate tty", and "tty baudrate" specifications. P.S. The "tty: Set correct tty name in 'active' sysfs attribute" introduces a change to display the terminal device which is associated with the Linux preferred console. This change helps to let systemd handle this particular case only. Without the changes of this commit, no additional 3270 terminal device can be managed by systemd. https://git.kernel.org/cgit/linux/kernel/git/gregkh/tty.git/commit/?id=723abd87f6e536f1353c8f64f621520bc29523a3
2014-03-11gpt-auto-generator: rename root device node symlink to /dev/gpt-auto-rootLennart Poettering
Before it was placed in /dev/disk/by-id, which makes it a bit too much API. However, it's mostly an implementation detail for now, hence move it out of the stable block device dir.
2014-03-10rules: mark loop device as SYSTEMD_READY=0 if no file is attachedPeter Rajnoha
Check existence of loop/backing_file in sysfs and mark loop devices with SYSTEMD_READY if missing. Such loop files is uninitialized and it's not ready for use yet (there's no file attached).
2014-03-07udev: automatically create a symlink /dev/disk/by-id/gpt-auto-root if ↵Lennart Poettering
there's a suitable root partition
2014-02-27udev/rules: setup tty permissions and group for sclp_line, ttysclp and 3270/ttyLukas Nykryn
2014-02-21udev: net_setup - import ID_NET_DRIVERTom Gundersen
This will do until all net properties are imported.
2014-02-17doc: update punctuationJan Engelhardt
Resolve spotted issues related to missing or extraneous commas, dashes.
2014-02-05udev: add zram to the list of devices inappropriate for symlinksJóhann B. Guðmundsson
udev seems to have a race condition with swapon to see which can open /dev/zram0 first, causing swapon to fail. Seems to be most noticeable on arm devices one out of every 7 times or something.
2014-01-31s390/getty-generator: initialize essential system terminals/consolesHendrik Brueckner
Ensure to start getty programs on all essential system consoles on Linux on System z. Add these essential devices to the list of virtualization_consoles to always generate getty configurations. For the sake of completion, the list of essential consoles is: /dev/sclp_line0 - Operating system messages applet (LPAR) /dev/ttysclp0 - Integrated ASCII console applet (z/VM and LPAR) /dev/ttyS0 - Already handled by systemd (3215 console on z/VM) /dev/hvc0 - Already handled by systemd (IUCV HVC terminal on z/VM) Depending on the environment, z/VM or LPAR, only a subset of these terminals are available. See also RH BZ 860158[1] "Cannot login via Operating System Console into RHEL7 instance installed on a LPAR". This bugzilla actually blocks the installation of Linux on System z instances in LPAR mode. [1] https://bugzilla.redhat.com/show_bug.cgi?id=860158
2014-01-03rules: drivers - do not reset RUN listKay Sievers
2013-11-03rules: simply 60-drm.rulesDavid Herrmann
We don't need any GOTO, if we merge all matches into a single line.
2013-11-03rules: load path_id on DRM devicesDavid Herrmann
The path_id-builtin provides useful unique aliases for DRM devices. If we want to configure DRM render-nodes for compositors, we want to avoid storing the whole sys-path in configuration files. Hence, allow users to store the short PATH_ID instead. Load path_id-builtin unconditionally on DRM devices now to always provide this alias.
2013-10-30udev: link-config - let udevd set the ifnameTom Gundersen
2013-10-29udev: builtin - rename net_link to net_setup_linkTom Gundersen
Also add shell completions.
2013-10-28udev: link-config - move naming policy from udev rulesTom Gundersen
This introduces a new key NamePolicy, which takes an ordered list of naming policies. The first successful one is applide. If all fail the value of Name (if any) is used. The possible policies are 'onboard', 'slot', 'path' and 'mac'. This patch introduces a default link file, which replaces the equivalent udev rule.
2013-10-26udev: add network link configuration toolTom Gundersen
This tool applies hardware specific settings to network devices before they are announced via libudev. Settings that will probably eventually be supported are MTU, Speed, DuplexMode, WakeOnLan, MACAddress, MACAddressPolicy (e.g., 'hardware', 'synthetic' or 'random'), Name and NamePolicy (replacing our current interface naming logic). This patch only introduces support for Description, as a proof of concept. Some of these settings may later be overriden by a network management daemon/script. However, these tools should always listen and wait on libudev before touching a device (listening on netlink is not enough). This is no different from how things used to be, as we always supported changing the network interface name from udev rules, which does not work if someone has already started using it. The tool is configured by .link files in /etc/net/links/ (with the usual overriding logic in /run and /lib). The first (in lexicographical order) matching .link file is applied to a given device, and all others are ignored. The .link files contain a [Match] section with (currently) the keys MACAddress, Driver, Type (see DEVTYPE in udevadm info) and Path (this matches on the stable device path as exposed as ID_PATH, and not the unstable DEVPATH). A .link file matches a given device if all of the specified keys do. Currently the keys are treated as plain strings, but some limited globbing may later be added to the keys where it makes sense. Example: /etc/net/links/50-wireless.link [Match] MACAddress=98:f2:e4:42:c6:92 Path=pci-0000:02:00.0-bcma-0 Type=wlan [Link] Description=The wireless link
2013-10-21rules: remove pointless MODE= settingsKay Sievers
Changing the default MODE= for the group accessi, but not specifying a GROUP= does not provide anything. It disables the default logic that the mode switches to 0660 as soon as a GROUP= is specifed, which make custom rules uneccesarily complicated. https://bugs.freedesktop.org/show_bug.cgi?id=70665
2013-10-16rules: don't limit some of the rules to the "add" actionLennart Poettering
Devices should show up in systemd regardless whether the user invoked "udevadm trigger" or not. Before this change some devices might have suddenly disappeared due issuing that command.
2013-10-16rules: expose loop block devices to systemdLennart Poettering
Since the kernel no longer exposes a large number of "dead" loop devices it is OK to expose them now in systemd, so let's do that. This has the benefit that mount dependencies on loop devices start to work.
2013-10-14backlight: include ID_PATH in file names for backlight settingsLennart Poettering
Much like for rfkill devices we should provide some stability regarding enumeration order, hence include the stable bits of the device path in the file name we store settings under.
2013-10-14rfkill: use ID_PATH as identifier for rfkill state filesLennart Poettering
Let's include the stable device path for the rfkill devices in the name of the file we store the rfkill state in, so that we have some stability regarding enumeration order.
2013-10-14rfkill: add new rfkill tool to save/restore rfkill state across rebootsLennart Poettering
This works analogous to the existing backlight and random seed services
2013-10-14backlight: always prefer "firmware"/"platform" backlights over "raw" ↵Lennart Poettering
backlights if we have both for the same device
2013-10-11Add support for saving/restoring keyboard backlightsBastien Nocera
Piggy-backing on the display backlight code, this saves and restores keyboard backlights on supported devices. The detection code matches that of UPower: http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c#n173 https://bugs.freedesktop.org/show_bug.cgi?id=70367 [tomegun: also work for devices named "{smc,samsung,asus}::kbd_backlight"]
2013-08-14backlight: instead of syspath use sysname for identifying backlight devicesLennart Poettering
This makes the description string of the backlight service a bit nicer.
2013-08-14backlight: add minimal tool to save/restore screen brightness across rebootsLennart Poettering
As many laptops don't save/restore screen brightness across reboots, let's do this in systemd with a minimal tool, that restores the brightness as early as possible, and saves it as late as possible. This will cover consoles and graphical logins, but graphical desktops should do their own per-user stuff probably. This only touches firmware brightness controls for now.
2013-08-0180-net-name-slot.rules: only rename network interfaces on ACTION=="add"Harald Hoyer
Otherwise systemd-udevd will rename on "change" and "move" events, resulting in weird renames in combination with biosdevname systemd-udevd[355]: renamed network interface eth0 to em1 systemd-udevd[355]: renamed network interface eth1 to p3p2 systemd-udevd[357]: renamed network interface eth0 to p3p1 systemd-udevd[429]: renamed network interface p3p2 to ens3f1 systemd-udevd[428]: renamed network interface p3p1 to ens3f0 systemd-udevd[426]: renamed network interface em1 to enp63s0 or systemd-udevd[356]: renamed network interface eth0 to em1 systemd-udevd[356]: renamed network interface eth0 to p3p1 systemd-udevd[420]: renamed network interface p3p1 to ens3f0 systemd-udevd[418]: renamed network interface em1 to enp63s0 systemd-udevd[421]: renamed network interface eth1 to p3p1
2013-07-21rules: net, tty description - ask hwdb explicitly for pci dataKay Sievers