About the Ubuntu loop login interface

In fact, the cause of the matter is very strange. I have been trying to upgrade Ubuntu 18.04 two days ago. I don’t know why 17.10 is weird, but 18.04 will not be released until April 26. There is no other way but Beta 2 to try it first. .

Then a normal operation

Upgrading from Ubuntu 17.10 to 18.04 Beta 2

# 先将当前系统更新
sudo apt update
sudo apt upgrade
#然后升级系统
sudo do-release-upgrade -d

Then I let the system download and install it by itself, but I saw in the terminal prompt that something was unavailable. Of course, I didn't care. I guess it will be fine after updating to the official version of the system. As a result, this has laid the groundwork. .

Stuck on startup screen

That's right, it's the interface with the Ubuntu logo and a few little dots under the logo. It's stuck. The status displayed after ESC should be like this

[Started] Gnome Display Manage

Then I immediately went to Google, and I didn't know where I saw an answer that I had to enter Recovery mode to repair dpkg. After I did it, I felt that this was not enough. The first time I installed Ubuntu, I encountered it. However, I know it's a graphics card driver problem, and I don't know where to see the method, so I uninstalled my Nvidia driver.

The first time I installed Ubuntu and encountered this problem, the solution is to edit the kernel that needs to be booted by pressing e in the Ubuntu advanced options, and add it after quiet splashthat line acpi_osi=linux nomodeset, this is for the N card, if it is an A card or Intel There are corresponding solutions

Ubuntu Login Loop

After restarting, I can get through the logo level, but a new problem comes again. This time I can reach the login interface, but after entering the password to log in, the screen will go black and return to the login interface.

This Ubuntu Login Loopproblem is not new. It has been encountered in each version before, and the reasons are different. This time I encountered this pit and I will summarize it a little.

  • .XauthorityThe owner and all groups of the file have become root: there is a .Xauthorityfile in your user's home directory, ls -lacheck the owner and all groups of the file, if it is root, then you need to change it to your login user

    sudo chown username:username .Xauthority
    
  • /tmpPermissions: ls -ldCheck whether /tmpthe permissions are yes drwxrwxrwxt, otherwise modify the permissions

    sudo chmod a+wt /tmp
    
  • Of course, there is also the problem of the graphics card driver: most people on the Internet have updated the graphics card driver before they keep looping the login interface, and I am special. I uninstalled the graphics card driver, but the solution is the same, that is, reinstall it graphics card driver

    #完全卸载N卡驱动
    sudo apt remove --purge nvidia*
    #关闭图形界面
    sudo service lightdm stop
    #禁用nouveau驱动
    #在/etc/modprobe.d/blacklist.conf中加入如下内容:
    blacklist nouveau
    options nouveau modeset=0
    #然后执行
    sudo update-initramfs -u
    #安装Nvidia驱动
    sudo add-apt-repository ppa:xorg-edgers/ppa #添加ppa源
    sudo add-apt-repository ppa:graphics-drivers/ppa #添加ppa源
    sudo apt update #更新apt-get
    sudo apt install nvidia-375
    #最后别忘了打开图形化界面
    sudo service lightdm start
    

    Since my graphics card is GTX 960M, I refer to the 375 graphics card driver installed by netizens. After the installation is completed, the system reminds me that the graphics card driver is too low-level and needs to be upgraded. There is no way to upgrade it to 390, then restart it and enter the password. Back to the familiar graphical interface

write at the end

Of course, the reasons for the login loop are more than these. Sometimes /etc/profile, some things have been changed or added to cause these weird problems, so we need to prescribe the right medicine. The correct way is to first check .xsession-errorsthe error message in the log in the main directory to determine the cause.

What? You ask me how to do so many operations without getting into the graphical interface? I can't get into the graphics, and there are also command lines. My graphics are tty1, and the above operations are all carried out in tty5.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325810816&siteId=291194637