After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738639 - Allow to configure / set the bell volume (currently either 0 or 50)
Allow to configure / set the bell volume (currently either 0 or 50)
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: Rui Matos
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-16 14:46 UTC by Daniel Hahler
Modified: 2019-03-20 11:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.34 KB, patch)
2014-10-16 14:48 UTC, Daniel Hahler
none Details | Review

Description Daniel Hahler 2014-10-16 14:46:43 UTC
gnome-settings-daemon does not allow to set the volume of the keyboard bell.

Although KEY_BELL_VOLUME is defined, it isn't used:

    #define KEY_BELL_VOLUME    "bell-volume"

The volume is derived as follows:

    bell_volume   = (bell_mode == GSD_BELL_MODE_ON) ? 50 : 0;

Ref: https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/keyboard/gsd-keyboard-manager.c#n298


The following patch should fix this (untested):

    diff --git i/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in w/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
    index f1d1648..2d94659 100644
    --- i/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
    +++ w/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
    @@ -91,6 +91,9 @@
         <key name="bell-duration" type="i">
           <default>100</default>
         </key>
    +    <key name="bell-volume" type="i">
    +      <default>50</default>
    +    </key>
         <key name="bell-custom-file" type="s">
           <default>''</default>
           <summary>Keyboard Bell Custom Filename</summary>
    diff --git i/plugins/keyboard/gsd-keyboard-manager.c w/plugins/keyboard/gsd-keyboard-manager.c
    index 58972e0..db60da0 100644
    --- i/plugins/keyboard/gsd-keyboard-manager.c
    +++ w/plugins/keyboard/gsd-keyboard-manager.c
    @@ -295,7 +295,11 @@ apply_bell (GsdKeyboardManager *manager)
             bell_duration = g_settings_get_int   (settings, KEY_BELL_DURATION);

             bell_mode = g_settings_get_enum (settings, KEY_BELL_MODE);
    -        bell_volume   = (bell_mode == GSD_BELL_MODE_ON) ? 50 : 0;
    +        if (bell_mode == GSD_BELL_MODE_ON) {
    +            bell_volume = g_settings_get_int (settings, KEY_BELL_VOLUME);
    +        } else {
    +            bell_volume = 0;
    +        }

             /* as percentage from 0..100 inclusive */
             if (click_volume < 0) {
Comment 1 Daniel Hahler 2014-10-16 14:48:36 UTC
Created attachment 288693 [details] [review]
Patch
Comment 2 Bastien Nocera 2014-10-16 15:04:10 UTC
This shouldn't change anything, because the bell event is captured by pulseaudio, and pulseaudio generates the event. This is controlled by the sound effects volume in the sound panel.

Could you explain what you're trying to achieve here?
Comment 3 Daniel Hahler 2014-10-17 20:55:01 UTC
After `xset b 100` the bell is louder than after `xset b 50`.

I am using this pulseaudio config, and it's what gets played.

    load-sample-lazy x11-bell /usr/share/sounds/gnome/default/alerts/glass.ogg
    load-module module-x11-bell sample=x11-bell

This is on Ubuntu 14.04 with gnome-settings-daemon 3.8.6.1-0ubuntu11.2.
Comment 4 Daniel Hahler 2014-10-17 20:56:43 UTC
While the sound panel controls the overall volume, this allows to control the relative volume of the bell itself.
Comment 5 Rui Matos 2014-10-20 09:11:20 UTC
I don't know about Ubuntu, but the way it works upstream is that you can adjust the "Alert volume" in Settings > Sound > Sound Effects, which is then handled by pulseaudio.

So, what are you trying to fix here?
Comment 6 GNOME Infrastructure Team 2019-03-20 11:18:57 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/254.