dnschneid / crouton

Chromium OS Universal Chroot Environment
https://goo.gl/fd3zc?si=1
BSD 3-Clause "New" or "Revised" License
8.57k stars 1.24k forks source link

X startup failure: "AddScreen/ScreenInit failed for driver 1" #3164

Closed jgyllinsky closed 2 years ago

jgyllinsky commented 7 years ago
$ sudo edit-chroot -all
name: xenial
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/xenial...
crouton: version 1-20170315143304~master:95589555
release: xenial
architecture: armhf
xmethod: xorg
targets: lxde,cli-extra
host: version 9000.91.0 (Official Build) stable-channel daisy 
kernel: Linux localhost 3.8.11 #1 SMP Wed Feb 22 23:16:02 PST 2017 armv7l armv7l armv7l GNU/Linux
freon: yes
Unmounting /mnt/stateful_partition/crouton/chroots/xenial...

Please describe your issue:

Crouton appears to work OK on Samsung XE303C12 chromebook. Everything installs and additional software can be installed and run via sudo apt install .... Crouton and shell can be exited safely and reopened without any issues. However it would seem that upon rebooting the chromebook, typing sudo startlxde fails to start X anymore. Sleep may also cause this issue - at first I thought this was random, but it seems reproducible on reboot. I would test this more but it takes a VERY long time to reinstall crouton.

I have reproduced this issue with lxde, xfce and unity.

Updating crouton with sudo sh ~/Downloads/crouton -n xenial -u does not fix the issue.

This is an example of the output:

$ sudo startlxde
Entering /mnt/stateful_partition/crouton/chroots/xenial...

_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-59-generic armv7l Ubuntu
Current Operating System: Linux localhost 3.8.11 #1 SMP Wed Feb 22 23:16:02 PST 2017 armv7l
Kernel command line: cros_secure console= console= loglevel=7 init=/sbin/init cros_secure oops=panic panic=-1 root=/dev/dm-0 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 dm="1 vroot none ro 1,0 2539520 verity payload=PARTUUID=d6b9cbba-f8c7-f54f-a3f1-b503bc9fdeb8/PARTNROFF=1 hashtree=PARTUUID=d6b9cbba-f8c7-f54f-a3f1-b503bc9fdeb8/PARTNROFF=1 hashstart=2539520 alg=sha1 root_hexdigest=0f8e46d1190f0b380a736dcc0160f1b5d0787ee9 salt=11b3c6f73efe039531fac6ea08ccfbea76bc7f4476fc063a443c9bdc614ba489" noinitrd vt.global_cursor_default=0 kern_guid=d6b9cbba-f8c7-f54f-a3f1-b503bc9fdeb8  
Build Date: 26 January 2017  12:27:19AM
xorg-server 2:1.18.4-1ubuntu6.1~16.04.1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.33.6
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.crouton.1.log", Time: Thu Mar 16 13:35:41 2017
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/exynos_dri.so: cannot open shared object file: No such file or directory
failed to load driver: exynos
EGL_MESA_drm_image required.
(EE) 
Fatal server error:
(EE) AddScreen/ScreenInit failed for driver 1
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/tmp/Xorg.crouton.1.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.

/usr/bin/xinit: giving up
/usr/bin/xinit: unable to connect to X server: Connection refused
/usr/bin/xinit: server error
Unmounting /mnt/stateful_partition/crouton/chroots/xenial...

The CLI seems to work fine though if I start the "xenial" chroot up using sudo startcli.

If known, describe the steps to reproduce the issue:

  1. install crouton (sudo sh /downloads/crouton -t lxde,cli-extra)
  2. run crouton OK (sudo startlxde)
  3. logout of lxde, exit crouton, exit shell, close tab
  4. Reboot device
  5. Go to terminal (Ctrl+Alt+t)
  6. Enter shell (type shell)
  7. Attempt to start X (type sudo sudo startlxde)
bumper314 commented 7 years ago

Same experience on my Samsung Chromebook Plus.

parsifal9 commented 7 years ago

same experience, New xenial install, crouton updated. chronos@localhost / $ sudo startxfce4 Password: Enter encryption passphrase for xenial: Entering /mnt/stateful_partition/crouton/chroots/xenial... /usr/bin/startxfce4: Starting X server _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root X.Org X Server 1.18.4

gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri) gbm: Last dlopen error: /usr/lib/dri/exynos_dri.so: cannot open shared object file: No such file or directory failed to load driver: exynos EGL_MESA_drm_image required. (EE) Fatal server error: (EE) AddScreen/ScreenInit failed for driver 1 (EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/tmp/Xorg.crouton.1.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file. /usr/bin/xinit: giving up /usr/bin/xinit: unable to connect to X server: Connection refused /usr/bin/xinit: server error Unmounting /mnt/stateful_partition/crouton/chroots/xenial...

benzipperer commented 7 years ago

Hi, I can confirm this startxfce4 error with a new crouton, xenial install on a Samsung Series 3.

danvocino commented 7 years ago

Same issue on Samsung 303c

yelluw commented 7 years ago

Experiencing same issue on Samsung 303c as @danvocino

cricketbox5000 commented 7 years ago

I'm also having this issue on a 303c.

sethfeinberg commented 7 years ago

I am having the same issue on a Samsung Series 3 as well...

cricketbox5000 commented 7 years ago

I tried deleting the chroot by resetting the computer, and then creating a new one. I made sure to add both extension and xiwi. (However, I wanted to be able to use xorg specifically, and it was using xorg instead of using xiwi that seemed to cause the problem. I never had the problem with xiwi.)

Now if I start xfce like this:

sudo startxfce4, -t xorg

it does actually work. I don't know if simply retrying it was what solved the problem, or if it was making sure to add extension. I would suggest simply trying to add extension. If that doesn't work, try xiwi. This way you can at least run xfce in a chrome tab. IAC the problem is resolved for me. (Unfortunately, I've found xfce is a lot slower if I run it on xorg than if I run it on xiwi, but this is probably a different issue.) I'm still a newbie, so I hope someone here finds this helpful. : /

EDIT: I don't know about lxde. I haven't tried using it.

(Edited about a hundred times.)

asadislove commented 7 years ago

@cricketbox5000 can you tell me from stat what to download? I did download the regular xfce using the command sudo ~/downloads/crouton -t xfce and what extensions should I add to download xiwi and org? I already have my laptop on dev mod and powerwashed it. Please tell me the command because I'm a total noob haha. Thanks in advance.

cricketbox5000 commented 7 years ago

@asadislove What I did was I added xfce, xiwi, and extension. I'm a total noob too, so I don't remember exactly what specific command I wrote when I installed my chroot. Sorry about that. I believe it was as follows:

sudo sh ~/Downloads/crouton -t xfce,xiwi,extension

or possibly:

sudo sh ~/Downloads/crouton -t xfce,xorg,xiwi,extension

As far as I know, the first command should work fine (barring syntax errors?). I would recommend doing more research on your own before following my advice, and if anyone out there is reading this and knows more than I do, I'd love to hear your input.

Both xorg and xiwi are ways of displaying a graphical user interface like xfce (1)(2). Xorg is automatically included when you install xenial, so you don't need to worry about adding it when you first create the chroot. Xiwi simply runs xfce inside a new Chrome tab. I've found that xorg runs much slower than xiwi.

Extension is needed to run the Crouton Integration Extension for Chrome. I don't know what it does exactly, but I believe that it works with either xiwi or xorg to integrate Chrome with xenial. Normally extension is installed with xiwi automatically. I think that if you run xorg instead of xiwi, you need to install extension separately from xiwi. [ED:] This seems to have resolved my initial problem. I'm sure that there is also a way of adding these packages after installing the chroot, but I haven't been able to do that successfully yet.

The command I wrote in my above comment (sudo startxfce4, -t xorg) is to launch xfce using xorg when entering the chroot (when you also have xiwi installed). Alternatively, if you want to launch xfce using xiwi, use:

sudo startxfce4, -t xiwi

Thanks for your patience.

DennisLfromGA commented 7 years ago

To those having trouble with launching your desktop target after a reboot I'd like to suggest doing a backup of the chroot after it's setup and tweaked and before you reboot. This will save you from re-installing or more accurately installing a new chroot each time something goes awry. You can either first delete the hosed chroot or restore it over the hosed chroot with the edit-chroot command.

For instance to back up a chroot named xenial use this:

sudo edit-chroot -b -f ~/Downloads xenial

To restore a chroot named xenial on top of an old hosed one use this:

sudo edit-chroot -rr -f ~/Downloads/xenial-2017*.tar.gz

I used the '*' wildcard character to find any xenial backup created this year but you can use it's exact name if you have more than one.

Hope this helps, -DennisL

DennisLfromGA commented 7 years ago

@cricketbox5000,

Both of your chroot install commands above should work, I always use the second form that installs both xmethods to give more flexibility, for example -

sudo sh ~/Downloads/crouton -t xfce,xorg,xiwi

And the 'crouton integration' extension is needed when you install the 'xiwi' target/xmethod and installs the 'extension' target automatically like you mentioned but can also be used with the 'xorg' target/xmethod for copy pasta but you do have to specify it on the command line, again like you mentioned.

The target/xmethod you enter first in the install command will become the default xmethod so in your example it will be 'xorg'. If you want to change the default xmethod say from 'xorg' to 'xiwi' just update your chroot specifying only the new default xmethod like this for example -

sudo sh ~/Downloads/crouton -n xenial -t xiwi -u

With both xmethods installed you can launch your desktop in a number of ways -

Hope this helps, -DennisL

cricketbox5000 commented 7 years ago

@DennisLfromGA

Thank you very much. All of your suggestions are very helpful. : )

jgyllinsky commented 7 years ago

While xenial (16.04lts) was unstable for me, trusty (Ubuntu 14.04lts) has been stable for the last month.

To install: sudo sh ~/Downloads/crouton -n trusty -u -t xiwi,xfce

Although, note that I think the lxde version works a little smoother due to speed

I would now label this issue as a regression, since 14.04 works well.

wowSH commented 7 years ago

I installed xenial and experienced same issue on Samsung Chromebook 2 503.

2426 fixed this issue for me.

Current version of pixman: 0.33.6 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (++) Log file: "/tmp/Xorg.crouton.1.log", Time: Sun May 14 20:15:40 2017 (==) Using system config directory "/usr/share/X11/xorg.conf.d" gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri) gbm: Last dlopen error: /usr/lib/dri/exynos_dri.so: cannot open shared object file: No such file or directory failed to load driver: exynos EGL_MESA_drm_image required. (EE) Fatal server error: (EE) AddScreen/ScreenInit failed for driver 1 (EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/tmp/Xorg.crouton.1.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file. /usr/bin/xinit: giving up /usr/bin/xinit: unable to connect to X server: Connection refused /usr/bin/xinit: server error Unmounting /mnt/stateful_partition/crouton/chroots/xenial...

bjodah commented 7 years ago

@wowSH, what part of #2426 helped you?

wowSH commented 7 years ago

Below answer helped me to fix this issue.

tista500 commented on Feb 8, 2016 OK.

Download this file to your "Downloads" directory in ChromeOS: 20-armsoc.txt

In crosh window, run shell command to launch bash-like shell

Rename downloaded file from .txt to conf:

cd ~/Downloads mv 20-armsoc{.txt,.conf} Login into chroot without X11:

sudo enter-chroot -n precise Move that file into proper place and flush the RAM cache:

sudo mv ~/Downloads/20-armsoc.conf /usr/share/X11/xorg.conf.d/ sync Logout chroot with "Ctrl + d" or run exit command

Re-login into chroot with X11/freon:

sudo startxfce4 That's all, maybe...

Regards.