Closed bambusdani closed 7 years ago
Try
amixer -q -D pulse sset Master toggle
amixer -q -D pulse sset Master 5%+
amixer -q -D pulse sset Master 5%-
Thanks, commands work fine. I can toggle the sound now expect scrolling doens't work. Is that problem related with the volume script or i3blocks in general?
Does it say the volume is changing but you don't perceive any change? Or does the block not even update? Do any of the blocks work when you scroll? What audio device are you using to play back?
The block does not update and there are no volume changes. I just found out that none of my blocks are working with scrolling when I add a simple script.
case $BLOCK_BUTTON in
4) echo "up" ;;
5) echo "down ;;
esac
audio device:
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Can you use xev
and show me the output for an up scroll and down scroll?
Up
ButtonPress event, serial 32, synthetic NO, window 0x1a00001,
root 0x2a6, subw 0x0, time 3915465, (-2,364), root:(961,387),
state 0x10, button 4, same_screen YES
ButtonRelease event, serial 32, synthetic NO, window 0x1a00001,
root 0x2a6, subw 0x0, time 3915465, (-2,364), root:(961,387),
state 0x810, button 4, same_screen YES
Down
ButtonPress event, serial 32, synthetic NO, window 0x1a00001,
root 0x2a6, subw 0x0, time 3984135, (5,145), root:(968,168),
state 0x10, button 5, same_screen YES
ButtonRelease event, serial 32, synthetic NO, window 0x1a00001,
root 0x2a6, subw 0x0, time 3984135, (5,145), root:(968,168),
state 0x1010, button 5, same_screen YES
EDIT: corrected down
That's odd. Mouse scroll events should only be ButtonRelease events, and your down event says "Button 4" which corresponds to up, not down. Are you sure that is the output that down gives?
I edited down. It was a cop&paste fail. Down is button 5
ButtonPress event, serial 32, synthetic NO, window 0x1a00001,
root 0x2a6, subw 0x0, time 3984135, (5,145), root:(968,168),
state 0x10, button 5, same_screen YES
ButtonRelease event, serial 32, synthetic NO, window 0x1a00001,
root 0x2a6, subw 0x0, time 3984135, (5,145), root:(968,168),
state 0x1010, button 5, same_screen YES
In your i3 config where you put something like
bar {
status_command i3blocks
}
can you make it
bar {
status_command i3blocks 2>~/i3blocks.err
}
then restart i3 in place with i3-msg restart
and try scrolling over your blocklets.
Then post any interesting contents of i3blocks.err
.
There is no output at all. Should there be any regardless of errors?
There would only be content if there was an error. No content means the script is completing without errors. Just to clarify, when you execute the mixer command from the command line, it works, but when you scroll with i3blocks it doesn't work?
Correct
EDIT: If I use the exact same setup on my laptop is the same problem.
Try the following in order to troubleshoot:
Make a blocklet that executes the command that doesn't work on scrolling on a click instead
Add print statements to the script that print to a file, letting you know exactly what statements are actually executed.
Actually, since none of your scripts work when scrolling, echo the value of "$BLOCK_BUTTON" and see if it corresponds to the correct value on execution.
I did echo the valeu of $BLOCK_BUTTON and it worked for every button except the scrolling part. Also, yes I can control the volume with for example left, middle and right mouseclick.
Did I already mention that the button 4 and 5 (up and down) are not recognized by i3blocks at all. Meaning when I scroll on the volume block for example I switch workspaces (maybe this is important to know).
When you echo $BLOCK_BUTTON for a scroll, does it give you the wrong answer, or no (a blank) answer?
When you scroll over the volume blocklet it switches workspaces? Or when you try to scroll over the workspaces it doesn't switch?
1) It gives me no answer (blank) when i echo $BLOCK_BUTTON for a scroll. 2) When I scroll over the volume blocket it switches workspaces
Hmm, this may not be a simple issue like I initially suspected. I'm not familiar with all the click handling code. Perhaps @vivien would be able to tell if this is an i3blocks problem or an i3wm problem.
Okay. Well thank you anyway for your help. At least I know a little bit now whats going on. I think I will try to purge everything and reinstall it just because I can maybe it works.
Hi @Mahadras
2) When I scroll over the volume blocket it switches workspaces
Can you try to disable the scroll wheel action in your bar block as mentioned in the pointer below?
Hi, it works now. What it did was kind of bizarre. First I tried to disable the scroll wheel action then I got error because the syntax 'bindsym button4 nop' wsa not supported so I had to reinstall i3 and then it worked. @vivien Thanks, you kinda solved my problem :+1: Also thanks for your help @kb100 and for staying patient.
Cram
My guess is that you had an old version of i3. We had that click detection bug (multiple, actually) which has been fixed in the meantime. The fact that the new bindsym syntax didn't work confirms that as well. The reinstall of i3 helped because you updated it by doing so.
I have a similar issue with the volume blocklet. When I mute the volume, it will mute the speaker output device. Then, when I unmute, it will unmute the PCM and master but it will not unmute the speaker output.
I have to manually go into the puvucontrol and unmute the device under "Output Devices" > Port: Speaker.
I have this or a very similar problem with the volume blocklet on gentoo, with just ALSA involved (haven't even got pulse installed.) Scrolling down immediately mutes the audio (more accurately it sets the volume to 0% rather than mute) and scrolling up immediately sets the audio output to 100%. No steps between. If i use amixer commands or alsamixer I can change volume in normal increments. Setting volume through alsamixer and then left clicking the blocklet causes it to update and display the correct value.
Hi, I've got a problem I can't fix with the volume blocket. What does work is to mute the sound. Unmute and increase/decrease volume doens't work for me. I just installed Ubuntu 14.04 and I read that alsa and pulseaudio both are installed by default and needed for Ubuntu?! I use the default volume script from vivien. My mixer is set on default (alsa). If I put the code in the command line for example: amixer -q set Master 2dB- it works amixer -q set Master toggle however mutes the sound but doens't unmute it.
So is there any problem with having alsa and pulseaudio installed at the same time? Do I have to set a default system? Maybe you got some ideas.
Mahadras