X11 audible bell is disabled by muffin, but nothing replaces it when audible-bell is false
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 245
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
Distribution
Debian 12 (bookworm); also reproducible on current Debian testing/unstable
Package version
Cinnamon 5.6.8 / muffin 5.6.4 (the code is unchanged in 6.6.x and in current master)
Graphics hardware in use
Not relevant (X11 session, any hardware)
Frequency
Always
Bug description
On X11 muffin turns off the X server's audible bell at startup, in
src/x11/meta-x11-display.c:
/* We are playing sounds using libcanberra support, we handle the
* bell whether its an audible bell or a visible bell */
XkbChangeEnabledControls (x11_display->xdisplay,
XkbUseCoreKbd,
XkbAudibleBellMask,
0);
But muffin only plays a bell of its own when
org.cinnamon.desktop.wm.preferences audible-bell is true, and that key
defaults to false. With the default settings the bell is therefore simply
gone: the X/hardware beep is disabled by the window manager, and nothing is
played in its place.
This is a change from Cinnamon 4.8, where meta_bell_init() only called
XkbSelectEvents(..., XkbBellNotifyMask, ...) and left the X audible bell
enabled, so the beep worked out of the box.
There is a fallback that looks like it should cover exactly this case, in
src/x11/events.c:
if (!meta_bell_notify (display, window) &&
meta_prefs_bell_is_audible ())
{
/* Force a classic bell if the libcanberra bell failed. */
XkbForceDeviceBell (...);
}
but it can never run: bell_audible_notify() in src/core/bell.c returns TRUE
unconditionally, without checking whether the sound was actually played, and it
is only reached when audible-bell is already true.
Steps to reproduce
- Log into a Cinnamon X11 session with default settings (
audible-bellfalse). - Open a terminal and run
echo -e '\a'. - Nothing is heard — no sound file, and no PC speaker beep either (the pcspkr
module being loaded makes no difference). - Setting
audible-bellto true (System Settings > Accessibility > "Enable
audio alerts") makes muffin play its own bell sound, confirming where the
behaviour comes from.
Expected behavior
Either the X audible bell is left enabled when muffin is not going to play a
bell itself, or bell_audible_notify() reports the real outcome so that the
existing XkbForceDeviceBell() fallback can do its job.
Additional information
Reported in Debian as https://bugs.debian.org/1036121, after an upgrade from
Cinnamon 4.8 to 5.6.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the bell flow through src/x11/meta-x11-display.c, src/x11/events.c, and src/core/bell.c, starting with the X11 startup control change and the terminal reproduction command. Compare the default audible-bell=false path with the enabled path and verify the existing fallback's return-value assumptions. Done means the default X11 session produces an audible bell without breaking the configured audio-alert behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100