From owner-freebsd-stable@FreeBSD.ORG Mon Sep 13 07:40:52 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF0351065674 for ; Mon, 13 Sep 2010 07:40:51 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [76.96.30.16]) by mx1.freebsd.org (Postfix) with ESMTP id B0B858FC14 for ; Mon, 13 Sep 2010 07:40:51 +0000 (UTC) Received: from omta15.emeryville.ca.mail.comcast.net ([76.96.30.71]) by qmta01.emeryville.ca.mail.comcast.net with comcast id 67Vl1f0021Y3wxoA17grPd; Mon, 13 Sep 2010 07:40:51 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta15.emeryville.ca.mail.comcast.net with comcast id 67gq1f0023LrwQ28b7gqqc; Mon, 13 Sep 2010 07:40:51 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 2669C9B423; Mon, 13 Sep 2010 00:40:50 -0700 (PDT) Date: Mon, 13 Sep 2010 00:40:50 -0700 From: Jeremy Chadwick To: Oliver Fromme Message-ID: <20100913074050.GA45070@icarus.home.lan> References: <20100913065658.GA44306@icarus.home.lan> <201009130721.o8D7LLId098604@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009130721.o8D7LLId098604@lurza.secnetix.de> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: ed@freebsd.org, freebsd-stable@FreeBSD.ORG Subject: Re: Serial console problems with stable/8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 07:40:52 -0000 On Mon, Sep 13, 2010 at 09:21:21AM +0200, Oliver Fromme wrote: > Jeremy Chadwick wrote: > > Is there a PS/2 keyboard hooked up to this machine when you're > > attempting to get serial console output? > > Kind of. It's connected to a local KVM switch. Does the KVM switch provide power to a PS/2 port which isn't currently selected? (E.g. on an A/B/C/D KVM switch, if the FreeBSD box is wired to port A, and the KVM switch has port C selected, does port A still get power?) Some KVMs do this, others do not. > > If so, I'm not too surprised it doesn't work (re: -P flag). > > If -P is not supposed to activate the serial console, then > the boot.config(5) manpage is in urgent need of a fix. > Quote: > > > The command: > > > > # echo "-P" > /boot.config > > > > will activate the serial console of FreeBSD. That's a highly misleading description, and should probably be removed. It's better to read boot(8). -P does not activate serial console. -P probes for a PS/2 keyboard. If one is attached, the system behaves like it would with a VGA console attached. Otherwise, if there is no PS/2 keyboard attached, it behaves identically to the -D -h flags being set. I do not know how -P internally works. I imagine it speaks to the PIC internal to the keyboard, or through a BIOS interrupt (0x10). This is why I asked what I did about the KVM switch above. The -D and -h flags are somewhat confusing, so see the "table" in the handbook for what does what (note the handbook which still references sio(4) flags/bits, but those also apply to uart(4)): http://www.freebsd.org/doc/handbook/serialconsole-setup.html You'll find that FreeBSD does not offer a "true" dual console setup. DragonflyBSD does offer this. > Also, with that flag it has worked fine for ages, until > I updated to 8.1-stable. There must be a regression > somewhere. I don't know if the regression is with PS/2 keyboard probing or with the introduction of uart(4) as the default serial port driver. I'm CC'ing ed@ since he's worked heavily on uart(4) and can assist here. > > Can you try the following? > > > > 1) Removing kernel_options and console from loader.conf > > 2) Place "-P" in /boot.config instead > > > > If this doesn't change the behaviour, please replace -P and with -D -h > > and see if there's any improvement. > I already have tried all kinds of different combinations when I sat in > front of the box yesterday. I'm not sure if I have tried the exact > combination that you suggest, though. I also don't understand why > those changes should improve anything. Hopefully the reason why I'm asking you to try this makes more sense with my above explanation of what -P actually does. > BTW, the interesting thing is that all processes that try to access > the console hang in "ttydcd". I'm not familiar with the tty code ... > Does anyone have an idea what this means? I imagine it means the tty driver (thus uart(4)) is waiting for the DCD line on the serial port to either go low or high (not sure which), but I could be completely wrong. One more thing to try: can you replace "std.9600" in your /etc/ttys with "3wire.9600" and then do "init q" and see if things improve? This should remove carrier detection (DCD) from the mix. If using 3wire.9600 works, can you provide a description of the wiring of your serial console setup? Specifically what DB9 pin is connected to what on the remote end, and what the remote end actually is (Xyplex unit, another PC, etc.)? Thanks! -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |