NetBSD Problem Report #53188

From john@hlin.zia.io  Mon Apr 16 14:10:46 2018
Return-Path: <john@hlin.zia.io>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A46677A1C9
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 16 Apr 2018 14:10:46 +0000 (UTC)
Message-Id: <201804131753.w3DHrPGO014198@hlin.zia.io>
Date: Fri, 13 Apr 2018 17:53:25 GMT
From: john@ziaspace.com
Reply-To: john@ziaspace.com
To: gnats-bugs@NetBSD.org
Subject: Can't use console on systems with modern NVIDIA 
X-Send-Pr-Version: 3.95

>Number:         53188
>Category:       install
>Synopsis:       Can't use coneole at all on systems with a modern NVIDIA video card
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 16 14:15:00 +0000 2018
>Closed-Date:    Fri Aug 24 07:13:25 +0000 2018
>Last-Modified:  Fri Aug 24 07:13:25 +0000 2018
>Originator:     John Klos
>Release:        NetBSD 8.0_BETA
>Organization:

>Environment:


System: NetBSD 8.0_BETA, NetBSD-current
Architecture: amd64
Machine: amd64
>Description:

Attempts to boot NetBSD-8 or NetBSD-current installer images on any computer 
with a modern NVIDIA card results in a panic saying console isn't found. 
Pleasantly, the keyboard works at the db prompt.
Attempting to boot with -c to try to disable nouveau gives a console on which 
the keyboard doesn't work. After the "uc> ", there's a rapidly flashing text 
cursor. The system does not respond to keystrokes at all.
>How-To-Repeat:

Try to install on a system with a modern NVIDIA card. Try to use boot -c on a 
system with a modern NVIDIA card. Tested with GTX 1050, 1080, 1080Ti, but I'm 
sure it affects many others.
>Fix:

Replace video card, or make a custom kernel and/or custom installer.

>Release-Note:

>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: re: install/53188: Can't use console on systems with modern NVIDIA 
Date: Tue, 17 Apr 2018 03:25:11 +1000

 i think the simplest way to fix this for now would be to black list
 the newer nvidia cards that don't work -- the nvidia driver has a
 generic "made by nvidia, is VGA class" match routine, so it matches
 pretty much all nvidia pci-style GPus.  this _normally_ works ok as
 previously the newer cards worked "ok" if not well accelerated, but
 the newer ones fail at it...

 then vga would attach, and vesa graphics work, and on the high end
 nvidia cards, vesa is surprisingly fast and usable.


 .mrg.

From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/53188: Can't use console on systems with modern NVIDIA 
Date: Tue, 17 Apr 2018 18:05:28 +0000

 can you post a dmesg to go along with it to see where it fails?
 my newer card (still recognised as something by nouveau) tries to
 attach, fails, and continues booting normally, so some code to handle
 things does exist.

From: John Klos <john@ziaspace.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/53188: Can't use console on systems with modern NVIDIA
Date: Thu, 19 Apr 2018 18:46:07 +0000 (UTC)

 > can you post a dmesg to go along with it to see where it fails?
 > my newer card (still recognised as something by nouveau) tries to
 > attach, fails, and continues booting normally, so some code to handle
 > things does exist.

 Apologies that I didn't have time to convert to text.

 https://www.klos.com/~john/noconsole.jpg

 Thanks,
 John

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: install-manager@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, john@ziaspace.com
Subject: re: install/53188: Can't use console on systems with modern NVIDIA
Date: Fri, 20 Apr 2018 05:39:18 +1000

 >  https://www.klos.com/~john/noconsole.jpg

 unfortunately, this only shows info that is actually known from
 the fact you've reported the cnopen panic.  we need the full
 dmesg so we can see why vga or whatever didn't attach.


 .mrg.

From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/53188: Can't use console on systems with modern NVIDIA
Date: Wed, 25 Apr 2018 16:11:22 +0000

 Are you using efiboot? that I can reproduce.
 I'll try to do something about it.

From: matthew green <mrg@eterna.com.au>
To: install-manager@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, john@ziaspace.com, gnats-bugs@NetBSD.org
Cc: 
Subject: re: install/53188: Can't use console on systems with modern NVIDIA
Date: Sat, 19 May 2018 19:08:45 +1000

 can you or anyone else with a modern nvidia card test this patch?

 thanks.


 .mrg.

 Index: nouveau_pci.c
 ===================================================================
 RCS file: /cvsroot/src/sys/external/bsd/drm2/nouveau/nouveau_pci.c,v
 retrieving revision 1.8
 diff -p -u -r1.8 nouveau_pci.c
 --- nouveau_pci.c	19 Apr 2016 06:57:37 -0000	1.8
 +++ nouveau_pci.c	19 May 2018 09:08:22 -0000
 @@ -91,6 +91,28 @@ nouveau_pci_match(device_t parent, cfdat
  	if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY)
  		return 0;

 +	/*
 +	 * NetBSD drm2 doesn't suport Pascal-based cards:
 +	 *   0x1580-0x15ff 	GP100
 +	 *   0x1b00-0x1b7f 	GP102
 +	 *   0x1b80-0x1bff 	GP104
 +	 *   0x1c00-0x1b7f 	GP106
 +	 *   0x1c80-0x1cff 	GP107
 +	 *   0x1d00-0x1d7f 	GP108
 +	 *   0x1d80-0x1dff 	GV100
 +	 */
 +#define IS_BETWEEN(x,y) \
 +	(PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y))
 +	
 +	if (IS_BETWEEN(0x1580, 0x15ff) ||
 +	    IS_BETWEEN(0x1b00, 0x1b7f) ||
 +	    IS_BETWEEN(0x1b80, 0x1bff) ||
 +	    IS_BETWEEN(0x1c00, 0x1b7f) ||
 +	    IS_BETWEEN(0x1c80, 0x1cff) ||
 +	    IS_BETWEEN(0x1d00, 0x1d7f) ||
 +	    IS_BETWEEN(0x1d80, 0x1dff))
 +		return 0;
 +
  	return 6;		/* XXX Beat genfb_pci...  */
  }


From: Robert Elz <kre@munnari.OZ.AU>
To: matthew green <mrg@eterna.com.au>
Cc: install-manager@netbsd.org, netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: install/53188: Can't use console on systems with modern NVIDIA
Date: Sat, 19 May 2018 22:23:27 +0700

     Date:        Sat, 19 May 2018 19:08:45 +1000
     From:        matthew green <mrg@eterna.com.au>
     Message-ID:  <8864.1526720925@splode.eterna.com.au>

   | can you or anyone else with a modern nvidia card test this patch?

 For me, with the typo fixed (or probably without, I did not try that) it
 correctly detects that my nvidea card is one of the unsupported ones,
 and does not attempt to configure it.

 [   1.0131365] NVIDIA product 1c8d (3D display, revision 0xa1) at pci1 dev 0 fun
 ction 0 not configured

 Previously it had done ...

 pci1: i/o space, memory space enabled, rd/line, wr/inv ok
 nouveau0 at pci1 dev 0 function 0: vendor 10de product 1c8d (rev. 0xa1)
 drm kern error: nouveau E[  DEVICE][nouveau0] unknown chipset, 0x137000a1
 drm kern error: nouveau E[     DRM] failed to create 0x80000080, -22
 nouveau0: unable to attach drm: 22

 (that's from a dmesg I saved before the timestamps were added).

 kre

State-Changed-From-To: open->pending-pullups
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 22 May 2018 18:21:17 +0000
State-Changed-Why:
This went to the wrong place.

Subject: PR/53258 CVS commit: src/sys/external/bsd/drm2/nouveau
Date: Mon, 21 May 2018 08:58:47 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Mon May 21 08:58:47 UTC 2018

 Modified Files:
 	src/sys/external/bsd/drm2/nouveau: nouveau_pci.c

 Log Message:
 disable drm2 on modern nouveau cards (Pascal-based).

 our older drm doesn't have any support for modern Pascal or
 the second version of Maxwell (but not disabled here yet)
 but the driver tries to attach on any nvidia gpu.

 this should workaround PR#53258, and other issues reported
 with modern nvidia chipsets.

 XXX: pullup-7, pullup-8.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c


From: "matthew green" <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53188 CVS commit: src/sys/external/bsd/drm2/nouveau
Date: Thu, 31 May 2018 09:18:31 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Thu May 31 09:18:31 UTC 2018

 Modified Files:
 	src/sys/external/bsd/drm2/nouveau: nouveau_pci.c

 Log Message:
 disable matching nouveau on pascal and the second generation of maxwell
 cards that are not supported by this version of drm.

 this should fix various modern systems vs nvidia issues, eg PR 53188.

 XXX: pullup-7, pullup-8.


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53188 CVS commit: [netbsd-8] src/sys/external/bsd/drm2/nouveau
Date: Fri, 8 Jun 2018 10:08:06 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Fri Jun  8 10:08:06 UTC 2018

 Modified Files:
 	src/sys/external/bsd/drm2/nouveau [netbsd-8]: nouveau_pci.c

 Log Message:
 Pull up following revision(s) (requested by mrg in ticket #851):

 	sys/external/bsd/drm2/nouveau/nouveau_pci.c: revision 1.9-1.11

 disable drm2 on modern nouveau cards (Pascal-based).

 our older drm doesn't have any support for modern Pascal or
 the second version of Maxwell (but not disabled here yet)
 but the driver tries to attach on any nvidia gpu.
 this should workaround PR#53258, and other issues reported
 with modern nvidia chipsets.

 XXX: pullup-7, pullup-8.

 -

 disable matching nouveau on pascal and the second generation of maxwell
 cards that are not supported by this version of drm.
 this should fix various modern systems vs nvidia issues, eg PR 53188.

 XXX: pullup-7, pullup-8.

  -

 the previous change doubled the check for pascal.  fix it so
 that we only check for later maxwell and pascal once each,
 as intended.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.8.10.1 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 23 Aug 2018 22:16:45 +0000
State-Changed-Why:
This was pulled up & committed, but we didn't hear from you: are you still having problems? (I guess not...)


From: John Klos <john@ziaspace.com>
To: gnats-bugs@NetBSD.org
Cc: maya@NetBSD.org
Subject: Re: install/53188 (Can't use coneole at all on systems with a modern
 NVIDIA video card)
Date: Thu, 23 Aug 2018 23:06:07 +0000 (UTC)

 > This was pulled up & committed, but we didn't hear from you: are you 
 > still having problems? (I guess not...)

 It's time to close the ticket. All recent NetBSD installs with all sorts 
 of NVIDIA cards have worked. Thank you!

State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Fri, 24 Aug 2018 07:13:25 +0000
State-Changed-Why:
Fixed, thanks for the report!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.