Skip to content

Include missing path in broken module messages - #607

Open
hopsayer wants to merge 3 commits into
dkms-project:mainfrom
hopsayer:broken-status-show-path
Open

hopsayer wants to merge 3 commits into
dkms-project:mainfrom
hopsayer:broken-status-show-path

Conversation

@hopsayer

@hopsayer hopsayer commented Sep 27, 2026 •

Copy link
Copy Markdown

Note

This PR also adds endeavouros to the distro case in run_test.sh (a one-line, unrelated change). EndeavourOS uses the same Arch-style module layout, so it shares the existing arch case. Happy to split it into a separate PR if preferred.

What this does

When DKMS reports a module as broken, the error message now shows the
path it tried to check, plus a short two-line hint about the next step.

Before:

Error! nvidia/565.57.01 is broken!
Missing the source directory or the symbolic link pointing to it.
Manual intervention is required!

After:

Error! nvidia/565.57.01 is broken!
Missing the source directory or the symbolic link pointing to it:
/var/lib/dkms/nvidia/565.57.01/source
Manual intervention is required!
If this module version is no longer needed, you can remove the stale directory.
Otherwise, reinstall the package that provides its source.

The hint deliberately avoids phrasing like "clear this folder", since that
could be read as an invitation to rm -rf on a system directory. It names
both real outcomes without being prescriptive.

Why

Diagnosing a broken DKMS module currently requires guessing which path is
missing and what to do about it. A real-world example is an nvidia-dkms
module left behind after a kernel update; the message gives no clue about
the source of the problem.

Changes

  • dkms.in: 4 call sites updated (module_is_broken_and_die, do_status,
    run_match, autoinstall).
  • run_test.sh: expected output updated for all 10 broken-status test
    blocks, plus endeavouros added to the distro case (it uses the same
    Arch-style module layout, so tests can run there too).

Testing

./run_test.sh passes on EndeavourOS with kernel 7.2.7-zen1-1-zen:

*** All tests successful :)

Notes

Happy to drop the two hint lines and keep just the path if maintainers
prefer a terser message. The hint is isolated in the same string
continuation in dkms.in, so removing it is a two-line change.

Fixes: #606
Related: #357, #94

When a module is broken, print the path DKMS tried to check
($dkms_tree/<module>/<version>/source) instead of leaving the user
to guess.

Related: dkms-project#606, dkms-project#357, dkms-project#94
EndeavourOS uses the same Arch-style module layout, so it can share
the existing 'arch' case.
After printing the missing path, suggest the two real options:
remove the stale entry, or reinstall the source. The phrasing avoids
'clear this folder' to not encourage blind rm -rf on a system dir.

Happy to drop this hint if maintainers prefer a terser message.
@scaronni scaronni self-assigned this Sep 28, 2026
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.

Include missing path in broken status and Manual intervention required messages

2 participants