2

I am using a Debian machine, ARK-3360F, and I need to make it beep like it does when it starts-up. Unfortunately, there is not any other speaker than this on the machine, so the below methods do not work even if I use modprobe pcspkr:

echo -e "\a"
echo ^G
echo -e "\07"

-and the beep program

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Alex
  • 41
  • 1
  • 2
  • 2
    Try `modprobe pcspkr` and `printf '\a' > /dev/tty1` – Stéphane Chazelas Jan 13 '14 at 08:31
  • I used `echo -e` instead of `printf` since it is in terminal and not C. Still it doesn't beep. – Alex Jan 13 '14 at 08:42
  • @Alex: You can use `printf` in various shells. Checked `alsamixer`? – Runium Jan 13 '14 at 08:51
  • sorry you are right. However, `printf` didn't work and so does the `beep` program. – Alex Jan 13 '14 at 08:59
  • @Alex: Yes, somehow missed that you had tested with `beep`. Checked `alsamixer`? Here are some ways to [*mute beep*](https://wiki.archlinux.org/index.php/Disable_PC_Speaker_Beep) – but you might find some of it useful. – Runium Jan 13 '14 at 09:07
  • I tried but there is no such package for a non-graphic Debian in the apt-cache. – Alex Jan 13 '14 at 09:17
  • 1
    Does it beep on BOOT? As in: sure it actually has a speaker? If it has, and `beep` does not beep, it mostly sound slike a mute issue. You could also try with `snd-pcsp` as [noted here](http://unix.stackexchange.com/questions/1974/how-do-i-make-my-pc-speaker-beep?lq=1#comment87963_1980). This should give an extra entry for `pcsp` in ALSA. If no `alsamixer` try `amixer`. – Runium Jan 13 '14 at 09:23
  • @Sukminder: that worked! thank you very much – Alex Jan 13 '14 at 09:35
  • http://unix.stackexchange.com/questions/1974/how-do-i-make-my-pc-speaker-beep – Ciro Santilli OurBigBook.com Sep 09 '15 at 20:46

1 Answers1

4

As root echo to /dev/console:

 echo -e '\a' > /dev/console

or as normal user:

sudo bash -c "echo -e '\a' > /dev/console"

as indicated you may have to run sudo modprobe pcspkr first.

Timo
  • 6,202
  • 1
  • 26
  • 28
  • this works on my laptop which has normal speakers but not on the Debian machine. Unfortunately, the sound doesn't come from the motherboard speaker but from the normal speakers. – Alex Jan 13 '14 at 08:50