Skip to content

cachyos-drm-awaiter: New package - #1695

Open
ventureoo wants to merge 1 commit into
masterfrom
cachyos-drm-awaiter
Open

cachyos-drm-awaiter: New package#1695
ventureoo wants to merge 1 commit into
masterfrom
cachyos-drm-awaiter

Conversation

@ventureoo

Copy link
Copy Markdown
Member

It's working pretty simple, we supply systemd generator which generates drm-module-load.target in early boot time, which is guessing all necessary GPU drivers and injecting dependency to them for units that are using graphics at boot process, that is getty with autostart of some environment or display manager. This should spare us from including GPU modules in initramfs images, which makes them very bloated. On my machine with two GPUs initramfs-linux-cachyos.img currently takes 252 MiBs per-kernel, and I don't find this acceptable. After removing early kms, it takes only 17 Mb, that's significant saving.

See CachyOS/chwd#236 for more details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a package that delays graphical services until detected DRM modules load, reducing initramfs size.

Changes:

  • Adds a systemd generator for GPU module detection and ordering.
  • Adds udev rules for module tracking and SimpleDRM handoff.
  • Adds Arch package metadata and installation rules.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
cachyos-drm-awaiter/PKGBUILD Packages the generator and udev rules.
cachyos-drm-awaiter/drm-module-awaiter-generator Generates DRM module dependencies during boot.
cachyos-drm-awaiter/30-drm-awaiter.rules Tracks DRM modules and handles SimpleDRM.
cachyos-drm-awaiter/.SRCINFO Provides generated package metadata.
Suppressed comments (2)

cachyos-drm-awaiter/drm-module-awaiter-generator:66

  • Comparing a concrete modalias prefix against modinfo's wildcard alias text is not alias matching. For example, Nouveau exposes aliases such as pci:v000010DEd*..., which cannot contain the concrete device prefix stored here, so Nouveau is omitted; other wildcard aliases are affected too. Preserve the full sysfs modalias and resolve it with modprobe --resolve-alias, then check for this exact module name.
    modinfo "$module" 2>/dev/null | grep -q "$modalias" || return 1

cachyos-drm-awaiter/drm-module-awaiter-generator:109

  • On an NVIDIA-only system, modules is still empty here because nvidia_module is appended below, so the generator returns without creating any synchronization target. The linked chwd NVIDIA profiles install this package while removing the initramfs module list, making this path essential. Add NVIDIA before the empty check and ensure the single-GPU path actively loads nvidia_drm; loading the core nvidia module alone does not pull it in, so merely moving the append would otherwise cause a 10-second timeout.
    if [ -z "${modules[0]}" ]; then
        return 0
    fi

    if [ -n "$nvidia_module" ]; then

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cachyos-drm-awaiter/drm-module-awaiter-generator Outdated
Comment on lines +2 to +3
ACTION=="add", SUBSYSTEM=="module", KERNEL=="amdgpu|radeon|nvidia_drm|i915|xe|nouveau", \
TEST=="/sys/devices/platform/simple-framebuffer.0/drm/card0", RUN+="/bin/rm /dev/dri/card0"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this extremely unlikely, besides the same rule is used in Ubuntu and I haven't seen any bugs related with it.

Signed-off-by: Vasiliy Stelmachenok <ventureo@cachyos.org>
@ventureoo
ventureoo force-pushed the cachyos-drm-awaiter branch from 875ee92 to d83ab02 Compare August 9, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants