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

xfce cannot restart after log out #259

Closed fugata closed 11 years ago

fugata commented 11 years ago

I just installed crouton -t xfce -r raring on my series 3 chromebook. Everything works well after installation, but as soon as I log out I cannot log back in. Specifically, the x window does not seem to properly shutdown after log out and/or restart at second start. This is somewhat similar to issue #239, and I have read that and all other issues posted. In particular, I have

apt-get remove the screensavers disable save-sessions make sure xfwm4 has "immediate" priority (under setting>session)

but the issue persists -- I have already powerwashed three times and delete-chroot/reinstall three times. I've sent along the end of the log (i.e. right before crouton crashes upon restart) from chronos terminal. Your help is most appreciated.


(xfce4-settings-manager:21468): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-session-settings:21487): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-session-settings:21487): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-panel:28580): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.

(xfce4-panel:28580): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.

(xfce4-panel:28580): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly. /usr/bin/xinit: connection to X server lost

waiting for X server to shut down xscreensaver: 07:04:14: SIGHUP received: restarting... xscreensaver: 07:04:14: running as siman/siman (1000/1000)

xscreensaver: 07:04:14: could not restart process: No such file or directory xfce4-volumed: Fatal IO error 11 (Resource temporarily unavailable) on X server :1.0.

Unmounting /usr/local/chroots/raring... Sending SIGTERM to processes under /usr/local/chroots/raring... chronos@localhost / $ sudo startxfce4 exec: Command not found. Unmounting /usr/local/chroots/raring... chronos@localhost / $ sudo startxfce4

tedm commented 11 years ago

what commands did you use to remove the screensavers as it appears xscreensaver is still running. You can type:

ps ax | grep xscreen to see if it is.

You possibly removed a conflicting gnome screensaver that installs with the xfce target along with xscreensaver.

Using apt-get remove or synaptic to remove xscreensaver may remove dependencies of your desktop.

This has been noted on the ARM with xfce target, and mainly the precise release.

dnschneid commented 11 years ago

Yeah, it looks like you removed way more than just xscreensaver.

fugata commented 11 years ago

Thanks for your comments.

@dnschneid:

Yeah, it looks like you removed way more than just xscreensaver. I removed three packages: xscreensaver, xscreensaver-data, and (unrelated) xfburn.

@tedm:

This has been noted on the ARM with xfce target, and mainly the precise release I must have missed it. Where can I read up on this?

You can type: ps ax | grep xscreen to see if it is.

Since I can't restart xfce4 I can't run "ps ax | grep xscreen". So I powerwashed again and reinstalled crouton with -t xfce -r raring. This time I simply disabled the screensaver and did not install/remove any package. I also went to setting>session and turned off options to save session. I then logged out and returned to chromeOS, and I found another massive chunk of error messages about screensaver -- see below -- but good news/question

MANY THANKS! ---------------------------- error message after I logged out of xfce4 and return to chrome --------------------------

(xfce4-session-settings:28338): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-session-settings:28338): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", /usr/bin/xinit: connection to X server lost

waiting for X server to shut down xscreensaver: 17:15:05: SIGHUP received: restarting... xscreensaver: 17:15:05: running as siman/siman (1000/1000)

g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting. xscreensaver: 17:15:05: Can't open display: :1.0 xscreensaver: 17:15:05: running as siman/siman (1000/1000)

xscreensaver: 17:15:05: Errors at startup are usually authorization problems. But you're not logging in as root (good!) so something else must be wrong. Did you read the manual and the FAQ?

          http://www.jwz.org/xscreensaver/faq.html
          http://www.jwz.org/xscreensaver/man.html

Unmounting /usr/local/chroots/raring... Sending SIGTERM to processes under /usr/local/chroots/raring...

chronos@localhost / $ chronos@localhost / $ sudo startxfce4 Password: /usr/bin/startxfce4: Starting X server

[skipping chunks of harmless initialization message] Initializing built-in extension GLX [dix] Could not init font path element /usr/share/fonts/X11/misc, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/Type1, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing from list! [dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing from list! [dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list! /usr/bin/xinit: XFree86_VT property unexpectedly has 0 items instead of 1 xfce4-session: No gpg or ssh authentication agent found

(Thunar:30552): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-session:30527): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-panel:30550): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(Thunar:30552): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-session:30527): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-panel:30550): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfsettingsd:30569): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfsettingsd:30569): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(polkit-gnome-authentication-agent-1:30558): GLib-CRITICAL **: g_variant_new_string: assertion `string != NULL' failed

(polkit-gnome-authentication-agent-1:30558): polkit-gnome-1-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

(xfwm4:30546): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(wrapper:30591): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfwm4:30546): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-volumed:30572): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(wrapper:30591): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-volumed:30572): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-dict-plugin:30613): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-dict-plugin:30613): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(wrapper:30617): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(wrapper:30619): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(wrapper:30617): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(wrapper:30619): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfdesktop:30554): GLib-GIO-CRITICAL **: g_file_get_path: assertion `G_IS_FILE (file)' failed

(xfdesktop:30554): GLib-GIO-CRITICAL **: g_file_get_path: assertion `G_IS_FILE (file)' failed

(xfdesktop:30554): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfdesktop:30554): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-terminal:30755): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(xfce4-terminal:30755): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", xscreensaver-demo: 17:17:02: Gtk-warning: Unable to locate theme engine in module_path: "pixmap", xscreensaver-demo: 17:17:02: Gtk-warning: Unable to locate theme engine in module_path: "pixmap",

(xscreensaver-demo:31039): libglade-WARNING **: Could not load support for `gnome': libgnome.so: cannot open shared object file: No such file or directory [31149:31149:0713/171721:ERROR:browser_main_loop.cc(166)] GTK theme error: Unable to locate theme engine in module_path: "pixmap", [31149:31149:0713/171722:ERROR:browser_main_loop.cc(166)] GTK theme error: Unable to locate theme engine in module_path: "pixmap", Failed to open /proc/cpuinfo

tedm commented 11 years ago

Well here is one thread about it: https://github.com/dnschneid/crouton/issues/114

But when I make a new chroot with xfce and precise, then start it, I first answer yes to the prompt to remove or inactivate the gnome screensaver.

Then I go into applications / utilities / screensaver and disable xscreensaver.

The applications menu and dialog prompts doesn't really disable (or save) the settings though, and since I have a user password, I am prompted by it after x minutes goes by it kicks in with a login prompt. I login, then kill the pid but notice it restarts, and at that point I just let it run as after the first kill, xscreensaver doesn't invoke or cause any known problems for me, even though I can see it having restarted.

By this point I've successfully disabled the duplicate gnome screensaver, and while not having stopped the xscreensaver restarting process, I've stopped it from kicking in, and haven't had to do any apt-get removals of packages.

The font and theme error messages above are pretty normal, I get those with a working chroot.

So I haven't gone into the xscreensaver package and isolated the dependecies because my method above works after the first couple of steps. I think that because the xscreensaver dialog for disabling doesn't have a 'save' option, you just close the window, it's config doesn't really get saved anywhere.

fugata commented 11 years ago

Thanks for your prompt reply!

I first answer yes to the prompt to remove or inactivate the gnome screensaver.

That's interesting, I had not seen this prompt in my multiple install of raring. Is this specific to precise, or do you have to invoke this prompt in some way? (I install xubuntu 12.04 on my desktops and laptop and I don't recall ever seeing this prompt)

I think you are right about the xscreensaver dialog not really saving anything: I just logged out, power down, reboot, and wa la, I cannot restart xfce4 -- it claims that an x-window is already running (even though I reboot!). I alread deleted the /tmp/.X0 file but right now I can't even log out of chroot:

Sending SIGTERM to processes under /usr/local/chroots/raring... Sending SIGKILL to processes under /usr/local/chroots/raring...

and I have to kill it with ctrl-C. And I can't even delete this chroot (note that I tried all the options):

chronos@localhost ~ $ sudo delete-chroot raring Password: Unmounting /usr/local/chroots/raring... Failed to unmount /usr/local/chroots/raring. Kill processes? [a/k/y/p/N] y Sending SIGTERM to processes under /usr/local/chroots/raring... Failed to unmount /usr/local/chroots/raring. Kill processes? [a/k/y/p/N] y Sending SIGTERM to processes under /usr/local/chroots/raring... Failed to unmount /usr/local/chroots/raring. Kill processes? [a/k/y/p/N] a Sending SIGTERM to processes under /usr/local/chroots/raring... Sending SIGKILL to processes under /usr/local/chroots/raring... Sending SIGKILL to processes under /usr/local/chroots/raring... Sending SIGKILL to processes under /usr/local/chroots/raring... ^Cchronos@localhost ~ $ sudo delete-chroot raring Unmounting /usr/local/chroots/raring... Failed to unmount /usr/local/chroots/raring. Kill processes? [a/k/y/p/N] k Sending SIGKILL to processes under /usr/local/chroots/raring... Failed to unmount /usr/local/chroots/raring. Kill processes? [a/k/y/p/N] p Failed to unmount /usr/local/chroots/raring. Kill processes? [a/k/y/p/N] n Skipping unmounting of /usr/local/chroots/raring

Questions: (1) How can I kill this run-away x window (rather, the log/lock of this x window)? (2) How can I delete this chroot and restart again, short of powerwash? (3) Is this screensaver issue common to all window manager or can be bypass it using e.g. lxde? (I don't want to touch unity) (4) I must have done something wrong since I run into this every time I install/run crouton, but assign from thread #114 I have not seen any other discussions... I wonder how others manage to get around this?

THANKS!

tedm commented 11 years ago

Is it possible that your x session locks are from you entering the chroot multiple times, or while you're in a chroot? I used to do this and learned to check very carefully before starting a DE or entering a chroot to ensure one wasn't already running.

sudo delete-chroot [-n name] targetchrootname from crosh/shell in usr/local/bin when chroot is unmounted.

If you must, and this is not recommended, you can force a chroot to unmount with -f or -k, adding -a will make sure any other chroots unmount, in case they are and you forgot.

I haven't had Precise 12.04 screensaver issues on stand-alone systems, but apt-get remove xscreensaver has been known to remove some desktop essentials in the past.

I am not sure if it is the arm version of xscreensaver/xfce, or crouton that is not saving the disable setting the first time, and letting it invoke, but killing the pid once seems to prevent it from recurrently popping up.

I haven't verified this with lxde for quite a while.

You'll possibly be re-installing chroots regularly, both for fun, and maybe out of necessity, so you might want to learn those delete-chroot parameters, much faster than powerwashing...

fugata commented 11 years ago

I have discovered a second reason for the failure to restart xfce (the first being xscreensaver), namely shell.

I normally use tsch and install it along with a dozen other packages as soon as I fire up a fresh install. Because of my ongoing problem with xscreensaver, this time I add one package at a time, taking care to kill xscreensaver, and then log out and back in (something with a reboot in between) to make sure that everything works. It does, until I install tcsh and then chsh, and bam, I can't restart xfce4 anymore.

delete-chroot, repeat the same process and I got the same problem. I have not tried to change tcsh back to bash before logging out; my fingers are getting a bit tired from reinstalling everything every other hour :-)

dnschneid commented 11 years ago

Now THAT's an interesting issue; thanks for unearthing it. It sounds like su is using tcsh or csh instead of sh to interpret the commands passed, and tcsh (or maybe csh) doesn't have the "exec" command that we use to avoid creating a new process. Modifying the host's /usr/local/bin/startxfce4 to remove the word "exec" should make the command work.

We probably need to modify enter-chroot to add -s /bin/sh to the su command.

DennisLfromGA commented 11 years ago

On Sat, Jul 13, 2013 at 5:41 PM, fugata notifications@github.com wrote:

Since I can't restart xfce4 I can't run "ps ax | grep xscreen".

​When I have trouble with a DE, I usually just log in to a shell via 'enter-chroot' and (attempt) to fix things that way. You can run 'ps ax', etc. and kill any processes you need to. It's saved me a lot of time and eliminated the need to 'delete-chroot' or heaven forbid 'powerwash'.​

DennyL@GMail

fugata commented 11 years ago

When I have trouble with a DE, I usually just log in to a shell via 'enter-chroot' and (attempt) to fix things that way.

Because of the tcsh issue, I was not able to re-"enter-chroot" to kill run away process. Now that I stick to bash :( and ap-get remove xscreensaver (and nothing else) the problem goes away. THANKS!

dnschneid commented 11 years ago

Really? A standard sudo enter-chroot should work just fine, even if the shell has changed.

dnschneid commented 11 years ago

@fugata, thanks for tracking that down to tcsh/csh. This should be fixed in the latest version.