I haven’t used Linux for a long time. I’ll just tell you based on my impression. This is a very complicated issue:
Some motherboards have a switch in the bios that needs to be turned on.
requires kernel support, module name pcspkr (this condition is generally met, but I prefer to remove this support when using gentoo).
user space support, such as the beep program (this program is sometimes echo -en 'a'>/dev/console), root permissions, etc. The switch settings of console and terminal in X are different.
It seems that not all motherboards have independent pc speakers, some are together with the onboard speakers, and need to be unmuted in alsamixer.
You can google "linux beep", and there are some findings. It seems that ubuntu blacklists the pcspkr module by default.
I haven’t used Linux for a long time. I’ll just tell you based on my impression. This is a very complicated issue:
Some motherboards have a switch in the bios that needs to be turned on.
requires kernel support, module name
pcspkr
(this condition is generally met, but I prefer to remove this support when using gentoo).user space support, such as the
beep
program (this program is sometimesecho -en 'a'>/dev/console
), root permissions, etc. The switch settings of console and terminal in X are different.It seems that not all motherboards have independent pc speakers, some are together with the onboard speakers, and need to be unmuted in
alsamixer
.You can google "linux beep", and there are some findings. It seems that ubuntu blacklists the pcspkr module by default.