The officially official Devuan Forum!

You are not logged in.

#1 2025-01-11 18:39:50

cade
Member
Registered: 2020-12-24
Posts: 9  

XBell (beep) muted or disabled on Xorg (daedalus)

hello!

today I upgraded my chimaera machine to the latest daedalus.

for my surprise, audible beep in Xorg via the pc speaker was muted or disabled somehow,
so bash will not alert in my rxvt, neither xterm nor gnome-terminal. even Firefox does
not beep on failed Ctrl+F search, f.e.

I tried everything:

xset b
xinput set bell-style audible
checked /dev/input links (seem correct)
pcspkr kernel module is loaded
xkbbell
xkbevd to check if XkbBellNotify fires (it fires but nothing audible)
apt purged pulseaudio and pipewire to avoid notification capture
...

strangely, beep works in text mode consoles (i.e. before running Xorg...)

has anyone noticed this? it is pretty annoying if you got used to beeps smile

I'd appreciate any ideas what to check next or how to fix this?

UPDATE: looks like using DM enables the beep (slim,xdm,lightdm...) but when not using one, just startx, it disappears...

thank you and have a great new year!
Vladi.
--

Last edited by cade (Yesterday 12:50:51)

Offline

#2 2025-01-11 19:28:33

greenjeans
Member
Registered: 2017-04-07
Posts: 701  
Website

Re: XBell (beep) muted or disabled on Xorg (daedalus)

Well I guess every DE is different and I don't know what you're using, but currently in my Mate install of daedalus, it's in the menu.
system>>preferences>>hardware>>sound, and the GUI that pops up has a little checkbox at the bottom for enabling system sounds.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded 12/24!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#3 2025-01-11 20:13:55

RedGreen925
Member
Registered: 2024-12-07
Posts: 46  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

hello!

today I upgraded my chimaera machine to the latest daedalus.

for my surprise, audible beep in Xorg via the pc speaker was muted or disabled

Distributions have taken to black listing the pcspkr module as it some kind of inconvenience to be alerted to potential problems, the noise offends their sensibilites.

To get your beep in the console back.
https://askubuntu.com/questions/19906/beep-in-shell-script-not-working

edit the /etc/modprobe.d/blacklist.conf and comment out the black listing of
the pcspkr module.

# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr

Put a # in front of the blacklist pcspkr and on next boot the module should load. A modprobe pcspkr as root or using sudo in front should load it and have it available without the reboot.

Offline

#4 2025-01-11 20:28:31

steve_v
Member
Registered: 2018-01-11
Posts: 403  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

checkbox at the bottom for enabling system sounds.

"system sounds" are not the same as the dedicated PC speaker bell.

@cade: We are talking about the old-school hardware PC speaker, not some soundcard emulation, right?
Is the pcspkr module loaded, and does 'beep' work? Do you have an appropriate evdev link (i.e. /dev/input/by-path/platform-pcspkr-event-spkr)?

You're not the first to ask after this here, see this thread.


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#5 2025-01-11 20:44:27

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

@cade: We are talking about the old-school hardware PC speaker, not some soundcard emulation, right?
Is the pcspkr module loaded, and does 'beep' work? Do you have an appropriate evdev link (i.e. /dev/input/by-path/platform-pcspkr-event-spkr)?

@steve_v: yes, good plain pc speaker. nothing to do with soundcard, which I keep muted on the amp usually.
* yes, I have proper link in /dev
* also set bell-style audible in xinput
* pcspkr is loaded, tried to unload/load even without effect

but! console (text mode) beep works!
also 'beep' command in rxvt terminal beeps but I think this has nothing to do with X bell notify event (i.e. gui apps and terms)

I will check the thread you linked, thanks! I also suspect the bell handling is routed through the sound subsystem somewhere or muted, but still have no much progress of alsa/pulse/etc. digging...

I even had brief look at X sources... but this will be last resort smile)

thanks!

Offline

#6 2025-01-11 21:39:06

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

@RedGreen925: sorry, forgot to mention that I already checked that and console (text mode) beep works fine. just X ignores the bell events, well, at least audible...

@greenjeans: I don't use any DE, just X with window manager (icewm), so the problem is somewhere in the Xorg, not in apps (DEs). I even did try to run clean X without my xinitrc configuration (which is a lot) and still no beeps...

pretty strange, it worked fine for the last 25 years smile

Last edited by cade (2025-01-12 11:05:23)

Offline

#7 2025-01-11 21:48:43

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

Each terminal emulator has its own code to handle keyboard input and character output/display. Some of them have configurable properties to "re-enable" audible bell and some don't.

Offline

#8 2025-01-11 21:59:56

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

@ralph.ronnquist: it is not terminal problem, they properly send XBell notifications, I can see them in xkbevd. I did check rxvt, xterm and gnome-terminal. The problem still exists and with X gui apps like Firefox, it beeps when you search for something which is not found on the current page... i.e. not beeping in my case smile

Last edited by cade (2025-01-11 22:00:51)

Offline

#9 2025-01-11 22:32:58

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

Yes, you're right. The XkbBellNotify event is generated but nothing handles it to make the noise.

Offline

#10 2025-01-12 04:42:35

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

I looked into this a bit and found a fair few ducks to line up before it worked both in console and Xorg.

For bell sound by the "xkbbell" command I needed to

  • add a special "InputClass" configuration snippet that tells Xorg to use the "kbd" module (from xserver-xorg-input-kbd) for the "PC Speaker" device;

  • configure Xorg to bell with 50% volume rather than 0%, and

  • enable loopback for the sound card.

My special configuration snippet /etc/X11/xorg.conf.d/pcspkeaker.conf is

Section "InputClass"
	Identifier  "PC Speaker"
	MatchProduct "PC Speaker"
	Driver      "kbd"
EndSection

You can use the "lsinput" command (from input-utils) to verify the name (i.e. the MatchProduct string) of the device. You also need to restart Xorg for loading the snippet.

The Xorg bell volume would be raised with an "xset" xommand:
# xset b 50

Loopback enabling might also be a command:

$ amixer sset 'Loopback Mixing' Enabled

though the actuals of that does depend on the soundcard; use a plain "amixer" command and guess from that.

I also needed that loopback enabling to hear a console bell.

Offline

#11 2025-01-12 09:26:05

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

hi ralph and thanks for looking into this!

I tried your suggestion but it didn't work hmm

also I think pc speaker should not be handled by kbd driver (which also strangely was not installed here "xserver-xorg-input-kbd", not sure if was upgrade glitch) because it ruined my keyboard mapping, all arrows/pgup/dn keys appear entirely different (not the keymap).

removed the driver line from xorg.conf and restarted, now I have this:

[  1385.287] (II) config/udev: Adding input device PC Speaker (/dev/input/event7)
[  1385.287] (**) PC Speaker: Applying InputClass "PC Speaker"
[  1385.287] (II) No input driver specified, ignoring this device.

I also have 3 sound cards, one on the mb, which has loopback mixing, one usb audigy, which has only master vol and a strange hdmi interface.
I managed to set amixer -c2 sset 'Loopback Mixing' Enabled and xset b 50 but still no success sad

installed back pulseaudio and pipewire if they handle somewhere something but nothing happens.

a whole lot of ducks and few monsters around smile

I believe it should be evdev problem, beep command says

$ beep --verbose
beep: Verbose: evdev driver_detect 0x55e45ecdb700 (nil)
beep: Verbose: b-lib: opened /dev/input/by-path/platform-pcspkr-event-spkr as 3
beep: Verbose: beep: using driver 0x55e45ecdb700 (name=evdev, fd=3, dev=/dev/input/by-path/platform-pcspkr-event-spkr)
beep: Verbose: 1 times 200 ms beeps (100 ms delay between, 0 ms delay after) @ 440 Hz
beep: Verbose: evdev driver_begin_tone 0x55e45ecdb700 440
beep: Verbose: evdev driver_end_tone 0x55e45ecdb700
beep: Verbose: evdev driver_end_tone 0x55e45ecdb700
beep: Verbose: evdev driver_fini 0x55e45ecdb700

and it works. but maybe X does not use the same interface? I don't know how to debug evdev/eudev channels...

I wasted nearly day and a half already so I'm thinking to get fresh install on separate machine (I have lenovo tiny around) so I can see if it is install or upgrade glitch (or both).

thanks again!

Last edited by cade (2025-01-12 11:06:04)

Offline

#12 2025-01-12 11:07:01

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

However wrong it is, the PC Speaker appears as an input device and is handled by the kbd module, or more specifically, Xorg looks for a keyboard device that handles bell. I think the idea is that the XBell event is actually like a KeyPress event and should be handled along the keyboard event handling path.

In any case, the kbd module is the only device handler for "bell" I've been able to find. You could also try the "evdev" module as driver. Xorg doesn't really care, but "libinput" doesn't recognise the "PC Speaker" device, so no driver gets installed.

I'm not sure how that could affect the "real" keyboard handling. The short of it is that Xorg has to install a driver for that device in order to use it.

The device, /dev/inputevent7 for you, is linked up by udev as /dev/input/by-path/platform-pcspkr-event-spkr (which you will find is a symbolic link to ../event7), and that's thus the same destination character device. But the missing link is for Xorg to install a (keyboard) driver that would have interest in the bell event(s).

EDIT: actually if you could share your Xorg.0.log with me, e.g. upload it to https://transfer.rrq.au so I could havea glance and maybe get some inspiration.... Xorg.0.log is found in either /var/log/ (if Xorg is run as root) or in ~/.local/share/xorg/ if Xorg is run by non-root user). Or email it to me.

Offline

#13 2025-01-12 11:49:46

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

yes, kbd driver seems to be proper way since, afaik, the bell/buzzer was initially attached to the physical keyboards back then. I will try again with kbd but keys mapping goes crazy.

platform-pcspkr-event-spkr symlink is correct, I checked permissions, groups, etc. all looks fine...

I'll send you the log, thanks!

Last edited by cade (2025-01-12 12:17:03)

Offline

#14 2025-01-12 17:17:55

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

aaah &*#%... fresh install works fine. it is upgrade glitch sad

Last edited by cade (2025-01-12 17:19:50)

Offline

#15 Yesterday 08:24:01

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 267  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

thanks for letting thread visitors know that this was another "upgrade versus fresh-install" conundrum.

while i humbly and respectfully acknowledge that not _everyone_ is able to do a fresh-install(whether from lacking hardware and/or skills and/or willingness), nevertheless a fresh install is by far best.

should this be a poem or haiku?


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#16 Yesterday 12:35:04

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

@stargate-sg1-cheyenne-mtn: you are right, you should stick to haiku. smile

Offline

#17 Yesterday 12:38:06

cade
Member
Registered: 2020-12-24
Posts: 9  

Re: XBell (beep) muted or disabled on Xorg (daedalus)

and I was wrong, fresh install doesn't help.
however DM enables the beep for some reason, but I'm not using one.
still chimaera works fine so there must be some kind of difference in firing the X session...

Offline

Board footer