From owner-freebsd-x11@freebsd.org Fri Mar 17 02:02:49 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 7A287D0FF5E for ; Fri, 17 Mar 2017 02:02:49 +0000 (UTC) (envelope-from davshao@gmail.com) Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3425F1315 for ; Fri, 17 Mar 2017 02:02:49 +0000 (UTC) (envelope-from davshao@gmail.com) Received: by mail-qk0-x230.google.com with SMTP id y76so54645189qkb.0 for ; Thu, 16 Mar 2017 19:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=SdpvYBmruHqXnQUG1lpIXZy1KZdAEkvkcHIuKkVk0ng=; b=c5RrCdlygAXo0zrRWMJdgtnvDawfVOBuzz4tuCst3SalOU3Qb4n+C8k7MYQJVnhc+n mWhJbJXeQ3olfwK0ddWDW4l+/7cbldzVPCxh5XM4T431Ye+2pDto/y30HVd5uvKfA1rm SD8AtaRxK94I5HoxUIc/qUhBaQqiaOqnQBTlcT35IXiqPD+gIyf5xmU4+PX+Rz5c5o8r jwV4X6Z7oA/Eegl/NhUmzTaYqWdamDHlA3vM9JfoiPhDmGNwmBcGchyn0KvLkkCVZmTf LXQbmVQwuRv36H4Z1qSX0sWUIL0D0vj/Y+XnAJ8K2+mAwDaBPxFR4iYXOBE83qMtfVtX N0AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SdpvYBmruHqXnQUG1lpIXZy1KZdAEkvkcHIuKkVk0ng=; b=gz+WCySkQf39NeiSLRQ1XfCLBFvFbuE8o66cEDqZvhomKpIRfouDHDbvB3b0OnkJe7 cWTsUlbaZyBro9fQxEHGP62LSTg4UvYBL6usv2SFpvmrvlaobVYKNHZ5euq5J/XDgTnX ZtBoPa3PrEwcdW42ZBB4Wc+eIbn2gQcibwFVMHHOR3TYSRdkAoXkUE2xFq8VlIS/498D F3tekrem4Tc0JZkV3G9PCoUcGDAvkx4U4dMjvVjJWkblcYVojoRNIUJLm8PwWpU7lB6h 9ZhXydXcLGbNTboqXlEszMqAnJSBGnqy19vQgtPUFLGgguvN6mdNC2oBw5Z6Jmouk8ay F38w== X-Gm-Message-State: AFeK/H2XCz99FnBr+giUMZstdyCOEiV+fhouBPozvfLmFnMl20hyj5AHvs5GEbPCfKF0Bv9xjOiOTEQzMjIMaA== X-Received: by 10.55.41.215 with SMTP id p84mr10324392qkp.35.1489716168174; Thu, 16 Mar 2017 19:02:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.135.129 with HTTP; Thu, 16 Mar 2017 19:02:47 -0700 (PDT) From: David Shao Date: Thu, 16 Mar 2017 19:02:47 -0700 Message-ID: Subject: I assert xf86-video-intel problems due to 2 bugs SIX characters total To: freebsd-x11@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Fri, 17 Mar 2017 02:02:49 -0000 My testing using pkgsrc merged with FreeBSD ports patches on FreeBSD 11-release, 11-stable, and 12-current has shown that only 2 bugs, a total of SIX characters, were preventing proper functioning of xf86-video-intel, one of those bugs not even in xf86-video-intel but instead in libdrm. The xf86-video-intel was instantly patched minutes after I submitted a bug report. I also submitted the libdrm bug report: https://bugs.freedesktop.org/show_bug.cgi?id=100077 "libdrm atomic_add_unless() may reverse return value meaning" --- xf86atomic.h.orig 2015-09-22 04:34:51.000000000 +0000 +++ xf86atomic.h @@ -111,7 +111,7 @@ static inline int atomic_add_unless(atom c = atomic_read(v); while (c != unless && (old = atomic_cmpxchg(v, c, c + add)) != c) c = old; - return c == unless; + return c != unless; } I am curious what exactly people are successfully running. Are they even using xf86-video-intel? I am using libdrm 2.4.75, mesa 17.0.1, xorg-server 1.19.2, and xf86-video-intel up through the 2017-02-28 patch for the above bug. For mesa 17.0.1 I am using --enable-glx-tls in full awareness that FreeBSD does not match what Linux's glibc does. For an Intel IvyBridge machine with an i3-3225 CPU, Xorg.0.log has entries similar to: [ 240.791] intel: card at 0:2:0 is claimed by a Device section [ 240.792] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20080730 [ 240.792] (II) intel(0): SNA compiled with assertions enabled ... [ 240.827] (WW) Falling back to old probe method for vesa [ 240.827] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support [ 240.828] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4000 ... [ 240.901] (II) intel(0): SNA initialized with Ivybridge (gen7, gt2) backend [ 240.901] (==) intel(0): Backing store enabled [ 240.901] (==) intel(0): Silken mouse enabled [ 240.902] (II) intel(0): HW Cursor enabled [ 240.902] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message. [ 240.904] (==) intel(0): DPMS enabled [ 240.919] (II) intel(0): [DRI2] Setup complete [ 240.919] (II) intel(0): [DRI2] DRI driver: i965 [ 240.919] (II) intel(0): [DRI2] VDPAU driver: va_gl [ 240.919] (II) intel(0): direct rendering: DRI2 enabled [ 240.919] (II) intel(0): hardware support for Present enabled [ 240.919] InitOutput - xf86Screens[0]->pScreen = 0x803538400 [ 240.919] xf86Screens[0]->pScreen->CreateWindow = 0x805a5a230 [ 240.919] (--) RandR disabled [ 240.926] XFree86VidModeExtensionInitVidModeAddExtension [ 241.156] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer [ 241.156] (II) AIGLX: enabled GLX_ARB_create_context [ 241.156] (II) AIGLX: enabled GLX_ARB_create_context_profile [ 241.156] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile [ 241.156] (II) AIGLX: enabled GLX_INTEL_swap_event etc. So SNA with dri2. For Firefox 52, I use: LD_PRELOAD=/usr/pkg/lib/libGL.so firefox & In about:config I set layers.acceleration.force-enabled true If you try and follow this, know how to edit the local prefs.js! Then in about:support I obtain: Graphics Features Compositing OpenGL Asynchronous Pan/Zoom none WebGL Renderer Intel Open Source Technology Center -- Mesa DRI Intel(R) Ivybridge Desktop WebGL2 Renderer Intel Open Source Technology Center -- Mesa DRI Intel(R) Ivybridge Desktop Hardware H264 Decoding No Audio Backend oss GPU #1 Active Yes Description Intel Open Source Technology Center -- Mesa DRI Intel(R) Ivybridge Desktop Vendor ID Intel Open Source Technology Center Device ID Mesa DRI Intel(R) Ivybridge Desktop Driver Version 3.0 Mesa 17.0.1 Diagnostics AzureCanvasAccelerated 0 AzureCanvasBackend skia AzureContentBackend skia AzureFallbackCanvasBackend none CairoUseXRender 0 Decision Log HW_COMPOSITING blocked by default: Acceleration blocked by platform force_enabled by user: Force-enabled by pref OPENGL_COMPOSITING force_enabled by user: Force-enabled by pref I am then able to go to sites such as https://www.chromeexperiments.com/webgl to view the webgl demos. Again before trying these demos know how to edit prefs.js! Now for the sake of full disclosure, on the IvyBridge machine running FreeBSD 12-current, after a while there have been lockup problems with WebGL Water http://madebyevan.com/webgl-water/ (Same pkgsrc code on NetBSD current lower tier Radeon card on another amd cpu machine very smoothly runs webgl-water.) To summarize, applications such as glxgears and Firefox with webgl and hardware acceleration enabled work for me with the ONE CHARACTER patch to libdrm in atomic_add_unless, using xf86-video-intel. I'm writing this right now in the same Firefox 52 on FreeBSD xxxxxx.xxx 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r314974+16bf7dd2d06(svn_head): Wed Mar 15 20:52:59 PDT 2017 xxxxxx@xxxxxx.xxx:/usr/obj/usr/src/sys/GENERIC amd64