unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* wip-xorg-server-1.18
@ 2016-02-18 21:03 Andy Wingo
  2016-02-19  4:19 ` wip-xorg-server-1.18 宋文武
  2016-02-23 21:17 ` wip-xorg-server-1.18 Mark H Weaver
  0 siblings, 2 replies; 7+ messages in thread
From: Andy Wingo @ 2016-02-18 21:03 UTC (permalink / raw)
  To: guix-devel

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

Hi,

My Broadwell laptop hasn't had working accelerated OpenGL since I
installed it.  It was using the llvmpipe, a software path.  Eventually
when I looked into it, it turned out that was because the
xf86-video-intel package was too old and disabled acceleration for my
chipset.  So I wrote an xorg updater, which uncovered about 62 package
updates.  There are in wip-xorg-server-1.18, or eventually will be once
the send-email git hook finishes running.

There are two notable commits, which I attach here for comment.  The
first adds the updater.  The last changes how the X server starts.
At some point in the X.org 1.17 development cycle, input modules started
shipping .conf snippets that were to go in an xorg.conf.d file.  These
snippets would register certain modules as providing the drivers for
certain classes of input devices, using a kind of pattern matching.
However with our setup, we didn't have one xorg.conf.d directory with
these files in it.  I experienced this problem as what I perceived to be
a video freeze, but in reality it was just that I had no keyboard or
mouse because no module volunteered to bind to my input devices.  So I
changed the X service to generate such a directory, like we do with dbus
and other things.  A proper solution would probably be to make Xorg
modules be "services" which provide extensions to the X server package,
but that's a problem for another day.

Andy


[-- Attachment #2: 0001-gnu-maintenance-Add-X.org-updater.patch --]
[-- Type: text/plain, Size: 3888 bytes --]

From 6ed739a8c7d45d7a6a4cabf493b1cbad80b48002 Mon Sep 17 00:00:00 2001
From: Andy Wingo <wingo@igalia.com>
Date: Thu, 18 Feb 2016 20:50:02 +0100
Subject: [PATCH] gnu-maintenance: Add X.org updater.

* guix/gnu-maintenance.scm (xorg-package?, latest-xorg-release): New
  private functions.
  (%xorg-updater): New public variable.

* guix/scripts/refresh.scm (%updaters): Add %xorg-updater.

* doc/guix.texi (Invoking guix refresh): Mention the new updater.
---
 doc/guix.texi            |  2 ++
 guix/gnu-maintenance.scm | 37 ++++++++++++++++++++++++++++++++++++-
 guix/scripts/refresh.scm |  3 ++-
 3 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index bac7389..ed17a63 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4612,6 +4612,8 @@ list of updaters).  Currently, @var{updater} may be one of:
 the updater for GNU packages;
 @item gnome
 the updater for GNOME packages;
+@item xorg
+the updater for X.org packages;
 @item elpa
 the updater for @uref{http://elpa.gnu.org/, ELPA} packages;
 @item cran
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 96fbfb7..9d720ca 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -33,6 +33,7 @@
   #:use-module (guix records)
   #:use-module (guix upstream)
   #:use-module (guix packages)
+  #:use-module (gnu packages)
   #:export (gnu-package-name
             gnu-package-mundane-name
             gnu-package-copyright-holder
@@ -57,7 +58,8 @@
             gnu-package-name->name+version
 
             %gnu-updater
-            %gnome-updater))
+            %gnome-updater
+            %xorg-updater))
 
 ;;; Commentary:
 ;;;
@@ -508,6 +510,32 @@ elpa.gnu.org, and all the GNOME packages."
                        ;; checksums.
                        #:file->signature (const #f))))
 
+(define (xorg-package? package)
+  "Return true if PACKAGE is an X.org package, developed by X.org."
+  (define xorg-uri?
+    (match-lambda
+      ((? string? uri)
+       (string-prefix? "mirror://xorg/" uri))
+      (_
+       #f)))
+
+  (match (package-source package)
+    ((? origin? origin)
+     (match (origin-uri origin)
+       ((? xorg-uri?) #t)
+       (_              #f)))
+    (_ #f)))
+
+(define (latest-xorg-release package)
+  "Return the latest release of PACKAGE, the name of an X.org package."
+  (let ((uri (string->uri (origin-uri (package-source (specification->package package))))))
+    (false-if-ftp-error
+     (latest-ftp-release
+      package
+      #:server "ftp.freedesktop.org"
+      #:directory
+      (string-append "/pub/xorg/" (dirname (uri-path uri)))))))
+
 (define %gnu-updater
   (upstream-updater
    (name 'gnu)
@@ -522,4 +550,11 @@ elpa.gnu.org, and all the GNOME packages."
    (pred gnome-package?)
    (latest latest-gnome-release)))
 
+(define %xorg-updater
+  (upstream-updater
+   (name 'xorg)
+   (description "Updater for X.org packages")
+   (pred xorg-package?)
+   (latest latest-xorg-release)))
+
 ;;; gnu-maintenance.scm ends here
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index f9e3f31..964fdcc 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -31,7 +31,7 @@
   #:use-module (guix scripts graph)
   #:use-module (guix monads)
   #:use-module ((guix gnu-maintenance)
-                #:select (%gnu-updater %gnome-updater))
+                #:select (%gnu-updater %gnome-updater %xorg-updater))
   #:use-module (guix import elpa)
   #:use-module (guix import cran)
   #:use-module (guix gnupg)
@@ -193,6 +193,7 @@ unavailable optional dependencies such as Guile-JSON."
   ;; List of "updaters" used by default.  They are consulted in this order.
   (list-updaters %gnu-updater
                  %gnome-updater
+                 %xorg-updater
                  %elpa-updater
                  %cran-updater
                  %bioconductor-updater
-- 
2.6.3


[-- Attachment #3: 0001-gnu-services-Start-X-with-configdir.patch --]
[-- Type: text/plain, Size: 3583 bytes --]

From b58c3fe4bf932768e9df20d9c2c74745ba5286e9 Mon Sep 17 00:00:00 2001
From: Andy Wingo <wingo@igalia.com>
Date: Thu, 18 Feb 2016 21:34:37 +0100
Subject: [PATCH] gnu: services: Start X with -configdir.

* gnu/services/xorg.scm (%default-xorg-modules): New public variable.
(xorg-configuration-directory): New function.
(xorg-start-command): Add #:modules keyword argument, defaulting to
%default-xorg-modules.  Build an xorg.conf.d directory from those
modules, and pass it to X via the -configdir parameter.
---
 gnu/services/xorg.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index a93dbfe..980b5a6 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -40,6 +40,7 @@
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match)
   #:export (xorg-configuration-file
+            %default-xorg-modules
             xorg-start-command
             %default-slim-theme
             %default-slim-theme-name
@@ -137,9 +138,52 @@ EndSection
   "\n"
   extra-config))
 
+(define %default-xorg-modules
+  (list xf86-video-vesa
+        xf86-video-fbdev
+        xf86-video-modesetting
+        xf86-video-cirrus
+        xf86-video-intel
+        xf86-video-mach64
+        xf86-video-nouveau
+        xf86-video-nv
+        xf86-video-sis
+        xf86-input-libinput
+        xf86-input-evdev
+        xf86-input-keyboard
+        xf86-input-mouse
+        xf86-input-synaptics))
+
+(define (xorg-configuration-directory modules)
+  "Return a directory that contains the @code{.conf} files for X.org that
+includes the @code{share/X11/xorg.conf.d} directories of each package listed
+in @var{modules}."
+  (computed-file "xorg.conf.d"
+                 #~(begin
+                     (use-modules (guix build utils)
+                                  (srfi srfi-1))
+
+                     (define files
+                       (append-map (lambda (module)
+                                     (find-files (string-append
+                                                  module
+                                                  "/share/X11/xorg.conf.d")
+                                                 "\\.conf$"))
+                                   (list #$@modules)))
+
+                     (mkdir #$output)
+                     (for-each (lambda (file)
+                                 (symlink file
+                                          (string-append #$output "/"
+                                                         (basename file))))
+                               files)
+                     #t)
+                 #:modules '((guix build utils))))
+
 (define* (xorg-start-command #:key
                              (guile (canonical-package guile-2.0))
                              (configuration-file (xorg-configuration-file))
+                             (modules %default-xorg-modules)
                              (xorg-server xorg-server))
   "Return a derivation that builds a @var{guile} script to start the X server
 from @var{xorg-server}.  @var{configuration-file} is the server configuration
@@ -158,6 +202,7 @@ Usually the X server is started by a login manager."
                "-logverbose" "-verbose"
                "-xkbdir" (string-append #$xkeyboard-config "/share/X11/xkb")
                "-config" #$configuration-file
+               "-configdir" #$(xorg-configuration-directory modules)
                "-nolisten" "tcp" "-terminate"
 
                ;; Note: SLiM and other display managers add the
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: wip-xorg-server-1.18
  2016-02-18 21:03 wip-xorg-server-1.18 Andy Wingo
@ 2016-02-19  4:19 ` 宋文武
  2016-02-23 21:17 ` wip-xorg-server-1.18 Mark H Weaver
  1 sibling, 0 replies; 7+ messages in thread
From: 宋文武 @ 2016-02-19  4:19 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

Andy Wingo <wingo@igalia.com> writes:

> Hi,
>
> My Broadwell laptop hasn't had working accelerated OpenGL since I
> installed it.  It was using the llvmpipe, a software path.  Eventually
> when I looked into it, it turned out that was because the
> xf86-video-intel package was too old and disabled acceleration for my
> chipset.  So I wrote an xorg updater, which uncovered about 62 package
> updates.  There are in wip-xorg-server-1.18, or eventually will be once
> the send-email git hook finishes running.
Thanks!  It have been on my TODO/WANTING list for a long time :-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wip-xorg-server-1.18
  2016-02-18 21:03 wip-xorg-server-1.18 Andy Wingo
  2016-02-19  4:19 ` wip-xorg-server-1.18 宋文武
@ 2016-02-23 21:17 ` Mark H Weaver
  2016-02-24  9:00   ` wip-xorg-server-1.18 Andy Wingo
  1 sibling, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2016-02-23 21:17 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

Hi Andy,

Andy Wingo <wingo@igalia.com> writes:

> My Broadwell laptop hasn't had working accelerated OpenGL since I
> installed it.  It was using the llvmpipe, a software path.  Eventually
> when I looked into it, it turned out that was because the
> xf86-video-intel package was too old and disabled acceleration for my
> chipset.  So I wrote an xorg updater, which uncovered about 62 package
> updates.  There are in wip-xorg-server-1.18, or eventually will be once
> the send-email git hook finishes running.

Awesome, thanks for taking this on!  Hydra has been building this (along
with the pulseaudio, gstreamer, and libvpx updates) on the
'media-updates' branch.

One problem that has turned up is that 6 of the video drivers you
updated no longer build, because our local patches no longer apply
cleanly to them:

  http://hydra.gnu.org/build/1039955 (xf86-video-mga)
  http://hydra.gnu.org/build/1037199 (xf86-video-r128)
  http://hydra.gnu.org/build/1036050 (xf86-video-siliconmotion)
  http://hydra.gnu.org/build/1034473 (xf86-video-tdfx)
  http://hydra.gnu.org/build/1040961 (xf86-video-trident)
  http://hydra.gnu.org/build/1043614 (xf86-video-vmware)

There's another video driver that you didn't update, but that no longer
builds against the new xorg-server:

  http://hydra.gnu.org/build/1042309 (xf86-video-voodoo)

Updating these poorly maintained video drivers has always been the
biggest hindrance to updating xorg-server, and is the reason that my
last attempt on the wip-xorg-server-1.17 branch stalled.

    Thanks,
      Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wip-xorg-server-1.18
  2016-02-23 21:17 ` wip-xorg-server-1.18 Mark H Weaver
@ 2016-02-24  9:00   ` Andy Wingo
  2016-02-24 17:26     ` wip-xorg-server-1.18 Mark H Weaver
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Wingo @ 2016-02-24  9:00 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Hi,

On Tue 23 Feb 2016 22:17, Mark H Weaver <mhw@netris.org> writes:

> One problem that has turned up is that 6 of the video drivers you
> updated no longer build, because our local patches no longer apply
> cleanly to them:
>
>   http://hydra.gnu.org/build/1039955 (xf86-video-mga)
>   http://hydra.gnu.org/build/1037199 (xf86-video-r128)
>   http://hydra.gnu.org/build/1036050 (xf86-video-siliconmotion)
>   http://hydra.gnu.org/build/1034473 (xf86-video-tdfx)
>   http://hydra.gnu.org/build/1040961 (xf86-video-trident)
>   http://hydra.gnu.org/build/1043614 (xf86-video-vmware)

Fixed on media-update.

> There's another video driver that you didn't update, but that no longer
> builds against the new xorg-server:
>
>   http://hydra.gnu.org/build/1042309 (xf86-video-voodoo)

Fixed too, by applying a patch from git.

Regards,

Andy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wip-xorg-server-1.18
  2016-02-24  9:00   ` wip-xorg-server-1.18 Andy Wingo
@ 2016-02-24 17:26     ` Mark H Weaver
  2016-02-24 17:36       ` wip-xorg-server-1.18 Andy Wingo
  0 siblings, 1 reply; 7+ messages in thread
From: Mark H Weaver @ 2016-02-24 17:26 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

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

Andy Wingo <wingo@igalia.com> writes:

> On Tue 23 Feb 2016 22:17, Mark H Weaver <mhw@netris.org> writes:
>
>> One problem that has turned up is that 6 of the video drivers you
>> updated no longer build, because our local patches no longer apply
>> cleanly to them:
>>
>>   http://hydra.gnu.org/build/1039955 (xf86-video-mga)
>>   http://hydra.gnu.org/build/1037199 (xf86-video-r128)
>>   http://hydra.gnu.org/build/1036050 (xf86-video-siliconmotion)
>>   http://hydra.gnu.org/build/1034473 (xf86-video-tdfx)
>>   http://hydra.gnu.org/build/1040961 (xf86-video-trident)
>>   http://hydra.gnu.org/build/1043614 (xf86-video-vmware)
>
> Fixed on media-update.
>
>> There's another video driver that you didn't update, but that no longer
>> builds against the new xorg-server:
>>
>>   http://hydra.gnu.org/build/1042309 (xf86-video-voodoo)
>
> Fixed too, by applying a patch from git.

Great, thanks.  I squashed the fixes into the original commits and
rebased 'media-updates' on current master.

Next problem: I tried updating my Thinkpad X60 (with Intel graphics) to
the media-updates branch, and now I'm seeing lots of rendering errors,
most consistently in the tab headers of GNU Icecat:


[-- Attachment #2: Buggy rendering on Thinkpad X60 --]
[-- Type: image/png, Size: 23406 bytes --]

[-- Attachment #3: Type: text/plain, Size: 187 bytes --]


I guess the problem is in the git revision of xf86-video-intel that
you've chosen.  I think we'd better use the latest tarball release of
this driver instead.  Suggestions?

       Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wip-xorg-server-1.18
  2016-02-24 17:26     ` wip-xorg-server-1.18 Mark H Weaver
@ 2016-02-24 17:36       ` Andy Wingo
  2016-02-24 19:01         ` wip-xorg-server-1.18 Mark H Weaver
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Wingo @ 2016-02-24 17:36 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On Wed 24 Feb 2016 18:26, Mark H Weaver <mhw@netris.org> writes:

> Andy Wingo <wingo@igalia.com> writes:
>
> Next problem: I tried updating my Thinkpad X60 (with Intel graphics) to
> the media-updates branch, and now I'm seeing lots of rendering errors,
> most consistently in the tab headers of GNU Icecat:
>
> I guess the problem is in the git revision of xf86-video-intel that
> you've chosen.  I think we'd better use the latest tarball release of
> this driver instead.  Suggestions?

Sure, we can give that a go.  Would you mind reporting your bug
upstream?

I think I updated to git after thinking that my video was frozen, but of
course that was the input driver configuration error.

Given that Debian sid uses git snapshots maybe we should just update our
snapshot:

  http://anonscm.debian.org/cgit/pkg-xorg/driver/xserver-xorg-video-intel.git

Andy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wip-xorg-server-1.18
  2016-02-24 17:36       ` wip-xorg-server-1.18 Andy Wingo
@ 2016-02-24 19:01         ` Mark H Weaver
  0 siblings, 0 replies; 7+ messages in thread
From: Mark H Weaver @ 2016-02-24 19:01 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

Andy Wingo <wingo@igalia.com> writes:

> On Wed 24 Feb 2016 18:26, Mark H Weaver <mhw@netris.org> writes:
>
>> Andy Wingo <wingo@igalia.com> writes:
>>
>> Next problem: I tried updating my Thinkpad X60 (with Intel graphics) to
>> the media-updates branch, and now I'm seeing lots of rendering errors,
>> most consistently in the tab headers of GNU Icecat:
>>
>> I guess the problem is in the git revision of xf86-video-intel that
>> you've chosen.  I think we'd better use the latest tarball release of
>> this driver instead.

I tried this, and the latest tarball release of xf86-video-intel is the
one we already had before your updates, from 2013, and it does not even
compile against the current xorg-server release :-(

>> Suggestions?
>
> Sure, we can give that a go.  Would you mind reporting your bug
> upstream?
>
> I think I updated to git after thinking that my video was frozen, but of
> course that was the input driver configuration error.
>
> Given that Debian sid uses git snapshots maybe we should just update our
> snapshot:
>
>   http://anonscm.debian.org/cgit/pkg-xorg/driver/xserver-xorg-video-intel.git

There have been only 8 commits since the one you chose.  However, it
turns out that updating to the latest upstream commit seems to fix the
rendering problems on my X60.  I pushed the update to 'media-updates'.

     Thanks,
       Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-24 19:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 21:03 wip-xorg-server-1.18 Andy Wingo
2016-02-19  4:19 ` wip-xorg-server-1.18 宋文武
2016-02-23 21:17 ` wip-xorg-server-1.18 Mark H Weaver
2016-02-24  9:00   ` wip-xorg-server-1.18 Andy Wingo
2016-02-24 17:26     ` wip-xorg-server-1.18 Mark H Weaver
2016-02-24 17:36       ` wip-xorg-server-1.18 Andy Wingo
2016-02-24 19:01         ` wip-xorg-server-1.18 Mark H Weaver

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).