You are not logged in.

#1 2026-05-14 10:53:19

jwodder
Member
Registered: 2026-05-14
Posts: 11

No sound from console bell inside VirtualBox

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 vboxservice

    Now 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 pcspkr

    That 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

#2 2026-05-14 13:08:02

jwodder
Member
Registered: 2026-05-14
Posts: 11

Re: No sound from console bell inside VirtualBox

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

#3 2026-05-16 15:53:27

jwodder
Member
Registered: 2026-05-14
Posts: 11

Re: No sound from console bell inside VirtualBox

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

#4 2026-05-16 15:59:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,194

Re: No sound from console bell inside VirtualBox

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

#5 2026-05-16 16:36:19

jwodder
Member
Registered: 2026-05-14
Posts: 11

Re: No sound from console bell inside VirtualBox

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

#6 2026-05-16 18:58:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,659

Re: No sound from console bell inside VirtualBox

Does the pc speaker even produce audible noise on the host? Does the hardware (macbook) even come with one?

Offline

#7 2026-05-16 20:51:55

jwodder
Member
Registered: 2026-05-14
Posts: 11

Re: No sound from console bell inside VirtualBox

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

#8 2026-05-16 21:06:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,659

Re: No sound from console bell inside VirtualBox

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 smile

Offline

#9 2026-05-16 23:16:46

jwodder
Member
Registered: 2026-05-14
Posts: 11

Re: No sound from console bell inside VirtualBox

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

#10 2026-05-17 07:18:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,659

Re: No sound from console bell inside VirtualBox

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

Board footer

Powered by FluxBB