Professional Documents
Culture Documents
Developer
Design
Discourse
Hardware
Insights
Juju
Shop
More
signup
AskUbuntuisaquestionandanswersiteforUbuntuusersanddevelopers.It's100%free,noregistrationrequired.
login
Ask!
Community
Ubuntu
4/30/2015
tour
help
Takethe2minutetour
Ubuntugetsstuckinaloginloop
Myproblem:AsyoucanguessmyUbuntuisstuckinaloginloopwhentryingtoentermydesktop.WhenIlogin,thescreengetsblackand
soonafterthattheloginscreencomesback.I'maUbuntunewbiesoifthere'sanyanswerpleaseexplaininasimpleunderstandable
language.
I'vealreadyreadthattheproblemmightbecausedbyanerrordependingonthegraphics,soIpostmygraphicscard:ATIRadeon7670M
login
lightdm
loginscreen
editedApr25at10:14
askedNov29'12at16:57
minerz029
9,394
CalvinWahlers
26
62
428
6 Lookin~/.xsessionerrorstheremightbeacluethere.offby1Apr21'12at23:09
Checkoutmyanswerintheend.SiddharthaRTNov29'12at22:55
@CalvinWahlersSinceyouinstalledQuantal,youcouldn'tstartthesystemcorrectly?Haveyouinstalled
driverssome?CouldyouconnectfromsomeTTY(Ctrl+Alt+F1..F6)withanyuser?LucioNov30'12at
2:13
no,itworkedfinforIthinkmonth...Butsuddenlythathappened CalvinWahlers Nov30'12at12:45
seemsthatIcan'tpostananswer.Ihadasimilarproblemandaftertryingallworkaroundsmentionedhere
withnosuccess,Ifoundthatmysessionswheremessedupin/usr/share/xsessions.Movedallfilesthere
tomy/homedir(tohaveacopy)andtriedtologinusingkdm(IuseKubuntu).Toselectkdmaslogin
screen,Iexecuted sudodpkgreconfigurelightdm andselectedkdm.Withkdmyoucanselecta
previoussessionoradefaultone.Thiswasthewaytogo.IvanFerrerVillaFeb12'14at21:40
17Answers
Press
Ctrl
Alt
F3
andloginintotheshell.
Alt
>
untilyoureachtheloginscreenagain,andrestart.
editedApr19'13at5:41
answeredNov29'12at23:01
RaduRdeanu
54.9k
17
106
SiddharthaRT
193
1,714
14
4 I'vesameproblem,chownusername:username.Xauthorityhelped.But,anyonehasanexplanation?
ts01Jan23'13at8:41
@ts01Ithinkmyproblemwas"gdmsessionworkercrashedwithSIGSEGVinact_user_is_loaded()"
ElzoValugiFeb11'13at17:13
2 Iactuallyevenhadtoremovemy.Xauthorityforthingstowork.Forsomereasons,noneoftheabove
solvedmyproblem.jlengrandOct15'13at8:51
1 Thiswasexactlymyproblem.Couldn'tthedevsthinkofsomethingsimplelikepoppingup"Permission
deniedwhileattemptingtoedit/home/username/.Xauthority.Ensureusernamehasread/write
permissions."?Thiscouldhavesavedthe41000peoplewhohaveviewedthisquestionsofarsomehuge
http://askubuntu.com/questions/223501/ubuntugetsstuckinaloginloop
1/7
4/30/2015
lightdmUbuntugetsstuckinaloginloopAskUbuntu
headaches.MikeDec22'13at6:18
2 +1AlthoughIhadtodothisforboth.Xauthorityand.ICEauthority AustJan17'14at16:00
Iencounteredthisexactproblemandnonofthesuggestedfixesaboveworkedforme.After
almostgivingupIlookedatthe .xsessionerrors andnoticedIhadatypoinmy .profile (Ihad
anextra } inthefileafterIediteditearlierintheday).
Thatwascausingtheloginloop.Itmightbeanotherplacetolookiftheothersuggestedfixes
don'tworkforyou.
editedJan24'13at1:53
answeredJan24'13at1:19
EricCarvalho
18.7k
13
44
DanCundiff
77
181
1 Mysituationwasverysimilar.Ihadrecentlyaddedarunfunctionforrunningcommandsmultipletimesin
my.profileandthatfunction,thoughitworkedasadvertised,seemstohavebeenthecauseofmy
problem.Commentingitoutfixedit.pthurmondJun6'13at16:05
Thisworkedforme.MyPClostpowerduringanelectricalstormandsomehowIendedupwitha
extraneouslineattheendofmy.profile.Nocluehowitgotthere.Anyway,I'dsaythegeneralsolution
shouldjustbetocheck.xsessionerrorsandseewhatitsays.BrandonYates Jun7'13at15:57
1 Thisisagoodone!Ihitthesamelightdmloginloopproblem,spent30minstroubelshootingwithnoluck
(triedallpossibleworkaroundIcanfind).Turnedouttobeasyntaxerrorin ~/.profile causedby
rbenv . TerryWang Oct7'13at2:58
1 Thissolvedmyproblemfailinglinein~/.profileJoshuaNov9'13at1:39
+1Thanksformentioning .xsessionerrors AustJan17'14at15:59
Ihadanearlyidenticalproblemafewmonthsago.SwitchingintoaconsolefromtheLightDM
loginscreen(CtrlAltF1),logginginwithadministrativeusernameandpassword,andenteringthe
followingcommandsresolvedtheissue:
sudomv~/.Xauthority~/.Xauthority.backup
sudoservicelightdmrestart
answeredAug28'12at15:53
mblasco
939
10
,ThanksIjusttypethesecondcommandItsolvedmyproblembutwhatthiscommandwilldowillyouplz
elaborateali786Aug6'14at10:25
Thiscommandrenames".Xauthority",whichisafilethatstorescredentialsusedforauthenticationofX
sessions(basicallyacookie),to".Xauthority.backup".Renamingthisfilecausesxauthtocreateanew
".Xauthority"file,therebyreauthenticating.mblascoAug11'14at13:53
Facedthesameproblemtoday.
Thecausewasabitstrangetome. xubuntudesktop wasremoved,sowas ubuntudesktop .
LightDMexitedwithnoerrormessage.TriedlxdmandwhenItriedtologin,itpoppedupa
messagesayingXubuntucouldnotbefound.
Reinstalled xubuntudesktop andit'sfixednow.Think aptgetautoremove removedthepackage.
editedJan29'13at11:22
answeredJan29'13at10:51
EricCarvalho
18.7k
13
44
sooth
77
61
YoumightbehavingproblemswithLightDM,theloginmanagerthatcomesinUbuntubydefault.
In12.04itusedtodothesameproblemyouaredescribing.
YoucaninstallGDM,analternativeloginmanager,togetaroundthis:
Attheloginscreen,pressandhold Ctrl + Alt +
loginherewithyourusernameandpassword.
F2
togototheterminal.Don'tbeafraid!Just
http://askubuntu.com/questions/223501/ubuntugetsstuckinaloginloop
2/7
4/30/2015
lightdmUbuntugetsstuckinaloginloopAskUbuntu
answeredNov29'12at17:27
RaduRdeanu
54.9k
17
WindowsEscapist
106
193
724
31
ok,IthinkI'mnotquitesuchanoob,Iknowhowtoenteraterminalthereandhowtologin:)AndIalready
haveinstalledgdm:doesn'twork.lightdm:doesn'twork.lxdm:doesn'twork... CalvinWahlers Nov29
'12at17:53
OK.YoudefinitelyhaveagraphicsproblemthenLightDMcansometimesmirrortheproblemsyou're
describing(itmighthelpifyousaidhowlongthedelayis).SorryIcouldn'thelp.WindowsEscapistNov29
'12at19:12
Delaymeansthetimebetweenhavingenteredanappearingagain? CalvinWahlers Nov29'12at21:52
Right.Itislikeacoupleseconds,ormorelike30,etc.Ican'thelpyouwithgraphicsissuesbutI'msure
thereissomeoneherethatcan.Goodluck!WindowsEscapistNov29'12at22:56
YesIcausedaLoginLooponmymainUbuntu12.10userandthefixwassimple.
Background:Ubuntu12.10isinstalledinVirtualBoxrunningonWindows7andusesUnity.
Cause:FromtheDesktopI Ctrl + Alt + T intoterminalmodeandthentriedtorun'startx'(I
wastryingtohelpafriendoverthephonelateatnight...butthiswasastupidthingtodo).Anew
blankUnitydesktopappearedandeverythinghung...
Problem:
ForcingVirtualBoxtocloseandthenrebootingUbuntuIgottotheloginscreenbutkeptlooping
backtothissamescreeneverytimeafterenteringthepassword.Noerrorsweredisplayed.I
couldloginasGuestbutIhadnoSudorightsandthusnocontrol...Howeveronceloggedinas
GuestI Ctrl + Alt + F3 andgottoaterminallogin.
Ienteredmymainusernameandpasswordandloggedinwithcommandmode.Logouttookme
backtoCLIloginand Ctrl + Alt + F7 tookmebacktoGuestdesktop.Somyaccountstill
worked.Ithenaddedatestuserandgavethemsudorights.FromtheUnityloginIcouldlogin
andlogoutTestuserwithnoproblem.SoUnitystillworked.
Fix:SomymainaccountwasstillaccessableviaCLIandUnitywasworkingforallother
accounts.Thisindicatedaconfiguationproblemonmymainaccount.Ifollowedtheadviceof
SiddharthaRTatthetopofthispostanddid chownusername:username.Xauthority .Thisfixedmy
problem.Thanks!!
editedJun21'13at6:59
answeredMar9'13at12:36
Nickolas
1,585
Dig
I'vepressed
command:
Ctrl
27
Alt
51
F3
andloggedintotheshell.Afterwardswiththis
chownusername:username.Xauthority
33
answeredApr16'13at9:28
RaduRdeanu
57
54.9k
17
106
193
Afterthese,IwasabletologintoUnityagainwiththenormalaccountagain.Soifyouhave,what
lookslikea .Xauthority problem,youcouldtrythisifnothingelseworks.
http://askubuntu.com/questions/223501/ubuntugetsstuckinaloginloop
3/7
4/30/2015
lightdmUbuntugetsstuckinaloginloopAskUbuntu
See:http://ubuntuforums.org/showthread.php?t=868941
editedFeb22'14at13:54
answeredFeb22'14at13:24
Braiam
29k
Dirk
13
57
113
11
Thenrebootyourcomputerusingthiscommand:
sudoreboot
Seeifthisworks:)
Ifthisdoesnotwork,trygoingbacktothe3rdterminal(
command(pressing ENTER afteryouhavetypedit):
ALT
F3
),login,andenterthis
sudoaptgetyinstalllxdm
Ifthisstilldoesn'twork,gobacktothe3rdterminal(
(sameprocedure):
ALT
F3
),login,andenterthiscommand
sudoaptgetyinstalllubuntudesktop
Thiswillinstallamuchlighterdesktopenvironmentwhichshouldworkfornow(shouldenable
youtologinanduseyourcomputer).Oncethatisdone,reboot( sudoreboot ),andwhenyouare
confrontedwiththeloginpage,selectthe Lubuntu environmentinsteadof Ubuntu .
editedNov29'12at17:19
answeredNov29'12at17:04
MiJyn
1,701
21
Thiswillnotwork.Xisrunningheiscrashingpostlogin(ithink).coteyrNov29'12at17:10
Iknow,thatisbecauseUnitycrashes.Probablybecause3Ddoesnotwork.TheLXDMsolutionisforusing
aslittle3DresourcesaspossiblesothatmoreresourcesarefreedforUnity.MiJynNov29'12at17:13
Isee,couldwork,Ihavenoideaiflightdmuses"3D"ornot.coteyrNov29'12at17:16
Ithinkitdoes...oratleastit'sseriously heavyweight.MiJynNov29'12at17:16
Iflightdmuses3Dthenshouldn'tittriggerthecrash,notafterithandscontroltounity?coteyrNov29'12
at17:18
Changetoanotherloginscreen.
Ctrl
Alt
F2
toopenaterminal.
Ctrl
Alt
F7
togobacktothegraphicmode.
Type sudodpkgreconfiguregdm
Inagraphicscreen,selectgdmandOK.
Type sudoreboot
editedApr19'13at7:27
answeredNov29'12at17:07
RaduRdeanu
54.9k
17
106
HoracioGalan
193
27
2 Idon'tthinkthisswillwork,heishavingproblemsaftergdm/lightdmcoteyrNov29'12at17:09
http://askubuntu.com/questions/223501/ubuntugetsstuckinaloginloop
4/7
4/30/2015
lightdmUbuntugetsstuckinaloginloopAskUbuntu
No,thelightDMloopdoesactuallyhappenlikethis(althoughitdependsonthelengthoftheblackscreen)
WindowsEscapistNov29'12at17:20
untilnow,nothingreallyhelps:(iselectedgdmbutnowthere'sonlytheubuntu12.10wallpaper,nothing
else CalvinWahlers Nov29'12at17:22
ProbablyIshouldaddthatthelasttimeIusedUbuntufirefoxtoldmetorestartit...itcrashed.LibreOffice
alsodid.ThenIrebootetandsincethatmomentyesterdayitdoesn'twork. CalvinWahlers Nov29'12
at18:29
IhadthesameproblemafterIupgradedto12.10.ThenIcameherefromGoogle.Icreated
anotheruserandIcouldlogin.
AsIdon'tuseUnity,Iuninstalledlighdm.Afterreboot,Icouldlogin.Youcantrythat.
Goodluck!
answeredJun3'13at15:57
JamesNi
1
IhadthesameproblemafteracleaninstallofUbuntu12.10(butreusingmyexistinghome
partition).Itriedalloftheotheranswers,butnoneworked.ButIfoundthecluetomyspecific
probleminthefile.xsessionerrorsinmyhomedirectory.
ThisishowIsolveditinmycase:
1. Hit
Ctrl
Alt
F1
toopenavirtualterminal.Thenloginwithusernameandpassword.
Ctrl
Alt
F7
togobacktotheloginscreen,andloginworkedfinenow.
Ofcourseinyourcaseyoumightfindadifferenterrormessagein.xsessionerrors,which
requiresadifferentsolution.
editedJun21'13at6:59
Nickolas
1,585
answeredJan8'13at20:40
SerranoPereira
27
632
12
Yourdesktopenvironmentisfailingtostart(itsoundslike).Iwouldstartbytringtologinasa
differentuser.
Ctrl
Alt
F1
thenlogin
sudoaddusertesting
answeredNov29'12at17:14
coteyr
27
6,037
15
41
Thisisnotadirectanswertoyourcasebutitsmoreofageneralsolutiontologinloops.
Theproblemcouldbeassimpleasawrongcommandputintothe.profilefileinthehome
directory.(Sincethatfilegetloadedonlogon)
http://askubuntu.com/questions/223501/ubuntugetsstuckinaloginloop
5/7
4/30/2015
lightdmUbuntugetsstuckinaloginloopAskUbuntu
Toseeifthatisreallythecase,press
fileinyourhomedirectory
Ctrl
Alt
F1
,andlogin.Checkingthe.xsessionerrors
~/.xsessionerrors
Thisshouldgivesomecluesaboutsomeproblematiccommand.
answeredAug19'13at10:30
Nerrve
136
Ihavebeenexperiencingtheverysameproblemacoupleoftimeseveryweekandhavetried
mostofsolutionsgivenherebuttheonlywayIcanlogbackinisbyrestartinglightdm.
sudoservicelightdmrestart.
ThefunnythingisthatevenafterIrestratlightdm,itdoesnotloginonthefirstattemptbutonlyon
mysecondattempteventhoughIamenteringtherightpassword.Irealisedthisafewweeksago
andIhaveverifiedthisafewtimes,makingsurethatIamnotaccidentallykeyinginmy
passwordwrong.Iamnowcertainthatitdoesnotlogmeinthefirsttimeafterrestartinglightdm
butonlyonthesecondattempt!
answeredJul8'14at10:06
eshwar
144
13
TodayIgotaclueaboutmyproblem.Ihaveanexternalmonitorconnectedtomylaptop.WhenIgotinto
theloginloopIdecidedtosomehowgetitworkingwithrestartinglightdm.FromabugreportinlaunchpadI
gotanideathatitcouldbeduetosomeissueinrecognisingmyexternalmonitor.So,Idisconnectedthe
monitor,droppedtotty1andbackandtheloginworkedthefirsttime!NotthesecondtimelikewhenI
restartedlightdm.Thisisbetterbuttherehastobeasolutionwhichdoesnotrequirethis.eshwarJul18
'14at10:17
Iftheotherquestionsdonotleadtoasolution,mysuggestionistotrytofollowthesesteps:
1. LoginincharactermodewithaVC(VirtualConsole).Thatis,
username/passwordlogin.Let'scallthisuser original .
Ctrl
Alt
F1
andyour
2. Createanewuser.Youcanuseforexample:
addusernewusergroupsudo
toaddanewadministrativeuser(thatis,auserthatcando sudo ).
3. Trytologinas newuser .Ifitworks,younowthattheproblemisinthespecificsetupof
original user.Otherwise,stopreadingheretheproblemisatsystemlevelandyou'll
probablyneedtoreinstallsomethingofthegraphicstack.
4. Nowyoucantrytosearchwhathappened.Comparehiddenfilesin ~original and
~newuser andtrytofindmismatches.Especiallyyoushouldsearchforfilesnotownedby
you:
find.\!useroriginal
andfilesthatarenotwritabletoyou(therewillbemoreofthem,especiallyincaches):
find.\!permu=w
37
70
IhadaverysimilarissuewhereIcouldloginontheterminalbutnotonthedesktop,my
wallpaperfromtheprofilewasloadedduringlogin,butafterafewsecondsitjumpedbacktothe
http://askubuntu.com/questions/223501/ubuntugetsstuckinaloginloop
6/7
4/30/2015
lightdmUbuntugetsstuckinaloginloopAskUbuntu
loginscreen.Icheckedallfilepermissionsassuggested,theywerefine.Itriedwithouta
separatehomepartitionandwasabletologintothedesktop.AfterthatIcheckedthesettingsfor
theLUKSencryptedhomepartition,whichwerealsofine(thoughthereweresomeerror
messagesontheterminal,tellingmethattheencryptedvolumecouldnotbemounted,becauseit
wasalreadymounted).
ThenIlookedintodmesg,foundBTRFSerrorsrelatedtothefilesystemontheLUKSencrypted
homepartition(yep,I'mmixingLUKSandBTRFS),triedtoactuallywritetothefilesystemand
foundthatitgavemeI/Oerrors.SoIhadtorepairthefilesystemorcreateanewoneandrestore
frombackup.
Longstoryshort:Lookatdmesgandactuallytrytowritetothefilesystemthatseemstobe
writable.
answeredyesterday
LiveWireBT
9,757
29
62
protectedbyCommunity Jun26'13at13:55
Thankyouforyourinterestinthisquestion.Becauseithasattractedlowqualityanswers,postingananswernowrequires10reputationonthissite.
Wouldyouliketoansweroneoftheseunansweredquestions instead?
http://askubuntu.com/questions/223501/ubuntugetsstuckinaloginloop
7/7