unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Xorg tearing fix on Intel HD Graphics 4000
Date: Sun, 25 Jun 2017 07:08:30 -0400	[thread overview]
Message-ID: <87injkiatt.fsf@netris.org> (raw)
In-Reply-To: 87vank7h4x.fsf@gmail.com

[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]

Hi Chris,

Chris Marusich <cmmarusich@gmail.com> writes:

> Mark H Weaver <mhw@netris.org> writes:
>
>> However, your proposed workaround is not a proper fix, and I don't think
>> we should apply it system-wide in Guix.
>
> Can you elaborate on why it is not a proper fix?  It isn't obvious to
> me.

You're right, it's not obvious, and an explanation is indeed warranted.

The problem is that the Device section added by this patch specifies
that the "intel" driver should be used.  I haven't tested it, but the
way xorg.conf generally works is that explicit configuration overrides
auto-configuration.  Quoting from the introduction of xorg.conf(5):

  Xorg supports several mechanisms for supplying/obtaining configuration
  and run-time parameters: command line options, environment variables,
  the xorg.conf configuration file, auto-detection, and fallback
  defaults.  When the same information is supplied in more than one way,
  the highest precedence mechanism is used.  The list of mechanisms is
  ordered from highest precedence to lowest.

  https://www.x.org/archive/X11R6.8.1/doc/xorg.conf.5.html#sect1

If we want to make UXA the default acceleration method for
xf86-video-intel, I've attached a patch that accomplishes this without
overriding auto-configuration.  Given the severity of the problems on
the X200, I would be in favor of applying this patch to master.  The
X200 is an important system for us because it is one of only two
RYF-certified laptops.

FWIW, I do not notice any visually apparent difference in performance
between UXA and SNA on the X200 for things like web browsing, watching
videos, and running gnome-shell.  Nonetheless, I've seen reports that
SNA performs significantly better than UXA, at least on newer Intel
chips:

  http://cynic.cc/blog/posts/sna_acceleration_vs_uxa/
  https://ickle.wordpress.com/2013/10/02/and-over-in-the-red-corner/
  https://www.reddit.com/r/archlinux/comments/17sy9l/intel_graphics_uxa_vs_sna/

I would invite someone who cares about this to enhance
'xorg-configuration-file' in (gnu services xorg) to allow users to
optionally specify which accel-method to use for each driver.

       Mark


[-- Attachment #2: [PATCH] gnu: xf86-video-intel: Use UXA accel method by default --]
[-- Type: text/x-patch, Size: 1532 bytes --]

From 745487d79dca402609200f67431ac19eaa99a4eb Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Sun, 25 Jun 2017 05:20:36 -0400
Subject: [PATCH] gnu: xf86-video-intel: Use UXA accel method by default.

* gnu/packages/xorg.scm (xf86-video-intel)[arguments]: Add #:configure-flags
with "--with-default-accel=uxa".
---
 gnu/packages/xorg.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index d4da5d709..c6d194622 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
@@ -2849,7 +2849,8 @@ X server.")
                                     (string-prefix? "x86_64-" system)))
                %supported-systems))
       (arguments
-       '(#:phases (modify-phases %standard-phases
+       '(#:configure-flags '("--with-default-accel=uxa")
+         #:phases (modify-phases %standard-phases
                     (add-after 'unpack 'bootstrap
                       (lambda _
                         (zero? (system* "autoreconf" "-vfi")))))))
-- 
2.13.1


  parent reply	other threads:[~2017-06-25 11:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21  7:55 Xorg tearing fix on Intel HD Graphics 4000 Roel Janssen
2017-06-21 10:38 ` Ricardo Wurmus
2017-06-21 13:26   ` Roel Janssen
2017-06-21 16:27     ` Kei Kebreau
2017-06-21 17:23     ` Mark H Weaver
2017-06-21 22:21       ` Roel Janssen
2017-06-21 23:23         ` William
2017-06-25 11:59           ` Marius Bakke
2017-06-25 17:13             ` Roel Janssen
2017-06-25 17:39               ` Marius Bakke
2017-06-25  5:47       ` Chris Marusich
2017-06-25  8:31         ` Roel Janssen
2017-06-25 11:38           ` Mark H Weaver
2017-06-25 11:08         ` Mark H Weaver [this message]
2017-08-07 21:48           ` Clément Lassieur
2017-06-25  5:46     ` Chris Marusich
2017-06-25  8:28       ` Roel Janssen
2017-07-20  2:43         ` Chris Marusich
2017-07-20 10:57           ` Roel Janssen
2017-06-23 18:00 ` Christopher Baines
2017-06-26  8:55 ` Andy Wingo
2017-06-27 17:43   ` Mark H Weaver
2017-06-28  8:24     ` Andy Wingo
2017-06-28 18:14       ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87injkiatt.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).