~ruther/guix-local

ref: 42f7d1c9aeb281861817505fbb500e598b40be24 guix-local/gnu/packages/patches/eudev-removable-devices-polling.patch -rw-r--r-- 1.7 KiB
42f7d1c9 — Sharlatan Hellseher gnu: python-asyncgui: Move to python-graphics. 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Upstream-status: https://github.com/systemd/systemd/pull/37336
Upstream-status: https://github.com/eudev-project/eudev/pull/294

The existing rule would only be effective when the block drivers are compiled
as modules as opposed to being builtin.  On some systems such as Guix System,
the 'sr_mod' driver for optical discs is builtin the kernel instead of a
module, and the absence of polling means there are no uevents emitted for
udisks to act on.

This change was originally contributed to Debian by Martin Pitt to fix
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713877>, later removed as it
was deemed no longer needed.  It appears still useful on eudev and elogind
systems like Guix System and others.

* rules.d/60-block.rules: Apply kernel polling to all removable devices instead
of just those of the block category handled by a kernel module.
---
 rules.d/60-block.rules | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rules.d/60-block.rules b/rules.d/60-block.rules
index c3bf32eb83..cc1eb7055e 100644
--- a/rules/60-block.rules
+++ b/rules/60-block.rules
@@ -1,8 +1,7 @@
 # do not edit this file, it will be overwritten on update
 
 # 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"
 
 # forward scsi device event to corresponding block device
 ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"

base-commit: 0e0d3ed93a4e816f8ca5efb3760ceb640fea11bc
-- 
2.49.0