Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching of device names/descriptions as parsed from dmesg #3

Open
morgant opened this issue Sep 13, 2024 · 0 comments
Open

Add caching of device names/descriptions as parsed from dmesg #3

morgant opened this issue Sep 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@morgant
Copy link
Owner

morgant commented Sep 13, 2024

Currently, audio device names/descriptions are parsed from the dmesg output every time that xsndiomenu is executed. It would preferable if the device name/description mapping was stored and/or cached on disk the be more quickly retrieved when building the xsndiomenu menu options. Part of the reason for this is that dmesg only keeps a set number of output lines and so if a lot of kernel/device changes happen, it's possible for early device logs to no longer be available.

I'm thinking that the daemon (maybe xsndiomenud?) would first parse dmesg, then tail /var/log/messages and parse new lines for audio device changes. Maybe it would save device names to /var/run/xsndiomenud/ for /var/db/xsndiomenud/, which would give xsndiomenu a consistent location to fetch device names without further parsing.

Another alternative to tailing /var/log/messages would be using hotplugd(8), but would require further configuration by the user.

@morgant morgant added the enhancement New feature or request label Sep 13, 2024
@morgant morgant added this to the 0.2 milestone Sep 13, 2024
@morgant morgant self-assigned this Sep 13, 2024
@morgant morgant changed the title Caching device names/descriptions as parsed from dmesg in the case of long uptime and/or frequent connects/disconnects resulting in not being found in dmesg Add caching of device names/descriptions as parsed from dmesg Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant