From owner-freebsd-current@freebsd.org Tue Feb 20 13:48:37 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 95A58F03554 for ; Tue, 20 Feb 2018 13:48:37 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (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 0D7C7780BA for ; Tue, 20 Feb 2018 13:48:37 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-wr0-x22d.google.com with SMTP id 34so14529610wre.13 for ; Tue, 20 Feb 2018 05:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Y+nRxge4hA7qtE616awo3ds4BmkeBARPgeTipjQ95TQ=; b=MEfajbEuO5wlrqlyfgIdVdFLnhwX6IVygygojcg/CrvnzZ7pWg2SB5TNwAmFnR+H6d diWrCeSVRW03hF2B18P+ZjgGrVa+9SoejTIlxmBld+C0nkXmgPFEsMXG48zjLvP8KE4+ sppIAOa3ZlsaH92k6fYiohsLoB8stuZtoHVBF1QFzSL80XK2KoZiONu2xiySameA3Py0 7qkQKnlvEOqZ35nB9yp9I4XbLN7No1YpPU3hGzlUxOfSn/Olw49J1+qdCKAGkS8qKHxc l0LlJklxNiPtVIwmdObIMW1t1hx5QcxFkmQzY4HhxOyPqXFASNheERHpLbSzUnMc3EeS Hi2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Y+nRxge4hA7qtE616awo3ds4BmkeBARPgeTipjQ95TQ=; b=hodkNkf6M1AYJRxfIxYHG2OwxnIP0KOmTDVP6n+C9oMYBVcyvZOQTJcd/mGhYg3HtV cvTUjXEuz7rOQ2zY0Y1g77xYBmpzLmmCNAAnB9lJyCr8ShgB0jAw6MHW/PrlP+75begR QprvO9bR2SiVknY2ICedc8BS97/jjcBCNVVcDP5hkG+WAkBEK0ngwdz2TukGmwe/bm0z F4OIiy0KVNUMo0AWJaPOCEP8m/QnfwzTYjJPbUiVcTXdl3GRj1DQVFSt/iVDtnkZ4I5O 3ylB9osT1uBKvdeLUd68u7r4Kzxg/NJ9mP5PeKbEFv5agdWdF7Pj168GuHK0q26+5+iw 93AQ== X-Gm-Message-State: APf1xPD5UHw76eqU6FNR/2xfgHJe2hSepBWNviozLKYLs3i2b13ESmJD MazvzLhrb8fvjPJxS6e2XVbAtRArfZEjBeojBG4= X-Google-Smtp-Source: AH8x226oDLrdaAiyitsl6tGhbFv9ebGpk53xEVdEbecsj4ki5+idXDNZNAlDHOcQjhbfnRAirCmQStTFBS6C1zYAdiY= X-Received: by 10.223.129.49 with SMTP id 46mr13045491wrm.133.1519134515973; Tue, 20 Feb 2018 05:48:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.165.68 with HTTP; Tue, 20 Feb 2018 05:47:55 -0800 (PST) In-Reply-To: References: <25f3a769-b1dd-9531-c87f-20a5f7b73ff3@selasky.org> From: Johannes Lundberg Date: Tue, 20 Feb 2018 13:47:55 +0000 Message-ID: Subject: Re: Recent world+kernel has broken Linux 3D apps? To: Hans Petter Selasky Cc: freebsd-current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 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:48:37 -0000 On Tue, Feb 20, 2018 at 1:39 PM, Hans Petter Selasky wrote: > 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); >> } >> > And just like magic it works again <3 > > --HPS >