Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X server failed to launch Try to use different display number, or reboot your device #112

Open
kennedyshaun opened this issue Dec 16, 2019 · 21 comments

Comments

@kennedyshaun
Copy link

So it had been about two weeks since I last used it, but then I started it up and got this message. I've tried display numbers 0, 1, 2, and 3 with the same result. I've restarted, reinstalled, and reset the configuration to default. It was working fine a few weeks ago. I don't think I've seen an update for it, but there's been a lot of apps updated, so I might have missed it. Might there be a configuration file that needs updating our something?

@pelya
Copy link
Owner

pelya commented Dec 16, 2019 via email

@kennedyshaun
Copy link
Author

So I decided I wasn't going to break it worse and deleted the Android/data/x.org.server/files directory. It rebuilt the directory and now seems to be working. What's that old saying? Move fast and break things?

@abliss
Copy link

abliss commented Dec 22, 2019

I may be having the same issue. Logcat says:

12-22 18:27:30.003 15886 15923 I XSDL    : [dix] Could not init font path element /data/user/0/x.org.server/files/usr/share/fonts, removing from list!
12-22 18:27:30.005 15886 15923 I XSDL    : (EE) XKB: Couldn't open rules file /data/user/0/x.org.server/files/usr/share/X11/xkb/rules/evdev
12-22 18:27:30.005 15886 15923 I XSDL    : (EE) XKB: Failed to load keymap. Loading default keymap instead.
12-22 18:27:30.005 15886 15923 I XSDL    : (EE) XKB: Couldn't open rules file /data/user/0/x.org.server/files/usr/share/X11/xkb/rules/evdev
12-22 18:27:30.005 15886 15923 I XSDL    : XKB: Failed to compile keymap
12-22 18:27:30.005 15886 15923 I XSDL    : Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
12-22 18:27:30.005 15886 15923 I XSDL    : (EE)
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.005 15886 15923 I XSDL    : Fatal server error:
12-22 18:27:30.005 15886 15923 I XSDL    : (EE)
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.005 15886 15923 I XSDL    : Failed to activate virtual core keyboard: 2
12-22 18:27:30.005 15886 15923 I XSDL    : (EE)
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.006 15886 15923 I XSDL    :
12-22 18:27:30.006 15886 15923 I XSDL    : Current video mode: 2160 1080

Mine was also working a couple weeks ago. If there was no update, is perhaps some rogue piece of code deleting /data/user/0/x.org.server/files/usr/bin/xkbcomp ? I find an empty bin directory there.

I tried removing the files directory, and even uninstalling the app and reinstalling it from Play Store, and it still isn't working.

@abliss
Copy link

abliss commented Dec 22, 2019

Actually I'm not super sure that it worked after the Nov 6 update. "An update after 3.5 years of neglect!

  • Support for Android 9. Android 10 not tested."

@kennedyshaun
Copy link
Author

Hmm, it's working for me now. My Android/data/x.org.server directory was on the SD card, yours looks like it's on local storage. I'm not sure if that really means anything. There is a similar file on the local storage. I'm not sure if they're actually linked somehow or not. Maybe look on your SD card to see if there's another folder there and delete it? I didn't have to reinstall after I deleted the right folder, but I was definately operating under the theory that I wasn't going to break it worse and trying things that I thought might make it unfixable. So, good luck!

@abliss
Copy link

abliss commented Dec 23, 2019

I uninstalled the app and sideloaded the previous version, 1.11.40, from sourceforge:
https://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/XServer-XSDL-1.11.40.apk/download

And it worked. I then tried copying the contents of usr/bin from that version, uninstalling, reinstalling the new version from the google play store, and copying in the files. At first it still seemed to fail the same way. But copying the files back in did not restore their original context, so after running chcon u:object_r:app_data_file:s0:c512,c768 /data/user/0/x.org.server/files/usr/bin/* , the problem went away. The X server does appear to be working now, but it starts out at an empty black screen isntead of the blue screen with the helpful text.

I should perhaps point out that my device, a Gemini, has a hardware keyboard. Is that perhaps related? Does the new version assume a virtual keyboard must be used?

@PSzczepanski1996
Copy link

Isn't that releated to this:
meefik/linuxdeploy#1156

Because I don't believe that Linux Deploy developer did mistake in installing Arch packages which are probably authomaticated from ARM Arch Linux repo.

I may be having the same issue. Logcat says:

12-22 18:27:30.003 15886 15923 I XSDL    : [dix] Could not init font path element /data/user/0/x.org.server/files/usr/share/fonts, removing from list!
12-22 18:27:30.005 15886 15923 I XSDL    : (EE) XKB: Couldn't open rules file /data/user/0/x.org.server/files/usr/share/X11/xkb/rules/evdev
12-22 18:27:30.005 15886 15923 I XSDL    : (EE) XKB: Failed to load keymap. Loading default keymap instead.
12-22 18:27:30.005 15886 15923 I XSDL    : (EE) XKB: Couldn't open rules file /data/user/0/x.org.server/files/usr/share/X11/xkb/rules/evdev
12-22 18:27:30.005 15886 15923 I XSDL    : XKB: Failed to compile keymap
12-22 18:27:30.005 15886 15923 I XSDL    : Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
12-22 18:27:30.005 15886 15923 I XSDL    : (EE)
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.005 15886 15923 I XSDL    : Fatal server error:
12-22 18:27:30.005 15886 15923 I XSDL    : (EE)
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.005 15886 15923 I XSDL    : Failed to activate virtual core keyboard: 2
12-22 18:27:30.005 15886 15923 I XSDL    : (EE)
12-22 18:27:30.005 15886 15923 I XSDL    :
12-22 18:27:30.006 15886 15923 I XSDL    :
12-22 18:27:30.006 15886 15923 I XSDL    : Current video mode: 2160 1080

Mine was also working a couple weeks ago. If there was no update, is perhaps some rogue piece of code deleting /data/user/0/x.org.server/files/usr/bin/xkbcomp ? I find an empty bin directory there.

I tried removing the files directory, and even uninstalling the app and reinstalling it from Play Store, and it still isn't working.

I have similar problem, see my linked thread, but not sure if this is releated. Seems maybe it is, but really chrooted linux relies on bin files from Xorg? I don't quite understand that.

@vitalinvent
Copy link

vitalinvent commented Feb 27, 2020

Error: X server failed to launch
Try yo use different display number
or reboot device
(nexus 7 2013 install from google play)
at all. nothing help.

@zanfix
Copy link

zanfix commented Feb 28, 2020

Hmm, it's working for me now. My Android/data/x.org.server directory was on the SD card, yours looks like it's on local storage. I'm not sure if that really means anything. There is a similar file on the local storage. I'm not sure if they're actually linked somehow or not. Maybe look on your SD card to see if there's another folder there and delete it? I didn't have to reinstall after I deleted the right folder, but I was definately operating under the theory that I wasn't going to break it worse and trying things that I thought might make it unfixable. So, good luck!

I have the Android/data/x.org.server on SD card too... deleting the contents will restore the app!
The issue is still present on latest version (Feb 2020)

@nathaneltitane
Copy link

nathaneltitane commented Apr 14, 2020

Can confirm this is also happening as of right now with a fresh install.
Tried deleting both sorage contents and reinitializing the app to no avail.

Running android 10 (Samsung Galaxy Note 10+, via Dex)

EDIT:

I was able to narrow it down and reproduce it:

In my case, if i specify a custom resolution that surpasses the current window's width/height parameters, the server is unable to comply.

I set mine to be 2560x1080 with a 1x display scale, when the native window size detected on launch is smaller than 800x600.

the app should be updated to reflect the window resize permissions for the newer api manifests to permit flexible/adhoc resize and dpi scaling of content like most modern apps.

otherwise, it works if i take the time to maximize the window before the process launches.

@IntyLab
Copy link

IntyLab commented Jun 19, 2020

I've had the same problem on both an old and new Android tablet, but not on my phones yet. The only thing that worked was to revert to a previous version.

@seisdr
Copy link

seisdr commented Jul 5, 2020

same #128

@ristomatti
Copy link

Same issues here as described above. I'm running crusty old Android 5.0.2 on my Samsung Galaxy Tab S2 9.7. Like others I did clear app data, uninstall, reboot, delete data dirs from internal storage and sdcard. I then tried v1.20.47 but it suffered from the same issue. Finally downgrading to v1.11.40 as suggested above fixed the issue.

@zorkpatrol
Copy link

All I had to do was clear the data and clear the cache. I was going to downgrade but decided to try that first. Good thing I did!

@Wiiplay123
Copy link

Same here, had to downgrade to make it work. Still doesn't work on my Samsung Galaxy S4 running Android 5.0.1.

@w4123
Copy link

w4123 commented Feb 3, 2023

The reason why it fails to launch on Android 5/6 is that the busybox binary included in 1.20.41+ is not compatible with Android 5/6. A linker error "CANNOT LINK EXECUTABLE: empty/missing DT_HASH" will be thrown when busybox is invoked to extract data files. By replacing the busybox binary (lib0.so) with a compatible one, I can successfully launch the latest version of the app on my Android 5 arm64 device.

Before this issue is officially fixed, I will include a patched version here.

Please note that I have only replaced the binary for arm64 architecture and the remaining architectures remain unchanged and untested.

@AyrtonRicardo
Copy link

If you're having this problem, while booting click on the screen to change resolution, you can select native resolution, select your dpi, and in the last screen select a different type of keyboard.

To me the keyboard was "system" and I changed to "built in QWERTY".

Now it boots normally again.

@ppsirius
Copy link

ppsirius commented Jul 5, 2023

If you're having this problem, while booting click on the screen to change resolution, you can select native resolution, select your dpi, and in the last screen select a different type of keyboard.

To me the keyboard was "system" and I changed to "built in QWERTY".

Now it boots normally again.

@AyrtonRicardo What version do you use, and on what android version?

@AyrtonRicardo
Copy link

Lineage OS 17.1 Android 10, downloading latest version from Google Play

@ppsirius
Copy link

ppsirius commented Jul 5, 2023

I try on Android 4.4.4 (HTC Desire 620) without success 🥲

@Dima325sk
Copy link

in settings change storage to system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests