Date: Sat, 22 Mar 2003 23:14:16 -0700 From: <soralx@cydem.org.ua> To: jhb@FreeBSD.ORG Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: misc/41772: can't disable keybell [PATCH] Message-ID: <200303222312.35930.soralx@cydem.org.ua> In-Reply-To: <XFMail.20030322094245.jhb@FreeBSD.org> References: <XFMail.20030322094245.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303222312.35930.soralx>