Kernel sometimes mistakes my PC speaker for a buzzer

WiseKind

Member
Joined
May 17, 2020
Messages
39
Reaction score
7
Credits
436
I have recently uninstalled PulseAudio and opted to use ALSA by itself for Linux sound. The reason was mainly to remove Polkit from my machine, because I didn't feel like I needed it yet it was a dependency for many programs on my computer.

However, afterwards I noticed that there are random times when I turn on my machine, I notice that contrary to what I thought, the terminal bell actually works. I backspace past the beginning of my command and my speaker makes a short sound, despite the fact that I had headphones plugged in.

Noticing the problem, I immediately checked Alsamixer and noticed that the sound card that was used for the terminal bell was missing from ALSA's configuration, and while the terminal bell worked, my sound card couldn't be used by any other programs on the system. This must mean that at some point in the boot process, my entire sound card was reserved as a 'buzzer', only for making the terminal beep.

The only way I know how to fix it is to reboot my system, which doesn't always work as my kernel makes this decision pretty much randomly after each boot: sometimes the speaker can be used by programs on my system to play music, video, games, etc., while other times the speaker only serves as a buzzer.

This basically means that I don't have sound when my speaker acts this way, as my headphone jack is part of the internal sound card rather than being its own card. I don't have a speaker that plugs into USB, allowing it to behave as its own sound card.

I am asking to know why my computer is behaving like this, and how to configure my system to act one way or another.

Code:
Script started on 2021-12-22 14:42:52-06:00 [TERM="st-256color" TTY="/dev/pts/1" COLUMNS="191" LINES="55"]
[?2004h[wisekind@cyb3rF0rtr3s5:~]$ uname -a
[?2004l
Linux cyb3rF0rtr3s5 5.15.10-hardened1-1-hardened #1 SMP PREEMPT Fri, 17 Dec 2021 20:16:31 +0000 x86_64 GNU/Linux
[?2004h[wisekind@cyb3rF0rtr3s5:~]$ neofetch
[?2004l
[?25l[?7l                   -`
                  .o+`
                 `ooo/
                `+oooo:
               `+oooooo:
               -+oooooo+:
             `/:-:++oooo+:
            `/++++/+++++++:
           `/++++++++++++++:
          `/+++ooooooooooooo/`
         ./ooosssso++osssssso+`
        .oossssso-````/ossssss+`
       -osssssso.      :ssssssso.
      :osssssss/        osssso+++.
     /ossssssss/        +ssssooo/-
   `/ossssso+/:-        -:/+osssso+-
  `+sso+:-`                 `.-/+oso:
 `++:.                           `-/+/
 .`                                 `/
[19A[9999999D[41Cwisekind@cyb3rF0rtr3s5
[41C----------------------
[41COS: Arch Linux x86_64
[41CHost: Inspiron 7773
[41CKernel: 5.15.10-hardened1-1-hardened
[41CUptime: 38 mins
[41CPackages: 498 (pacman)
[41CShell: bash 5.1.12
[41CResolution: 1920x1080, 1920x1080
[41CWM: dwm
[41CTheme: Solarized-Dark-Magenta [GTK2/3]
[41CIcons: breeze-extended-gnome-dark [GTK2/3]
[41CTerminal: script
[41CCPU: Intel i7-8550U (8) @ 4.000GHz
[41CGPU: NVIDIA GeForce MX150
[41CGPU: Intel UHD Graphics 620
[41CMemory: 973MiB / 15746MiB

[41C                       
[41C[38;5;8m[48;5;8m   [38;5;9m[48;5;9m   [38;5;10m[48;5;10m   [38;5;11m[48;5;11m   [38;5;12m[48;5;12m   [38;5;13m[48;5;13m   [38;5;14m[48;5;14m   [38;5;15m[48;5;15m   


[?25h[?7h[?2004h[wisekind@cyb3rF0rtr3s5:~]$ exit
[?2004l
exit

Script done on 2021-12-22 14:43:31-06:00 [COMMAND_EXIT_CODE="0"]
 


PulseAudio basically sits atop ALSA, and use it internally. ALSA is unable by itself to be used by multiple applications, so PulseAudio provides this functionality among others.
Summarized:
ALSA - dealing with the hardware, basically owning it
PulseAudio - a software proxy providing additional features (mixing, equalizer) between your application and the ALSA/OSS subsystem

need to reinstall PulseAudio - here is a diagram of PulseAudio as you can see ALSA is in the kernel PulseAudio controls everything else above it
800px-Pulseaudio-diagram.svg.png
 
But here's the thing. Even though Pulse Audio is removed from my system, as seen here:
Code:
Script started on 2021-12-27 12:40:49-06:00 [TERM="st-256color" TTY="/dev/pts/0" COLUMNS="191" LINES="55"]
%                                                                                                                                                                                             
 

[J[wisekind@cyb3rF0rtr3s5:~]% [?2004hppacman -Q pulseaudio[?2004l

error: package 'pulseaudio' was not found
[?25l[?25h%                                                                                                                                                                                             
 

[J1 [wisekind@cyb3rF0rtr3s5:~]% [?2004heexit[?2004l


Script done on 2021-12-27 12:40:56-06:00 [COMMAND_EXIT_CODE="1"]
When the sound card is not made into a buzzer, and can be seen in alsamixer:
Code:
Script started on 2021-12-27 12:42:06-06:00 [TERM="st-256color" TTY="/dev/pts/0" COLUMNS="191" LINES="55"]
%                                                                                                                                                                                             
 

[J[wisekind@cyb3rF0rtr3s5:~]% [?2004haamixer scontrols[?2004l

Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Headphone Mic',0
Simple mixer control 'Headphone Mic Boost',0
Simple mixer control 'Speaker',0
Simple mixer control 'PCM',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958',1
Simple mixer control 'IEC958',2
Simple mixer control 'IEC958',3
Simple mixer control 'IEC958',4
Simple mixer control 'Capture',0
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Headset Mic',0
Simple mixer control 'Headset Mic Boost',0
Simple mixer control 'Internal Mic',0
Simple mixer control 'Internal Mic Boost',0
%                                                                                                                                                                                             
 

[J[wisekind@cyb3rF0rtr3s5:~]% [?2004heexit[?2004l


Script done on 2021-12-27 12:42:11-06:00 [COMMAND_EXIT_CODE="0"]
I actually have no problem using multiple applications with ALSA. When I play multiple instances of MPV video player, the audio channels get mixed so I can hear them at the same time. There is nothing I used Pulse Audio for that seems to be missing with ALSA. The only problem is that sometimes my speaker thinks it's only a buzzer and can't be used for any applications on the system.
 
could be you machine has a built in MoBo buzzer/beep speaker which operates outside of normal audio and is generally use for warnings and diagnostics
 

Members online


Latest posts

Top