Bug#780990: xserver-xorg-video-intel: hangs startx on logout if xrandr rotate is used in session

2015-10-14 Thread M Joonas Pihlaja

Hi,

Just wanted to let you know that I just upgraded to jessie and hit
this same problem with xfce4.  I have two monitors, so to make any use
of the other one I run

xrandr --output DP1 --auto --output DP2 --auto --right-of DP1 --rotate
left

After logout from my xfce4 session I get the same freeze as in the
bug.  As a workaround I can rotate back to normal using "--rotate
normal" in the command above, and then I can logout without the
console hanging.

Cheers,

Joonas



xserver-xorg-video-intel: Changes to 'ubuntu'

2015-10-14 Thread Robert Ancell
 debian/changelog |8 
 debian/patches/randr.patch   |  296 +++
 debian/patches/revert-dpms-fix.patch |2 
 debian/patches/series|1 
 4 files changed, 306 insertions(+), 1 deletion(-)

New commits:
commit a18a59406278b8448717c8a708170b1fc5131f75
Author: Robert Ancell 
Date:   Wed Oct 14 15:06:48 2015 +0100

* debian/patches/randr.patch:
  - Combine upstream RandR changes to fix hotplug events not working
(LP: #1505695)

diff --git a/debian/changelog b/debian/changelog
index 004324a..75dd66c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xserver-xorg-video-intel (2:2.99.917+git20150808-0ubuntu4) wily; urgency=medium
+
+  * debian/patches/randr.patch:
+- Combine upstream RandR changes to fix hotplug events not working
+  (LP: #1505695)
+
+ -- Robert Ancell   Wed, 14 Oct 2015 14:59:19 
+0100
+
 xserver-xorg-video-intel (2:2.99.917+git20150808-0ubuntu3) wily; urgency=medium
 
   * debian/patches/revert-dpms-fix.patch:
diff --git a/debian/patches/randr.patch b/debian/patches/randr.patch
new file mode 100644
index 000..9e963b8
--- /dev/null
+++ b/debian/patches/randr.patch
@@ -0,0 +1,296 @@
+commit bf63eba5f1900ab5314e3d37dff55cfca800d400
+Author: Chris Wilson 
+Date:   Wed Sep 9 11:18:15 2015 +0100
+
+Combined RandR changes:
+f5aabb7bddc6fc5dc910a983d1291c9864f65f06
+f384af433cbb39ad74e02b10d3700e71c8668506
+d50d336605e9be7280529b0eb565402d7646c913
+2c08d72393e4c8ddf5926571b087459aaa225cb1
+650da13c7257019728cfca361dfcbe34a6c526ef
+717b6208d0d7bdcdacaf30b871216e6084c7205c
+23986f0a31dbdec2e2086ca898bee43842ab73d4
+15215651a992b7aa06314b9118ad9028b51c7e3e
+31d42ed5637a1b2223d48d0db4d7c512b27aee07
+679ee12079a7d2682d41506b81973c7c7d4fa1d8
+096ddef22d6c57198a424eef00845dc7302b0cfe
+
+diff --git a/src/sna/sna.h b/src/sna/sna.h
+index 6c4d179..7592f7b 100644
+--- a/src/sna/sna.h
 b/src/sna/sna.h
+@@ -442,7 +442,7 @@ bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna);
+ bool sna_mode_fake_init(struct sna *sna, int num_fake);
+ bool sna_mode_wants_tear_free(struct sna *sna);
+ void sna_mode_adjust_frame(struct sna *sna, int x, int y);
+-extern void sna_mode_discover(struct sna *sna);
++extern void sna_mode_discover(struct sna *sna, bool tell);
+ extern void sna_mode_check(struct sna *sna);
+ extern bool sna_mode_disable(struct sna *sna);
+ extern void sna_mode_enable(struct sna *sna);
+diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
+index 34d19bb..f562660 100644
+--- a/src/sna/sna_display.c
 b/src/sna/sna_display.c
+@@ -90,6 +90,8 @@ void *alloca(size_t);
+ #include 
+ #endif
+ 
++#define COLDPLUG_DELAY_MS 2000
++
+ /* Minor discrepancy between 32-bit/64-bit ABI in old kernels */
+ union compat_mode_get_connector{
+   struct drm_mode_get_connector conn;
+@@ -951,6 +953,8 @@ static void
+ sna_crtc_force_outputs_on(xf86CrtcPtr crtc)
+ {
+   xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
++  /* All attached outputs are valid, so update our timestamps */
++  unsigned now = GetTimeInMillis();
+   int i;
+ 
+   assert(to_sna_crtc(crtc));
+@@ -970,6 +974,7 @@ sna_crtc_force_outputs_on(xf86CrtcPtr crtc)
+   continue;
+ 
+   __sna_output_dpms(output, DPMSModeOn, false);
++  to_sna_output(output)->last_detect = now;
+   }
+ 
+ #if XF86_CRTC_VERSION >= 3
+@@ -1211,9 +1216,10 @@ sna_crtc_apply(xf86CrtcPtr crtc)
+output_count, output_count ? output_ids[0] : 0));
+ 
+   ret = drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_SETCRTC, ) == 0;
+-
+-  sna_crtc->mode_serial++;
+-  sna_crtc_force_outputs_on(crtc);
++  if (ret) {
++  sna_crtc->mode_serial++;
++  sna_crtc_force_outputs_on(crtc);
++  }
+ unblock:
+   sigio_unblock(sigio);
+   return ret;
+@@ -2633,7 +2639,7 @@ error:
+   sna_crtc->cursor_transform = saved_cursor_transform;
+   sna_crtc->hwcursor = saved_hwcursor;
+   sna_crtc->bo = saved_bo;
+-  sna_mode_discover(sna);
++  sna_mode_discover(sna, true);
+   return FALSE;
+ }
+ 
+@@ -4787,17 +4793,53 @@ static bool disable_unused_crtc(struct sna *sna)
+   return update;
+ }
+ 
+-void sna_mode_discover(struct sna *sna)
++static bool
++output_check_status(struct sna *sna, struct sna_output *output)
++{
++  union compat_mode_get_connector compat_conn;
++  struct drm_mode_modeinfo dummy;
++  xf86OutputStatus status;
++
++  VG_CLEAR(compat_conn);
++
++  compat_conn.conn.connector_id = output->id;
++  compat_conn.conn.count_modes = 1; /* skip detect */
++  compat_conn.conn.modes_ptr = (uintptr_t)
++  compat_conn.conn.count_encoders = 0;
++  compat_conn.conn.count_props = 0;
++
++  (void)drmIoctl(sna->kgem.fd,
++ 

Bug#801401: xserver-xorg indirect dependency of systemd

2015-10-14 Thread Emil
With the latest release of xorg the SUID wrapper for Xorg is now gone
/usr/bin/X is just a symlink to Xorg and the /etc/X11/Xwrapper.config
is ignored.

This is yet another attempt to shovel systemd down on our throats so
even if you avoid systemd as PID 1 at least you need a fully privileged
daemon systemd-logind.

A quick fix to still avoid the systemd plague is to make either the 
xinit or Xorg SUID root but this is now equivalent to 
allowed_users=anybody in the old Xwrapper.config

-- 
Regards,
Emil
--
Good judgment comes from experience. Experience comes from bad judgment.



Bug#801605: xserver-xorg: X fails to start as normal user

2015-10-14 Thread Cosimo Morelli
Package: xserver-xorg
Version: 1:7.7+12
Followup-For: Bug #801605

Dear Maintainer,

I have the same problem here, but the solution (install systemd-shim) didn't
work for me, also libpam-systemd is present on my system.



-- Package-specific info:
/etc/X11/X does not exist.
/etc/X11/X is not a symlink.
/etc/X11/X is not executable.

Diversions concerning libGL are in place

diversion of /usr/lib/arm-linux-gnueabihf/libGL.so.1.2.0 to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGL.so.1.2.0 by glx-diversions
diversion of /usr/lib/libGL.so.1 to /usr/lib/mesa-diverted/libGL.so.1 by 
glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGLESv2.so.2.0.0 by glx-diversions
diversion of /usr/lib/libGLESv2.so.2 to /usr/lib/mesa-diverted/libGLESv2.so.2 
by glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGL.so to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGL.so by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1.1.0 to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so.1.1.0 by glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGLESv1_CM.so by glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2 to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGLESv2.so.2 by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so.2 by glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGL.so.1.2 to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGL.so.1.2 by glx-diversions
diversion of /usr/lib/libGLESv1_CM.so.1.1.0 to 
/usr/lib/mesa-diverted/libGLESv1_CM.so.1.1.0 by glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1 to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGLESv1_CM.so.1 by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so by glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so.1.1.0 to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGLESv1_CM.so.1.1.0 by 
glx-diversions
diversion of /usr/lib/libGL.so.1.2.0 to /usr/lib/mesa-diverted/libGL.so.1.2.0 
by glx-diversions
diversion of /usr/lib/libGLESv2.so to /usr/lib/mesa-diverted/libGLESv2.so by 
glx-diversions
diversion of /usr/lib/libGL.so.1.2 to /usr/lib/mesa-diverted/libGL.so.1.2 by 
glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so.1.1.0 to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGLESv1_CM.so.1.1.0 by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0 to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2.0 by glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGLESv2.so to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGLESv2.so by glx-diversions
diversion of /usr/lib/libGL.so to /usr/lib/mesa-diverted/libGL.so by 
glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGLESv2.so.2 by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1.2 to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2 by glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGLESv2.so by glx-diversions
diversion of /usr/lib/libGLESv1_CM.so to /usr/lib/mesa-diverted/libGLESv1_CM.so 
by glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGL.so.1.2.0 to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2.0 by glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGL.so to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGL.so by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1 by glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGL.so.1 to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGL.so.1 by glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGLESv2.so.2.0.0 to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGLESv2.so.2.0.0 by glx-diversions
diversion of /usr/lib/libGLESv1_CM.so.1 to 
/usr/lib/mesa-diverted/libGLESv1_CM.so.1 by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGL.so to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.0.0 to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so.2.0.0 by glx-diversions
diversion of /usr/lib/i386-linux-gnu/libGLESv1_CM.so to 
/usr/lib/mesa-diverted/i386-linux-gnu/libGLESv1_CM.so by glx-diversions
diversion of /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so.1 to 
/usr/lib/mesa-diverted/arm-linux-gnueabihf/libGLESv1_CM.so.1 by glx-diversions
diversion of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 to 
/usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so.1 by glx-diversions
diversion of /usr/lib/libGLESv2.so.2.0.0 to 
/usr/lib/mesa-diverted/libGLESv2.so.2.0.0 by glx-diversions
diversion of 

xorg-server: Changes to 'debian-unstable'

2015-10-14 Thread Julien Cristau
 debian/changelog  |4 
 debian/xserver-xorg-core.NEWS |   15 +++
 2 files changed, 19 insertions(+)

New commits:
commit f8dd68af0467aa8a7fe6ec85c7f15c54418dcfb4
Author: Julien Cristau 
Date:   Wed Oct 14 14:57:09 2015 +0200

Add NEWS file for xserver-xorg-core with info about the -legacy split.

diff --git a/debian/changelog b/debian/changelog
index e4e2a28..4d19572 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
 xorg-server (2:1.17.2-4) UNRELEASED; urgency=medium
 
+  [ Andreas Boll ]
   * Use the correct repository for the Vcs-Git field (Closes: #801340).
 Thanks, Vagrant Cascadian.
 
+  [ Julien Cristau ]
+  * Add NEWS file for xserver-xorg-core with info about the -legacy split.
+
  -- Andreas Boll   Thu, 08 Oct 2015 21:29:12 +0200
 
 xorg-server (2:1.17.2-3) unstable; urgency=medium
diff --git a/debian/xserver-xorg-core.NEWS b/debian/xserver-xorg-core.NEWS
new file mode 100644
index 000..2080e43
--- /dev/null
+++ b/debian/xserver-xorg-core.NEWS
@@ -0,0 +1,15 @@
+xorg-server (2:1.17.2-4) UNRELEASED; urgency=medium
+
+  The Xorg server is no longer setuid root by default.  This change reduces the
+  risk of privilege escalation due to X server bugs, but has some side effects:
+
+  * it relies on logind and libpam-systemd
+  * it relies on a kernel video driver (so the userspace component doesn't
+touch the hardware directly)
+  * it needs X to run on the virtual console (VT) it was started from
+
+  On systems where those are not available, the new xserver-xorg-legacy package
+  is needed to allow X to run with elevated privileges.  See the
+  Xwrapper.config(5) manual page for configuration details.
+
+ -- Julien Cristau   Wed, 14 Oct 2015 14:12:43 +0200