Skip to content

volume: avoid logging error while detecting pulseaudio#157

Merged
kgilmer merged 1 commit intoregolith-linux:masterfrom
mpareja:patch-2
May 18, 2025
Merged

volume: avoid logging error while detecting pulseaudio#157
kgilmer merged 1 commit intoregolith-linux:masterfrom
mpareja:patch-2

Conversation

@mpareja
Copy link
Contributor

@mpareja mpareja commented May 18, 2025

The volume script attempts to detect pulseaudio by calling pactl. On machines without pactl installed, the detection generates a steady stream of noise in the logs, journalctl --follow shows:

regolith-session-x11[4037999]: /usr/share/i3xrocks/scripts/volume: line 38: pactl: command not found

Closes #154.

@kgilmer
Copy link
Member

kgilmer commented May 18, 2025

Hi @mpareja , thanks for the fix and clear description. Looking at the script, I wonder if pactl is an optional or required dependency. The script looks to me like it's required, and if so, I suggest this fix instead, which simply requires that the package providing pactl is installed as well ~

diff --git a/debian/control b/debian/control
index fb287fd..04b4252 100644
--- a/debian/control
+++ b/debian/control
@@ -140,7 +140,8 @@ Package: i3xrocks-volume
 Architecture: any
 Depends: ${misc:Depends},
     regolith-i3xrocks-config,
-    alsa-utils
+    alsa-utils,
+    pulseaudio-utils
 Description: Indicator to show volume.
  An i3xrocks indicator for showing the current sound volume.

LMK what you think :)

@mpareja
Copy link
Contributor Author

mpareja commented May 18, 2025

From what I can tell, pactl is only used to detect which device to manipulate using amixer (which is a required dependency). I don't think we should require installing the pulse audio tools.

@kgilmer kgilmer self-assigned this May 18, 2025
Copy link
Member

@kgilmer kgilmer left a comment

Choose a reason for hiding this comment

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

LGTM

@kgilmer kgilmer merged commit 98fba35 into regolith-linux:master May 18, 2025
7 checks passed
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.

i3xrocks-volume: "pactl: command not found"

2 participants