From owner-freebsd-hackers Sat Mar 22 22:15: 9 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 4DD3137B401; Sat, 22 Mar 2003 22:15:07 -0800 (PST) Received: from 134.216-123-229-0.interbaun.com (134.216-123-229-0.interbaun.com [216.123.229.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id E894443F3F; Sat, 22 Mar 2003 22:15:05 -0800 (PST) (envelope-from soralx@cydem.org.ua) Received: from vasya (vasya [192.168.0.3]) by 134.216-123-229-0.interbaun.com (8.11.6/8.11.6) with ESMTP id h2N6F3U31367; Sat, 22 Mar 2003 23:15:04 -0700 (MST) (envelope-from soralx@cydem.org.ua) From: To: jhb@FreeBSD.ORG Subject: Re: misc/41772: can't disable keybell [PATCH] Date: Sat, 22 Mar 2003 23:14:16 -0700 User-Agent: KMail/1.5 Cc: freebsd-hackers@FreeBSD.ORG References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200303222312.35930.soralx@cydem.org.ua> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 > Using kbdcontrol -b off on my laptop running current does > turn off the sound already. I tested `kbdcontrol -b off` on FreeBSD 5.0-RELEASE, and it still did not turn off the beeper. I have also checked 'syscons.c', v. 1.399 ([0]), and foud only one change concerning keybell: 'if (cold || shutdown_in_progress || !enable_bell)' - ('enable_bell' added, which must be "hw.syscons.bell" sysctl var), that enables to turn the keybell off globally, but not for separate vtys. > Incidentally, using quiet.off doesn't > shut it up either which is very confusing since quiet sets > SC_QUIET_BELL. I tested this again, and it works fine: `kbdcontrol -b quiet.normal` `(sleep 2;echo -e "\x07";sleep 2)&` When, after executing this command, i quickly switch to another vty, I hear no bell; when I stay on the same vty, I can hear the bell. > PCI ID's for the ICH4 controllere were committed prior to 4.7. good, found my controller's ID in the latest CVSweb ATA-PCI tree > 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? yes, it does but, I think, this may produce faster code: + } else if (duration && pitch) { I also found couple more problems: 00. `kbdcontrol -b 128.800` `(sleep 2;echo -e "\x07";sleep 2)&` If I stay on the same vty, I hear 800Hz bell, if I switch to another vty, I hear ~400Hz bell. `kbdcontrol -b normal` `(sleep 2;echo -e "\x07";sleep 2)&` If I stay on the same vty, I hear normal bell, if I switch to another vty, I hear a bell with pitch twice as _high_. 01. `kbdcontrol quiet.115.400` - won't set SC_QUIET_BELL flag [0] (http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/root/src \ /src/sys/dev/syscons/syscons.c?rev=1.399&content-type=text/plain) 22.03.2003; 23:12:44 [SorAlx] http://cydem.org.ua/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message