Beep on console missing

I have an Acer TravelMate P2 laptop ... and I miss the console beep.

After readings manuals, handbook and playing with nid pins, reading kernel source I made the following test.

I used the usb memstick image (11.2) for boot on this and a similar control system.
Boot uefi, set verbose mode in the boot menu and select live... from the menu.
After login I ran the command 'sysctl hw.snd.verbose=4' and saved dmesg, sndstat, mixer ...etc outputs.

On the control system the command 'mixer igain 2' switches on the console bell with
a message like 'Setting amplifier nid=12 index=1 in mute=0/0 vol=0/0'.
On this laptop the same command does not switch on console bell and I see no message.

Booting on this laptop from harddisk (installed with the same memstick some weeks ago)
where 'hw.snd.verbose=4' is set in /etc/sysctl.conf
I can see lot of 'Setting amplifier nid=12 ...' messages during boot:
hdaa0: Setting amplifier nid=12 index=0 in mute=0/0 vol=0/0
hdaa0: Setting amplifier nid=12 index=1 in mute=1/1 vol=0/0
hdaa0: Setting amplifier nid=12 index=0 in mute=0/0 vol=0/0
hdaa0: Setting amplifier nid=12 index=1 in mute=1/1 vol=0/0
hdaa0: Setting amplifier nid=12 index=1 in mute=1/1 vol=0/0

The pin configuration status seems to be the same as on the control system, the Mic has differnt nid.
So, I assume the status after boot is the same, but somehow the 'mixer igain 2' does not trigger
an unmute on this laptop.

Sound is otherwise working, I can play music. Headphone switch and noise does not matter now.

How can I patch my system to have beep on console?
 

Attachments

Are you sure that the sound is emitted by the console?

What are you doing that you expect a beep?

The bell is controlled by the console driver you are using, syscon(4) or vt(4)

Rich (BB code):
hw.syscons.bell=1
kern.vt.enable_bell=1

To test, in the console try, printf "\7" or spkrtest
 
After setting igain to something nonzero I press backspace... that should work
as well the mentioned printf '\7' or echo -e '\a'
and after sudo kldload speaker and sudo chmod g+w /dev/speaker
echo 'ec' > /dev/speaker

I have FreeBSD 11.2, booting from uefi, vt by default, and bell is on by default:
Code:
$ sysctl -a | grep bell
kern.vt.enable_bell: 1
hw.syscons.bell: 1
 
You miss the beep produced by the backspace of the keyboard, try kbdcontrol -b normal

What you are trying to do, should be activated by default, does the /dev/speaker file exist by default (no kldload speaker)?

Do you hear something with beep -d /dev/pcm0?
 
Running kbdcontrol does not help.
The speaker module iss not loaded by default and there is no /dev/speaker device, only after kldload speaker.

I have installed beep for the test, with the recommended configs.
I have no /dev/pcm0, using default device:
Code:
# beep -v
frequency: 800Hz   duration: 5ms   device: /dev/speaker
silence
 
I can play music, so somethig is working, but
echo 'ec' > /dev/speaker should give the sounds like the printf '\7' also the beep
and there is nothing
 
I can play music, so somethig is working, but
echo 'ec' > /dev/speaker should give the sounds like the printf '\7' also the beep
and there is nothing
What I think is that you don't have /dev/speaker because your laptop does not have physically a speaker, more info in "console speaker device driver" speaker(4)

The beep should be redirected to the sound card and for the content of your dmesg, it may be in mute
Code:
pcm0: <Realtek ALC255 (Internal Analog)> at nid 20 and 18 on hdaa0
pcm0: Speaker/Beep Volume (OSS: speaker): -34/12dB
pcm0:    +- ctl  9 (nid  11 in   4): -34/12dB (32 steps) + mute
pcm0:    +- ctl 11 (nid  12 in   1): mute
pcm0:    +- ctl 34 (nid  35 in   4): mute
pcm0:    +- ctl 35 (nid  35 in   5): mute
pcm0: Mixer "speaker":

pcm1: <Realtek ALC255 (Front Analog Headphones)> at nid 33 on hdaa0
pcm1: Speaker/Beep Volume (OSS: speaker)
pcm1:    +- ctl 13 (nid  13 in   1): mute
 
As I mentioned in #1, I have this laptop and an older one where beep works.
Booting from the same USB with memstick 11.2 "Live CD" on these systems the kernel is the same, config is the same.
What is different is BIOS/UEFI (I used uefi boot on both) and the hardware itself.
There is no /dev/speaker after boot, the two systems show the same, except on changing igain makes beep working on that and nothing on this.
 
Sorry for repeating
I used the usb memstick image (11.2) for boot on this and a similar control system.
Boot uefi, set verbose mode in the boot menu and select live... from the menu.
After login I ran the command 'sysctl hw.snd.verbose=4' and saved dmesg, sndstat, mixer ...etc outputs.

On the control system the command 'mixer igain 2' switches on the console bell with
a message like 'Setting amplifier nid=12 index=1 in mute=0/0 vol=0/0'.
On this laptop the same command does not switch on console bell and I see no message.

The control system is a dell, this is an acer, both have ALC255 for the default hda, but the hdac/hdaa/pcm structure is different.
I used memstick 11.2 "live cd" to eliminate custom settings.

I will check the audio signaI during boot as soon as I can.
 
Beeps are not emulated through OSS.
I followed that link (Beeps : /sys/kern/kern_cons.c +651), added two printf's to see if the hw exists or not
and make buildkernel/installkernel and reboot...
After reboot I see the answer on console, so at least the hardware exists. GREAT!!!
then I did [BGCOLOR=rgb(204, 204, 204)]mixer igain 23[/BGCOLOR] and
on every backspace press I see the printf that in sysbeep() function HAS_TIMER_SPKR defined and beeping=0
(a little bit experimental)

How can I debug further to find why it is silent?
 
[BGCOLOR=rgb(204, 204, 204)]mixer igain 23[/BGCOLOR]

This command does nothing. It's completely unrelated.

I see the printf that in sysbeep() function HAS_TIMER_SPKR defined

It's defined on i386 and amd64 platforms (also, it's a macro, so it's value is not determined at runtime). To actually hear beeps you need a beeper/buzzer attached to the motherboard and I'm pretty sure you don't have one. They really are out of fashion now, I don't expect anything like that in a modern consumer notebook. Maybe there is some kind of hardware support for beeping through regular notebook speakers.
 
Maybe there is some kind of hardware support for beeping through regular notebook speakers.

Found that rather popular Realtek ALCxxx chipsets have "Supports external PCBEEP input and built-in digital BEEP generator" line in description. Other sound chips likely have similar features. That's not something that you can connect yourself, though; it's up to the motherboard manufacturer to properly set up.
 
FreeBSD is detecting 3 sound cards
Code:
pcm0: <Realtek ALC255 (Internal Analog)> at nid 20 and 18 on hdaa0
pcm1: <Realtek ALC255 (Front Analog Headphones)> at nid 33 on hdaa0
pcm2: <Intel Kabylake (HDMI/DP 8ch)> at nid 3 on hdaa1
There should be 3 devices
Code:
/dev/mixer0
/dev/mixer1
/dev/mixer2
Set to the maximun the volume of the speaker mixer -f /dev/mixer0 speaker 100 and test with beep -v -d /dev/mixer0

You can also try set all to 100 in mixer0
 
Anyway, while I'm in the boot menu, when I unplug/plug the power cord I hear the beep.
 
Maybe somebody has new idea, I will sum the facts.

I have an Acer travelmate with KabyLake and ALC255.
To have an original environment I boot from FreeBSD memstick 11.2 and run the "Live cd".
With this setting I have checked some other laptops with ALC255 and the I could get the bell, just after mixer igain 50.
On this laptop when I push all the values with mixer up, I hope I will be able to hear the beep, for example pressing the TAB on multiple selection or the Backspace on the prompt.
But there is silence.

ls -l > /dev/dsp
gives some garbage noise.
After loading speaker.ko
echo 'ec' > /dev/speaker
is silent.
When I boot from disk I can play music.


Pciconf and devinfo (is it ok to have only hdac0?)
hdac0@pci0:0:31:3: class=0x040300 card=0x12281025 chip=0x9d718086 rev=0x21 hdr=0x00

hdac0 pnpinfo vendor=0x8086 device=0x9d71 subvendor=0x1025 subdevice=0x1228 class=0x040300 at slot=31 function=3 dbsf=pci0:0:31:3 handle=\_SB_.PCI0.HDAS
hdacc0 pnpinfo vendor=0x10ec device=0x0255 revision=0x00 stepping=0x02 at cad=0
hdaa0 pnpinfo type=0x01 subsystem=0x10251228 at nid=1
hdacc1 pnpinfo vendor=0x8086 device=0x280b revision=0x00 stepping=0x00 at cad=2
hdaa1 pnpinfo type=0x01 subsystem=0x80860101 at nid=1

selected lines from dmesg
hdaa0: <Realtek ALC255 Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x10251228
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: Original pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 90a601a0 10 0 Mic Fixed Digital Internal Unknown 1
hdaa0: 20 90170120 2 0 Speaker Fixed Analog Internal Unknown 1
hdaa0: 23 40000000 0 0 Line-out None Unknown 0x00 Unknown 0
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 25 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 29 40700001 0 1 Modem-handset None Unknown 0x00 Unknown 0
hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1
hdaa0: 33 02211030 3 0 Headphones Jack 1/8 Front Black 0
hdaa0: Patched pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 18 90a601a0 10 0 Mic Fixed Digital Internal Unknown 1
hdaa0: 20 90170120 2 0 Speaker Fixed Analog Internal Unknown 1
hdaa0: 23 40000000 0 0 Line-out None Unknown 0x00 Unknown 0 DISA
hdaa0: 24 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 25 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 26 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 27 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA
hdaa0: 33 02211030 3 0 Headphones Jack 1/8 Front Black 0
hdaa0: 3 associations found:
hdaa0: Association 0 (2) out:
hdaa0: Pin nid=20 seq=0
hdaa0: Association 1 (3) out:
hdaa0: Pin nid=33 seq=0
hdaa0: Association 2 (10) in:
hdaa0: Pin nid=18 seq=0
hdaa0: Tracing association 0 (2)
hdaa0: Pin 20 traced to DAC 2
hdaa0: Association 0 (2) trace succeeded
hdaa0: Tracing association 1 (3)
hdaa0: Pin 33 traced to DAC 3
hdaa0: Association 1 (3) trace succeeded
hdaa0: Tracing association 2 (10)
hdaa0: Pin 18 traced to ADC 8
hdaa0: Association 2 (10) trace succeeded
hdaa0: Looking for additional DAC for association 0 (2)
hdaa0: Looking for additional DAC for association 1 (3)
hdaa0: Looking for additional ADC for association 2 (10)
hdaa0: Tracing input monitor
hdaa0: Tracing nid 35 to out
hdaa0: Tracing other input monitors
hdaa0: Tracing nid 18 to out
hdaa0: Tracing beeper
hdaa0: nid 29 traced to out
hdaa0: GPIO commit
hdaa0: GPIO0: output state=1
hdaa0: GPIO1: disabled
hdaa0: GPIO2: disabled
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <Realtek ALC255 (Internal Analog)> at nid 20 and 18 on hdaa0
pcm0: Playback:
pcm0: Stream cap: 0x00000001 PCM
pcm0: PCM cap: 0x000e0060 16 20 24 bits, 44 48 KHz
pcm0: DAC: 2
pcm0:
pcm0: nid=20 [pin: Speaker (Fixed)]
pcm0: + <- nid=12 [audio mixer] [src: pcm, speaker]
pcm0: + <- nid=2 [audio output] [src: pcm]
pcm0: + <- nid=11 [audio mixer] [src: speaker]
pcm0: + <- nid=29 [beep widget] [src: speaker]
pcm0:
pcm0: Record:
pcm0: Stream cap: 0x00000001 PCM
pcm0: PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
pcm0: ADC: 8
pcm0:
pcm0: nid=8 [audio input]
pcm0: + <- nid=35 [audio mixer] [src: speaker, monitor]
pcm0: + <- nid=29 [beep widget] [src: speaker]
pcm0: + <- nid=11 [audio mixer] [src: speaker]
pcm0: + <- nid=29 [beep widget] [src: speaker]
pcm0: + <- nid=18 [pin: Mic (Fixed)] [src: monitor]
pcm0:
pcm0: Master Volume (OSS: vol): -65/0dB
pcm0: +- ctl 1 (nid 2 out): -65/0dB (88 steps)
pcm0: +- ctl 10 (nid 12 in 0): mute
pcm0: +- ctl 11 (nid 12 in 1): mute
pcm0: +- ctl 16 (nid 20 in ): mute
pcm0:
pcm0: PCM Volume (OSS: pcm): -65/0dB
pcm0: +- ctl 1 (nid 2 out): -65/0dB (88 steps)
pcm0: +- ctl 10 (nid 12 in 0): mute
pcm0:
pcm0: Microphone2 Volume (OSS: monitor): 0/30dB
pcm0: +- ctl 15 (nid 18 out): 0/30dB (4 steps)
pcm0: +- ctl 36 (nid 35 in 6): mute
pcm0:
pcm0: Speaker/Beep Volume (OSS: speaker): -34/12dB
pcm0: +- ctl 9 (nid 11 in 4): -34/12dB (32 steps) + mute
pcm0: +- ctl 34 (nid 35 in 4): mute
pcm0: +- ctl 35 (nid 35 in 5): mute
pcm0:
pcm0: Recording Level (OSS: rec): -17/30dB
pcm0: +- ctl 3 (nid 8 in 0): -17/30dB (64 steps) + mute
pcm0: +- ctl 15 (nid 18 out): 0/30dB (4 steps)
pcm0: +- ctl 34 (nid 35 in 4): mute
pcm0: +- ctl 35 (nid 35 in 5): mute
pcm0: +- ctl 36 (nid 35 in 6): mute
pcm0:
pcm0: Input Monitoring Level (OSS: igain): 0/0dB
pcm0: +- ctl 11 (nid 12 in 1): mute
pcm0:
pcm0: Mixer "vol":
pcm0: Mixer "pcm":
pcm0: Mixer "speaker":
pcm0: Mixer "rec":
pcm0: Mixer "igain":
pcm0: Mixer "ogain":
pcm0: Mixer "monitor":
pcm0: Playback channel set is: Front Left, Front Right,
pcm0: Playback channel matrix is: 2.0 (unknown)
pcm0: Automatically set rec source to: monitor
pcm0: Recording channel set is: Front Left, Front Right,
pcm0: Recording channel matrix is: 2.0 (unknown)
pcm1: <Realtek ALC255 (Front Analog Headphones)> at nid 33 on hdaa0
pcm1: Playback:
pcm1: Stream cap: 0x00000001 PCM
pcm1: PCM cap: 0x000e0060 16 20 24 bits, 44 48 KHz
pcm1: DAC: 3
pcm1:
pcm1: nid=33 [pin: Headphones (Black Jack)]
pcm1: + <- nid=13 [audio mixer] [src: pcm, speaker]
pcm1: + <- nid=3 [audio output] [src: pcm]
pcm1: + <- nid=11 [audio mixer] [src: speaker]
pcm1: + <- nid=29 [beep widget] [src: speaker]
pcm1:
pcm1: Master Volume (OSS: vol): -65/0dB
pcm1: +- ctl 2 (nid 3 out): -65/0dB (88 steps)
pcm1: +- ctl 12 (nid 13 in 0): mute
pcm1: +- ctl 13 (nid 13 in 1): mute
pcm1: +- ctl 23 (nid 33 in ): mute
pcm1:
pcm1: PCM Volume (OSS: pcm): -65/0dB
pcm1: +- ctl 2 (nid 3 out): -65/0dB (88 steps)
pcm1: +- ctl 12 (nid 13 in 0): mute
pcm1:
pcm1: Speaker/Beep Volume (OSS: speaker)
pcm1: +- ctl 13 (nid 13 in 1): mute
pcm1:
pcm1: Input Monitoring Level (OSS: igain): 0/0dB
pcm1: +- ctl 13 (nid 13 in 1): mute
pcm1:
pcm1: Mixer "vol":
pcm1: Mixer "pcm":
pcm1: Mixer "igain":
pcm1: Mixer "ogain":
pcm1: Playback channel set is: Front Left, Front Right,
pcm1: Playback channel matrix is: 2.0 (disconnected)
hdaa1: <Intel Kabylake Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80860101
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid 0x as seq device conn jack loc color misc
hdaa1: 3 18560010 1 0 Digital-out Jack Digital 0x18 Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid 0x as seq device conn jack loc color misc
hdaa1: 3 18560010 1 0 Digital-out Jack Digital 0x18 Unknown 0
hdaa1: 1 associations found:
hdaa1: Association 0 (1) out:
hdaa1: Pin nid=3 seq=0
hdaa1: Tracing association 0 (1)
hdaa1: Pin 3 traced to DAC 2
hdaa1: Association 0 (1) trace succeeded
hdaa1: Looking for additional DAC for association 0 (1)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm2: <Intel Kabylake (HDMI/DP 8ch)> at nid 3 on hdaa1
pcm2: Playback:
pcm2: Stream cap: 0x00000005 AC3 PCM
pcm2: PCM cap: 0x001a07f0 16 24 32 bits, 32 44 48 88 96 176 192 KHz
pcm2: DAC: 2
pcm2:
pcm2: nid=3 [pin: Digital-out (Jack)]
pcm2: + <- nid=2 [audio output] [src: pcm]
pcm2:
pcm2: Master Volume (OSS: vol): 0/0dB
pcm2: +- ctl 1 (nid 3 in ): mute
pcm2:
pcm2: PCM Volume (OSS: pcm): 0/0dB
pcm2: +- ctl 1 (nid 3 in ): mute
pcm2:
pcm2: Mixer "vol":
pcm2: Mixer "pcm":
pcm2: Soft PCM mixer ENABLED
pcm2: Playback channel matrix is: unknown, assuming 7.1 (disconnected)
 
Are you in X?
When I switch to a text console with CTRL + ALT + F1-8 I hear a beep.

In X:
You can switch the sound devices with:
sysctl hw.snd.default_unit=n
n is in your case 0,1 or 2
 
Back
Top