Ubuntu

Ubuntu Oneric Volume Step Can Not be Changed

Reported by Josh Burghandy on 2011-10-09
412
This bug affects 96 people
Affects Status Importance Assigned to Milestone
gnome-settings-daemon (Ubuntu)
Low
Unassigned

Bug Description

Changing the volume step in gconf-editor does not do anything when adjusting the volume on a hardware dial.
---
ApportVersion: 1.23-0ubuntu3
Architecture: i386
DistroRelease: Ubuntu 11.10
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110413)
Package: gnome-settings-daemon 3.2.0-0ubuntu5
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Tags: oneiric running-unity
Uname: Linux 3.0.0-12-generic i686
UpgradeStatus: Upgraded to oneiric on 2011-10-08 (3 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare vboxusers

Sam_ (and-sam) wrote :

Please integrate from gconf2
/apps/gnome_settings_daemon/volume_step
in Oneiric dconf gsettings.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed

@Josh Burghandy
On the affected machine, please open a Terminal window (Ctrl+Alt+T) and run this command:
apport-collect 871133
After doing so, please verify that information was automatically attached to this bug report and that the "apport-collected" tag was automatically added (please do *not* manually add it yourself). If this is the case, then you can go ahead and change this bug's status back from Incomplete to Confirmed. The automatically attached information should hopefully make this report complete enough to be worked on by a developer.

@Sam_
Was there additional information you had wanted attached as well? You may want to clarify your request from https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/871133/comments/1.

tags: added: oneiric
Changed in gnome-settings-daemon (Ubuntu):
status: Confirmed → Incomplete

apport information

tags: added: apport-collected running-unity
description: updated
Josh Burghandy (kid1000002000) wrote :

done.

Changed in gnome-settings-daemon (Ubuntu):
status: Incomplete → Confirmed

ApportVersion: 1.23-0ubuntu3
Architecture: i386
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110921.2)
NonfreeKernelModules: fglrx
Package: gnome-settings-daemon 3.2.0-0ubuntu5
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic-pae 3.0.4
Tags: oneiric running-unity
Uname: Linux 3.0.0-12-generic-pae i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

apport information

Sam_ (and-sam) wrote :

Addendum to #1
Screenshot of volume_step in gconf from Natty.

Sam_ (and-sam) wrote :

Which is missing in Oneiric gconf and dconf. (screenshots) I've searched gconf for 'volume' and 'daemon' which didn't reveal any key value 'volume_step', dconf unfortunately can't be searched like gconf (another missing feature, but that's another bug story).

Sam_ (and-sam) wrote :
Josh Burghandy (kid1000002000) wrote :

Rolling on the sound icon with my touchpad causes smaller increases in the volume step, although I am constantly fighting to get it to simply increase the volume instead of popup the entire window.
Using the manual volume control wheel on the front of my toshiba laptop, the volume step goes back to the really big steps.

Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Low
beef zbeef (zbeefy) wrote :

Isn't there another solution to this? I mean, it has to be set by some kind of key/property, right? What's controlling it, if not the key from gconf? I'm being affected too; really liked when it worked.

Erik S (ofenfisch) wrote :

I found a workaround :D
With the command, you can control the volume: amixer set Master 1- (lower), amixer set Master 1+ (higher)
This commands can be set for the special keys you want: System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts
Here you have to create two new entries: 1. Name: VolumeUp, Command: amixer set Master 2+ (I think '1' is too slow for change). The second one for VolumeDown. Then set the key for running this command by clicking on the line and type, scroll or whatever you want to use for volume-control.

The only thing which don't work is the quick-notifying (this bubble in the top-right corner) which shows the change of the volume.
But now it works smooth as hell :)

Josh Burghandy (kid1000002000) wrote :

Thanks Erik. When using headphones, I really consider this a safety hazard as it is very easy to have the volume turned up too lout, too fast.

Josh Burghandy (kid1000002000) wrote :

zbeefy, apparently the volume step is hard coded.

Axel Pospischil (apos) wrote :

This is really really anoying because I am using 11.10 as multimedia pc as well (mythtv). Using the standard volume control via the infrared control, it is not possible to adjust a proper volume - especially when watching TV in the evening.

To remove this option in gconf without given a proper alternative is not acceptable. It really should not be such a big thing to add a dconf option for this feature.

Just my 2 cents ;)

Axel Pospischil (apos) wrote :

I temporarily could solve according to #13, but using "xbindkeys"according to this thread: https://wiki.archlinux.org/index.php/Xbindkeys . As stated above the on screen display for audio is then not visible any more! I like this solution more, because it does not depend on the gui you are using (unity, cinnamon, ...)

"xbindkeys" uses "dB"-steps by default. But you also could use "1%+/-" to toggle the sound.

Be aware that it does not toggle your pulseaudio volume. The "maximum" pulse sound level you can adjust using the "audio settings" dialog.

You can check everything running "alsamixer" in a terminal and the "audio settings" dialog.

I also added the amixer commands to my .lirc configuration.

Steps to reproduce:

1. Install xbindkeys and graphical configuration program (last not really needed for this scenario)

 sudo apt-get install xbindkeys xbindkeys-config

2. Edit a configuration file

gedit ~/.xbindkeysrc

# Increase volume
"amixer set Master playback 1+"
    m:0x0 + c:123
    XF86AudioRaiseVolume

# Decrease volume
"amixer set Master playback 1-"
    m:0x0 + c:122
    XF86AudioLowerVolume

# Toggle mute - this is not used here
#"amixer set Master toggle"
# m:0x0 + c:121
# XF86AudioMute

3. Add "xbindkeys" to the programs that should be started after login

Olle Hassel (olle-ohassel) wrote :

Thanks Axel for finding it!

But I want to see that nice OSD to know how high the volume is so my search continued but then I found this neat shellscript: http://askubuntu.com/questions/12766/adjust-volume-via-commandline-so-that-volume-notify-pops-up

So I changed your ~/.xbindkeysrc so that it posts the volume with the nice notify-OSD also.

It's an ugly hack but hey, it works =)

///////////////////////////////////

gedit ~/.xbindkeysrc

/////

# Increase volume
#"amixer set Master playback 1+"
"sh ~/.volumeHack.sh up -i 2% -m Master"
    m:0x0 + c:123
    XF86AudioRaiseVolume

# Decrease volume
"sh ~/.volumeHack.sh down -i 2% -m Master"
    m:0x0 + c:122
    XF86AudioLowerVolume

# Toggle mute - this is not used here
#"amixer set Master toggle"
# m:0x0 + c:121
# XF86AudioMute

///////////////////////////////////

gedit ~/.volumeHack.sh

//////

#!/bin/sh

usage="usage: $0 -c {up|down|mute} [-i increment] [-m mixer]"
command=
increment=5%
mixer=Master

while getopts i:m:h o
do case "$o" in
    i) increment=$OPTARG;;
    m) mixer=$OPTARG;;
    h) echo "$usage"; exit 0;;
    ?) echo "$usage"; exit 0;;
esac
done

shift $(($OPTIND - 1))
command=$1

if [ "$command" = "" ]; then
    echo "usage: $0 {up|down|mute} [increment]"
    exit 0;
fi

display_volume=0

if [ "$command" = "up" ]; then
    display_volume=$(amixer set $mixer $increment+ unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi

if [ "$command" = "down" ]; then
    display_volume=$(amixer set $mixer $increment- unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi

icon_name=""

if [ "$command" = "mute" ]; then
    if amixer get Master | grep "\[on\]"; then
        display_volume=0
        icon_name="notification-audio-volume-muted"
        amixer set $mixer mute
    else
        display_volume=$(amixer set $mixer unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
    fi
fi

if [ "$icon_name" = "" ]; then
    if [ "$display_volume" = "0" ]; then
        icon_name="notification-audio-volume-off"
    else
        if [ "$display_volume" -lt "33" ]; then
            icon_name="notification-audio-volume-low"
        else
            if [ "$display_volume" -lt "67" ]; then
                icon_name="notification-audio-volume-medium"
            else
                icon_name="notification-audio-volume-high"
            fi
        fi
    fi
fi
notify-send " " -i $icon_name -h int:value:$display_volume -h string:synchronous:volume

/////////////////////

beef zbeef (zbeefy) wrote :

Nothing yet on this? Where is it hard-coded? If anyone can point me in a direction I'll scour the grounds.

Olivier Leduc (neogalael) wrote :

I tried the work-around, but when I do next on rhythmbox, it sets Master to 0 and raises PCM volume meaning that I need to set volume for each song I listen to

Marc G. (marc-gu) wrote :

This bug is still present in Ubuntu Precise...

Olle Hassel (olle-ohassel) wrote :

As of now in Precise the workaround has stopped working. Right now I'm using an uglier but working solution:

Download and install pulseaudio-equalizer from the repos, and then make an EQ preset where you reduce the volume on all frequencies by some amount, say 12-24 db. What you do is that you will reduce the maximum volume possible thus making each volume step affect the volume less in turn giving you more headroom to play with.

Josh Burghandy (kid1000002000) wrote :

Problem confirmed on my end.

Josh Burghandy (kid1000002000) wrote :

Unfortunately, this link (https://bugzilla.gnome.org/show_bug.cgi?id=650371) shows that devs are unwilling to fix this problem. It's unfortunate, as this problem can cause both hearing and audio equipment damage.

Josh Burghandy (kid1000002000) wrote :

Edit- that came off a little harsh, sorry about that. Maybe we could figure out what needs to be done to fix this in the correct way? Does anybody have suggestions on where a good place to start would be? I'm not a great programmer (yet), but it would be great to see what the right way to fix this issue would be....?

Olle Hassel (olle-ohassel) wrote :

I just looked a bit at the source and how hard to fix should depend on how nice a solution you want. If you only want to change the number of steps it should be enough to change their hardcoded line:

#define VOLUME_STEP 6 /* percents for one volume button press */

to say 2.

Ideally though would be to make it configurable such that VOLUME_STEP is like before in gnome2 is externally configurable.

The problem though is that the Gnome viewpoint is flawed since they have built it for embedded sound systems where the usable volume is from 0% up to 100% but if you use an external sound system then this is usually not the case but rather 20-30 % might me maximum.

Joonas Saarinen (jza) wrote :

On HP laptops which have the capacitive volume adjustment strip, changing volume is very racy.

You probably cannot expect the hard-coded +/- 6% to create a good experience on all systems.

Bruno Dantas (bdantas) wrote :

I have an HP laptop and, indeed, the volume steps are so large that after I've decreased the volume just 3 or 4 clicks from maximum, I can no longer hear anything. The weird thing is that even though I can't hear anything and I can see that the Master volume in alsamixer is zero, the volume notification bar is close to maximum. Ugly.

It would be nice if volume_step were availalbe in gconf or mate-conf. In the meantime, I found an elegant workaround...

I was looking for a solution where I'd have BOTH reasonable volume steps AND the nice volume notification bar. I tried many things and went around in circles. This is the only solution that gave me both:

1. In a terminal, type alsamixer then increase Master volume to maximum

2. Change the volume button behavior to control PCM volume rather than Master by editing the /etc/pulse/default.pa and changing this line:
# load-module module-alsa-sink
to this:
load-module module-alsa-sink control=PCM

3. restart

Now the volume buttons control PCM. The steps are nice and the volume bar shows up normally.

Woop woop! Confirmed on Ubuntu 12.04!
After the restart did something funny as I tried to turn the volume down to 0 and then I lost everything.
Run alsamixer again and check for any "MM" label below any channel. This means the channel is muted. Hit m on keyboard to turn "MM" to "00" (means open=working). Once I did this I could turn the volume from my keyboard from all the way down to 0 to 100%.

Thanks bdantas a LOT !!!

For those who are not afraid of compiling gnome-settings-daemon themselves, have a look at this:
https://bugzilla.gnome.org/show_bug.cgi?id=650371#c42

I'm afraid the people there seem to be ignoring that patch though.

Krzysztof Dryja (cih997) wrote :

Ubuntu 13.10, Gnome-Shell 3.10.2.1 problem still exists (1 step = 10% change on mouse scroll) and is extremely annoying. Volume step should be configurable or at least less than 10%.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.