Re: Beep on Backspace in Console Sessions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I do know that some systems produce a beep using the soundcard.
I just tried installing an Open Media Vault ISO into a VM, it is a Debian rebuild, and although the startup beep was the only hope of accessibility there, I was surprised when I heard the beep, because my Intel NUC does not have a speaker for that, so it was sent through the soundcard.
I didn't know that this was ever done.
But I hadn't noticed the missing sound when I backspaced to the wall, but I sure miss it. I guess I figured it was the particular system I was using, but that sound can tell us a lot, like if we are in an edit field or actually made it to a terminal, when we can't tell if we even booted.
Glenn
----- Original Message ----- From: "Joseph C. Lininger" <joe@xxxxxxxxxx>
To: "Janina Sajka" <janina@xxxxxxxxxxx>; <speakup@xxxxxxxxxxxxxxxxx>
Sent: Saturday, May 27, 2023 3:59 AM
Subject: Re: Beep on Backspace in Console Sessions


Hi Janina,
First, unfortunately, I don't have a definite answer to your question. I wish I did, as this is a question I myself would like answered. I am going to provide some additional information here though, including a possible fix. If you aren't interested, feel free to use the delete key.

That beep on backspace functionality is actually a function of the shell working in conjunction with the kernel code. More specifically, if you press the backspace key and you are at the beginning of the line, the shell sends an alert character to the controlling terminal, in this case your console. That should, if things are working right, result in a beep from the PC speaker or maybe a sound from the sound card speakers depending on your hardware and on what's loaded in the kernel.

The shell (bash specifically) is still doing this. I verified this by connecting remotely to a Linux server using Windows, then purposely backspacing at the beginning of a line. Sure enough, I got an alert. In fact, I got the same one as what I get if I purposely print an alert character to the terminal. I also booted my PC into Linux and verified that if I print an alert character to the terminal, nothing happens. Also nothing if I backspace in the terminal, which was exactly what I expected.

I mentioned all of this for a couple of reasons. First, if this isn't working, it isn't just the beep on backspace functionality that is disabled. The ability for shell scripts to provide audible alerts and such is also less functional; now they have to play an audio file or something like that instead of just sending an alert to the controlling terminal. There are problems with that approach, which I won't go into here. Pretty much any tool that would use the PC speaker for some reason can't do so.

Second, there may be a fix. Some laptop hardware actually can act on PC speaker signals. The sound would come through the regular laptop speakers. I believe to do this you use the regular PC speaker kernel code, I.E. the pcspkr module. You may need to set parameters on the sound card as well; amixer should give you a clue as to what needs changing. You might have to set a control to on, unmute a control, and/or increase a control's volume. Failing that, do you know if the snd_pcsp code has been removed entirely or is it just disabled in your distribution's stock kernel? Could you perhaps recompile your kernel to put the module back?
Joe

On 5/27/2023 2:42 AM, Janina Sajka wrote:
Dear All:

I'm wondering whether it's still supported in alsa?

Yes, in ancient history, with speakers in the computer case just for a
beep on backspace, the old pcskpr module did the trick.

Then those speakers disappeared, but alsa-lib gave us an snd-beep module
(as I recall). I'm not finding that module these days, and I'm wondering
wheter it's just not getting compiled for some reason? Or has it really
been dropped.

I know most fot the sighted world hates that beep on backspace. That's
partly why it's quite hard to google for this question. I don't mind if
it's off by default, but it should be something those of us who find it
beneficial should be able to turn on, imo.

Anyone know.

Janina








[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]

  Powered by Linux