[Mesa] Very low Gallium performance compared to Trisquel

  • Done
  • quality assurance status badge
Details
8 participants
  • Danny Milosavljevic
  • Thompson, David
  • Leo Famulari
  • Ludovic Courtès
  • Matthew Brooks
  • Marius Bakke
  • Mark H Weaver
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Matthew Brooks
Severity
normal

Debbugs page

M
M
Matthew Brooks wrote on 3 Mar 2017 00:04
(address . bug-guix@gnu.org)
CAPi-ftqAM_+Xm6eDV_3cHu1k1T6T3vz-Y9hqW=MBTrGsyidHzQ@mail.gmail.com
This came up in a help-guix thread, and Ricardo Wurmus asked me to
post here requesting that Mesa be built with LLVM to improve Gallium's
performance.

The original post is here:
but in short, when running GuixSD on my system, Gnome is unusably
slow, and while LXDE is usable, trying to play even 480p videos
results in a slideshow rather than a video.
On Trisquel though, even though it's also blobless and using Gallium,
the performance is vastly better, and even HD videos play fine.

I'm not really familiar with stuff this deep into the system, so if
there's any extra info you all need then just let me know and I'll be
happy to provide it.


Anyway, thanks for your time, and all the work you all are doing.

Matthew F. Brooks
L
L
Leo Famulari wrote on 3 Mar 2017 09:53
(name . Matthew Brooks)(address . matthewfbrooks@gmail.com)(address . 25953@debbugs.gnu.org)
20170303175355.GC18261@jasmine
On Fri, Mar 03, 2017 at 02:04:14AM -0600, Matthew Brooks wrote:
Toggle quote (16 lines)
> This came up in a help-guix thread, and Ricardo Wurmus asked me to
> post here requesting that Mesa be built with LLVM to improve Gallium's
> performance.
>
> The original post is here:
> https://lists.gnu.org/archive/html/help-guix/2017-02/msg00141.html
> but in short, when running GuixSD on my system, Gnome is unusably
> slow, and while LXDE is usable, trying to play even 480p videos
> results in a slideshow rather than a video.
> On Trisquel though, even though it's also blobless and using Gallium,
> the performance is vastly better, and even HD videos play fine.
>
> I'm not really familiar with stuff this deep into the system, so if
> there's any extra info you all need then just let me know and I'll be
> happy to provide it.

I used to use GuixSD's GNOME on my Thinkpad x200s but, at some point, it
started to have the problem you describe. I decided to stop using GNOME
instead of investigating the bug because I had no idea where to start
looking.

But if I can help change some packages and test the changes, please let
me know how.
M
M
Marius Bakke wrote on 3 Mar 2017 10:15
(address . 25953@debbugs.gnu.org)
878tom6xc6.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Leo Famulari <leo@famulari.name> writes:

Toggle quote (25 lines)
> On Fri, Mar 03, 2017 at 02:04:14AM -0600, Matthew Brooks wrote:
>> This came up in a help-guix thread, and Ricardo Wurmus asked me to
>> post here requesting that Mesa be built with LLVM to improve Gallium's
>> performance.
>>
>> The original post is here:
>> https://lists.gnu.org/archive/html/help-guix/2017-02/msg00141.html
>> but in short, when running GuixSD on my system, Gnome is unusably
>> slow, and while LXDE is usable, trying to play even 480p videos
>> results in a slideshow rather than a video.
>> On Trisquel though, even though it's also blobless and using Gallium,
>> the performance is vastly better, and even HD videos play fine.
>>
>> I'm not really familiar with stuff this deep into the system, so if
>> there's any extra info you all need then just let me know and I'll be
>> happy to provide it.
>
> I used to use GuixSD's GNOME on my Thinkpad x200s but, at some point, it
> started to have the problem you describe. I decided to stop using GNOME
> instead of investigating the bug because I had no idea where to start
> looking.
>
> But if I can help change some packages and test the changes, please let
> me know how.

What are your hardware specs?

For testing, you could try building "mesa" with "--enable-gallium-llvm"
and maybe "--enable-llvm-shared-libs".

It could be interesting to see how Trisquel builds mesa.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAli5srkACgkQoqBt8qM6
VPoh5ggA1MyPo9ck/9v/FJvFkuzNPhce2qpXfrVlH1XhO+//trPvFz4v2i9Xovjl
IVzQux76gig8BuSl/8tf35QymjjhkxhUgTGdSmasyRw3a15egpsHi+xL7q98yd8u
b+2WbVaoXiqIJRzDw4Pe6RjRkkzfT9KqMK1Z94jP0GKXazOgsKdA8H0Y9L5z8coN
CFExSSAKqsSc5eQA8SjVINHxtkTEwMYpY/WzEQGoFhyoceIY3ygvVowY7jNRc4Uk
83PGMGhN/qv4GJxBcRrUIaTT8EjoceslXNcfZ2/yC5pxJwCUzYPVz8nP7tfd67fb
+LEHZ3aqq6PK2wCNMgctKX1px9vcWg==
=SRt3
-----END PGP SIGNATURE-----

M
M
Matthew Brooks wrote on 3 Mar 2017 14:22
Fwd: bug#25953: [Mesa] Very low Gallium performance compared to Trisquel
(address . 25953@debbugs.gnu.org)
CAPi-ftr7iVssDe3rebPJQr7o6z8L+F54PXQpUMtFrqUTwYxHkg@mail.gmail.com
Forgot to CC this when sending.


---------- Forwarded message ----------
From: Matthew Brooks <matthewfbrooks@gmail.com>
Date: Fri, Mar 3, 2017 at 4:11 PM
Subject: Re: bug#25953: [Mesa] Very low Gallium performance compared to Trisquel
To: Marius Bakke <mbakke@fastmail.com>


Toggle quote (2 lines)
> What are your hardware specs?

I'm using an AMD Phenom II X6 1100T (~3GHz, 6 cores). I've got 16 GB
of RAM. My graphics card is an Nvidia Geforce 1060 with 6GB of VRAM.
The screen is a 1920x1080 monitor from Asus.

Toggle quote (3 lines)
> For testing, you could try building "mesa" with "--enable-gallium-llvm"
> and maybe "--enable-llvm-shared-libs".

How would I do that? I tried making a copy of gl.scm (which contains
the definition for the standard mesa package), and stripping out the
non-mesa packages and adding those compile flags, but when I did "guix
package --install-from-file=./gl.scm", it didn't actually seem to do
anything.
Before that I also tried "guix package --install mesa
--enable-gallium-llvm --enable-llvm-shared-libs", but it (predictably,
in hindsight) gave an "unrecognized option" error.

Anyway, thanks for your help, and have a nice day!
R
R
Ricardo Wurmus wrote on 6 Mar 2017 06:35
[PATCH] gnu: mesa: Build LLVM Gallium drivers.
(address . 25953@debbugs.gnu.org)
20170306143526.30361-1-rekado@elephly.net

* gnu/packages/gl.scm (mesa)[inputs]: Add llvm.
[arguments]: Build LLVM Gallium drivers.
---
gnu/packages/gl.scm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

Toggle diff (41 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index a3862f1ec..fff0e9ab3 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2014, 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
-;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 David Thompson <davet@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -33,6 +33,7 @@
#:use-module (gnu packages gettext)
#:use-module (gnu packages guile)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages video)
@@ -230,14 +231,15 @@ also known as DXTn or DXTC) for Mesa.")
("makedepend" ,makedepend)
("presentproto" ,presentproto)
("s2tc" ,s2tc)
+ ("llvm" ,llvm)
("wayland" ,wayland)))
(native-inputs
`(("pkg-config" ,pkg-config)
("python" ,python-2)))
(arguments
`(#:configure-flags
- '(;; drop r300 from default gallium drivers, as it requires llvm
- "--with-gallium-drivers=r600,svga,swrast,nouveau,virgl"
+ '("--with-gallium-drivers=i915,r300,r600,svga,swrast,nouveau,virgl"
+ "--enable-gallium-llvm"
;; Enable various optional features. TODO: opencl requires libclc,
;; omx requires libomxil-bellagio
"--with-egl-platforms=x11,drm,wayland"
--
2.12.0
T
T
Thompson, David wrote on 6 Mar 2017 06:58
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 25953@debbugs.gnu.org)
CAJ=RwfZN=Ayj70Ym6yy9mniW_CtnVSKXrPJa2m55yqKctuj3RA@mail.gmail.com
On Mon, Mar 6, 2017 at 9:35 AM, Ricardo Wurmus <rekado@elephly.net> wrote:
Toggle quote (5 lines)
>
> * gnu/packages/gl.scm (mesa)[inputs]: Add llvm.
> [arguments]: Build LLVM Gallium drivers.

LGTM. I think this patch would need to be applied somewhere other than
master to avoid mass rebuilds.

- Dave
D
D
Danny Milosavljevic wrote on 6 Mar 2017 08:46
(name . Thompson, David)(address . dthompson2@worcester.edu)
20170306174633.057e67d4@scratchpost.org
Also, there's a newer Mesa version available (and the Mesa version numbers are now year-based). So if we change it anyway we might want to update it.
L
L
Leo Famulari wrote on 6 Mar 2017 10:55
(name . Thompson, David)(address . dthompson2@worcester.edu)
20170306185539.GH2185@jasmine
On Mon, Mar 06, 2017 at 09:58:04AM -0500, Thompson, David wrote:
Toggle quote (9 lines)
> On Mon, Mar 6, 2017 at 9:35 AM, Ricardo Wurmus <rekado@elephly.net> wrote:
> > Fixes <https://bugs.gnu.org/25953>.
> >
> > * gnu/packages/gl.scm (mesa)[inputs]: Add llvm.
> > [arguments]: Build LLVM Gallium drivers.
>
> LGTM. I think this patch would need to be applied somewhere other than
> master to avoid mass rebuilds.

Since core-updates is (still) in the early stages, we could put it
there.
R
R
Ricardo Wurmus wrote on 6 Mar 2017 13:37
(name . Leo Famulari)(address . leo@famulari.name)
87y3wi2ijj.fsf@elephly.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (13 lines)
> On Mon, Mar 06, 2017 at 09:58:04AM -0500, Thompson, David wrote:
>> On Mon, Mar 6, 2017 at 9:35 AM, Ricardo Wurmus <rekado@elephly.net> wrote:
>> > Fixes <https://bugs.gnu.org/25953>.
>> >
>> > * gnu/packages/gl.scm (mesa)[inputs]: Add llvm.
>> > [arguments]: Build LLVM Gallium drivers.
>>
>> LGTM. I think this patch would need to be applied somewhere other than
>> master to avoid mass rebuilds.
>
> Since core-updates is (still) in the early stages, we could put it
> there.

Done. It’s now on core-updates (093c6f8bc). I hope this really does
fix the performance problems.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
M
M
Mark H Weaver wrote on 6 Mar 2017 23:04
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 25953@debbugs.gnu.org)
871su9lg9o.fsf@netris.org
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (5 lines)
>
> * gnu/packages/gl.scm (mesa)[inputs]: Add llvm.
> [arguments]: Build LLVM Gallium drivers.

I'm uncomfortable adding llvm as a requirement for our most minimal X11
system, for several reasons. Can we find a way to make this optional?

Mark
R
R
Ricardo Wurmus wrote on 7 Mar 2017 05:29
(name . Mark H Weaver)(address . mhw@netris.org)(address . 25953@debbugs.gnu.org)
87poht2p1w.fsf@elephly.net
Mark H Weaver <mhw@netris.org> writes:

Toggle quote (10 lines)
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Fixes <https://bugs.gnu.org/25953>.
>>
>> * gnu/packages/gl.scm (mesa)[inputs]: Add llvm.
>> [arguments]: Build LLVM Gallium drivers.
>
> I'm uncomfortable adding llvm as a requirement for our most minimal X11
> system, for several reasons. Can we find a way to make this optional?

Would it make sense to add a “mesa-minimal” package and a minimal
variant of xorg-server where any mesa package is rewritten to be
mesa-minimal?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
M
M
Mark H Weaver wrote on 10 Mar 2017 17:45
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 25953@debbugs.gnu.org)
87o9x8powc.fsf@netris.org
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (16 lines)
> Mark H Weaver <mhw@netris.org> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> Fixes <https://bugs.gnu.org/25953>.
>>>
>>> * gnu/packages/gl.scm (mesa)[inputs]: Add llvm.
>>> [arguments]: Build LLVM Gallium drivers.
>>
>> I'm uncomfortable adding llvm as a requirement for our most minimal X11
>> system, for several reasons. Can we find a way to make this optional?
>
> Would it make sense to add a “mesa-minimal” package and a minimal
> variant of xorg-server where any mesa package is rewritten to be
> mesa-minimal?

Judging by the number of packages that include 'mesa' as an input, it
won't be so easy. Search for ",mesa" in gnu/packages/*.scm, and see the
output of "guix refresh -l mesa". The xf86-video-* packages include
'mesa' as input, and many other packages as well.

I won't block this, but I will take this opportunity to mention that for
those of us who wish to build GuixSD from source code on our own
machines, life is becoming increasingly uncomfortable as more and more
optional features are added to our core packages. We are on a
trajectory to leave that set of users behind, as we cater primarily to
the majority who use the latest Intel machines and don't worry about the
security of either the Intel Management Engine or our build farm.

Mark
L
L
Ludovic Courtès wrote on 11 Mar 2017 02:58
(name . Mark H Weaver)(address . mhw@netris.org)
87r3249j28.fsf@gnu.org
Mark H Weaver <mhw@netris.org> skribis:

Toggle quote (9 lines)
> > Would it make sense to add a “mesa-minimal” package and a minimal
> > variant of xorg-server where any mesa package is rewritten to be
> > mesa-minimal?
>
> Judging by the number of packages that include 'mesa' as an input, it
> won't be so easy. Search for ",mesa" in gnu/packages/*.scm, and see the
> output of "guix refresh -l mesa". The xf86-video-* packages include
> 'mesa' as input, and many other packages as well.

We could somehow provide a way (maybe an xorg-service option) to rewrite
the package graph so that it uses mesa-minimal. WDYT?

Toggle quote (5 lines)
> I won't block this, but I will take this opportunity to mention that for
> those of us who wish to build GuixSD from source code on our own
> machines, life is becoming increasingly uncomfortable as more and more
> optional features are added to our core packages.

This is true, but it’s a problem that concerns GNU/Linux in general;
I don’t think Guix is really special in this regard.

I mean, in the good ol’ GCC 2.95 and GTK+ 2.x days, when D-Bus and its
friends didn’t exist, there was much less to build, right? :-)

Ludo’.
M
M
Matthew Brooks wrote on 15 Mar 2017 01:58
(address . 25953@debbugs.gnu.org)
CAPi-ftoQtdh7wUzshdS5yaqdtc2EP6Nw_D-qZB55xyFQtq583A@mail.gmail.com
Forgot to CC the list again. :/

Toggle quote (6 lines)
> life is becoming increasingly uncomfortable as more and more
> optional features are added to our core packages. We are on a
> trajectory to leave that set of users behind, as we cater primarily to
> the majority who use the latest Intel machines and don't worry about the
> security of either the Intel Management Engine or our build farm.

I definitely wouldn't want to push GuixSD in a less libre direction,
and I can just stick with XFCE on my desktop and just watch videos on
my laptop (which has more libre friendly hardware).
I also have a flash drive running a different distro for if I ever
really want to do anything particularly hardware intensive on my
desktop, so it's no problem for me to just reboot into that on
occasion if I need to.
R
R
Ricardo Wurmus wrote on 15 Mar 2017 04:58
(name . Matthew Brooks)(address . matthewfbrooks@gmail.com)(address . 25953@debbugs.gnu.org)
877f3qwy3i.fsf@elephly.net
It looks like the latest status here (according to discussions on IRC)
is that we’ll add LLVM as a dependency to mesa only when building on
x86_64 or i686. The LLVM Gallium drivers do not seem to be supported on
other architectures anyway.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
L
L
Ludovic Courtès wrote on 21 Nov 2017 05:29
control message for bug #25953
(address . control@debbugs.gnu.org)
877eujn4ka.fsf@gnu.org
tags 25953 fixed
close 25953
?
Your comment

This issue is archived.

To comment on this conversation send an email to 25953@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 25953
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch