From owner-freebsd-hackers Sat Mar 22 6:42:51 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99DB837B401 for ; Sat, 22 Mar 2003 06:42:49 -0800 (PST) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AB2F43F93 for ; Sat, 22 Mar 2003 06:42:48 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 7010 invoked from network); 22 Mar 2003 14:42:50 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 22 Mar 2003 14:42:50 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h2MEgjOv086995; Sat, 22 Mar 2003 09:42:45 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200303212321.30894.soralx@cydem.org.ua> Date: Sat, 22 Mar 2003 09:42:45 -0500 (EST) From: John Baldwin To: soralx@cydem.org.ua Subject: Re: misc/41772: can't disable keybell [PATCH] Cc: dougb@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 22-Mar-2003 soralx@cydem.org.ua wrote: > >> http://www.freebsd.org/cgi/query-pr.cgi?pr=41772 > This appears to be _VERY_ old problem (I don't remember > it on 2.2.7-RELEASE, though) > In short: the beeper still produces noises (clicks) when > shut up with `kbdcontrol -b off` Using kbdcontrol -b off on my laptop running current does turn off the sound already. On a stable machine I still do see the problem. Incidentally, using quiet.off doesn't shut it up either which is very confusing since quiet sets SC_QUIET_BELL. > (as well a this one: > 'http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/44257' - > it works well for my EIDE controller). PCI ID's for the ICH4 controllere were committed prior to 4.7. However, thanks for your submission. > FreeBSD 4.6.2-RELEASE: > =======================8<======================= > --- ./syscons.c.ORIG Fri Mar 21 23:10:05 2003 > +++ ./syscons.c Fri Mar 21 23:10:37 2003 > @@ -3385,6 +3385,9 @@ > if (scp != scp->sc->cur_scp && (scp->sc->flags & SC_QUIET_BELL)) > return; > > + if (!(duration && pitch)) > + return; > + > if (scp->sc->flags & SC_VISUAL_BELL) { > if (scp->sc->blink_in_progress) > return; > =======================8<======================= This patch would inadvertently turn off visual bell's if you set the duration or pitch to zero manually. A better patch might be: Index: syscons.c =================================================================== RCS file: /usr/cvs/src/sys/dev/syscons/syscons.c,v retrieving revision 1.399 diff -u -r1.399 syscons.c --- syscons.c 3 Mar 2003 16:24:44 -0000 1.399 +++ syscons.c 22 Mar 2003 14:38:58 -0000 @@ -3547,7 +3547,7 @@ if (scp != scp->sc->cur_scp) scp->sc->blink_in_progress += 2; blink_screen(scp->sc->cur_scp); - } else { + } else if (duration != 0 && pitch != 0) { if (scp != scp->sc->cur_scp) pitch *= 2; sysbeep(pitch, duration); Can you verify that this fix works for you? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message