Hey all,

udev's 60-persistent-storage.rules enables in-kernel polling if
"block" is built as a module. But that doesn't work if it is built
into the kernel, as done by Debian and Ubuntu (for efficiency, as
pretty much everyone will need it). This causes CD drive eject buttons
to not work (see the linked bugs).

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
From daa826169c1cef081da50c0127ad9311fe93de8a Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.p...@ubuntu.com>
Date: Sat, 26 Apr 2014 16:43:35 +0200
Subject: [PATCH] Set default polling interval on removable devices as well

The events_dfl_poll_msecs rule will not trigger if "block" is not a module, but
built in. This will avoid udisks etc. having to poll from userspace, and
provide proper ejection when the hardware eject button is pressed.

Bug-Debian: https://bugs.debian.org/713877
Bug-Ubuntu: https://launchpad.net/bugs/890592
---
 rules/60-persistent-storage.rules | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 475b151..40b4eb9 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -10,6 +10,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
 
 # enable in-kernel media-presence polling
 ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}=="0", ATTR{parameters/events_dfl_poll_msecs}="2000"
+ACTION=="add", ATTR{removable}=="1", ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2000"
 
 SUBSYSTEM!="block", GOTO="persistent_storage_end"
 
-- 
1.9.1

Attachment: signature.asc
Description: Digital signature

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to