RalfWerner / integrated-process

sources for check X11
3 stars 0 forks source link

Xserver with "unwanted effect occurs (UEO/SSM) #1

Closed RalfWerner closed 5 years ago

RalfWerner commented 5 years ago

The warranty period of my mobile phone expires in 2 weeks. The problem, especially SSM (Strange/Stupid-Stalled-Mode), has not been solved for 4-5 months despite many attempts. I could not exclude a HW problem or limit it to the "aarch" architecture. The Termux developers @twaik and @xeffyr have also tried the reverse successless - thank you very much.

Currently/prorisiert I therefore try to create a (easy) repeatable example ("upload_mode = 1"), which I would give the dealer as a reference example.

@mogryph1 My goal is to start a Linux emulator (with X-server) on the phone. So far, I have experienced the Termux app as a very good terimal emulator with development needs for the X-server. With your sparkle I now know 6 alternatives, but only partly can be used simultaneously or simply with OTS (One-Touch-Start).

In this repo, I describe the test sources and processes for using XClients on smart phones. You write:

discussing sparkle in his repository. We are competitors after all, not one friendly team.

We can discuss here - but I still like "friendly team", especially since I am a retiree and there is no "compulsion to compete". There and here are also contributions to the dissemination.

... --el" startservice "" 1 " ... Sparkle can not be used with termux anyway (on newer devices).

startservice works after new installation this morning partly (thanks) "close itself quietly" not. In the other X-servers, I use this (am ...) action to easily change the X-server, but land back in the start menu (shot1). The "sparkle notification tab" would not be necessary if I land immediately in the "shot3"(here wtermux) - this would be OTS. I have devices with 7.1 - 8.1. From which version does "Sparkle" no longer work with termux, why and which alternative do you know?? grafik

I've changed the key to toggle keyboard as you have suggested.

Thanks I've detected it yesterday by test on my wife's phone X11/wtermux use "end" key for toggle.

There is almost no chance that sparkle's upload_mode could affect other apps.

It's really crazy how this works on my device and affect x11/wtermux!

ghost commented 5 years ago

@RalfWerner ,

I am sure you know that there are a lot of linux distributions: Fedora, Debian, and another... 200 or so. Many of them support ARM processors. And most of them have more software available in repositories than termux.

Sparkle can be setup to "launch" these distributions. With or without root (but root is very desirable and may become necessary in future). Here is what I see immediately after clicking "Start" in sparkle (I use Fedora 28): http://i.piccy.info/i9/2d480db0c80d16899e4ac144397b9765/1567535076/70305/1335998/2019_09_03_21_09_51_mp4_00_00_05.png It is just xterm. But I can change it to any desktop environment: KDE, XFCE etc. Isn't this OTS you wanted?

Now lets get back to termux. Besides simplicity, termux has one advantage over other linux distributions: it is based on bionic-libc and can use android's hardware drivers (like OpenGL, video/audio decoding acceleration etc.). It can use those drivers but it doesn't (currently). So termux doesn't utilize its only advantage over other powerful distributions.

Personally I see no reason in termux. Until it start to utilize android's hardware acceleration drivers. Thats it. Together with xeffyr we could make sparkle-termux integration (with your OTS) in few hours. But none of us is interested in this.

Regarding SSM... Its twaik's problem actually... I spent few minutes thinking about it and only idea I have is to use GDB and capture backtrace during SSM. Backtrace will show in what particular function program gets stuck. But using GDB on android isn't that easy and no one will ask you to do that.

RalfWerner commented 5 years ago

Thank you @mogryph1 for your answer.

In SSM and here my current problems are best documented (with videos), including traceback up to XPending. Twaik can not reproduce SSM on his phone (does not have a aarch device) and said I was the only one (means it's a HW problem). Do you have a device with this architecture and can test SSM and UEO (sparkle only) there also occurs?

Because of this problem I have not been able to get on with my major goal "Smart-Linux-Emulator" for months. As OTS I would for example designate the screen that appears after One finger-tab on G-Maps. By Termux the GUI of fluxbox and xterm is currently being published so as not to disappoint classic Linux friends.

You're right, I have worked with various Linux distributions on servers and PC's (development of XClients). Currently I use MobaXterm (WSL) on my PC, different Debian/Ubuntu over VirtualBox and Cygwin. All are started with X-server, managed with a WM (Windows Manager Gnome/KDE) and controlled via KB + mouse / touchpad. It is possible to transfer this method of operation to a mobile phone but this is not my favorite and not smart.

Working with a mobile phone is different. An X-server, however, is essential in my opinion. Typically, the phone owner has no mouse / KB / PC in his pocket. As far as the terminal emulation is concerned, Termux has convinced me the most here, my attempt with Debian not. In videos of this repos are a few investigations. Your *.png (above) is just a picture. Are there any API / widget-like features included?

Together with @xeffyr we could make sparkle-termux integration (with your OTS) in few hours

That would be fantastic (without SSM and UEO at best)! But The last attempt from the 5th of May (one *.apk) was abandoned because of segfaults (before SSM could occure) and still contained various errors/bugs (I've worked with it for two months).

As a first step to OTS would be the sparkle+Xwayland script-only-start without the screens shown above in Shot1+2, and also back as the switch to Wtermux (shot3). Could you implement that and inform me, if I can copy the updated sparkle.apk?

ghost commented 5 years ago

Do you have a device with this architecture

Sometimes I can't afford even food. And the only device I have is 6 years old (sister gave it to me after purchasing new one).

Fine... I think it is time to finish this discussion...

If you get SSM with sparkle (new version), please confirm this and I will do my best to find solution. Otherwise, SSM is twaik's problem.

Also there is no point for me to fix segfaults in old version of sparkle. New version is more advanced. Today I have a lot more experience than I had when I was writing first sparkle.

And, of course, I am not going to ask xeffyr or anyone to integrate sparkle into termux. I am sure he is also not interested. To be honest, all versions of sparkle and twaik's project are very simple. For xeffyr its probably faster to make his own X server than cooperate with me or twaik.

Yet if authors of termux want some termux<->sparkle integration, they can contact me and I will do what is needed. I can add ability to launch sparkle from script, turn sparkle into termux addon, provide unsigned apk etc.

Thats it... Take care! Feel free to poke me if you find bugs in new sparkle. But I am definitely not interested in solving twaik's SSM.

RalfWerner commented 5 years ago

The Xserver of @xeffyr is Wtermux and the one of @twaik X11 references in the previous dialogues. As described I get SSM also with sparkle but additionaly UEO here.

Misunderstanding: SSM is my problem at first, and Twaik tried to help me, but just as you do not have aarch device and therefore can not understand / repeat / fix it.

@mogryph1 Could you please answer my last question above?

ghost commented 5 years ago

@RalfWerner , ah, ok. If you get SSM with sparkle, I am ready to work and solve this. But. first of all, I don't support termux and termux's Xwayland. You need to run sparkle in the way it was designed for: a) get root rights on your device; b) prepare image file with your linux distribution and Xwayland installed in it; c) edit sparkle's user.sh to launch this image file. If you want, I can provide my image with Fedora 28. Its armv7, but will work on aarch too.

I hope you do not consider these steps redundant. Currently termux's Xwayland is the only thing sparkle and twaik's projects have in common. 60% that SSM is caused by Xwayland. If so, this test will help twaik also: he will know he need to check Xwayland, not compositor.

Roger out.

ghost commented 5 years ago

Word or warning. Using Xwayland without root rights (like in termux) requires it to be patched to use ashmem instead of temporary files. We discussed this with twaik and after few days he informed me that they did this patching. That was... 2-3 weeks ago or so... Not sure. But... If for some reason they didn't patch Xwayland or if they patched it wrong or if YOU didn't update your Xwayland in last 2-3 weeks, using such version of Xwayland may cause not just SSM, but also damage to phone's persistent memory.

RalfWerner commented 5 years ago

Unfortunately, SSM is a complicated problem, as it only appeared on my device and You/Twaik have no comparable. The armv8l of my wife does not occur SSM and probably not on your armv7, which would be necessary for the SSM solution. The *shmem problem can be solved with LD_PRELOAD, which is included in OTS (please remind my question above?) - without I couldn't start Xwayland.

Before the warranty expiration next week, I returned yesterday my Huawei-Y7 to the dealer, which sent it to the manufacturer and installed a repeatable example on the device. SSM is not good, because it often happens for the first time after a few minutes and UEO (with upload_mode = 1) immediately. In 1-2 weeks I get it back and then report on the result.

Leonid has integrated the build on device function into termux, which I used a week ago for the build of Xwayland because I already had your idea! My experience with it:

The three Xserver (with your sparkle) on Xwayland basis I know meanwhile and they are compared to the Xorg of May better - so I also do not want to back, except the merge in one *.apk file. On the other hand, they have different pro & cons.

If I understand your statements above correctly, you have no interest make with the two a merge of pro's - correct? - pitty!

RalfWerner commented 5 years ago

@mogryph1 Again to my question above:

As a first step to OTS would be the sparkle+Xwayland script-only-start without the screens shown above in Shot1+2, and also back as the switch to Wtermux (shot3). Could you implement that and inform me, if I can copy the updated sparkle.apk?

Are you still working on it or do not I need to wait for it?

I can not understand your arguments against termux so far. I have not been able to determine a performance constraint on the functions I use compared to the PC. But I'm not a "gamer" either. Which functions did you notice a deficiency?

On my question above: "which alternative do you know?" I just got the answer: "other powerful distributions" (insufficient for installation) and fedora28 App is not in google-play. What are you using on your armv7? And again the question: "Are there any API / widget-like features included?"

ghost commented 5 years ago

@RalfWerner , you probably take me for some friendly and helpful guy who wants to make everyone in the world happy... I am not. People hate me and I hate them in return.

Primary alternative to termux is deploying one of many desktop linux distributions. It takes about 20-40 commands in terminal. Such distributions have much more applications available in their repositories. Some people (like me) are able to fully replace Android with desktop linux distribution on their devices.

For those, who can't deploy distribution manually, there are programs like LinuxDeploy . But I suggest manual installation.

Sparkle was designed for me and for people who already have desktop distributions on their devices. This is mandatory requirement to get support for me.

RalfWerner commented 5 years ago

@mogryph1 I do not claim from you, to "make everyone in the world happy" - not even me, but would like to know if you're working on it and preparing an update or not - would not be a problem. So I'm still waiting for an answer to my questions.

I am sufficiently satisfied with the 4-5 Linux desktop distributions on my PC, and my smart phone should stay that way and not become a desktop.

Your statements above suggest that you want a "small PC" in your pocket and termux is for you too much "phone like" (API / widget). We have different goals - do not worry. But we're agree, to get with Xwayland (Xorg) an alternative Xserver to VNC.

If I get my device back from the manufacturer, I may test LinuxDeploy. What does "rooten" mean in this case? I know the Termux package proot and the command termux-chroot!

ghost commented 5 years ago

What does "rooten" mean in this case?

If your device is rooted, you will have utility su available in default PATH and corresponding application (e.g. Magisk or SuperSU). Typically used to obtain superuser rights and execute stuff requiring system privileges.

I know the Termux package proot and the command termux-chroot!

Proot is good solution if you don't have root. Otherwise it isn't.

RalfWerner commented 5 years ago

Thanks @xeffyr for the explanation. In my PC Linux distributions I use "su/sudo" more often, if user rights are not enough and that proot is more of a "root-simulation" I already suspected.

My question was about the practical steps of "device rooting" and the implications for protability and hardware warranty. I asked because @mogryph1 made the sparcle-support above dependent on it.

Another "charm criterion" of termux is for me, that root is not needed. With a merged / upgraded X-server (for example: TouchClass in wtermux as in X11/sparkle), it would be almost perfect.

RalfWerner commented 5 years ago

@mogryph1 is no longer in github and support only rooted devices. discussion continue in: https://github.com/twaik/termux-x11/issues/1#issuecomment-529225708