Repository navigation
sof-top: notify user when local kernel devices are missing or inaccessible - #10
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Polling permission notices remain hidden from CLI and headless output, and unavailable SysFS/DebugFS selections produce misleading connection errors.
2 open issues
What changed in this PR
Adds diagnostics for missing or inaccessible local SOF interfaces across the backend, CLI, and GTK/headless UI.
Changes:
- Separates non-fatal notices from telemetry errors.
- Adds CDEV fallback when automatic SysFS/DebugFS discovery fails.
- Displays device warnings and explains ignored power-management options.
| File | Description |
|---|---|
sof-top/sof-top-cli |
Prints connection and ignored-option warnings to stderr. |
sof-top/sof-top |
Adds warnings to GTK status/tooltips and headless output. |
sof-top/backend.py |
Expands interface diagnostics, separates notices, and adds automatic CDEV fallback. |
Review effort: Balanced
lgirdwood
marked this pull request as ready for review
December 4, 2026 15:50
…sible Surface clear warnings and status messages across backend probing, CLI (sof-top-cli), and GTK4 UI (sof-top) whenever either /dev/sof-dsp0 or SOF DebugFS/SysFS is absent or lacks permissions: - backend.probe_local_sof_device(): check /dev/sof-dsp0 accessibility (R_OK|W_OK) alongside DebugFS/SysFS presence and emit explicit 'warning' / 'reason' diagnostics for missing or inaccessible devices. - backend.LocalCdevBackend: track non-fatal device notices in 'last_note' without polluting 'last_error' on healthy read-only/cdev connections, auto-fallback to /dev/sof-dsp0 in 'auto' mode when SysFS/DebugFS are absent, and provide clearer errors when explicit /dev/sof-dsp* fails. - sof-top-cli & sof-top --render-png: print backend 'last_note' as a stderr WARNING and warn explicitly when --wake / --hold-d0 is ignored in read-only mode. - sof-top GTK4 UI: include missing/inaccessible device notices in the Local Device dropdown tooltip, disabled PM button tooltips, status bar connection banner, and polling status bar Note field. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
pushed a commit
that referenced
this pull request
Dec 4, 2026
- backend.py: Report unavailable SysFS/DebugFS clearly and suggest --local /dev/sof-dsp0 or --local auto when only CDEV is present, set last_note/last_error on CDEV polls, initialize RemoteTcpBackend.last_note, and add shared emit_new_backend_notes() helper. - sof-top-cli, sof-top: Emit newly discovered polling permission notes (e.g. fw_regs/exception EACCES) once to stderr via emit_new_backend_notes() while keeping last_error for failures. - sof-top/tests/test_local_device_notices.py: Add unit tests covering local device probing, CDEV fallback/errors, and polling note dedup. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
force-pushed
the
feat/sof-top-local-device-notices
branch
from
December 4, 2026 15:53
091c0eb to
d237e1c
Compare
- backend.py: Report unavailable SysFS/DebugFS clearly and suggest --local /dev/sof-dsp0 or --local auto when only CDEV is present, set last_note/last_error on CDEV polls, add RemoteTcpBackend.last_note, and add shared emit_new_backend_notes() helper. - sof-top-cli, sof-top: Emit newly discovered polling permission notes (e.g. fw_regs/exception EACCES) once to stderr via emit_new_backend_notes() while keeping last_error for failures. - sof-top/tests/test_local_device_notices.py: Add unit tests covering local device probing, CDEV fallback/errors, and polling note dedup. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
force-pushed
the
feat/sof-top-local-device-notices
branch
from
December 4, 2026 15:53
d237e1c to
273c33d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds clear user-facing diagnostics across
sof-top(GTK4 UI + headless render),sof-top-cli, andbackend.pywhenever either local SOF kernel interface (/dev/sof-dsp0vs SOF DebugFS/sys/kernel/debug/sof+ PCI/ALSA SysFS) is absent or inaccessible:probe_local_sof_device):/dev/sof-dsp0accessibility (R_OK | W_OK) alongside DebugFS and PCI/ALSA SysFS discovery.warningandreasonmessages for partial or completely missing local interfaces (missing/dev/sof-dsp0, permission-denied/dev/sof-dsp0, missing/unmounted DebugFS, permission-denied DebugFS, or SysFS/DebugFS absent).LocalCdevBackend):last_noteso healthy read-only/CDEV telemetry keepssummary.last_error == ""insof-top-cli.automode fallback to/dev/sof-dsp0when SysFS/DebugFS discovery returns false but/dev/sof-dsp0exists./dev/sof-dsp*open failure messages with hints when SysFS/DebugFS is available.sof-top-cli) & UI (sof-top):WARNING:tostderrinsof-top-cliandsof-top --render-png(keepingstdoutJSON clean).stderrwhen--wakeor--hold-d0is ignored in read-only mode.sof-topGTK4 UILocal Devicedropdown tooltip, disabled PM button tooltips, connection status banner, and polling status barNote:.Verification
make -C sof-top check(py_compile) passes./dev/sof-dsp0+--wake,/dev/sof-dsp0-onlyautofallback, permission-denied DebugFS/cdev, both interfaces present cleanly, UI headless render warnings, and missing explicit/dev/sof-dsp99).sof-arl-s): verified non-sudo--wakeread-only warning, missing/dev/sof-dsp99error, andsudo --local /dev/sof-dsp0 --wakefull CDEV telemetry.