You are not logged in.
I am trying to create an Arch Linux VM using VirtualBox, and I've managed to get a working non-GUI system, but a couple things still aren't functioning right. One problem is that trying to sound the terminal bell from the virtual console — whether with `printf '\a'` or by, say, trying to scroll past the end of a file in `less` — produces no audio. Even the `beep` command doesn't make a sound.
I've tried the following solutions, none of which worked:
I read somewhere that installing VirtualBox Guest Additions might fix audio issues, so I did:
sudo pacman -S virtualbox-guest-utils
sudo systemctl enable --now vboxserviceNow shared folders work, but even after rebooting the VM, the bell is still silent.
I tried following the instructions at https://wiki.archlinux.org/title/PC_spe … figuration by doing:
sudo mkdir -p /etc/udev/rules.d
sudo tee /etc/udev/rules.d/70-pcspkr-beep.rules > /dev/null <<'EOT'
ACTION!="remove", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", TAG+="uaccess"
EOT
sudo udevadm control --reload && sudo rmmod pcspkr && sudo modprobe pcspkrThat didn't seem to affect anything.
Trying to configure the bell with `setterm --bfreq=440 --blength=500` didn't work.
On the host side, VirtualBox's "Audio Output" is enabled, and my computer's volume is at max. Also, I don't know if it makes a difference here, but I did not enable EFI when creating the VM.
The host machine is an Intel MacBook Pro with macOS Sonoma 14.8.4, and VirtualBox is version 7.2.8.
Also, while researching this problem, I found out from https://wiki.archlinux.org/title/PC_spe … _Linux_ISO that there's an "init tune" on the Arch ISO. I never heard that when setting up the VM.
Offline
Update: After I installed GNOME, the sound was working when using the GUI, so this seems to be something specific to the console rather than to VirtualBox.
EDIT: Not everything in the GUI has working sound. `printf '\a'` in gnome-console works, but not in WezTerm. Selecting an alert sound in Settings initially resulted in a sound, but now doesn't. No sound comes out when playing a music file with amberol, though the timestamp wasn't advancing from "0:00", so that might be a different problem.
Last edited by jwodder (2026-05-14 14:14:40)
Offline
Another update: At the console, after installing `alsa-utils` and unmuting & turning everything up with `alsamixer`, I can get audio using `speaker-test` and `alsabat`, but `beep` and the bell are still silent.
Offline
A googler suggest you can enable passthrough of your pc speaker to the VM with a config: https://docs.oracle.com/en/virtualizati … rough.html --- note that the pcspeaker in general has no relation to normal audio or a sound card, so efforts on the ALSA side will not really help you here.
Offline
Well, that link looked promising, but it didn't seem to help. I ran `VBoxManager $VBOX_NAME "VBoxInternal/Devices/i8254/0/Config/PassthroughSpeaker" $n` several times, with `$n` set to 1, 2, 70, and 100, rebooting the VBox after each one, but `beep` and `printf '\a'` still don't work. The only line in VBox.log that starts with "PIT: speaker" is "PIT: speaker: emulation deactivated", and none of the surrounding lines look like they give any further information on the deactivation.
Offline
Does the pc speaker even produce audible noise on the host? Does the hardware (macbook) even come with one?
Offline
Well, my MacBook is definitely capable of producing audio, but I don't know whether it has anything that strictly qualifies as a "PC Speaker." How would I tell?
Offline
Boot some life distro and try to printf \a or beep, however V1del's link actually says
limited to Linux host only
Why do you need an audible bell on the console?
Most users try to disable that ![]()
Offline
Booting a live distro isn't really an option at the moment.
I did not see that bit of text. Makes me think this isn't possible.
Why do you need an audible bell on the console?
I don't need it; I've just grown accustomed to it.
Offline
this isn't possible
That's why I asked for the use case, if you cannot general the bell, maybe you can substitute the bell call (though readline only supports visible and audible and the visible bell isn't supported by the console either…)
Offline