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

[BUG] Volume control actually does not change the volume #258

Closed
Schievel1 opened this issue Oct 21, 2023 · 4 comments
Closed

[BUG] Volume control actually does not change the volume #258

Schievel1 opened this issue Oct 21, 2023 · 4 comments

Comments

@Schievel1
Copy link
Contributor

Describe the bug
When I raise or lower the volume in the panel the actual volume of the sound output does not change.

To Reproduce
Steps to reproduce the behavior:

  1. Lower or raise volume

Expected behavior
Volume changes

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Gentoo
hyprland 0.30.0
nwg-panel version 0.9.14

Additional context
I guess I am just missing a program to change the volume programmatically. But I don't know which. I don't use pulseaudio an my system, only pipewire. So which is nwg-panel using in this case?

@nwg-piotr
Copy link
Owner

You need either pamixer or pactl package:

def set_volume(percent):
    if nwg_panel.common.commands["pamixer"]:
        subprocess.call("pamixer --set-volume {}".format(percent).split())
    elif nwg_panel.common.commands["pactl"]:
        subprocess.call("pactl set-sink-volume 0 {}%".format(percent).split())
    else:
        eprint("Couldn't set volume, no 'pamixer' or 'pactl' found")

@Schievel1
Copy link
Contributor Author

I have pactl but when I run this command in the terminal the slider in nwg-panel changed but the volume doesn't.

I guess this has nothing todo with nwg-panel then

@nwg-piotr
Copy link
Owner

Yes, it must be a problem with your system.

@Schievel1
Copy link
Contributor Author

It on the terminal works when I use the sink 1 like this:
set-sink-volume 1 100%

So apparently my system has a sink 0 that isn't used.
Couldn't nwg-panel use the command pactl set-sink-volume @DEFAULT_SINK@ {} instead? I am by no means an expert on this, but at first glance this should cover more edge cases.

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

No branches or pull requests

2 participants