debian11纯净安装

2021-11-15  本文已影响0人  无我_a50f
1. 安装时 选择软件那块,只选中 gnome 去掉 debian桌面 和 系统工具

登陆之前确保,登陆界面选择 xorg gnome (默认 wayland),否则会导致 fcitx5 输入法在浏览器中无法正常使用
进入桌面后

su
apt purge gnome-games libreoffice* gnome-todo gnome-shell-extensions gnome-clocks gnome-contacts gnome-maps gnome-music gnome-sound-recorder gnome-weather totem yelp cheese xterm shotwell malcontent evolution gnome-documents transmission-gtk
apt autoremove --purge
apt install fcitx5 fcitx5-pinyin
2. 切换阿里巴巴开源镜像
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
3. 安装nvidia 驱动

安装之前确保,登陆界面选择 xorg gnome ,否则会导致黑屏无法进入

apt install linux-headers-amd64
apt install nvidia-driver firmware-misc-nonfree firmware-realtek
apt install nvidia-xconfig
4. 安装后出现的问题

a. 无法登录
之前在 wayland 下安装的显卡驱动,后面在 xrog gnome 下面执行下面的命令

sudo nvidia-xconfig

解决方式:
先在登录界面选择wayland 进入桌面

sudo rm -rf /etc/X11/xorg.conf
sudo reboot

根本原因是nvidia 无法正常加载导致
b. nvidia-settings 显示

ERROR: NVIDIA driver is not loaded


ERROR: Unable to load info from any available system

注意到在重启时,界面显示

Failed to start Load Kernel Modules

执行

systemctl status systemd-modules-load.service

显示

systemd-modules-load.service - Load Kernel Modules
     Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static)
     Active: failed (Result: exit-code) since Wed 2022-02-16 11:32:15 CST; 11min ago
       Docs: man:systemd-modules-load.service(8)
             man:modules-load.d(5)
    Process: 289 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
   Main PID: 289 (code=exited, status=1/FAILURE)
        CPU: 12ms

Warning: some journal files were not opened due to insufficient permissions.

看出有问题的进程 289, 执行命令查看日志

sudo journalctl -b _PID=289

显示

-- Journal begins at Tue 2022-02-15 10:44:36 CST, ends at Wed 2022-02-16 11:44:06 CST. --
2月 16 11:32:15 debian systemd-modules-load[289]: Inserted module 'msr'
2月 16 11:32:15 debian systemd-modules-load[289]: Error running install command 'modprobe nvidia-modeset ; modprobe -i nvidia-current-drm ' for module nvidia_drm: retcode 1
2月 16 11:32:15 debian systemd-modules-load[289]: Failed to insert module 'nvidia_drm': Invalid argument

运行

sudo modprobe nvidia-modeset

显示

modprobe: FATAL: Module nvidia-current not found in directory /lib/modules/5.10.0-10-amd64
modprobe: ERROR: ../libkmod/libkmod-module.c:990 command_do() Error running install command 'modprobe -i nvidia-current ' for module nvidia: retcode 1
modprobe: ERROR: could not insert 'nvidia': Invalid argument
modprobe: FATAL: Module nvidia-current-modeset not found in directory /lib/modules/5.10.0-10-amd64
modprobe: ERROR: ../libkmod/libkmod-module.c:990 command_do() Error running install command 'modprobe nvidia ; modprobe -i nvidia-current-modeset ' for module nvidia_modeset: retcode 1
modprobe: ERROR: could not insert 'nvidia_modeset': Invalid argument

分析 因为之前升级了系统,目前进入的kernel 版本不是最新的导致
查看最新版本kernel 下的modules

 ls /lib/modules/5.10.0-11-amd64

果然编译的驱动都在这个目录下

结论:
因本人安装的是双系统, 系统引导的gurb 是在ubuntu 上,debian 11.2 更新后,没有更新ubuntu 的grub,导致引导错误
修复方式:
进入ubuntu 系统, 运行:

sudo update-grub

或者在bios 中修改debian 为启动引导均可。

5. 关于 xrog gnome 切换回wayland 问题

最近更新后,fcitx5 已经可以在firefox下正常使用,nvidia驱动,在安装完之后,再切换回wayland 也能正常使用

上一篇 下一篇

猜你喜欢

热点阅读