Can't log in unless remove .Xauthority or use gdm

Bug #1036830 reported by Nate
This bug report is a duplicate of:  Bug #1228570: Login often fails. Edit Remove
70
This bug affects 15 people
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On 8/13/2012 I updated ubuntu 12.10. Now when I try to log in the system flashes a black screen and then puts me back at the log in screen. Logging in as guest works. I tried adding a new user and cannot log in with that user either.

I switched to gdm and logging in works fine.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: xorg 1:7.7+1ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-10.10-generic 3.5.1
Uname: Linux 3.5.0-10-generic x86_64
ApportVersion: 2.4-0ubuntu6
Architecture: amd64
Date: Tue Aug 14 13:24:06 2012
DistUpgraded: Fresh install
DistroCodename: quantal
DistroVariant: ubuntu
GraphicsCard:
 Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Dell Device [1028:04a9]
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: Dell Inc. Latitude E6220
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=linux
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-10-generic root=UUID=94ff83ca-e880-49d3-8791-cdd2999ea806 ro quiet splash elevator=deadline vt.handoff=7
SourcePackage: xorg
Symptom: display
Title: Xorg crash
UpgradeStatus: No upgrade log present (probably fresh install)
XorgConf:
 section "Device"
  Identifier "Card0"
  Driver "intel"
  Option "AccelMethod" "sna"
 EndSection
dmi.bios.date: 05/17/2012
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A08
dmi.board.name: 0D1CTR
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA08:bd05/17/2012:svnDellInc.:pnLatitudeE6220:pvr01:rvnDellInc.:rn0D1CTR:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E6220
dmi.product.version: 01
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.8+bzr3249-0ubuntu2
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.38-0ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.4-1ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.4-1ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.12.1.902-1ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~really6.14.4-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.19.0-1ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.1-1build1

Revision history for this message
Nate (n2cubed) wrote :
Revision history for this message
Nate (n2cubed) wrote :

I found this post http://askubuntu.com/questions/65852/cannot-login-to-my-user-account which suggested removing ~/.Xauthority file. I did this and was able to log in without problem.

bugbot (bugbot)
affects: xorg (Ubuntu) → xorg-server (Ubuntu)
Bryce Harrington (bryce)
summary: - Xorg crash when logging in goes right back to log in screen
+ Can't log in unless remove .Xauthority
summary: - Can't log in unless remove .Xauthority
+ Can't log in unless remove .Xauthority or use gdm
affects: xorg-server (Ubuntu) → lightdm (Ubuntu)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Does anyone have a .Xauthority that was causing the problem? Can you attach it here?

Revision history for this message
Nate (n2cubed) wrote :

Here is the .Xauthority file.

Revision history for this message
NDP (neilprestemon) wrote :

12.04 64-bit in Unity 3D with ATI graphics. (Dell Inspirion laptop) Same EXACT problem.

What happened, was I was in a session when my battery ran down to about 6%. I put it to sleep instead of shutting down. It remained asleep until the battery fully-drained. When I plugged it back in and restarted, I encountered this problem.

I renamed my .Xauthority -> .Xauthority.old (taking advice from a Ubuntu Forums poster, who suggested deleting all items in the home directory that start with ".", one by one, until the problem is resolved. . . - I renamed .conf, .gnome2, .gconf, a few others. . . but by renaming BACK, isolated the problem to .Xauthority).

When the ONLY configuration delta was .Xauthority (the new file, and all of my old ~/. directories were restored), I was able to log back-in, but I only saw my desktop, (and conky). All the Unity elements were missing. No launcher, no menu-bar, and the popup thing didn't respond to the "windows" key. (various things would also crash, at random: colord, and compiz). But it was definitely a different symptom than being kicked right back to the login prompt as before.

I tried to chown .Xauthority to my user, but that did not fix the problem.

Revision history for this message
NDP (neilprestemon) wrote :

Original Problem Root Cause:
I have a dell inspirion laptop with amd Radeon 7700HD, and integrated Intel IvyBridge. At some point, prior to the "power-loss-induced shutdown" described in my previous comment. . . I believe I "played with" the switchable-graphics settings by using the aticonfig command, to switch from the Radeon to the Intel. I made this switch, and forgot.

I was using the 12.4 version of the Catalyst driver.

Upon reboot, (in Ivybridge-mode), I encountered this system. (logon flashes a bunch of warning messages, including "broken pipe" - then returns you to the login screen, no matter which window-manager is chosen - even Unity 2d, even Gnome - no effects).

When the .Xauthority file is chowned from root, back to my regular user account, I am able to log into Unity 2D.

(however - now I've got a new problem: I can't get the Radeon 7700 HD to work again . . . )

I went through several cycles of uninstall and reinstall of the Catalyst driver (including upgrade to the new 12.8 version).

I was able to reproduce the problem during BAD installs:
(when I could not build the installer package, but instead, just ran the .run file)
In this case - graphics is completely disabled, until I set /etc/X11/xorg.conf back to a failsafe vesa configuration.
. . . and then - I still have the login/return issue, until I change ownership of .Xauthority from root to my user.

More careful following of the install procedure on ATI's Catalyst wiki, produced a successful installation, including the ability to log into Unity 3D.

So the main two points I want to make:
1. The symptom reported in THIS bug, (login fails, returns you to the login screen). . .
1a. . . . (is actually not related to the "broken pipe message" - that's something else. It is a coincidence that we can SEE this message during the login failure, but it is likely that this message was happening during a normal successful login anyway - I don't know exactly what's causing it. But my system is now working fine, and I'm still able to see this message for a brief-flicker).
1b. . . (the symptom can be worked-around by the following command, where your user is "username":
sudo chown username:username ~/.Xauthority
I *do not* understand why this file is being claimed by root, but I think it has something to do with the Catalyst driver, and switching graphics from a discrete to embedded gpu, and rebooting. I believe the "bug" may exist in 12.8 as well.
Having .Xauthority owned by root is going to fubar the whole login process.
It may be possible to uninstall Unity and login with gdm, and the reinstall Unity - I didn't try that. Seems a bit extreme anyway.

2. Following the EXACT procedure (including complete removal of prior installs, not just the fglrx, but also the xorg ati components) on the AMD Catalyst wiki for YOUR version of Ubuntu is absolutely necessary to get this driver to install properly.

(for 12.04 - these instructions are here: http://wiki.cchtml.com/index.php/Ubuntu_Precise_Installation_Guide)

Revision history for this message
NDP (neilprestemon) wrote :

(btw - when you fix the login problem, by taking ownership of .Xauthority, but if your 3D acceleration is still broken, you can log into Unity 2D successfully - but what happens when you try to log into Unity 3D, is you see your background, and desktop icons, but no launcher, no HUD, no menubar. You can get a terminal with ctrl+alt+T, and logout that way, to get into Unity 2D, and fix your driver install).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
Revision history for this message
ejik (der-ejik) wrote :

After updating videodrivers (NVIDIA GTX 560 Ti), driver ver 319.17, x64, problem still persists.
chown it to myself back solved this.

Revision history for this message
Torsten Bronger (bronger) wrote :

I suffer from this bug for a week now. I have no idea what causes this. I use Lubuntu 13.04. My hobe directory is mounted with NFS, but for years, so this cannot be the sole cause.

My workaround is to remove /home/bronger/.Xauthority through /etc/rc.local.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

This happened to me today on Ubuntu 13.10. Before renaming .Xauthority, I had 'lightdm: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "timo"' in auth.log.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Timo sent me his xauthority directly and in that case it contained an invalid entry. libxau would have ignored the entry but there was a bug in lightdm that caused it to not write the new xauth entry.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Nate - your .Xauthority seems valid, do you remember what permissions it had? Did the problem persist after deleting it?

Revision history for this message
Nate (n2cubed) wrote : Re: [Bug 1036830] Re: Can't log in unless remove .Xauthority or use gdm
Download full text (3.5 KiB)

Robert,

I do not recall what the permissions where but I do know that before the
problem I had never messed with .Xauthority. The problem did not persist
once it was deleted.

Nate

On Sun, Sep 29, 2013 at 8:14 PM, Robert Ancell
<email address hidden>wrote:

> Nate - your .Xauthority seems valid, do you remember what permissions it
> had? Did the problem persist after deleting it?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1036830
>
> Title:
> Can't log in unless remove .Xauthority or use gdm
>
> Status in “lightdm” package in Ubuntu:
> Confirmed
>
> Bug description:
> On 8/13/2012 I updated ubuntu 12.10. Now when I try to log in the
> system flashes a black screen and then puts me back at the log in
> screen. Logging in as guest works. I tried adding a new user and
> cannot log in with that user either.
>
> I switched to gdm and logging in works fine.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 12.10
> Package: xorg 1:7.7+1ubuntu1
> ProcVersionSignature: Ubuntu 3.5.0-10.10-generic 3.5.1
> Uname: Linux 3.5.0-10-generic x86_64
> ApportVersion: 2.4-0ubuntu6
> Architecture: amd64
> Date: Tue Aug 14 13:24:06 2012
> DistUpgraded: Fresh install
> DistroCodename: quantal
> DistroVariant: ubuntu
> GraphicsCard:
> Intel Corporation 2nd Generation Core Processor Family Integrated
> Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
> Subsystem: Dell Device [1028:04a9]
> InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64
> (20120425)
> MachineType: Dell Inc. Latitude E6220
> ProcEnviron:
> LANGUAGE=en_US:en
> TERM=linux
> PATH=(custom, user)
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-10-generic
> root=UUID=94ff83ca-e880-49d3-8791-cdd2999ea806 ro quiet splash
> elevator=deadline vt.handoff=7
> SourcePackage: xorg
> Symptom: display
> Title: Xorg crash
> UpgradeStatus: No upgrade log present (probably fresh install)
> XorgConf:
> section "Device"
> Identifier "Card0"
> Driver "intel"
> Option "AccelMethod" "sna"
> EndSection
> dmi.bios.date: 05/17/2012
> dmi.bios.vendor: Dell Inc.
> dmi.bios.version: A08
> dmi.board.name: 0D1CTR
> dmi.board.vendor: Dell Inc.
> dmi.board.version: A00
> dmi.chassis.type: 9
> dmi.chassis.vendor: Dell Inc.
> dmi.modalias:
> dmi:bvnDellInc.:bvrA08:bd05/17/2012:svnDellInc.:pnLatitudeE6220:pvr01:rvnDellInc.:rn0D1CTR:rvrA00:cvnDellInc.:ct9:cvr:
> dmi.product.name: Latitude E6220
> dmi.product.version: 01
> dmi.sys.vendor: Dell Inc.
> version.compiz: compiz 1:0.9.8+bzr3249-0ubuntu2
> version.ia32-libs: ia32-libs N/A
> version.libdrm2: libdrm2 2.4.38-0ubuntu1
> version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.4-1ubuntu1
> version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
> version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.4-1ubuntu1
> version.xserver-xorg-core: xserver-xorg-core 2:1.12.1.902-1ubuntu1
> version.xserver-xorg-input-evdev: xserver-xorg-input-evdev
> 1:2.7.0-0ubuntu2
> vers...

Read more...

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I can reproduce this issue at will by logging in from lightdm, then logging in via ssh -X, 'xauth -b list' shows that it has two entries now. Log out from unity and try to log back in -> no go until I remove .Xauthority. Permissions are 0600, file owned by me..

Revision history for this message
Colin Law (colin-law) wrote :

As Timo says this is absolutely repeatable, on all my Saucy machines. Log in via lightdm then login via ssh from another machine using ssh -X. Logout ssh and logout locally, then cannot login via lightdm. Removing .Xauthority fixes it. Bad .Xauthority attached.

Revision history for this message
Colin Law (colin-law) wrote :

Note that though this appears to be a continuation of an old bug, reading the earlier comments suggests that it was an issue with the ownership of .Xauthority. It seems that the new problem is not that but is related to the contents of the file.

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

I may have the same problem. I'm running up to date 13.04, but Ubuntu, not Lubuntu. When I boot, I cannot log in until I delete .Xauthority using a tty session. This happens every reboot.

Revision history for this message
Paul Reddy (tuatara) wrote :

I have the same problem on:

  Linux mythtv 3.8.0-31-generic #46-Ubuntu SMP Tue Sep 10 20:03:44 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
  Ubuntu 13.04
  xfce

Fully up to date with patches.
Doesn't happen on every boot, but more than half of the time it does.
Since it runs mythtv and is our primary TV interface, the WAF is pretty low.
esp when it wont login and I'm not home.

From a comment above - I've added an rm -f /home/paul/.Xauthority to /etc/rc.local.
I sure hope that's not going to have any consequences.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Paul - it's completely safe to remove the .Xauthority after your X session has ended as long as you aren't storing any other tokens in it that you might need to keep (e.g. tokens for logging into remote X servers).

Revision history for this message
kaefert (kaefert) wrote :

Just ran into this after on my (up-to-date) Ubuntu 13.04 after a crash caused by power-loss. Found that removing the .Xauthority suffices to be able to log in again.

Revision history for this message
Ioldanach (ioldanach) wrote :

I've been experiencing this error for a while too, and reading the comments above I see that ssh -X was a component of the issue for a lot of people. I frequently log into this computer via ssh -X. I hadn't thought to consider that as a potential part of the issue, before. Looking at a backup .Xauthority I made when I was clearing it out to log in again, I see that there are a lot of magic cookies inside.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.