ubuntu登录黑屏,有鼠标

博主升级到Ubuntu 18.04后,登录出现黑屏问题,可通过终端登录并启动桌面。推测是nvidia问题,也可能是GUI应用占用个人文件权限,导致登录管理器权限不足。可通过命令重新获取文件所有权,安装lightdm确保登录管理器完整性。

https://askubuntu.com/questions/1041054/login-to-black-screen-in-18-04

ogin to black screen in 18.04

 

I recently upgraded to 18.04. Currently, I get to the login screen just fine. If I attempt to login, I am confronted with a black screen and nothing more. I can drop to the terminal at the login screen, login through the terminal, enter startx and now I'm at my desktop. I am pretty sure that this is an nvidia issue as I'm continuously getting crash reports popping up for libnvidia-gl-390 install, but when i try to install this manually from the terminal, no issues.

Output of "find ~/ -mount ! -user michael"

sudo find ~/ -mount ! -user michael
[sudo] password for michael: 
/home/michael/.wget-hsts
/home/michael/Downloads
/home/michael/.dbus
/home/michael/.dbus/session-bus
/home/michael/.dbus/session-bus/cd82760ca7c64274a03b987139d8bbd9-1
/home/michael/Videos
/home/michael/Documents
/home/michael/Pictures
/home/michael/Public
/home/michael/Music
/home/michael/Desktop
/home/michael/.cache/dconf

You have run some GUI application that has taken ownership of files in your personal area. The login manager isn't working because it doesn't have sufficient permission for the configuration files.

You can retake ownership of the files in your personal space by running this command:

$ sudo chown -R $(whoami):$(whoami) ~/

After running this command, you won't have any problems logging in.

Also insure the integrity of your login manager. You can do this by installing lightdm with:

$ sudo apt install lightdm

At the command configuration prompt select Lightdm.

You can toggle between the Lightdm login manager and the Gnome login manager with this command:

$ sudo dpkg-reconfigure lightdm

shareimprove this answer

 

<think>根据用户提供的引用内容,Ubuntu 20.04鼠标黑屏问题(即开机后黑屏,只有鼠标光标可见)有多种可能的原因和解决方法。我将结合引用内容,整理出系统化的解决方案。 ### 问题分析 Ubuntu 20.04开机后出现黑屏且只有鼠标光标可见,通常与以下因素有关: 1. 显示管理器(如gdm3、lightdm)故障 2. 桌面环境(如GNOME)配置错误 3. 显卡驱动或硬件连接问题 4. 第三方软件冲突(如搜狗输入法) 5. 内核版本冲突 ### 解决方案 #### 方法1:重置GNOME配置(引用[2]) 当卡在黑屏只有鼠标可移动时: 1. 按 `Ctrl+Alt+F3` 进入tty终端(若F3无效可尝试F2-F6)。 2. 执行以下命令: ```bash dconf reset -f /org/gnome/ # 重置GNOME配置 systemctl restart gdm3 # 重启gdm3显示管理器 ``` 3. 按 `Ctrl+Alt+F1` 或 `Ctrl+Alt+F7` 返回图形界面观察是否恢复。 #### 方法2:更换显示管理器(引用[1]) 1. 进入tty终端(如 `Ctrl+Alt+F2`)。 2. 安装lightdm并切换: ```bash sudo apt install lightdm # 安装lightdm sudo dpkg-reconfigure lightdm # 选择lightdm为默认管理器 sudo systemctl enable lightdm # 启用lightdm reboot # 重启 ``` #### 方法3:卸载冲突软件(引用[3]) 若问题由搜狗输入法引起: ```bash sudo apt-get purge sogoupinyin # 移除搜狗拼音 sudo apt-get purge fcitx # 移除fcitx框架 sudo apt-get autoremove # 清理残余文件 reboot ``` #### 方法4:检查硬件连接(引用[1]) - **重要步骤**:确认显示器连接线接入的是独立显卡接口(非主板集成显卡接口)。 #### 方法5:重装桌面组件(引用[1]补充) ```bash sudo apt install --reinstall ubuntu-desktop # 重装桌面 sudo apt install unity # 安装Unity桌面(备用) sudo service lightdm restart # 重启显示管理器 reboot ``` #### 方法6:清理多余内核(引用[4]) 若黑屏伴随左上角光标闪烁: ```bash dpkg --get-selections | grep linux-image # 查看内核版本 sudo apt purge linux-image-5.4.0-XX-generic # 删除旧内核(保留当前运行版本) sudo update-grub # 更新引导 reboot ``` ### 操作建议 1. **优先尝试方法1**(快速且不影响配置)。 2. 若无效,按顺序尝试方法2→方法3→方法5。 3. **始终检查硬件连接**(方法4),此问题容易被忽略。 4. 内核问题(方法6)多见于系统升级后,可通过GRUB选择旧内核启动测试。 > 注意:操作前建议备份重要数据。若tty终端无法输入命令,需通过Ubuntu恢复模式(开机时按Shift进入GRUB,选择`Advanced options→recovery mode`)操作。 §§相关问题§§ 1. Ubuntu 20.04如何进入恢复模式? 2. 如何查看Ubuntu当前使用的显卡驱动? 3. 卸载Linux内核的正确方法是什么? </think>### Ubuntu 20.04 鼠标黑屏问题解决方案 根据引用内容,Ubuntu 20.04开机后出现黑屏且只有鼠标光标可见的问题,通常由以下原因引起: #### 核心解决方案(按优先级排序): 1. **重置桌面配置(推荐首选)** - 按 `Ctrl+Alt+F3` 进入终端界面(若F3无效尝试F1-F6) - 执行命令: ```bash dconf reset -f /org/gnome/ # 重置GNOME桌面配置[^2] sudo systemctl restart gdm3 # 重启显示管理器 ``` - 按 `Ctrl+Alt+F1/F7` 返回图形界面 2. **更换显示管理器** - 在终端执行: ```bash sudo apt install lightdm # 安装替代管理器[^1] sudo dpkg-reconfigure lightdm # 切换默认管理器 sudo reboot ``` 3. **移除冲突软件(搜狗输入法场景)** ```bash sudo apt purge sogoupinyin fcitx # 卸载输入法[^3] sudo apt autoremove # 清理残留 sudo reboot ``` 4. **检查硬件连接(易忽略的关键点)** - 确认显示器连接在**独立显卡接口**(非主板集成接口)[^1] - 尝试更换视频线(HDMI/DP等) 5. **内核修复(伴随光标闪烁时)** ```bash dpkg --get-selections | grep linux-image # 查看内核 sudo apt purge linux-image-旧版本号 # 删除多余内核[^4] sudo update-grub sudo reboot ``` #### 备用方案: ```bash # 重装桌面环境[^1] sudo apt install --reinstall ubuntu-desktop sudo apt install unity sudo service gdm3 restart ``` > **操作提示**: > - 优先尝试方案1(耗时<2分钟且无副作用) > - 近期安装过搜狗输入法则首选方案3 > - 双显卡设备务必检查方案4的接口问题 > - 多次系统更新后出现该问题建议方案5
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值