GNOME Bugzilla – Bug 738639
Allow to configure / set the bell volume (currently either 0 or 50)
Last modified: 2019-03-20 11:18:57 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) {
Created attachment 288693 [details] [review] Patch
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?
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.
While the sound panel controls the overall volume, this allows to control the relative volume of the bell itself.
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?
-- 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.