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

error: Disabling module "volume" (reason: Cannot find simple element) #491

Closed
Joshbeyer opened this issue Mar 18, 2017 · 13 comments
Closed

Comments

@Joshbeyer
Copy link

Joshbeyer commented Mar 18, 2017

I can't figure out why this isn't working.. I am running manjaro i3, i don't have pulse audio install only using ALSA. Every other application detects my audio and it works fine. I am using one of the example scripts to test this out
`[module/volume]
type = internal/volume
speaker-mixer = Speaker
headphone-mixer = Headphone
headphone-id = 9

format-volume =

label-volume = volume %percentage%%
label-volume-foreground = #ff

label-muted = sound muted
label-muted-foreground = #99ffffff

ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-volume-3 = 
ramp-volume-foreground = #9f78e1

ramp-headphones-0 = 
ramp-headphones-1 = 
ramp-headphones-foreground = #9f78e1
`

@jaagr
Copy link
Member

jaagr commented Mar 24, 2017

Could you post the output of:

$ amixer scontrols ; amixer controls

@bbaserdem
Copy link

I'm having the same issue. I have pulse audio though.

Config is;

[module/volume]
type =                          internal/volume
format-volume =                 <bar-volume>
format-volume-prefix =          " "
label-volume-foreground =       ${colors.green-light}
format-muted-prefix =           " "
format-muted-foreground =       ${colors.foreground}
label-muted =                   " 0% ○○○○○○○○○○"
bar-volume-width =              10
bar-volume-foreground-0 =       ${colors.green-dark}
bar-volume-foreground-1 =       ${colors.green-dark}
bar-volume-foreground-2 =       ${colors.green-dark}
bar-volume-foreground-3 =       ${colors.green-dark}
bar-volume-foreground-4 =       ${colors.green-dark}
bar-volume-foreground-5 =       ${colors.yellow-dark}
bar-volume-foreground-6 =       ${colors.red-dark}
bar-volume-gradient =           false
bar-volume-indicator =          
bar-volume-fill =               
bar-volume-empty =              
bar-volume-empty-foreground =   ${colors.foreground}

Output from my terminal is

--> amixer scontrols
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958',1
--> amixer controls
numid=1,iface=CARD,name='HDMI/DP,pcm=3 Jack'
numid=7,iface=CARD,name='HDMI/DP,pcm=7 Jack'
numid=2,iface=MIXER,name='IEC958 Playback Con Mask'
numid=8,iface=MIXER,name='IEC958 Playback Con Mask',index=1
numid=3,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=9,iface=MIXER,name='IEC958 Playback Pro Mask',index=1
numid=4,iface=MIXER,name='IEC958 Playback Default'
numid=10,iface=MIXER,name='IEC958 Playback Default',index=1
numid=5,iface=MIXER,name='IEC958 Playback Switch'
numid=11,iface=MIXER,name='IEC958 Playback Switch',index=1
numid=6,iface=PCM,name='ELD',device=3
numid=13,iface=PCM,name='Playback Channel Map',device=3
numid=12,iface=PCM,name='ELD',device=7
numid=14,iface=PCM,name='Playback Channel Map',device=7

@chuckmasucci
Copy link

Same here. I have ALSA and PulseAudio, and like @bbaserdem, volume works perfect everywhere else. (including i3blocks).

Here is the output of amixer scontrols ; amixer controls

▶ amixer scontrols ; amixer controls
Simple mixer control 'Master',0
Simple mixer control 'Capture',0
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'

This is the error when I run polybar

▶ polybar default
error: Disabling module "volume" (reason: No built-in support for 'internal/volume')

Finally, here is my volume config

[module/volume]
type = internal/volume
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}

format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted

bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

@jaagr
Copy link
Member

jaagr commented Mar 27, 2017

@chuckmasucci You need to rebuild polybar with alsa support.

@chuckmasucci
Copy link

@jaagr Thanks, that worked perfectly

@asymmetric
Copy link

I have polybar with alsa support enabled, but get the same error:

❯ result/bin/polybar -v
polybar 3.0.5

Features: +alsa -curl +i3 -mpd +network
❯ ./result/bin/polybar -c ~/.config/polybar/config Bar
warn: No monitor specified, using "eDP-1"
warn: The config parameter `bar/Bar.dock` is deprecated, use `bar/Bar.override-redirect` instead.
error: Disabling module "volume" (reason: Cannot find simple element)
warn: Systray selection already managed (window=0x0c0000c)
[module/volume]
type = internal/volume

format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}

format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted

bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

@jaagr
Copy link
Member

jaagr commented Apr 9, 2017

It's a different error message. It means that the module can't find a master mixer. What's the output of amixer scontrols?

@asymmetric
Copy link

asymmetric commented Apr 10, 2017

Here it is:

❯ amixer scontrols
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958',1
Simple mixer control 'IEC958',2
❯ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3232 Analog [ALC3232 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

I'm using PulseAudio btw.

Thanks for taking the time.

@asymmetric
Copy link

Fixed it by looking at this. Ran amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" and used its output:

master-mixer = IEC958

🎉

@x70b1 x70b1 mentioned this issue Apr 15, 2017
@anchnk
Copy link

anchnk commented May 29, 2017

I am also having this issue:

❯ polybar -c ~/.config/polybar/config main-top
error: Disabling module "volume" (reason: Cannot find simple element)

If i do remove the headphone-* lines it works again.

[module/volume]
type = internal/volume

master-soundcard = default
speaker-soundcard = default
headphone-soundcard = default

headphone-mixer = Headphone
headphone-id = 16

mapping = true

format-volume = <ramp-volume> <label-volume>%
format-muted = <label-muted>
label-volume = %percentage%
label-muted =  muted
label-muted-foreground = #aaa
format-volume-padding = 2
format-muted-padding = 2

ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-headphones-0 = 
❯ polybar -v
polybar 3.0.5-17-g2e8cc7f

Features: +alsa +curl +i3 +mpd +network
❯ amixer controls
numid=21,iface=CARD,name='HDMI/DP,pcm=3 Jack'
numid=27,iface=CARD,name='HDMI/DP,pcm=7 Jack'
numid=33,iface=CARD,name='HDMI/DP,pcm=8 Jack'
numid=15,iface=CARD,name='Headphone Jack'
numid=13,iface=CARD,name='Internal Mic Phantom Jack'
numid=14,iface=CARD,name='Mic Jack'
numid=16,iface=CARD,name='Speaker Phantom Jack'
numid=11,iface=MIXER,name='Master Playback Switch'
numid=10,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Headphone Playback Switch'
numid=1,iface=MIXER,name='Headphone Playback Volume'
numid=42,iface=MIXER,name='PCM Playback Volume'
numid=9,iface=MIXER,name='Mic Boost Volume'
numid=7,iface=MIXER,name='Capture Switch'
numid=6,iface=MIXER,name='Capture Volume'
numid=22,iface=MIXER,name='IEC958 Playback Con Mask'
numid=28,iface=MIXER,name='IEC958 Playback Con Mask',index=1
numid=34,iface=MIXER,name='IEC958 Playback Con Mask',index=2
numid=23,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=29,iface=MIXER,name='IEC958 Playback Pro Mask',index=1
numid=35,iface=MIXER,name='IEC958 Playback Pro Mask',index=2
numid=24,iface=MIXER,name='IEC958 Playback Default'
numid=30,iface=MIXER,name='IEC958 Playback Default',index=1
numid=36,iface=MIXER,name='IEC958 Playback Default',index=2
numid=25,iface=MIXER,name='IEC958 Playback Switch'
numid=31,iface=MIXER,name='IEC958 Playback Switch',index=1
numid=37,iface=MIXER,name='IEC958 Playback Switch',index=2
numid=5,iface=MIXER,name='Auto-Mute Mode'
numid=18,iface=MIXER,name='Beep Playback Switch'
numid=17,iface=MIXER,name='Beep Playback Volume'
numid=8,iface=MIXER,name='Internal Mic Boost Volume'
numid=12,iface=MIXER,name='Mute-LED Mode'
numid=4,iface=MIXER,name='Speaker Playback Switch'
numid=3,iface=MIXER,name='Speaker Playback Volume'
numid=20,iface=PCM,name='Capture Channel Map'
numid=19,iface=PCM,name='Playback Channel Map'
numid=26,iface=PCM,name='ELD',device=3
numid=39,iface=PCM,name='Playback Channel Map',device=3
numid=32,iface=PCM,name='ELD',device=7
numid=40,iface=PCM,name='Playback Channel Map',device=7
numid=38,iface=PCM,name='ELD',device=8
numid=41,iface=PCM,name='Playback Channel Map',device=8
❯ amixer scontrols
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Speaker',0
Simple mixer control 'PCM',0
Simple mixer control 'Mic Boost',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958',1
Simple mixer control 'IEC958',2
Simple mixer control 'Beep',0
Simple mixer control 'Capture',0
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Internal Mic Boost',0
Simple mixer control 'Mute-LED Mode',0

@010penetrator
Copy link

010penetrator commented Nov 29, 2017

Official wiki helped me to solve this issue.
Needed to add such line to config:
master-soundcard=hw:1

@patrick96
Copy link
Member

I'm going to close this. There should now be ample information on the wiki on how to resolve issues with the volume module. If there still are problems, please create a new issue

@spatialdreams
Copy link

Fixed it by looking at this. Ran amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" and used its output:

master-mixer = IEC958

tada

Sorry, I don't understand how this solved the issue.
My amixer controls outputs the same IEC958 that yours does. Adding "master-mixer: IEC958" to my polybar config file under the module/volume section does not resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants