Subject: Fwd: [Bug 1256116] Re: Documentation instructs to install the package unity-system-compositor, but this is not sufficient for having Mir

From: Daniel van Vugt <[email-masked]>
Date: Mon, 07 Apr 2014 15:04:27 +0100

-------- Original Message --------
Subject: [Bug 1256116] Re: Documentation instructs to install the 
package unity-system-compositor, but this is not sufficient for having Mir
Date: Thu, 03 Apr 2014 09:36:51 -0000
From: Thomas Hellström <[email-masked]>
Reply-To: Bug 1256116 <[email-masked]>
To: [email-masked]

Hi, There!

Tried to install ubuntu-desktop-mir on a vmware VM running 14.04, XMir-
capable xf86-video-vmware

However, X apparently hangs trying to switch console:

root       2111  0.0  0.4 142456  9492 tty8     Ss+  02:35   0:00
/usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten
tcp vt8 -novtswitch

(gdb) bt
#0  0x00007fb2cd8c11c7 in ioctl () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fb2cfd6cc35 in switch_to (vt=8,
     from=from@entry=0x7fb2cfe7c12d "xf86OpenConsole")
     at ../../../../../hw/xfree86/os-support/linux/lnx_init.c:74
#2  0x00007fb2cfd6ce99 in xf86OpenConsole ()
     at ../../../../../hw/xfree86/os-support/linux/lnx_init.c:197
#3  0x00007fb2cfd4b34f in InitOutput (
     pScreenInfo=pScreenInfo@entry=0x7fb2d00fa600 <screenInfo>,
     argc=argc@entry=11, argv=argv@entry=0x7fffb424b118)
     at ../../../../hw/xfree86/common/xf86Init.c:585
#4  0x00007fb2cfd0d71b in dix_main (argc=11, argv=0x7fffb424b118,
     envp=<optimized out>) at ../../dix/main.c:200
#5  0x00007fb2cd7f0ec5 in __libc_start_main (main=0x7fb2cfcf8e50 <main>,
     argc=11, argv=0x7fffb424b118, init=<optimized out>, fini=<optimized 
out>,
     rtld_fini=<optimized out>, stack_end=0x7fffb424b108) at 
libc-start.c:287
#6  0x00007fb2cfcf8e7e in _start ()

Any ideas?

Thanks,
Thomas

-- 
You received this bug notification because you are subscribed to mir in
Ubuntu.
https://bugs.launchpad.net/bugs/1256116

Title:
   Documentation instructs to install the package unity-system-
   compositor, but this is not sufficient for having Mir

Status in Mir:
   Fix Released
Status in Unity System Compositor:
   Invalid
Status in “mir” package in Ubuntu:
   Fix Released

Bug description:
   Documentation at Ubuntu Wiki (https://wiki.ubuntu.com/Mir/Installing)
   and at the Mir site
   (http://unity.ubuntu.com/mir/installing_prebuilt_on_pc.html) instruct
   to install the package unity-system-compositor to have Mir. At least
   for me, with bleeding edge Trusty Tahr with daily updates this isn't
   sufficient, I believe the last time my lightdm ran Mir was 17th of
   November. That's when my /var/log/lightdm/unity-system-compositor.log
   is dated. I've had xserver-xorg-xmir and unity-system-compositor
   installed all along, but noticed apt would like to autoremove the
   latter.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1256116/+subscriptions

---

From: Thomas Hellstrom <[email-masked]>
Date: Tue, 08 Apr 2014 08:00:56 +0200

Hi!

This happens with unity8-desktop-session-x11 as well.

0  0x00007fa335dcf1c7 in ioctl () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fa33827ac35 in switch_to (vt=8,
    from=from@entry=0x7fa33838a12d "xf86OpenConsole")
    at ../../../../../hw/xfree86/os-support/linux/lnx_init.c:74
#2  0x00007fa33827ae99 in xf86OpenConsole ()
    at ../../../../../hw/xfree86/os-support/linux/lnx_init.c:197
#3  0x00007fa33825934f in InitOutput (
    pScreenInfo=pScreenInfo@entry=0x7fa338608600 <screenInfo>,
    argc=argc@entry=11, argv=argv@entry=0x7fff73c09518)
    at ../../../../hw/xfree86/common/xf86Init.c:585
#4  0x00007fa33821b71b in dix_main (argc=11, argv=0x7fff73c09518,
    envp=<optimized out>) at ../../dix/main.c:200
#5  0x00007fa335cfeec5 in __libc_start_main (main=0x7fa338206e50 <main>,
    argc=11, argv=0x7fff73c09518, init=<optimized out>, fini=<optimized
out>,
    rtld_fini=<optimized out>, stack_end=0x7fff73c09508) at libc-start.c:287
#6  0x00007fa338206e7e in _start ()

Oddly enough, the vmware driver sets the HW_SKIP_CONSOLE flag...

Xorg logs ends with
[ 54499.106] (II) LoadModule: "vesa"
[ 54499.106] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 54499.106] (II) Module vesa: vendor="X.Org Foundation"
[ 54499.106]    compiled for 1.15.0, module version = 2.3.3
[ 54499.106]    Module class: X.Org Video Driver
[ 54499.106]    ABI class: X.Org Video Driver, version 15.0
[ 54499.106] (II) vmware: driver for VMware SVGA: vmware0405, vmware0710
[ 54499.106] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 54499.106] (II) FBDEV: driver for framebuffer: fbdev
[ 54499.106] (II) VESA: driver for VESA chipsets: vesa
[ 54499.106] (++) using VT number 8

/Thomas

On 04/07/2014 04:04 PM, Daniel van Vugt wrote:
>     argc=11, argv=0x7fffb424b118, init=<optimized out>,
> fini=<optimized out>,

---

From: Thomas Hellstrom <[email-masked]>
Date: Tue, 08 Apr 2014 08:08:01 +0200

> Oddly enough, the vmware driver sets the HW_SKIP_CONSOLE flag...

Actually, it looks like the xorgMir variable is never set to TRUE. Any
clues anybody?

When trying unity8-desktop-session-mir, I can certainly get a Mir
desktop running, and all the Mir demos are working...

Thanks,
/Thomas

---

From: Kevin Gunn <[email-masked]>
Date: Tue, 8 Apr 2014 02:44:28 -0500

+bregma to keep me honest

Hi Thomas -
I believe the  unity8-desktop-session-x11 is something that wasn't really
intended to be used in the end. Its just a unity8 running in an X window
and redundant to the ./run script that resides in the unity8 source package.

Good to hear the unity8-desktop-session-mir is working for you.

br,kg

On Tue, Apr 8, 2014 at 1:08 AM, Thomas Hellstrom <[email-masked]>wrote:

> Mir-devel mailing list
> [email-masked]
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/mir-devel
>

---

From: Kevin Gunn <[email-masked]>
Date: Tue, 8 Apr 2014 02:44:59 -0500

+bregma for real :)

---

From: Thomas Hellstrom <[email-masked]>
Date: Tue, 08 Apr 2014 12:02:04 +0200

Hi!

Well, the exact same problem happens when I install ubuntu-desktop-mir
to run Unity 7 on top of XMir.

Anyway, after further debugging it appears to be the unity greeter that
errors,
this closes down XMir and starts a new non-XMir X session that hangs in
xf86OpenConsole()

DEBUG: unity-greeter.vala:474: Starting unity-greeter 14.04.7 UID=112 L
ANG=en_US.UTF-8
[+0.00s] DEBUG: unity-greeter.vala:477: Setting cursor
[+0.00s] DEBUG: unity-greeter.vala:491: Loading command line options
[+0.00s] DEBUG: unity-greeter.vala:519: Setting GTK+ settings
[+0.04s] DEBUG: unity-greeter.vala:542: Creating Unity Greeter
[+0.04s] DEBUG: unity-greeter.vala:57: Creating background surface
[+0.05s] ERROR: The program 'unity-greeter' received an X Window System
error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 147 error_code 2 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

/Thomas

On 04/08/2014 09:44 AM, Kevin Gunn wrote:
> +bregma for real :)
>
>
> On Tue, Apr 8, 2014 at 2:44 AM, Kevin Gunn <[email-masked]
> <mailto:[email-masked]>> wrote:
>
>     I believe the  unity8-desktop-session-x11 is something that wasn't
>     really intended to be used in the end. Its just a unity8 running
>     in an X window and redundant to the ./run script that resides in
>     the unity8 source package.
>
>     On Tue, Apr 8, 2014 at 1:08 AM, Thomas Hellstrom
>     <[email-masked] <mailto:[email-masked]>> wrote:
>
>         > [ 54499.106] (II) Loading
>         /usr/lib/xorg/modules/drivers/vesa_drv.so
>         >> package unity-system-compositor, but this is not sufficient
>         for having
>         >> Mir
>         >> From: Thomas Hellström <[email-masked]
>         <mailto:[email-masked]>>
>         >> Reply-To: Bug 1256116 <[email-masked]
>         <mailto:[email-masked]>>
>         <mailto:[email-masked]>
>         >>
>         >> Hi, There!
>         >>
>         >>     at
>         ../../../../../hw/xfree86/os-support/linux/lnx_init.c:197
>         [email-masked] <mailto:[email-masked]>
>         <https://urldefense.proofpoint.com/v1/url?u=https://lists.ubuntu.com/mailman/listinfo/mir-devel&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=l5Ago9ekmVFZ3c4M6eauqrJWGwjf6fTb%2BP3CxbBFkVM%3D%0A&m=4XTzFwggwYw%2B3ZED3aZE%2BXUUyO9Oo%2BNCvbQmyZfkxi4%3D%0A&s=ed07ab9a1d939d2cd6d80c7f964795dc80ba7919419f90a02981b7d6a1fab1b2>
>
>
>

---

From: Christopher James Halse Rogers <[email-masked]>
Date: Wed, 09 Apr 2014 00:56:16 +0010

Hm. I've just tried ubuntu-desktop-mir, and it (mostly) works for me on 
Intel HW.

Things went pear-shaped when I tried to VT switch - it did indeed look 
like Xorg was trying to VT switch too, which results in sadness - but 
by and large things worked (multimonitor, resolution changes, 
suspend/resume, etc).

There'll likely be another burst of XMir activity soon; I'll have a 
look through then.

On Tue, Apr 8, 2014 at 8:02 PM, Thomas Hellstrom 
<[email-masked]> wrote:
>> ../../../../../hw/xfree86/os-support/linux/lnx_init.c:74
>>          >     rtld_fini=<optimized out>, stack_end=0x7fff73c09508) 
>> at
>>          libc-start.c:287
>>          > [ 54499.106] (II) modesetting: Driver for Modesetting 
>> Kernel
>>          Drivers: kms
>>          >> Tried to install ubuntu-desktop-mir on a vmware VM 
>> running
>>          14.04, XMir-
>>          >> root       2111  0.0  0.4 142456  9492 tty8     Ss+  
>> 02:35
>>            0:00
>> ../../../../../hw/xfree86/os-support/linux/lnx_init.c:74
>> <mailto:[email-masked]>

---

From: Thomas Hellstrom <[email-masked]>
Date: Wed, 09 Apr 2014 09:44:56 +0200

Hi!

Thanks for the reply.
I've done a bit of debugging, and this happens because the unity-greeter
tries to create up a pixmap of size (0,0). X  doesn't allow that and
sends an error to unity-greeter that shuts down. Lightdm then shuts down
Mir and XMir and tries to start a new non-XMir X server and that's the
one that hangs. So the hang seems to be a symptom of a bug /
inconsistency in the lightdm error path.

So why does unity-greeter (actually gtk::screen) think the screen is of
size (0,0)? I tried to dump the gtk <-> Xserver communication and it
appears like gtk queries the crtcs / outputs and gets (0,0) answers,
although X replies the root window is of size 800x600, so I need to
somehow make XMir respond with the correct modes on crtcs / outputs.
Reading the XMir code it appears like nothing really performs an initial
modeset, although an initial mode configuration is performed.

Is the XMir-enabled DDX driver responsible for calling
xf86SetDesiredModes(), and in that case, where is a suitable place for
the driver to do that?

Thanks,
Thomas

On 04/09/2014 02:46 AM, Christopher James Halse Rogers wrote:
> Hm. I've just tried ubuntu-desktop-mir, and it (mostly) works for me
> on Intel HW.
>
>>>      Hi Thomas -      I believe the  unity8-desktop-session-x11 is
>>> something that wasn't
>>> https://urldefense.proofpoint.com/v1/url?u=https://lists.ubuntu.com/mailman/listinfo/mir-devel&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=l5Ago9ekmVFZ3c4M6eauqrJWGwjf6fTb%2BP3CxbBFkVM%3D%0A&m=t3RMkVOTcMHtAfhoMGV6jrwNmL25gB8GDEUd%2FFmBq0s%3D%0A&s=c698b93a3a939317dddea3c8b87de55ce07fb3c6783967650d6540cbe38fa42a
>>>         
>> https://urldefense.proofpoint.com/v1/url?u=https://lists.ubuntu.com/mailman/listinfo/mir-devel&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=l5Ago9ekmVFZ3c4M6eauqrJWGwjf6fTb%2BP3CxbBFkVM%3D%0A&m=t3RMkVOTcMHtAfhoMGV6jrwNmL25gB8GDEUd%2FFmBq0s%3D%0A&s=c698b93a3a939317dddea3c8b87de55ce07fb3c6783967650d6540cbe38fa42a

---

From: Christopher James Halse Rogers <[email-masked]>
Date: Wed, 09 Apr 2014 08:21:29 +0010

> xf86SetDesiredModes(), and in that case, where is a suitable place for

Yeah, we currently expect XMir-enabled DDXen to call 
xf86SetDesiredModes themselves, at the same point as they'd normally 
call call it (and after xmir_mode_pre_init()).

We could do it in the XMir module itself, but I was leary of side 
effects the DDXen weren't expecting.

---

From: Thomas Hellstrom <[email-masked]>
Date: Wed, 09 Apr 2014 12:24:51 +0200

Hi!

Please see below.

On 04/09/2014 10:11 AM, Christopher James Halse Rogers wrote:
> effects the DDXen weren't expecting

OK. That made XMir work again.

Is this a new requirement or was that present also with Ubuntu 13.10?

In any case, while window movement and 3D looks as snappy as in 13.10
there is a 0.5 second or so latency when I type text in
terminal windows. Very annoying. Is that a known problem? I'll try to
find out whether this delay happens in XMir or in Mir.

Thanks,
Thomas

---

From: Christopher James Halse Rogers <[email-masked]>
Date: Wed, 09 Apr 2014 23:44:29 +0010

> OK. That made XMir work again.

Yay!

> Is this a new requirement or was that present also with Ubuntu 13.10?

This was also present with 13.10, I think; it's been there since the 
start of multihead support.

> find out whether this delay happens in XMir or in Mir.

Urgh. I thought we had some automated tests for that! You're probably 
seeing https://bugs.launchpad.net/mir/+bug/1295851 ; likely what's 
happening is that Mir is compositing the second-to-last frame again, 
rather than the most recent frame you've submitted.