Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

elogind service starts after sound device initialization, causing permission failures

Đang mở
#135 10 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

  • #62626 của @eholzbach — đã đóng, không merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
linux
Lĩnh vực
devops, operating-systems

Hướng nghiên cứu

Bắt đầu bằng cách đọc /etc/sv/elogind/run và /usr/share/dbus-1/system-services/org.freedesktop.login1.service, sau đó kiểm tra /etc/sv/sddm/run phụ thuộc vào elogind và D-Bus như thế nào. Tái hiện trình tự khởi động và so sánh quyền của thiết bị trước và sau udevadm trigger --subsystem-match=sound. Được xem là hoàn tất khi elogind khởi động ổn định đủ sớm để các ACL của thiết bị âm thanh hoạt động, không làm hỏng SDDM hoặc tạo ra xung đột D-Bus/dịch vụ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Display Manager: SDDM
Desktop: KDE Plasma

On a fresh Void Linux installation with elogind, sound devices are created with incorrect permissions at boot, making them inaccessible to logged-in users. This occurs because elogind starts via D-Bus activation after udev has already processed sound devices.

Current Behavior:
At boot (before login):
crw------- 1 root root 116, 12 /dev/snd/controlC0

After manual udev trigger:
crw-rw----+ 1 root audio 116, 12 /dev/snd/controlC0

Void Linux ships elogind with only D-Bus activation enabled (/usr/share/dbus-1/system-services/org.freedesktop.login1.service)

No runit service is enabled by default (/var/service/elogind does not exist)

Boot sequence

  1. udev processes sound devices early in boot
  2. udev rules tag devices with uaccess (via /usr/lib/udev/rules.d/70-uaccess.rules
  3. elogind helper (/usr/libexec/elogind/elogind-uaccess-command) should set ACLs
  4. BUT elogind is not running yet (D-Bus hasn't activated it)
  5. Devices get root:root 600 permissions
    User logs in → D-Bus now activates elogind → Too late, devices already processed

Sound devices remain inaccessible until manual udevadm trigger --subsystem-match=sound

Attempted Solutions:
ln -s /etc/sv/elogind /var/service/

Service fails to start because /etc/sv/elogind/run contains sv check dbus >/dev/null || exit 1, which fails with permission errors for non-root users. Meanwhile, D-Bus still auto-activates elogind, creating a conflict.

Option 2: Disable D-Bus activation + enable service

mv /usr/share/dbus-1/system-services/org.freedesktop.login1.service
/usr/share/dbus-1/system-services/org.freedesktop.login1.service.disabled
ln -s /etc/sv/elogind /var/service/

Result: SDDM fails to start resulting in no graphical login.

Any workarounds essentially lead me to either using rc.local with sleep and retrigger of udevadm, which is frankly a very bad solution, or rewriting the /etc/sv/sddm/run which I frankly think I shouldn't be doing.

I am not sure if this is even the correct repo to report this to, but this seems like a very obscure timing bug that should be probably looked into. If i am doing something wrong or have any suggestions how to fix this please let me know.

Ngôn ngữ chính
C
Star
247
Fork
67
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của void-linux/void-runit

Tất cả issue của void-linux/void-runit

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.