From owner-freebsd-x11@freebsd.org Sat Jun 17 17:16:27 2017 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BB72BFE2FA for ; Sat, 17 Jun 2017 17:16:27 +0000 (UTC) (envelope-from bengt.ahlgren@ri.se) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6CFAB72A69 for ; Sat, 17 Jun 2017 17:16:27 +0000 (UTC) (envelope-from bengt.ahlgren@ri.se) Received: by mailman.ysv.freebsd.org (Postfix) id 6C2E5BFE2F9; Sat, 17 Jun 2017 17:16:27 +0000 (UTC) Delivered-To: x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BC58BFE2F8 for ; Sat, 17 Jun 2017 17:16:27 +0000 (UTC) (envelope-from bengt.ahlgren@ri.se) Received: from se-out1.mx-wecloud.net (se-out1.mx-wecloud.net [89.221.255.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.mx-wecloud.net", Issuer "GeoTrust SSL CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1116B72A68 for ; Sat, 17 Jun 2017 17:16:26 +0000 (UTC) (envelope-from bengt.ahlgren@ri.se) Received: from sp-mail-3.sp.se (unknown [194.218.146.197]) by se-out1.mx-wecloud.net (Postfix) with ESMTPS id CF970202D23 for ; Sat, 17 Jun 2017 17:16:21 +0000 (UTC) Received: from P142s.sics.se (10.116.0.226) by sp-mail-3.sp.se (10.100.0.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Sat, 17 Jun 2017 19:16:22 +0200 Received: (from bengta@localhost) by P142s.sics.se (8.15.2/8.15.2/Submit) id v5HHFoFG002286; Sat, 17 Jun 2017 19:15:50 +0200 (CEST) (envelope-from bengt.ahlgren@ri.se) X-Authentication-Warning: P142s.sics.se: bengta set sender to bengt.ahlgren@ri.se using -f From: Bengt Ahlgren To: Subject: Re: Lost HW OpenGL on intel In-Reply-To: (Bengt Ahlgren's message of "Fri, 16 Jun 2017 20:08:26 +0200") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (berkeley-unix) Date: Sat, 17 Jun 2017 19:15:50 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.116.0.226] X-ClientProxiedBy: sp-mail-2.sp.se (10.100.0.162) To sp-mail-3.sp.se (10.100.0.163) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=aq3CMWRV c=1 sm=1 tr=0 a=L5DDne6A+dD0FbDkt2Fblw==:117 a=L5DDne6A+dD0FbDkt2Fblw==:17 a=sZ8rJzgPlrQA:10 a=LWSFodeU3zMA:10 a=6I5d2MoRAAAA:8 a=aR16PxjQAAAA:8 a=Iev_YTveJk9TnjsV91AA:9 a=E9LtQix4xlUA:10 a=v2312BZ5C20A:10 a=IjZwj45LgO3ly-622nXo:22 a=zbFvvTOBjyH4ze5LlUjX:22 X-Virus-Scanned: clamav-milter 0.99.2 at MailSecurity X-Virus-Status: Clean X-MailSecurity-Status: 0 X-Scanned-By: WeCloud MailSecurity X-MailSecurity-Score: 0 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jun 2017 17:16:27 -0000 For the record: applying the patch for intel_screen.c from https://reviews.freebsd.org/D11148 to graphics/mesa-dri also works for the current Mesa 17.1.1, i.e., restores HW OpenGL for intel graphics on 10.x. Bengt Bengt Ahlgren writes: > Bengt Ahlgren writes: > >> Bengt Ahlgren writes: >> >>> HW OpenGL stopped working for me - I think it was after the last mesa >>> update (17.1.1). This is with 10.3-STABLE (r316723) and intel ironlake >>> graphics. >>> >>> Xorg log says: >>> >>> [ 18.061] (II) intel(0): DRI2: Enabled >>> [ 18.061] (II) intel(0): DRI3: Disabled >>> [ 18.069] (--) RandR disabled >>> [ 18.110] (EE) AIGLX error: Calling driver entry point failed >>> [ 18.111] (EE) AIGLX: reverting to software rendering >>> [ 18.470] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer >>> [ 18.471] (II) AIGLX: Loaded and initialized swrast >>> [ 18.471] (II) GLX: Initialized DRISWRAST GL provider for screen 0 >>> >>> I have these packages: >>> >>> mesa-dri-17.1.1 OpenGL hardware acceleration drivers for DRI2+ >>> mesa-libs-17.1.1 OpenGL libraries that support GLX and EGL clients >>> xf86-video-intel-2.99.917.20170228_1 Driver for Intel integrated >>> graphics chipsets >>> xorg-server-1.18.4_1,1 X.Org X server and related programs >>> >>> Any advice? >> >> Some more information about this system: >> >> * Lenovo X201 with Core i7 M620 >> * "Intel(R) HD Graphics" (Ironlake - fifth gen): >> >> vgapci0@pci0:0:2:0: class=0x030000 card=0x215a17aa chip=0x00468086 rev=0x02 hdr=0x00 >> vendor = 'Intel Corporation' >> device = 'Core Processor Integrated Graphics Controller' >> class = display >> subclass = VGA >> bar [10] = type Memory, range 64, base 0xf2000000, size 4194304, enabled >> bar [18] = type Prefetchable Memory, range 64, base 0xd0000000, size 268435456, enabled >> bar [20] = type I/O Port, range 32, base 0x1800, size 8, enabled >> cap 05[90] = MSI supports 1 message enabled with 1 message >> cap 01[d0] = powerspec 2 supports D0 D3 current D0 >> cap 13[a4] = PCI Advanced Features: FLR TP >> >> * no xorg.conf - xorg selects intel driver >> * i915kms.ko is loaded when Xorg starts (but it >> does not make any difference if it's loaded from /boot/loader.conf) >> * VT console (kern.vty="vt" in loader.conf) >> >> I'd be happy to provide more information and do some debugging, but will >> need instructions. > > I got a lead by running: > > $ LIBGL_DEBUG=verbose glinfo|more > libGL: OpenDriver: trying /usr/local/lib/dri/i965_dri.so > [intel_init_bufmgr: 1317] Kernel 3.6 required. > libGL error: failed to create dri screen > libGL error: failed to load driver: i965 > > Looking into that function (intel_init_bufmgr() in port graphics/libdrm, > mesa-17.1.1/src/mesa/drivers/dri/i965/intel_screen.c) reveals that it > tries this: > > if (!intel_get_boolean(screen, I915_PARAM_HAS_WAIT_TIMEOUT)) { > fprintf(stderr, "[%s: %u] Kernel 3.6 required.\n", __func__, __LINE__); > return false; > } > > But, I915_PARAM_HAS_WAIT_TIMEOUT does not exist on 10.x! > > It is missing in src/sys/dev/drm2/i915/i915_drm.h, so it fails, and > resorts to sw rendering. > > Bengt