From root@126.216-123-229-0.interbaun.com  Sun Aug 18 17:59:04 2002
Return-Path: <root@126.216-123-229-0.interbaun.com>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0FFCB37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Aug 2002 17:59:04 -0700 (PDT)
Received: from 126.216-123-229-0.interbaun.com (126.216-123-229-0.interbaun.com [216.123.229.126])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1991643E65
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Aug 2002 17:59:01 -0700 (PDT)
	(envelope-from root@126.216-123-229-0.interbaun.com)
Received: (from root@localhost)
	by 126.216-123-229-0.interbaun.com (8.11.6/8.11.6) id g7J0wxg17992;
	Sun, 18 Aug 2002 18:58:59 -0600 (MDT)
	(envelope-from root)
Message-Id: <200208190058.g7J0wxg17992@126.216-123-229-0.interbaun.com>
Date: Sun, 18 Aug 2002 18:58:59 -0600 (MDT)
From: soralx@cydem.zp.ua
To: FreeBSD-gnats-submit@freebsd.org
Subject: can't disable keybell
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41772
>Category:       conf
>Synopsis:       can't disable keybell
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 18 18:00:07 PDT 2002
>Closed-Date:    Thu Dec 11 11:28:06 PST 2003
>Last-Modified:  Thu Dec 11 11:28:06 PST 2003
>Originator:     SorAlx
>Release:        FreeBSD 4.5-RELEASE i386 (updated from 'FreeBSD 4.4-RELEASE i386')
>Organization:
cydem.zp.ua
>Environment:
	System: FreeBSD soralx.home 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Sun May 5 23:57:12 MDT 2002 root@soralx.home:/usr/src/sys/compile/SORALX i386
	Hardware: tested on some 80486 and Pentiums

>Description:
	Even though i have 'keybell=NO' in '/etc/rc.conf', the beeper doesn't shut up.
	Also I tried `kbdcontrol -b quiet.off`

>How-To-Repeat:
>Fix:
	not fixed yet; wait...
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: schweikh 
State-Changed-When: Tue Aug 20 07:55:26 PDT 2002 
State-Changed-Why:  
The proper way to turn off the bell is keybell=off in rc.conf. 
If you do this on the command line, you need to redirect the tty, 

kbdcontrol -b off < /dev/tty 

does the trick for me on 4-STABLE. Please confirm if it works for 
you as well. 

PS: This is more appropriately asked on questions@ mailing 
list than in a PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41772 

From: Jens Schweikhardt <schweikh@schweikhardt.net>
To: soralx@cydem.zp.ua
Cc: GNATS Bug Followup <bug-followup@FreeBSD.org>
Subject: Re: misc/41772: can't disable keybell
Date: Wed, 21 Aug 2002 11:03:57 +0200

 [Please Cc: answers to bug-followup@freebsd.org with the subject intact]
 
 On Tue, Aug 20, 2002 at 11:24:05PM -0600, soralx@cydem.zp.ua wrote:
 # > Synopsis: can't disable keybell
 # 
 # > The proper way to turn off the bell is keybell=off in rc.conf.
 # that's right, I tried this first
 # in '/etc/defaults/rc.conf' it's 'keybell=NO'
 
 Just to make my statement clear:
 keybell=NO   means "Do not run any kbdcontrol -b command at boot time"
              it does NOT mean to turn it off.
 keybell=off  means "Run kbdcontrol -b off" at boot time.
 
 # Well, that doesn't really matter - it's all the same and is not
 # working properly for me 8)
 # 
 # > If you do this on the command line, you need to redirect the tty,
 # > kbdcontrol -b off < /dev/tty
 # does the same thing, as supposed to
 # 
 # > does the trick for me on 4-STABLE.
 # as I remember, in RELEASE-2.2.7 it worked fine (or it just was
 # because of a different machine), and as I moved to FreeBSD-4.?.?,
 #  it never works for me
 # 
 # > Please confirm if it works for you as well.
 # not as I expect it to work
 
 So you have keybell=off in /etc/rc.conf and it does the following:
 # I expect the beeper to be absolutely quiet, but it just sets the
 # frequency low (about 30Hz)
 
 Hmm. I've got seven disks and a bunch of fans in my case, so I'll
 never hear anything that low and short.
 
 # As I understand it: when the 'keybell=off' is used, and terminal
 # recieves 07h, the kernel shouldn't touch the timer and send anything
 # to port 61h, but it [sets the timer(I can hear some
 # sounds) and OUTs to the port?]
 # 
 # I'll check '/usr/src/sys/isa/syscons_isa.c' (right?) for how it actually works
 # [and will learn some more C :)]
 
 Try to understand what kbdcontrol does. It writes an escape sequence
 to the stderr stream which you can capture with (bourne shell, not csh)
 
 $ kbdcontrol -b off 2>esc
 $ od -bc esc
 0000000  033 133 075 060 073 060 102                                    
          033   [   =   0   ;   0   B                                    
 0000007
 
 Investigate how the syscons driver interprets this escape sequence
 and you should be on the right track. Good luck!
 
 # > PS: This is more appropriately asked on questions@ mailing
 # >     list than in a PR.
 # well, I thought I tested it enough to report a PR
 
 Well, if you had given all that extra information about using keybell=off
 and 30Hz stuff... better give too much details that too little. We can
 always ignore what is not relevant, but if something relevant is missing
 like in your case, we are guided in the wrong direction.
 
 
 Regards,
 
 	Jens
 -- 
 Jens Schweikhardt http://www.schweikhardt.net/
 SIGSIG -- signature too long (core dumped)

From: <soralx@cydem.zp.ua>
To: bug-followup@freebsd.org
Cc: schweikh@schweikhardt.net
Subject: Re: misc/41772: can't disable keybell
Date: Wed, 28 Aug 2002 23:33:41 -0600

 > Hmm. I've got seven disks and a bunch of fans in my case, so I'll
 > never hear anything that low and short.
 i have 5 HDs and still can hear the sound
 
 > # As I understand it: when the 'keybell=off' is used, and terminal
 > # recieves 07h, the kernel shouldn't touch the timer and send anything
 > # to port 61h, but it [sets the timer(I can hear some
 > # sounds) and OUTs to the port?]
 > Try to understand what kbdcontrol does. It writes an escape sequence
 > to the stderr stream which you can capture with (bourne shell, not csh)
 > $ kbdcontrol -b off 2>esc
 > $ od -bc esc
 > 0000000  033 133 075 060 073 060 102                                    
 >          033   [   =   0   ;   0   B                                    
 > 0000007
 > Investigate how the syscons driver interprets this escape sequence
 > and you should be on the right track. Good luck!
 I think that there's nothing wrong with that piece of code, because syscons
 changes the keybell status, and it works properly for people
 (but I'll look at it anyway)
 
 I'll check all this when I will get some free time (probably this weekend)
 
 > Well, if you had given all that extra information about using keybell=off
 > and 30Hz stuff... better give too much details that too little. We can
 > always ignore what is not relevant, but if something relevant is missing
 > like in your case, we are guided in the wrong direction.
 of course
 I guess I gave all the necessary info (I could forget something though...)
 as I said, I tested this on different computers (seems that all of them
 have Asus motherboards); the PC beepers were plugged directly into
 mboards; 'GENERIC' kernel was usually used, FreeBSD 4.*; changing
 the keybell to 'visual' , for example, worked correctly; removing the
 piece of code that sends 07h in 'bash' src works well too, as well
 as disconnecting the beeper ;)
 
 26.08.2002; 22:20:34
 [SorAlx]  http://cydem.zp.ua/
State-Changed-From-To: feedback->closed 
State-Changed-By: keramida 
State-Changed-When: Fri Feb 28 14:07:44 PST 2003 
State-Changed-Why:  
Pilot error.  Setting keybell to NO doesn't disable beeping. 
Hopefully similar misunderstandings will be avoided in the 
future after my recent commit to rc.conf.5 that documents 
keybell and points to kbdcontrol(1). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41772 
State-Changed-From-To: closed->open 
State-Changed-By: keramida 
State-Changed-When: Tue Mar 4 17:04:15 PST 2003 
State-Changed-Why:  
I didn't read carefully nough through the audit trail. 
I'm not sure what the problem is though, so just leave this open. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41772 
State-Changed-From-To: open->patched 
State-Changed-By: dougb 
State-Changed-When: Sat Mar 15 00:11:18 PST 2003 
State-Changed-Why:  

keramida's patch to rc.conf(5) will help. I also just committed 
an update to /etc/defaults/rc.conf that should help as well. 


Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Sat Mar 15 00:11:18 PST 2003 
Responsible-Changed-Why:  

I'll MFC this after the freeze. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41772 
State-Changed-From-To: patched->closed 
State-Changed-By: jhb 
State-Changed-When: Thu Dec 11 11:27:44 PST 2003 
State-Changed-Why:  
Merged to 4.x.  Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41772 
>Unformatted:
