NetBSD Problem Report #48916

From ryo_on@yk.rim.or.jp  Mon Jun 16 14:24:59 2014
Return-Path: <ryo_on@yk.rim.or.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6621BA654C
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 16 Jun 2014 14:24:59 +0000 (UTC)
Message-Id: <20140616142455.42B603001670C@mail.SiriusCloud.jp>
Date: Mon, 16 Jun 2014 23:24:55 +0900 (JST)
From: ryoon@NetBSD.org
Reply-To: ryoon@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: OpenGL does not work with DRMKMS kernel and X.org intel driver 
X-Send-Pr-Version: 3.95

>Number:         48916
>Category:       kern
>Synopsis:       OpenGL does not work with DRMKMS kernel and X.org intel driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    riastradh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 16 14:25:00 +0000 2014
>Closed-Date:    Tue Jul 15 16:53:52 +0000 2014
>Last-Modified:  Tue Jul 15 16:53:52 +0000 2014
>Originator:     Ryo ONODERA
>Release:        NetBSD 6.99.43
>Organization:

>Environment:


System: NetBSD tellurium.elements.tetera.org 6.99.43 NetBSD 6.99.43 (DTRACE2) #31: Fri Jun 6 17:28:03 JST 2014 ryo_on@tellurium.elements.tetera.org:/usr/obj/amd64/sys/arch/amd64/compile/DTRACE2 amd64
Architecture: x86_64
Machine: amd64
>Description:
OpenGL porgram, for example, glxgear and Blender from pkgsrc/graphics/blender
cannot start with following error.

% glxgears
Unrecognized deviceID 166
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Serial number of failed request:  27
  Current serial number in output stream:  29

On same machine, non-DRMKMS kernel and vesa driver do not cause this error.
And DRMKMS kernel and wsfb driver do not cause this error too.

>How-To-Repeat:
Run DRMKMS kernel and X.org intel driver from xsrc, and run glxgear or blender.

>Fix:

I have no idea.

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48916: OpenGL does not work with DRMKMS kernel and X.org
 intel driver
Date: Tue, 17 Jun 2014 05:03:29 +0000

 On Mon, Jun 16, 2014 at 02:25:00PM +0000, ryoon@NetBSD.org wrote:
  > % glxgears
  > Unrecognized deviceID 166
  > X Error of failed request:  BadAlloc (insufficient resources for operation)
  >   Major opcode of failed request:  154 (GLX)
  >   Minor opcode of failed request:  3 (X_GLXCreateContext)
  >   Serial number of failed request:  27
  >   Current serial number in output stream:  29
  > 
  > On same machine, non-DRMKMS kernel and vesa driver do not cause this error.
  > And DRMKMS kernel and wsfb driver do not cause this error too.

 I'm pretty sure that we're going to need to know what chipset it is...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48916: OpenGL does not work with DRMKMS kernel and X.org
 intel driver
Date: Tue, 17 Jun 2014 14:22:07 +0900 (JST)

 Hi,

 It is MacBook Air 11-inch mid-2012 model.
 Its video chip is probably "3rd Generation Intel HD Graphics 4000".

 From dmesg,

 i915drmkms0 at pci0 dev 2 function 0: vendor 0x8086 product 0x0166 (rev. 0x09)
 drmkms0 at i915drmkms0
 drm: Memory usable by graphics device = 2048M
 drm: Supports vblank timestamp caching Rev 1 (10.10.2010).
 drm: Driver supports precise vblank timestamp query.
 drmkms0: interrupting at ioapic0 pin 16 (i915)
 drm: GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2
 i915drmkms0: framebuffer at 0xffff800047287000, size 1366x768, depth 32, stride
 5504
 wsdisplay0 at i915drmkms0 kbdmux 1: console (default, vt100 emulation)

 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

Responsible-Changed-From-To: kern-bug-people->riastradh
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 18 Jun 2014 03:08:11 +0000
Responsible-Changed-Why:
drmkms guru
(set it back if you can't take it)


From: Taylor R Campbell <riastradh@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org, dholland@NetBSD.org, ryoon@NetBSD.org
Subject: Re: kern/48916 (OpenGL does not work with DRMKMS kernel and X.org intel driver)
Date: Mon, 30 Jun 2014 21:39:35 +0000

 We need to update Mesa to get hardware accelerated OpenGL support for
 newer devices.  We're at 7.8.2, but unfrotunately, Mesa 8.0 dropped
 support for various old graphics devices that I'm told some people
 still care about.  We can probably update to 7.11.2, which adds
 support for Ivy Bridge devices but still has all the old drivers.

 As a stop-gap, we can probably make it fall back to software rendering
 for these devices until we update Mesa, but that's only a stop-gap.

From: matthew green <mrg@eterna.com.au>
To: Taylor R Campbell <riastradh@NetBSD.org>
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
    gnats-admin@netbsd.org, dholland@NetBSD.org, ryoon@NetBSD.org,
    gnats-bugs@NetBSD.org
Subject: re: kern/48916 (OpenGL does not work with DRMKMS kernel and X.org intel driver)
Date: Tue, 01 Jul 2014 11:15:02 +1000

 > As a stop-gap, we can probably make it fall back to software rendering
 > for these devices until we update Mesa, but that's only a stop-gap.

 can you do this?  it should be a quick hack and gets apps
 working again, if slowly...


 .mrg.

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48916 CVS commit: xsrc/external/mit/xf86-video-intel/dist/src/sna
Date: Tue, 1 Jul 2014 15:16:07 +0000

 Module Name:	xsrc
 Committed By:	riastradh
 Date:		Tue Jul  1 15:16:07 UTC 2014

 Modified Files:
 	xsrc/external/mit/xf86-video-intel/dist/src/sna: sna_dri.c

 Log Message:
 Disable DRI for Ivy Bridge (and later) until we update Mesa.

 This is a stop-gap for PR 48916.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.1 -r1.2 \
     xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_dri.c

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

From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/48916
Date: Fri, 4 Jul 2014 14:56:40 +0100

 I saw the sna_dri.c commit which lead me here - I just tried today's
 (4th July) source code, doing a build.sh -x -u, so hope that it
 includes this patch. Trying out glxgears on a

 i915drmkms0 at pci0 dev 2 function 0: Intel Sandy Bridge Integrated Graphics Device (rev. 0x09)

 I see the same GLX opcode failure as reported above.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 13 Jul 2014 04:48:49 +0000
State-Changed-Why:
Now we have an updated mesa - any improvement?


From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/48916
Date: Tue, 15 Jul 2014 14:57:02 +0100

 With the updated mesa, all is well!

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 15 Jul 2014 16:53:52 +0000
State-Changed-Why:
Confirmed fixed, thanks for the feedback!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.