From owner-freebsd-current@freebsd.org Tue Feb 20 13:39:34 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB396F02A46 for ; Tue, 20 Feb 2018 13:39:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8369477AD9 for ; Tue, 20 Feb 2018 13:39:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 43C212603CD; Tue, 20 Feb 2018 14:39:31 +0100 (CET) Subject: Re: Recent world+kernel has broken Linux 3D apps? To: Johannes Lundberg Cc: freebsd-current References: <25f3a769-b1dd-9531-c87f-20a5f7b73ff3@selasky.org> From: Hans Petter Selasky Message-ID: Date: Tue, 20 Feb 2018 14:39:31 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Feb 2018 13:39:34 -0000 On 02/20/18 14:03, Johannes Lundberg wrote: > On Tue, Feb 20, 2018 at 12:57 PM, Hans Petter Selasky > wrote: > >> On 02/20/18 12:39, Johannes Lundberg wrote: >> >>> Before rebuilding world my system was running Linux games fine with a >>> couple of months old world/kernel and drm-next-kmod. >>> >>> Since updating world+kernel last week all Linux 3D apps fail (native >>> binaries like glxgears and supertuxkart works fine). >>> >>> linux-c6/c7, intel/modesetting, does no difference >>> This is on Dell Intel Broadwell laptop. >>> >>> Doom 3 fail like this: >>> >>> ----- R_ReloadARBPrograms ----- >>> glprogs/test.vfpsignal caught: Segmentation fault >>> si_code 1 >>> Trying to exit gracefully.. >>> >>> >>> And glxgears (in /compat/linux/usr/bin/) >>> >>> johannes@jd2:~ % /compat/linux/usr/bin/glxgears >>> Couldn't dlopen libudev.so.1 or libudev.so.0, driver detection may be >>> broken. >>> Couldn't dlopen libudev.so.1 or libudev.so.0, driver detection may be >>> broken. >>> Couldn't dlopen libudev.so.1 or libudev.so.0, driver detection may be >>> broken. >>> Couldn't dlopen libudev.so.1 or libudev.so.0, driver detection may be >>> broken. >>> Couldn't dlopen libudev.so.1 or libudev.so.0, driver detection may be >>> broken. >>> libdrm aub dumping is deprecated. >>> >>> Use intel_aubdump from intel-gpu-tools instead. Install intel-gpu-tools, >>> then run (for example) >>> >>> $ intel_aubdump --output=trace.aub glxgears -geometry 500x500 >>> >>> See the intel_aubdump man page for more details. >>> bo_create: buf 1 (swizzle test) 32768b >>> bo_unreference final: 1 (swizzle test) >>> libGL: Can't open configuration file /home/johannes/.drirc: No such file >>> or >>> directory. >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> bo_create: buf 1 (transform feedback offsets) 16b >>> bo_create: buf 2 (xfb primitive counts) 4096b >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> intelNewTextureObject >>> Mesa warning: couldn't open libtxc_dxtn.so, software DXTn >>> compression/decompression unavailable >>> libGL: Can't open configuration file /home/johannes/.drirc: No such file >>> or >>> directory. >>> bo_create: buf 3 (batchbuffer) 32768b >>> drm_intel_gem_bo_purge_vma_cache: cached=0, open=1, limit=-1 >>> bo_map: 3 (batchbuffer), map_count=1 >>> bo_map: 3 (batchbuffer) -> 0x1000 >>> bo_create: buf 4 (pipe_control workaround) 4096b >>> bo_create: buf 5 (program cache) 4096b >>> drm_intel_gem_bo_purge_vma_cache: cached=0, open=2, limit=-1 >>> bo_map_gtt: mmap 5 (program cache), map_count=1 >>> intel_bufmgr_gem.c:1461: Error mapping buffer 5 (program cache): Invalid >>> argument . >>> drm_intel_gem_bo_purge_vma_cache: cached=0, open=1, limit=-1 >>> bo_create: buf 6 (shader time) 393216b >>> bo_create: buf 7 (bufferobj) 65536b >>> enter intel_update_renderbuffers, drawable 0x614b80 >>> enter intel_update_dri2_buffers, drawable 0x614b80 >>> attaching buffer 3, at 1, cpp 4, pitch 1536 >>> bo_create_from_handle: 3 (dri2 back buffer) >>> intel_miptree_create_layout target GL_TEXTURE_2D format >>> MESA_FORMAT_B8G8R8X8_UNORM level 0..0 slices 1 <-- 0x778210 >>> intel_miptree_set_level_info level 0, depth 1, offset 0,0 >>> intel_miptree_set_total_width_height: 300x300x4 >>> intel_alloc_private_renderbuffer_storage: GL_DEPTH_COMPONENT: >>> MESA_FORMAT_Z24_UNORM_X8_UINT (300x300) >>> intel_miptree_create_layout target GL_TEXTURE_2D format >>> MESA_FORMAT_Z24_UNORM_X8_UINT level 0..0 slices 1 <-- 0x778440 >>> intel_miptree_set_level_info level 0, depth 1, offset 0,0 >>> intel_miptree_set_total_width_height: 300x300x4 >>> bo_create: buf 9 (miptree) 409600b >>> bo_create: buf 10 (hiz) 98304b >>> mt 0x778440 level 0: HiZ enabled >>> intel_alloc_private_renderbuffer_storage: GL_STENCIL_INDEX: >>> MESA_FORMAT_S_UINT8 (300x300) >>> intel_miptree_create_layout target GL_TEXTURE_2D format >>> MESA_FORMAT_S_UINT8 >>> level 0..0 slices 1 <-- 0x778890 >>> intel_miptree_set_level_info level 0, depth 1, offset 0,0 >>> intel_miptree_set_total_width_height: 300x304x1 >>> bo_create: buf 11 (miptree) 102400b >>> Running synchronized to the vertical refresh. The framerate should be >>> approximately the same as the monitor refresh rate. >>> bo_create: buf 12 (bufferobj) 32768b >>> drm_intel_gem_bo_purge_vma_cache: cached=0, open=2, limit=-1 >>> bo_map_gtt: mmap 12 (bufferobj), map_count=1 >>> intel_bufmgr_gem.c:1461: Error mapping buffer 12 (bufferobj): Invalid >>> argument . >>> drm_intel_gem_bo_purge_vma_cache: cached=0, open=1, limit=-1 >>> >>> >>> Segmentation fault (core dumped) >>> >> >> Can you compare the debug prints with working version? >> >> > I don't have a working system anymore.. Need some time to set one up... > If anyone has, try this > > $ setenv INTEL_DEBUG all > $ setenv MESA_DEBUG 1 > $ setenv LIBGL_DEBUG 1 > $ /compat/linux/usr/bin/glxgears > This patch fixes it for me: > Index: sys/compat/linux/linux_mmap.c > =================================================================== > --- sys/compat/linux/linux_mmap.c (revision 329557) > +++ sys/compat/linux/linux_mmap.c (working copy) > @@ -129,7 +129,7 @@ > error = fget(td, fd, cap_rights_init(&rights, CAP_MMAP), &fp); > if (error != 0) > return (error); > - if (fp->f_type != DTYPE_VNODE) { > + if (fp->f_type != DTYPE_VNODE && fp->f_type != DTYPE_DEV) { > fdrop(fp, td); > return (EINVAL); > } --HPS