升級到16.04後登入循環

升級到16.04後登入循環

將 xenial beta 更新到最新更新後,我遇到了登入循環。

我嘗試了很多事情:

  • xauthority/tmp權限改變

  • 重新安裝 nvidia 驅動程序,將其刪除。

  • 重新安裝unity、、、、和。unity-greeterubuntu-desktopupstartlightdmcompiz

  • 重置compiz和設定unitydbus

    Failed to commit changes to dconf: error spawning command line 'dbus-launch -auto launch=..................)
    
  • 使用較舊的核心和故障安全(故障安全報告未找到畫面)

  • 試試推出其他DE(steam大圖)

這是 xsession 錯誤日誌:

unity:
open connection: connect: No such file or directory
Cannot connect to brltty at :0
upstart: gnome-session (unity) main process (5441) terminated with status 1
upstart unity-settings-daemon main process (5434) killed by TERM signal

steam big picture:
open connection: connect: No such file or directory
Cannot connect to brltty at :0
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored
Could not create GLX context
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored

在Unity(compiz)日誌中有很多關於opengl插件的錯誤

Compiz (opengl) - Fatal: glXQueryExtenisonsString is NULL for screen 0

而且因為opengl卸載了很多插件。

Lightdm 突然出現 SIGTERM 訊號,日誌中沒有先前的錯誤。

xserver有2個錯誤:

xf86EnablePorts: failed to set IOPL for I/O (Operation not permitted)
(EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

但它會繼續進行輸入操作,直到突然終止。

答案1

就我而言,原始的 nvidia 驅動程式是原因,切換回開源 nouveau 有幫助。首先,我從 nvidia 中刪除了所有內容:

sudo apt-get remove --purge 'nvidia-*'
sudo apt-get install ubuntu-desktop
sudo rm /etc/X11/xorg.conf
echo 'nouveau' | sudo tee -a /etc/modules

(來源:如何徹底卸載nvidia驅動程式?

之後我可以登錄,但 Unity 沒有加載,沒有啟動器等。

sudo apt-get install compizconfig-settings-manager
DISPLAY=:0 ccsm
Find the Unity plugin and enable it.

(來源:Unity 無法加載,沒有啟動器,沒有出現 Dash

答案2

問題是,當您更新 Ubuntu 時(甚至當您安裝某些調用 的程式時/sbin/ldconfig/etc/ls.so.cache,.

嘗試一下,您會發現ld.so.cache安裝/更新後的檔案大小將與操作之前不同。

在 Ubuntu 16.04 中,這會導致從 lightDM 登入時出現登入循環。因此,您應該保留原始版本的副本ld.so.cache,因為在安裝/更新後產生的新版本中,lightDM 將不再進行身份驗證。

我已經多次遇到這個問題並且必須非常小心。我總是保留原始文件 ( ) 的副本/etc/ld.so.cache.orig,讓我無需登入循環即可登錄,並使用它進行登入/etc/ld.so.cache.new。為此,我修改了我的~/.bash_profile文件並添加了這一行:

sudo /bin/cp /etc/ld.so.cache.new /etc/ld.so.cache

然後,為了在退出會話時將原始檔案複製回來,以便我下次可以登入增益,我已將這一行新增至/etc/gdm/PostSession/Default

/bin/cp /etc/ld.so.cache.orig /etc/ld.so.cache

為了實現這一點,我已經修改/etc/sudoers(透過運行sudo vosudo)以允許非特權用戶運行複製命令:

ALL     ALL= NOPASSWD: /bin/cp /etc/ld.so.cache.new /etc/ld.so.cache

這可能看起來像一個醜陋的駭客,但它解決了這個登入循環問題,並且還保留了新/etc/ld.so.cache檔案。

答案3

我在 16.04 上也遇到了同樣的錯誤。就我而言,這也是 NVidia 驅動程式問題。我有 8 台顯示器,我喜歡 NVidia diver 使用它們的表現。為了讓它發揮作用,我:

  1. 在登入提示字元下按CTRL+ ALT+並透過終端登入。F1

  2. 備份了可能舊的/etc/X11/xorg.conf文件,因為配置 8 個顯示器很痛苦。

  3. 從 NVidia 下載驅動程式檔案:NVIDIA-Linux-x86_64-367.44.run

  4. 執行以下命令:(sudo service lightdm stop如果跳過此步驟,驅動程式安裝將失敗)。

  5. 重新安裝驅動程式:sudo ./NVIDIA-Linux-x86_64-367.44.run我收到通知,自動產生的腳本未完成,並選擇繼續安裝,我接受了。我還選擇將驅動程式安裝為核心模組,並讓程式產生一個新xorg.conf檔案(之前備份過我的檔案)。在該過程結束時,它抱怨缺少一個庫的鏈接,但給出了鏈接到它的說明。我把這件事推遲到以後再處理。

  6. 重新啟動並能夠透過 GUI 登入。

答案4

就我而言,此問題是由於意外在 UEFI 中啟用安全啟動導致的,這會導致第三方驅動程式無法使用(例如 Nvidia)。這導致了 X 會話錯誤。停用安全啟動後,一切恢復正常。

相關內容