Sunday, May 14, 2017

Login Loop - unable to run unity - not Xauthority ownership but may be related to display?

All, I was trying to get VNC working, making lots of changes that I don't recall now when I discovered after a restart that I could not login to Ubuntu 14.04. I believe I authenticate ok, but get returned to the login screen. I can log in as Guest and via Alt-F1 console.


I Googled the errors and tried lots of things but without success and am now clueless. see the output below. Note that XFCE does load ok, but I want to get back my lightdm.


I could really do with some advice and explanation as to what is going on here.
Regards
Martin



-rwxr-xr-x 1 martin martin 50 Mar 14 22:13 .Xauthority*
(I went a little overboard granting permissions for this file - just in case.)


martin@thrio:~$ cat .xsession-errors
Script for ibus started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
init: gnome-session (Unity) main process (2745) terminated with status 1
init: Disconnected from notified D-Bus bus
init: logrotate main process (2596) killed by TERM signal
init: update-notifier-crash (/var/crash/_usr_lib_ibus_ibus-ui-gtk3.1000.crash) main process > (2645) killed by TERM signal
init: update-notifier-crash (/var/crash/_usr_lib_unity_unity-panel-service.1000.crash) main > process (2646) killed by TERM signal
init: upstart-dbus-session-bridge main process (2697) terminated with status 1
init: xsession-init main process (2705) killed by TERM signal
init: hud main process (2715) killed by TERM signal
init: unity-panel-service main process (2753) killed by TERM signal
init: window-stack-bridge main process (2620) killed by KILL signal


martin@thrio:~$ unity --replace
stop: Unknown job: unity-panel-service
start: Unknown job: unity-panel-service
compiz (core) - Info: Loading plugin: core
compiz (core) - Info: Starting plugin: core
Invalid MIT-MAGIC-COOKIE-1 keycompiz (core) - Fatal: Couldn't open display :0
compiz (core) - Info: Stopping plugin: core
compiz (core) - Info: Unloading plugin: core



It may be related to the display setting: I was originally trying to get VNC to work and trying to turn of the default encryption which appears not to work and some of the instructions I was trying to follow related to the display


From /var/log/lightdm/lightdm.log


[+522.72s] DEBUG: Session pid=2785: Authenticate result for user martin: Success
[+522.72s] DEBUG: Session pid=2785: User martin authorized
[+522.72s] DEBUG: Session pid=2785: Greeter requests session Ubuntu
522.72s] DEBUG: Seat: Stopping greeter; display server will be re-used for user session
[+522.72s] DEBUG: Session pid=2785: Sending SIGTERM
[+522.73s] DEBUG: Session pid=2785: Exited with return value 0
[+522.73s] DEBUG: Seat: Session stopped
[+522.73s] DEBUG: Seat: Greeter stopped, running session
[+522.73s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1
[+522.73s] DEBUG: Session pid=2845: Running command /usr/sbin/lightdm-session gnome-session --session=Ubuntu
[+522.73s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martin
[+522.73s] DEBUG: Session pid=2845: Logging to .xsession-errors
[+522.74s] DEBUG: Activating VT 7
[+522.74s] DEBUG: Activating login1 session c4
[+524.24s] DEBUG: User /org/freedesktop/Accounts/User1000 changed
[+528.25s] DEBUG: Session pid=2845: Exited with return value 0
[+528.25s] DEBUG: Seat: Session stopped
[+528.25s] DEBUG: Seat: Stopping display server, no sessions require it
[+528.25s] DEBUG: Sending signal 15 to process 2778
[+528.36s] DEBUG: Process 2778 exited with return value 0
[+528.36s] DEBUG: DisplayServer x-0: X server stopped
[+528.36s] DEBUG: Releasing VT 7
[+528.36s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0
[+528.36s] DEBUG: Seat: Display server stopped
[+528.36s] DEBUG: Seat: Active display server stopped, starting greeter
[+528.36s] DEBUG: Seat: Creating greeter session
[+528.36s] DEBUG: Seat: Creating display server of type x
[+528.36s] DEBUG: Using VT 7
[+528.36s] DEBUG: Seat: Starting local X display on VT 7
[+528.36s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
[+528.36s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0
[+528.36s] DEBUG: DisplayServer x-0: Launching X Server
[+528.36s] DEBUG: Launching process 3516: /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+528.36s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
[+528.43s] DEBUG: Got signal 10 from process 3516
[+528.43s] DEBUG: DisplayServer x-0: Got signal from X server :0
[+528.43s] DEBUG: DisplayServer x-0: Connecting to XServer :0
[+528.43s] DEBUG: Seat: Display server ready, starting session authentication
[+528.43s] DEBUG: Session pid=3523: Started with service 'lightdm-greeter', username 'lightdm'
[+528.44s] DEBUG: Session pid=3523: Authentication complete with return value 0: Success
[+528.44s] DEBUG: Seat: Session authenticated, running command
[+528.44s] DEBUG: Session pid=3523: Running command /usr/lib/lightdm/lightdm-greeter- session /usr/sbin/unity-greeter
[+528.44s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+528.44s] DEBUG: Session pid=3523: Logging to /var/log/lightdm/x-0-greeter.log
[+528.45s] DEBUG: Activating VT 7
[+528.45s] DEBUG: Activating login1 session c5
[+528.57s] DEBUG: Session pid=3523: Greeter connected version=1.10.4
[+528.69s] DEBUG: Session pid=3523: Greeter start authentication for martin
[+528.69s] DEBUG: Session pid=3583: Started with service 'lightdm', username 'martin'
[+528.70s] DEBUG: Session pid=3583: Got 1 message(s) from PAM
[+528.70s] DEBUG: Session pid=3523: Prompt greeter with 1 message(s)
[+529.73s] DEBUG: User /org/freedesktop/Accounts/User1000 changed
martin@thrio:~$ uname -r
3.13.0-46-generic
martin@thrio:~$ lsmod|grep fglrx
martin@thrio:~$
martin@thrio:/var/log$ lshw -c video
WARNING: you should run this program as super-user.
*-display
description: VGA compatible controller
product: Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:48 memory:f7400000-f77fffff memory:e0000000-efffffff ioport:f000 (size=64)
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
martin@thrio:/var/log$ modinfo
modinfo: ERROR: missing module or filename.

Additional info following review of


"Have you installed drivers some? Could you connect from some TTY (Ctrl+Alt+F1..F6) with any user?"
No drivers - yes to TTY login


"Moved all files there to my /home dir (to have a copy) and tried to login using kdm (I use Kubuntu). To select kdm as login screen, I executed sudo dpkg-reconfigure lightdm and selected kdm. With kdm you can select a previous session or a default one. This was the way to go."


installed KDM (sudo apt-get install KDM) - during install I had an option to choose KDM or lightDM, chose lightDM. Rebooted - no change
moved home dir /home/martin to /home/martinbak and rebooted - no change


martin@thrio:~$ sudo dpkg-reconfigure kdm and rebooted - entered KDM shell - error "cannot enter home directory. using /." - still would not log in .
martin@thrio:~$ sudo dpkg-reconfigure lightdm and switched back to lightdm - rebooted - same login loop
martin@thrio:/home$ sudo mv martinbak martin and rebooted.

Chown .Xauthority - This was checked previously and is correct
Chown /tmp - This was checked previously and is correct
" If not both, I'd recommend you either
1.dpkg-reconfigure lightdm
2.or uninstall, reinstall it."


dpkg-reconfigure has been tried
martin@thrio:~$ sudo apt-get purge lightdm
"Removing lightdm (1.10.4-0ubuntu2) ...
Purging configuration files for lightdm (1.10.4-0ubuntu2) ...
Removing user lightdm' ...
Warning: group
lightdm' has no more members.
**userdel: user lightdm is currently used by process 2092
/usr/sbin/deluser: `/usr/sbin/userdel lightdm' returned error code 8. Exiting.
dpkg: error processing package lightdm (--purge):
subprocess installed post-removal script returned error exit status 1
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
lightdm
E: Sub-process /usr/bin/dpkg returned an error code (1)" **
martin@thrio:~$ sudo apt-get install lightdm


It does not look like a clean removal and re-install.


"After almost giving up I looked at the .xsession-errors and noticed I had a typo in my .profile"


I have not edited this file but if there was a problem I would not know what I was looking for.


`martin@thrio:~$ cat .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
martin@thrio:~$ `
_sudo mv ~/.Xauthority ~/.Xauthority.backup
sudo service lightdm restart_
martin@thrio:~$ mv ~/.Xauthority ~/.Xauthority.bak
martin@thrio:~$ sudo service lightdm restart
[sudo] password for martin:
lightdm stop/waiting
lightdm start/running, process 3032
martin@thrio:~$

still stuck in login loop


"Reinstalled xubuntu-desktop and it's fixed now"


martin@thrio:~$ sudo apt-get purge xubuntu-desktop
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'xubuntu-desktop' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
martin@thrio:~$

_"Then, type sudo apt-get install gdm . Let it install and type sudo dpkg-reconfigure gdm and follow the prompts to set it as your login manager.
Press Ctrl + Alt+ F7 to get back to the login screen which should now look different. Does logging in work? If it does, your problem is solved!


If it doesn't, go back to the fullscreen terminal and type sudo dpkg-reconfigure lightdm to set LigthDM as you login manager again. Now you know that this is a problem with your graphics drivers for sure."_


sudo apt-get install gdm and restarted - login loop. (So this suggests a problem with graphics driver - recall that I had


martin@thrio:~$ lsmod|grep fglrx
martin@thrio:~$

Should I get some output for this search?

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...