From owner-freebsd-questions@freebsd.org Thu Apr 23 09:36:30 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D9DE2AF42F; Thu, 23 Apr 2020 09:36:30 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497ByN6nxqz4kyy; Thu, 23 Apr 2020 09:36:28 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1587634581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aqWSY5F9gbx8Txa/69wKhT4kCmYxslOMOpets8PZLWA=; b=ulwNjncRVFLcwvOKCn5id5avD46onAAdEWmJZ1uP5dMx0T6IJZCm9RTJ6yniAvSBovqDBy 9S325tjPtbQER+OyMU+no9jj0hBhZC/zqOcnJrKO+C2+kYJVxRYEPFRvZBhEpAuzSqlAaQ Khjc8Bu+Njlix56zzpeMPdKn6zP1ZIs= Received: from tails.home (lfbn-idf2-1-900-181.w86-238.abo.wanadoo.fr [86.238.131.181]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 6dd0df7f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 23 Apr 2020 09:36:21 +0000 (UTC) Date: Thu, 23 Apr 2020 11:36:19 +0200 From: Emmanuel Vadot To: Frederic Chardon Cc: Jan Beich , Niclas Zeising , freebsd-x11@freebsd.org, FreeBSD Questions Mailing List Subject: Re: Wayland on FreeBSD Message-Id: <20200423113619.846772c919fece1861a8cca7@bidouilliste.com> In-Reply-To: References: <6c7abdcf-aeef-4af4-b8f4-9d7fd0e45cf0@localhost> <7fba319c-c012-8893-3ce0-e2a166c38d2d@daemonic.se> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 497ByN6nxqz4kyy X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=ulwNjncR; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-2.38 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; TAGGED_RCPT(0.00)[freebsd]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.38)[ip: (-9.19), ipnet: 212.83.128.0/19(1.88), asn: 12876(0.43), country: FR(0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 09:36:30 -0000 On Thu, 23 Apr 2020 11:24:37 +0200 Frederic Chardon wrote: > Le jeu. 23 avr. 2020 =E0 00:35, Jan Beich a =E9crit : > > > > Frederic Chardon writes: > > > > > Le mer. 22 avr. 2020 =E0 16:51, Jan Beich a =E9c= rit : > > > > > >> > > >> Frederic Chardon writes: > > >> > > >> > Le lun. 20 avr. 2020 =E0 23:06, Jan Beich a = =E9crit : > > >> > > > >> >> > > >> >> Frederic Chardon writes: > > >> >> > > >> >> > > > >> >> > The trace shows usage of llvmpipe after the failed ioctl on > > >> >> > /dev/dri/card0, so as I understand the lack of hardware acceler= ation > > >> >> > concerns only Xwayland, whereas wayland itself is accelerated ? > > >> >> > > >> >> Yep. Check which ioctls fail then try to reproduce outside of Mes= a or > > >> >> hardcode the result. Overriding PCI ID via INTEL_DEVID_OVERRIDE is > > >> >> unlikely to help e.g., > > >> > > > >> > All below failure occurs only in xwayland, X11 and wayland succeed. > > >> > > > >> > The first failure is with I915_PARAM_CHIPSET_ID. When I hardcode t= he > > >> > correct ID I get a failure with I915_PARAM_HAS_RELAXED_DATA. When I > > >> > force the result to be true (as with X11 and Wayland), the ioctl > > >> > DRM_I915_GEM_EXECBUFFER2_WR fails with errno EPERM. > > >> > > >> Thanks for investigating. Maybe either DRM_AUTH or DRM_RENDER_ALLOW = fails. > > >> Does setuid bit on Xwayland binary help? > > > Yes, hardware acceleration works. eglinfo still complain about invalid > > > 0xffffffff PCI ID though > > > > > >> Does disabling render node help > > >> e.g., chmod 0000 /dev/dri/renderD128 ? > > > No > > > > > > What helps however is to mount the different linux filesystems after > > > i915kms is loaded. > > > eg I added "late" keyword to fstab as below > > > devfs /compat/linux/dev devfs rw,late 0 0 > > > fdesc /compat/linux/dev/fd fdescfs rw,late,linrdlnk 0 0 > > > linproc /compat/linux/proc linprocfs rw,late 0 0 > > > linsys /compat/linux/sys linsysfs rw,late 0 0 > > > > > > without the late keyword, acceleration works if devfs alone is > > > mounted. any other fs (with or without devfs) makes Xwayland use > > > software rendering. > > > As with setuid Xwayland, eglinfo complains about invalid PCI ID. > > > > manu@ fixed major/minor usage upstream. Can you try the following patch? >=20 > No change. major are still different, minor doesn't have the 0x80 bit > set, and hw accel is disabled if I mount linux pseudofs before kldload > i915kms major/minor are irrelevent on FreeBSD, upstream code now don't care about them and should properly detect the node type. I haven't followed the whole thread as it's a typical mailing list thread that switched to troll and unreleated content. Can someone explain what is the problem that you have please ? > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" --=20 Emmanuel Vadot