maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   XWayland doable from user side or jolla required? (https://talk.maemo.org/showthread.php?t=93828)

szopin 2014-09-09 22:48

XWayland doable from user side or jolla required?
 
rewrite: In one of the never ending posts on how to get X* onto sailfish/jolla we learned it is actually lipstick that has to have XWayland support, not jut someone porting X app and hoping it will get ignored like other warehouse apps. Since all projects that are currently supporting wayland are already 1.4(1.5), can we get a firm declaration from Jolla when lipstick will support those? Selling a linux phone that cannot run 99.99% of linux apps because 1. too edgy for us (uses X, we are so edgy with old wayland), 2. software is too edgy, because anyone following wayland development is already at 1.4 (1.5) while jolla's 1.1 sucks balls and gives us maybe .1% of existing apps (that are still developed), when is this linux phone really gonna be linux phone??? I expect 'make' to work to call it a linux phone, if neo900 provides this awesome, if Jolla keeps using the term linux how about some linux compatibility?

rainisto 2014-09-10 07:50

Re: XWayland doable from user side or jolla required?
 
Its been stated many times that Jolla will _not_ be doing XWayland support and if someone wants it (cripled user experience with crappy X11 UI) then community needs to do the needed integration themselves.

Lipstick and wayland are OSS projects (https://github.com/nemomobile/lipstick) feel free to make pull requests there.

Personally I never want to see X11 apps in a phone, let those crappy UI apps remain in desktop only env.

szopin 2014-09-10 11:26

Re: XWayland doable from user side or jolla required?
 
Thanks, it seems that community has to port LibreOffice (works on Raspberry Pi http://talk.maemo.org/showpost.php?p...3&postcount=33), FreOffice, Koffice, even Gnumeric, because really it is a matter of taste, and not being part of linux/open source and usability/availability
EDIT: I'm going to assume those "stated many times" is the reply that was finally posted to the TJC thread about XWayland, judging by the timestamp on emails you should've used future tense as the TMO reply was faster

MartinK 2014-09-10 11:28

Re: XWayland doable from user side or jolla required?
 
Well, I wouldn't be this outright negative - there are many specialized X applications that are unlikely to be made Wayland compatible in the near future (they are using xlib directly or a Wayland incompatible GUI toolkit, such as GTK2) or ever (dead usptream & complicated codebase), so it would be nice to be able to run them on Wayland somehow. The end result might not be as fast and elegant as running on Wayland natively, but something is better than nothing in this case. :)

Also Wayland does not yet have anything like X forwarding, which might be another usecase for having some support for X (I use X forwarding quite heavily on my desktop PCs for apps like Xchat, Thunderbird, Geany, etc.).

rainisto 2014-09-10 12:20

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by szopin (Post 1438797)
EDIT: I'm going to assume those "stated many times" is the reply that was finally posted to the TJC thread about XWayland, judging by the timestamp on emails you should've used future tense as the TMO reply was faster

Lets see last year for example on quick search:

http://talk.maemo.org/showpost.php?p...&postcount=391

And there ware various other posts regarding xwayland beeing community only task. I only posted it again on together just to make it obvious if someone has not been reading TMO threads..

szopin 2014-09-10 13:07

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by rainisto (Post 1438801)
Lets see last year for example on quick search:

http://talk.maemo.org/showpost.php?p...&postcount=391

And there ware various other posts regarding xwayland beeing community only task. I only posted it again on together just to make it obvious if someone has not been reading TMO threads..

Quote:

but in theory you can run xserver inside wayland compositor
Only in theory as wayland is so old in Jolla that
Quote:

Nobody is looking currently on xwayland in Sailfish
. Even active wayland supporting projects like mplayer are not possible on Jolla as they default to 1.4 Wayland, so thanks

pycage 2014-09-10 16:26

Re: XWayland doable from user side or jolla required?
 
Better something old and stable than something new and crashing. :)

Why not just use an Android X server to render the UI for those desktop applications? The UI experience would already be so awful on a phone's screen that it can't get any worse with that solution, can it? ;)

equeim 2014-09-10 19:36

Re: XWayland doable from user side or jolla required?
 
Sailfish interface is completely different from traditional desktop toolkits (GTK+ and Qt Widgets). So all apps for Sailfish should be written in Qt Quick to look native. Qt Quick apps support Wayland so there aren't special reasons to support XWayland.

I can't say that I like it, I would prefer have new Maemo with classic toolkits and all modern technologies - but now we have only Sailfish.

w00t 2014-09-11 23:50

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by szopin (Post 1438803)
Only in theory as wayland is so old in Jolla that . Even active wayland supporting projects like mplayer are not possible on Jolla as they default to 1.4 Wayland, so thanks

Newer Wayland is easy for you to achieve by yourself without breaking anything (as it's backwards compatible). Update it, test it out, and submit a pull request at https://github.com/mer-packages/wayland when you're comfortable about the quality.

There's a very finite number of people working on these things, and the people working on them tend to prioritize things that give the biggest "bang for buck", which unfortunately for you, is not anything related to X. It's simply not something that the vast majority of customers want, as far as I've been able to tell.

That doesn't mean that those people won't work with you and support, publicize, and encourage your work - it just means they won't do it for you.

It's not like there's a conspiracy to hold the version back, either. It's a case of what was there previously working well enough to not require touching, up until a QtWayland upgrade (required to provide other ongoing work/fixes) bumped the minimum version, so I bumped it too.

rcolistete 2014-09-21 22:36

Re: XWayland doable from user side or jolla required?
 
Javispedro working on XWayland for Sailfish OS :
https://pbs.twimg.com/media/ByFK4iBCEAANE6Z.png
"slightly backported to work on current jolla's wayland and without any acceleration nor input so far"
:cool:

javispedro 2014-09-21 22:38

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by rainisto (Post 1438771)
Personally I never want to see X11 apps in a phone, let those crappy UI apps remain in desktop only env.

As if the display server has any impact on how crappy programs look! :)


Either way... xwayland exists!

https://pbs.twimg.com/media/ByIaAoHIIAAxmEY.png

Please note that there's no acceleration at all and that input does not work.

- For 2D acceleration we could at some point consider the use of Glamor. This would require some investigation as the current Xwayland uses GBM buffers, and I have no idea how libhybrys equivalent work.
- 3D acceleration is "complicated", but probably not useful at all since I know of few OpenGLES+X11 programs (Maemo ones being the most glaring exceptions...).
- As for input, I suspect that I need to look up the QtWayland "propietary" touch interfaces/protocols and patch xwayland accordingly.

I have made an OBS project with Xwayland and all the usual required X11 libraries and dependencies. Just set up the repository and install package "xorg-x11-server-xwayland" from it. Also on the repository is the xlogo tool.

Start Xwayland on a terminal like this:
Code:

Xwayland -nolisten tcp :0
export DISPLAY=:0.0
xlogo

Replace -nolisten tcp with -ac if you want to do non-SSH/insecure X11 forwarding.

Feel free to depend on the OBS project if you need libX11-devel or other packages in order to port X11 software to Sailfish. Most of these libraries are just updated versions of the older X11 packages in Nemo/Mer. If I missed some important lib/tool just ping me.

It was known that the "older" Xwayland was a pain to port and build because of its entrenched architecture -- it required specific parts for each Xorg "driver", Intel, nvidia, etc. At some point I pondered if it was worth resurrecting the older Xsdl server because it would be much simpler to port. However, there's no need to: Xwayland 1.16.x upwards is now finally "driver" independent and is as simple to build as Xsdl was!


EDIT: Funnily, closing Xwayland the "Sailfwish way" crashes Wayland!
EDIT: Updated image to real device screenshot.

r0kk3rz 2014-09-24 15:59

Re: XWayland doable from user side or jolla required?
 
obviously early days yet, but would it be possible to run remote apps on desktop pc from the Jolla using X Forwarding?

Not sure running full X apps on the phone is going to be great fun, but if i can remote into apps from a laptop then that's pretty cool.

tiempjuuh 2014-09-24 16:16

Re: XWayland doable from user side or jolla required?
 
This is great! This way we can get some applications on our phone, like Libreoffice. Lovely!

javispedro 2014-09-24 21:10

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by r0kk3rz (Post 1440334)
obviously early days yet, but would it be possible to run remote apps on desktop pc from the Jolla using X Forwarding?

Sorry I may have parsed the question in the opposite direction. If what you want is using Jolla programs on a X11 server such as the one on a GNU/Linux desktop then that's just not possible. However there's already something for that which uses VNC instead of X11 -- https://github.com/mer-qa/mervncserver

On the other hand, if you want you want is to run X11 programs on the Jolla, that's what Xwayland does, but without touch input as mentioned (either an issue with the oldish version of wayland in the Jolla , or a qtwayland incompatibility -- will look during weekend).

Xwayland also has two modes:
- "normal", in which it behaves similar to Xephyr or Xnest: a single new Wayland window is created in which all X11 programs run. You can use your own window manager inside this Xwayland window (with titlebars, maximize/minimize buttons, etc).
- "rootless", in which a new Wayland window is created for each X11 toplevel window. So you can basically switch between X11 window using the "sailfish" gestures. Unfortunately, we'd need to write a new X11 window manager for this, and take into account that we'd need to handle special windows such as menus on our own...

r0kk3rz 2014-09-24 21:48

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1440428)
On the other hand, if you want you want is to run X11 programs on the Jolla, that's what Xwayland does, but without touch input as mentioned (either an issue with the oldish version of wayland in the Jolla , or a qtwayland incompatibility -- will look during weekend).

I'll try and be a little clearer.

What I want is X11 programs to be executing on the Jolla in XWayland, but the GUI is accessed remotely on a PC using X Forwarding.

Is that possible? I've never really played around with X Forwarding to really understand what it does, but i've done RDP remote apps in windows and if it works anything like that, it could be very useful

javispedro 2014-09-24 23:41

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by r0kk3rz (Post 1440433)
What I want is X11 programs to be executing on the Jolla in XWayland, but the GUI is accessed remotely on a PC using X Forwarding

Ok. You don't actually need Xwayland at all for this scenario. The X11 programs/client will just connect directly to the X11 server your PC.

w00t 2014-09-29 02:46

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1439988)
- As for input, I suspect that I need to look up the QtWayland "propietary" touch interfaces/protocols and patch xwayland accordingly.

It might be worth investigating the inverse (supplanting the QtWayland extension with wl_touch). Where something is useful and integrated into Wayland itself, it makes sense to deprecate/remove the Qt-based extension in my opinion.

w00t 2014-09-29 02:47

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1439988)
EDIT: Funnily, closing Xwayland the "Sailfwish way" crashes Wayland

Can you get a backtrace out of that OOI?

javispedro 2014-09-29 10:45

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by w00t (Post 1440938)
Can you get a backtrace out of that OOI?

Yep, http://pastebin.com/hGCSFqqj

Xwayland is still running by the time of lipstick's crash.

nieldk 2014-09-29 12:57

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1440981)
Yep, http://pastebin.com/hGCSFqqj

Xwayland is still running by the time of lipstick's crash.

A bug in wayland_wrapper/qwlshellsurface.cpp ?

Code:

#2  QtWayland::ShellSurface::shell_surface_pong (this=0x1df2088,
    resource=<optimized out>,
    serial=<error reading variable: Cannot access memory at address 0xffffffe7>) at wayland_wrapper/qwlshellsurface.cpp:285

The particular function in wayland_wrapper/qwlshellsurface.cpp is like:

Code:

void ShellSurface::shell_surface_set_fullscreen(Resource *resource,
                      uint32_t method,
                      uint32_t framerate,
                      struct wl_resource *output)
{
    Q_UNUSED(resource);
    Q_UNUSED(method);
    Q_UNUSED(framerate);
    Q_UNUSED(output);
    QSize defaultScreenSize = m_surface->compositor()->outputGeometry().size();
    send_configure(resize_bottom_right, defaultScreenSize.width(), defaultScreenSize.height());
 
    if (m_surface->extendedSurface())
        m_surface->extendedSurface()->setVisibility(QWindow::FullScreen, false);
}

So, the memory read error is this statement:

uint32_t method

?

javispedro 2014-09-29 15:49

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by nieldk (Post 1441000)
So, the memory read error is this statement:

My version of lipstick is the latest released update, 1.0.8 , not git one :)

the crashing function is void ShellSurface::shell_surface_pong and the problem is that m_surface->waylandSurface() returns NULL.
(ah, the problems with asynchronous IPC... :) ).

Also:
Code:

m_transientInactive = false,
  m_isCursorSurface = false, m_visible = true, m_invertY = true,
  m_bufferType = QWaylandSurface::Shm, m_surfaceWasDestroyed = false,
  m_deleteGuard = false, m_destroyed = true


www.rzr.online.fr 2014-09-29 17:29

Re: XWayland doable from user side or jolla required?
 
gz javispedro I knew it was doable , do know where do you want to support X11 ? what about hw accel in x now ? like egl and qtquick2 ;)

MartinK 2014-09-29 20:16

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by www.rzr.online.fr (Post 1441016)
gz javispedro I knew it was doable , do know where do you want to support X11 ? what about hw accel in x now ? like egl and qtquick2 ;)

What about Py/GTK2 ? Worked quite nicely on Harmattan. :)

Larswad 2014-10-03 13:40

Re: XWayland doable from user side or jolla required?
 
we simply knew from the beginning, it is just a matter of time until someone in this highly competent community comes up with a working port.
Good work javispedro!

for integration of this xwayland server to work with ssh, I guess there is some extra work needed too?

I am rather split in my opinion about this, I love having x11 forwarding, bu t I can also see how ugly apps will be if they will be crosscompiled to run locally with x11. The possibility is always nice, but the question is still there, should we really let all those old apps pour in to the Jolla?
Me thinks not. But I do want sdl1.2 support still, but that's another thing I suppose.

www.rzr.online.fr 2014-10-03 18:07

Re: XWayland doable from user side or jolla required?
 
for forwarding display you could use RDP wayland backend ...

But for my point of view , the only use I'll have is to run other OS in a chroot , ie: harmattan apps like maps/drive :)

javispedro 2014-10-04 18:39

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by www.rzr.online.fr (Post 1441016)
what about hw accel in x now ? like egl and qtquick2 ;)

See my original post, it will be "hard" (albeit certainly not impossible). It may be relatively easier to do some kind of indirect rendering. Otherwise any chroots using OpenGL ES will need to link with libhybris. Since I'm only wasting a few hours per week on this it's highly improbable I'll manage that :)

But why? QtQuick2 requires Qt5, which should already work in Wayland? The only use case I can see here it's Maemo Gtk2/Qt4 programs, which I would like to see somewhat working.

juiceme 2014-10-06 08:03

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by Larswad (Post 1441730)
I am rather split in my opinion about this, I love having x11 forwarding, bu t I can also see how ugly apps will be if they will be crosscompiled to run locally with x11. The possibility is always nice, but the question is still there, should we really let all those old apps pour in to the Jolla?

I do not think it is a problem really, and for me the impostant thing is not just running local X apps in Jolla, rather the ability to have X forwarding work, that is paramount.

For example, to get VPNC connectivity I run a token generator on my server. The generator works in a java midp emulator that runs the application from RSA.
This application is only available as a legacy X application, so if I want to enable VPN in my jolla I need to connect to the token generator.

rainisto 2014-10-06 08:13

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by juiceme (Post 1441985)
For example, to get VPNC connectivity I run a token generator on my server. The generator works in a java midp emulator that runs the application from RSA.
This application is only available as a legacy X application, so if I want to enable VPN in my jolla I need to connect to the token generator.

What kind of tokens are you generating? If you mean RSA SecurID tokens, then you can already generate them with native sailfish OS binary (google search "stoken").

juiceme 2014-10-06 09:05

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by rainisto (Post 1441986)
What kind of tokens are you generating? If you mean RSA SecurID tokens, then you can already generate them with native sailfish OS binary (google search "stoken").

Well what can I say... Cannot do that 'cos our IM personnel are dickhead *****s :mad:

To use stoken I'd need to get the token seed code in a format importable to stoken. Unfortunately that's not allowed to us, instead they create the seed bound to a device IMEI and distribute it in hashed mode usable only in an "official RSA client"

I did put some effort in recoding the seed to a distributable format but was not very successiful at it.

rainisto 2014-10-06 10:21

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by juiceme (Post 1441989)
Well what can I say... Cannot do that 'cos our IM personnel are dickhead *****s :mad:

Ah, ofcourse if IT doesnt want to give you the seed in readable format, then its a bit DOH :)

javispedro 2015-01-27 10:37

Re: XWayland doable from user side or jolla required?
 
Some of the good news:
- The lipstick crash has been fixed in some recent Jolla update.
- When the Jolla keyboard TOH appears, it should work with Xwayland.

The bad news:
- Still no touch input. Possibly will make Xwayland use the 'propietary' lipstick protocols (aka the hackish solution).

szopin 2015-01-27 12:51

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1458385)
Some of the good news:
- The lipstick crash has been fixed in some recent Jolla update.
- When the Jolla keyboard TOH appears, it should work with Xwayland.

The bad news:
- Still no touch input. Possibly will make Xwayland use the 'propietary' lipstick protocols (aka the hackish solution).

Dirk will have a proto on FOSDEM could check there (can bring my non-working v1 with me, but it is non-working, so could be false negative)

w00t 2015-01-27 14:41

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1458385)
- Still no touch input. Possibly will make Xwayland use the 'propietary' lipstick protocols (aka the hackish solution).

What's missing there? Is it expecting wl_touch to work? I thought that was working, but it's been a long time since I looked at that code.

javispedro 2015-01-27 23:57

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by w00t (Post 1458408)
What's missing there? Is it expecting wl_touch to work? I thought that was working, but it's been a long time since I looked at that code.

Worse: it expects wl_pointer. Either way, last time I looked at qtwayland (pre5.2...) it did not announce wl_pointer nor wl_touch; and while wl_keyword works under the VirtualBox image at least, I haven't tried anything related to keyboard layouts (which might require qtkey...).

w00t 2015-01-29 15:12

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1458480)
Worse: it expects wl_pointer. Either way, last time I looked at qtwayland (pre5.2...) it did not announce wl_pointer nor wl_touch; and while wl_keyword works under the VirtualBox image at least, I haven't tried anything related to keyboard layouts (which might require qtkey...).

Ah, indeed, it looks like I was wrong.

But I would suspect that "the right thing", then, would be to look at whether or not the custom touch protocol can be ripped out in favor of wl_touch, and XWayland made to understand wl_touch?

jalyst 2015-02-08 21:18

Re: XWayland doable from user side or jolla required?
 
Interesting, I hope this sees some major progress over the next 6mth or so.
Some of you guys are Gods amongst men, really...

www.rzr.online.fr 2015-02-08 22:18

Re: XWayland doable from user side or jolla required?
 
What about hacking on libinput ? and expect it to be part of sfos ?

w00t 2015-02-08 23:29

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by www.rzr.online.fr (Post 1460133)
What about hacking on libinput ? and expect it to be part of sfos ?

Qt 5.5 contains support for it, so it could be used. But I don't see much advantage taking it into use -- the current code is pretty simplistic.

It's also at the wrong layer: the compositor is responsible for talking to the hardware (using evdev directly in the current case, using libinput as you're proposing) and propagating those events to clients.

javispedro 2015-07-13 21:10

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1458385)
- When the Jolla keyboard TOH appears, it should work with Xwayland.

Confirming, it works!

(Note: no rotation yet, and for some reason the Xwayland window does not appear in the TOHKBD2 task switcher)

mick3_de 2015-09-08 08:08

Re: XWayland doable from user side or jolla required?
 
Seems Ubuntu Phone will be able to run X Apps with "Convergence" :

http://www.omgubuntu.co.uk/2015/09/u...ng-mir-video-2

X Apps Running on Mir Display Server in a Unity 8 session


All times are GMT. The time now is 19:04.

vBulletin® Version 3.8.8