aboutsummaryrefslogtreecommitdiff
path: root/rules
Commit message (Collapse)AuthorAgeFilesLines
* Solid state drives should use noop IO elevatornonrotRichard Yao2015-08-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is often suggested that users set noop on SSDs and it turns out that udev can do this for users. Setting noop disables the IO priorization and IO reordering logic inside the kernel, but leaves front/back merging in place. This reduction in overhead should increase the number of requests sent to solid state media to the maximum possible,which is said to improve performance on SSDs. Unfortunately, few benchmarks try real world work loads with a clear cache to measure the actual difference. The benchmarks conducted by Daniel Nashed cleared the cache. They favor noop, although the workload seems somewhat unrealistic: http://blog.nashcom.de/nashcomblog.nsf/dx/linux-io-performance-tweek.htm The BFQ developers' benchmarks on SSDs appear to account for both. They show noop as being far better than CFQ and second only to BFQ, which is out of tree: https://lwn.net/Articles/600366/ In addition, I have experienced lockup-like effects on ext4 on an OCZ Vertex 2 SSD with the discard mount option enabled when recursively unlinking a subdirectory path that contains millions of files. The system was useless for hours. Setting noop allowed the unlink to finish in minutes. This is because the reordering from CFQ interleaved the TRIM command with write IOs, effectively putting barriers between them because because TRIM is a non-queued command prior to SATA 3.1. A good default should perform well in general and have the property that poor performance in the worst case scenarios is minimized. The previous examples contradict CFQ's ability to achieve that on solid state media. I believe that we should implement a udev rule to set noop on solid state media by default. It should be said that Milan Broz wrote it first, although there is only one way to write this rule in a manner consistent with the codebase: http://permalink.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/6045 It should be said that this will be a regression for those that rely on the "Block IO Controller" cgroup because it is only supported by CFQ when CONFIG_CFQ_GROUP_IOSCHED=y. My experience as a ZoL developer is that very few users rely on this behavior and consequently, I believe that the benefit from enabling this far outweighs the harm to the few that need it. Those that do need it should be able to disable this rule themselves. Container management software that expects the Block IO Controller to be supported should be modified to enable CFQ explicitly if it does not already do that. This has been tested against both a SATA mechanical drive and a SATA solid state drive. It changes the elevator to noop on the solid state drive, but does not touch it on the mechanical drive. Signed-off-by: Richard Yao <ryao@gentoo.org>
* rules: block - add dasd to whitelistKay Sievers2015-07-201-1/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Process cciss devicesCédric Delmas2015-07-201-1/+1
| | | | | | Do not skip the persistent storage rules for cciss devices Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* It's moved to the iio-sensor-proxy D-Bus service.Bastien Nocera2015-07-202-4/+0
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Revert "hwdb: add a touchpad hwdb"Peter Hutterer2015-07-202-13/+0
| | | | | | | | | | | | | | The main purpose of this hwdb was to tag touchpads that have the physical trackstick buttons wired to the touchpad (Lenovo Carbon X1 3rd, Lenovo *50 series). This hwdb is not required on kernels 4.0 and above, the kernel now re-routes button presses through the trackstick's device node. Userspace does not need to do anything. See kernel commit cdd9dc195916ef5644cfac079094c3c1d1616e4c. This reverts commit 001a247324b44c0e0b8fdba41a6fc66e7465b8b6. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: remove all power management from udevKay Sievers2015-07-202-37/+0
| | | | | | | | | | | | | | | | | | | It is not udev's task to apply any of these setting that way, or from udev rules files. Things need to be sortet out in the kernel, or explicit whitelist can possibly be added to the hardware database. Until that is sorted out, and general agreement, udev is not willing to maintain any such lists or power management settings in general. "Thanks for digging this out! I thought my Kinesis keyboard got broken and ordered a new one, only to find out that the new one doesn't work as well. I'm not sure whether we should start collecting a blacklist of keyboards which don't work with USB autosuspend, or rather a whitelist? Or revert this wholesale?" https://github.com/systemd/systemd/issues/340 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: re-add cciss rulesAlex Crawford2015-07-201-2/+3
| | | | | | | The original commit (1aff206) doesn't explain why these were removed. This adds them back since they are in fact needed. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: whitelist xvd* devicesAlex Crawford2015-07-202-2/+2
| | | | | | Xen disks need to be whitelisted as well. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Add /dev/xvd* to 60-persistent-storage whitelist Without this, systemd-udevd ↵Ed Swierk2015-07-201-1/+1
| | | | | | does not create persistent storage symlinks for xen block devices. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: Bring back persistant storage symlinks for bcacheDavid Mohr2015-07-201-1/+1
| | | | | | https://bugs.debian.org/787367 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: restore block watch after CHANGE eventsTom Gundersen2015-07-201-1/+1
| | | | | | | When processing an event, the watch is disabled, make sure it is restorted after a CHANGE event has been processed. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: fix typo in block watch ruleTom Gundersen2015-07-201-1/+1
| | | | | | | The intention was to turn this rule from using a blacklist to a whitelist, but there was a stray '!'. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* 80-net-name-slot.rules: restored for issue #117.Anthony G. Basile2015-06-022-1/+16
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: Add more firewire properties for sound, to be closer to USB and PCIAdam Goode2015-05-031-3/+6
| | | | | | | | | | | USB and PCI soundcards have a nice set of ID_* properties. It would be handy for firewire soundcards to have the same. Note that this removes the explicit setting of ID_ID in the firewire conditional. Because we are now setting ID_SERIAL, ID_ID will come from later in the file. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: Don't use ALSA card id in ID_IDAdam Goode2015-05-031-2/+2
| | | | | | | | | | | | | | | | | | | The ALSA id sysattr is generated by the sound subsystem and is not a stable identifier. It is generated though some string manipulation then made unique if there is a conflict. This means that it is enumeration-dependent and shouldn't be used for ID_ID. If ID_ID is supposed to be system-unique, it is not already since for firewire it is generated from the guid and there are broken firewire devices that have duplicate guids across devices. This is tracked for PulseAudio at https://bugs.freedesktop.org/show_bug.cgi?id=90129. This is essentially a revert of systemd ed1b2d9fc7d5c5bfe2a67b0b8ff9e5ea8694268e. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: finish incomplete renameZbigniew Jędrzejewski-Szmek2015-04-121-1/+1
| | | | | | Fixup for 51c0c2869845a058268d54c3111d55d0dd485704. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: fix tests for removable stateMatthew Garrett2015-04-121-3/+3
| | | | | | | | | We only care about whether our direct parent is removable, not whether any further points up the tree are - the kernel will take care of policy for those itself. This enables autosuspend on devices where the root hub reports that its removable state is unknown. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: builtin-keyboard: add support for EVDEV_ABS_*Anthony G. Basile2015-04-123-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parse properties in the form EVDEV_ABS_00="<min>:<max>:<res>:<fuzz>:<flat>" and apply them to the kernel device. Future processes that open that device will see the updated EV_ABS range. This is particularly useful for touchpads that don't provide a resolution in the kernel driver but can be fixed up through hwdb entries (e.g. bcm5974). All values in the property are optional, e.g. a string of "::45" is valid to set the resolution to 45. The order intentionally orders resolution before fuzz and flat despite it being the last element in the absinfo struct. The use-case for setting fuzz/flat is almost non-existent, resolution is probably the most common case we'll need. To avoid multiple hwdb invocations for the same device, replace the hwdb "keyboard:" prefix with "evdev:" and drop the separate 60-keyboard.rules file. The new 60-evdev.rules is called for all event nodes anyway, we don't need a separate rules file and second callout to the hwdb builtin. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* 50-udev-default.rules: don't run anything but REMOVE_CMD on removeHarald Hoyer2015-04-121-0/+1
| | | | | | we don't want to run usb_id and input_id on ACTION=="remove" Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: storage - support MemoryStick (non-Pro) cardsMantas Mikulėnas2015-04-121-3/+3
| | | | | | These are handled by a different driver than MemoryStick Pro. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: storage - whitelist partitioned MS & MMC devicesKay Sievers2015-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | On Mon, Mar 23, 2015 at 8:55 AM, Mantas Mikulėnas <grawity@gmail.com> wrote: > On Tue, Mar 17, 2015 at 11:50 PM, Kay Sievers <kay@vrfy.org> wrote: >> On Tue, Mar 17, 2015 at 5:00 PM, Mantas Mikulėnas <grawity@gmail.com> >> wrote: >> > Accidentally dropped in 1aff20687f4868575. >> > --- >> > rules/60-persistent-storage.rules | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> >> > +KERNEL!="loop*|mmcblk[0-9]*|mspblk[0-9]*|nvme*|sd*|sr*|vd*", >> > GOTO="persistent_storage_end" >> >> We can't do that, we need to ignore the mmc*rpmb devices: >> >> http://cgit.freedesktop.org/systemd/systemd/commit/?id=b87b01cf83947f467f3c46d9831cd67955fc46b9 >> >> Maybe "mmcblk*[0-9]" will work? > > Yeah, that would probably work (the names are like mmcblk0p1 etc.) Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: storage - don't apply rules to remove eventsTom Gundersen2015-04-121-0/+2
| | | | | | This line was accidentally lost in 52346b5f5424. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: avoid 'device/' accessesDavid Herrmann2015-04-121-1/+1
| | | | | | | | We should never access parents, as the sysfs hierarchy is in no way stable. Use KERNELS== etc. to match on a parent, then access it via $attr{} (which accesses the matching device, not the current device). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: fix input-name for keyboard rulesDavid Herrmann2015-04-121-1/+1
| | | | | | | | | | | | We match on the evdev node, but only the parent has a "name" attribute. Use $attr{device/name} to access it. This is borked since 2013, I wonder how that ever worked? Maybe this will suddenly fix all the DMI-based key detections. Thanks to Peter Hutterer for catching this! Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: keyboard - prefix "atkbd" match strings like we prefix the "name" stringsKay Sievers2015-03-181-1/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: remove unsed net rulesAnthony G. Basile2015-03-184-30/+2
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: keyboard - remove platform from comments + prefix "atkbd" match ↵Kay Sievers2015-03-181-5/+5
| | | | | | strings like we prefix the "name" strings Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: drop redundant matchDavid Herrmann2015-03-181-1/+1
| | | | | | | The 60-keyboard rules are already guared by KERNEL!="event*" bail-outs, therefore, KERNELS="input*" is always true. Drop it! Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* hwdb: support bluetooth keyboard fixupsDavid Herrmann2015-03-181-3/+0
| | | | | | | Drop the restriction not to match on bluetooth devices. They are supported just fine! Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* hwdb: convert to generic input-modalias matchesDavid Herrmann2015-03-181-2/+2
| | | | | | | | | | | | | | | | | | There is no reason to match on usb-modaliases, if we can use the input-modalias to achieve the same. This commit changes the keyboard-lookups to not be restricted to USB, but pass all modaliases to the hwdb. Furthermore, we convert all usb:* matches to input:* matches, thus getting rid of any ambiguity if multiple usb devices are chained (or a bluetooth device / etc. is on top). Note that legacy keyboard:usb:* matches are still supported, but deprecated. If possible, please use keyboard:input:* matches instead. This is a required step to make other input devices work with 60-keyboard.hwdb. Other bus-types are often chained on usb and we want to avoid any ambiguity here if we incorrectly match on a USB hub. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: merge tty and serial rules fileKay Sievers2015-03-183-21/+14
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: merge udev-late.rules filesKay Sievers2015-03-183-8/+6
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: default - remove legacy agpgartKay Sievers2015-03-181-1/+0
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: move block device rules to its own rules fileKay Sievers2015-03-183-13/+14
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: storage - relace blacklist with explicit whitelistKay Sievers2015-03-181-15/+16
| | | | | | | | | | | | | | | | Newly added kernel drivers repeatedly pass our blacklist and cause trouble for the devices, because they do not expect to be examined by udev's default rules which include blkid. This turns the blacklist into a whitelist. Device type which need support for additional symlinks need to be added to the whitelist now. Note, that the by-id, by-path symlinks are only intended for hotpluggable devices. There is no reason for exotic, or for statically configured devices to provide them. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: simplify mmc RPMB handlingv3.0Martin Pitt2015-03-011-6/+2
| | | | | | | | 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. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: Fix by-path of mmc RPMB partitions and don't blkid themMartin Pitt2015-03-011-1/+5
| | | | | | | | | | | | | | | | 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 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/udev/udev-builtin.c: remove legacy optional keymapAnthony G. Basile2015-02-111-5/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/udev/udev-builtin-kmod.c: remove the modprobe alt to kmod codeAnthony G. Basile2015-02-112-19/+1
|
* rule_generator: remove legacy codeAnthony G. Basile2015-02-111-5/+1
|
* hwdb: add a touchpad hwdbPeter Hutterer2015-02-082-0/+13
| | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: clean up stale CD drive mounts after ejectionMartin Pitt2015-02-081-0/+5
| | | | | | | | | | | | | | | | 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 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* hwdb: add rule and first entry for PS/2 micePeter Hutterer2014-12-291-0/+3
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=87037 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* hwdb: add a new db for the DPI/frequency settings of micePeter Hutterer2014-11-282-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/) Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules/50-firmware.rules: remove firmware rulesAnthony G. Basile2014-10-311-3/+0
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: remove userspace firmware loading supportKay Sievers2014-09-131-5/+0
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: import the full db on MOVE events for devices without dev_tTom Gundersen2014-09-101-2/+0
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: net-setup-link - remove stray linebreakMantas Mikulėnas2014-09-101-2/+1
| | | | | | If not backslash-escaped, it splits the rule in two. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: net-setup-link - preserve ID_NET_LINK_FILE and ID_NET_NAME after MOVETom Gundersen2014-09-101-1/+2
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: bring up to dateAnthony G. Basile2014-08-053-8/+12
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>