Documented as: -b duration.pitch | belltype Set the bell duration in milliseconds and pitch in hertz. If a belltype argument is specified, it may be one of normal which sets sound parameters back to normal values, off which disables the bell entirely, or visual which sets the bell to visual mode, i.e., flashes the screen instead. If belltype is preceded by the word quiet., the bell will not be rung when the ringing process is in the background vty. The visual bell, when chosen, applies to all vtys; other bell types can be set individually for each vty. in vt(4) mode kbdcontrol -b has no effect (and does not produce an error).
Support added in: commit 2533eca1c2b9d561c42d28bcb6f1c1c35562fbcc Author: Warner Losh <imp@FreeBSD.org> Date: Wed Nov 3 15:55:42 2021 -0600 vt(4): Connect to teken's TP_SETBELLPD Add the glue needed to listen to TP_SETBELLPD which teken uses to inform its client drivers about the results of parsing \e[=<pitch>;<duration>B. It converts these to a Hz value for the tone/pitch of the bell and a duration in ms. There's some loss of precision because <pitch> in the escape seuquence is defined to be (1193182 / pitch) Hz and <duration> is in 10ms units. Also note that kbdcontrol also parses 'off' but then doesn't send the proper escape sequence, leading me to wonder if that's another bug since teken appears to parse that sequence properly and I've added code here to treat that as the same as quiet or disabled. In general, Hz from 100 to 2000 is good. Outside that range is possible, but even at 100Hz the square wave is starting to sound bad and above 2000Hz the speaker may not respond. Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D32620