未知狐 发布的文章

参考内容:Force SSH Client to Use IPv4 or IPv6

假设我要连接的主机为:home.xfox.fun

两种方案

  1. 命令行直接使用特定参数指定使用ipv4/6
  2. 编辑配置文件对特定主机指定使用ipv4/6

    命令行参数

指定使用ipv4连接: ssh -4 home.xfox.fun
指定使用ipv6连接:ssh -6 home.xfox.fun

编写配置文件

对于配置文件闻之亦有两种选择:

  1. 全局用户生效 /etc/ssh/ssh_config
  2. 当前用户生效 ~/.ssh/config

Host home.xfox.fun
AddressFamily inet6 #对于ipv4 写为inet即可

之前用的是fcitx-rime,也就是基于fcitx4的,大致流程是一致的,但是需要注意配置文件路径有所改变。

安装并配置环境变量

sudo apt install fcitx5-rime
im-config
点击“是” 选择启动小企鹅输入法(即使在Wayland下你也应该这么做,否则开机后可能需要手动启动fcitx5.)
nano .bash_profile

export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx

保存

配置rime

cd ~/.local/share/fcitx5/rime/
touch default.custom.yaml
nano default.custom.yaml

# default.custom.yaml
# 用户  输入法配置
patch:  
  schema_list:  # 输入方案列表
    - schema: luna_pinyin_simp  # 不使用其它输入方案, 只保留明月拼音-简化字输入方案
  menu:
    page_size: 5  # 候选词为5个

重启即可

你应当优先阅读NvidiaGraphicsDrivers

启用非自由软件源

安装驱动程序

sudo apt install nvidia-driver
sudo systemctl reboot


展开查看日志

xfox@loong5-76s:~$ sudo apt install nvidia-driver
将要安装:                                     
  nvidia-driver

将要安装的依赖:  firmware-nvidia-gsp      libgles1                libnvidia-glcore           nvidia-egl-common         nvidia-settings
  glx-alternative-mesa     libglx-nvidia0          libnvidia-glvkspirv        nvidia-egl-icd            nvidia-smi
  glx-alternative-nvidia   libnvcuvid1             libnvidia-ml1              nvidia-installer-cleanup  nvidia-support
  glx-diversions           libnvidia-allocator1    libnvidia-pkcs11-openssl3  nvidia-kernel-common      nvidia-suspend-common
  libcuda1                 libnvidia-cfg1          libnvidia-ptxjitcompiler1  nvidia-kernel-dkms        nvidia-vdpau-driver
  libegl-nvidia0           libnvidia-egl-gbm1      libnvidia-rtcore           nvidia-kernel-support     nvidia-vulkan-common
  libgl1-nvidia-glvnd-glx  libnvidia-egl-wayland1  nvidia-alternative         nvidia-legacy-check       nvidia-vulkan-icd
  libgles-nvidia1          libnvidia-eglcore       nvidia-driver-bin          nvidia-modprobe           update-glx
  libgles-nvidia2          libnvidia-encode1       nvidia-driver-libs         nvidia-persistenced       xserver-xorg-video-nvidia

建议安装:  nvidia-cuda-mps

推荐安装:  libcuda1:i386  nvidia-driver-libs:i386

摘要:  升级:0,安装:46,卸载:0,不升级:0
  下载大小:154 MB
  所需的空间:486 MB / 243 GB 可用
是否继续? [Y/n] y
获取:1 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 update-glx amd64 1.2.2 [5,432 B]
获取:2 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 glx-alternative-mesa amd64 1.2.2 [4,760 B]
获取:3 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 nvidia-installer-cleanup amd64 20240109+1 [13.9 kB]
获取:4 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 glx-diversions amd64 1.2.2 [7,408 B]
获取:5 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 glx-alternative-nvidia amd64 1.2.2 [5,776 B]
获取:6 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-legacy-check amd64 535.183.06-1 [157 kB]
获取:7 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 nvidia-support amd64 20240109+1 [14.8 kB]
获取:8 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-alternative amd64 535.183.06-1 [153 kB]
获取:9 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-ptxjitcompiler1 amd64 535.183.06-1 [6,973 kB]
获取:10 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-pkcs11-openssl3 amd64 535.183.06-1 [155 kB]
获取:11 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libcuda1 amd64 535.183.06-1 [2,999 kB]
获取:12 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-glvkspirv amd64 535.183.06-1 [10.7 MB]
获取:13 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-eglcore amd64 535.183.06-1 [10.6 MB]
获取:14 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-glcore amd64 535.183.06-1 [10.8 MB]
获取:15 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libglx-nvidia0 amd64 535.183.06-1 [387 kB]
获取:16 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libgl1-nvidia-glvnd-glx amd64 535.183.06-1 [332 kB]
获取:17 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-egl-common amd64 535.183.06-1 [151 kB]
获取:18 https://mirrors.tuna.tsinghua.edu.cn/debian testing/main amd64 libnvidia-egl-wayland1 amd64 1:1.1.15-1 [31.5 kB]
获取:19 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libegl-nvidia0 amd64 535.183.06-1 [422 kB]
获取:20 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-egl-icd amd64 535.183.06-1 [151 kB]
获取:21 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-driver-libs amd64 535.183.06-1 [151 kB]
获取:22 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-ml1 amd64 535.183.06-1 [684 kB]
获取:23 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-driver-bin amd64 535.183.06-1 [218 kB]
获取:24 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 xserver-xorg-video-nvidia amd64 535.183.06-1 [2,289 kB]
获取:25 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-vdpau-driver amd64 535.183.06-1 [641 kB]
获取:26 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free-firmware amd64 firmware-nvidia-gsp amd64 535.183.06-1 [38.5 MB]
获取:27 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 nvidia-kernel-common amd64 20240109+1 [4,572 B]
获取:28 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 nvidia-modprobe amd64 550.78-1 [21.7 kB]
获取:29 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-kernel-support amd64 535.183.06-1 [152 kB]
获取:30 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-kernel-dkms amd64 535.183.06-1 [44.9 MB]
获取:31 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-driver amd64 535.183.06-1 [516 kB]
获取:32 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-cfg1 amd64 535.183.06-1 [241 kB]
获取:33 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 nvidia-persistenced amd64 535.171.04-1 [27.1 kB]
获取:34 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 nvidia-settings amd64 535.171.04-1 [767 kB]
获取:35 https://mirrors.tuna.tsinghua.edu.cn/debian testing/main amd64 libgles1 amd64 1.7.0-1+b1 [12.2 kB]
获取:36 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libgles-nvidia1 amd64 535.183.06-1 [171 kB]
获取:37 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libgles-nvidia2 amd64 535.183.06-1 [180 kB]
获取:38 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvcuvid1 amd64 535.183.06-1 [1,502 kB]
获取:39 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-allocator1 amd64 535.183.06-1 [207 kB]
获取:40 https://mirrors.tuna.tsinghua.edu.cn/debian testing/contrib amd64 libnvidia-egl-gbm1 amd64 1.1.2-1 [11.8 kB]
获取:41 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-encode1 amd64 535.183.06-1 [231 kB]
获取:42 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 libnvidia-rtcore amd64 535.183.06-1 [17.5 MB]
获取:43 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-smi amd64 535.183.06-1 [386 kB]
获取:44 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-suspend-common amd64 535.183.06-1 [153 kB]
获取:45 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-vulkan-common amd64 535.183.06-1 [151 kB]
获取:46 https://mirrors.tuna.tsinghua.edu.cn/debian testing/non-free amd64 nvidia-vulkan-icd amd64 535.183.06-1 [151 kB]
已下载 154 MB,耗时 3秒 (52.9 MB/s)           
正在从软件包中解出模板:100%
正在预设定软件包 ...
正在选中未选择的软件包 update-glx。(正在读取数据库 ... 系统当前共安装有 340595 个文件和目录。)
准备解压 .../update-glx_1.2.2_amd64.deb  ...
正在解压 update-glx (1.2.2) ...
正在选中未选择的软件包 glx-alternative-mesa。准备解压 .../glx-alternative-mesa_1.2.2_amd64.deb  ...
正在解压 glx-alternative-mesa (1.2.2) ...
正在选中未选择的软件包 nvidia-installer-cleanup。准备解压 .../nvidia-installer-cleanup_20240109+1_amd64.deb  ...
正在解压 nvidia-installer-cleanup (20240109+1) ...
正在设置 nvidia-installer-cleanup (20240109+1) ...
正在选中未选择的软件包 glx-diversions。(正在读取数据库 ... 系统当前共安装有 340735 个文件和目录。)
准备解压 .../glx-diversions_1.2.2_amd64.deb  ...
正在解压 glx-diversions (1.2.2) ...
正在选中未选择的软件包 glx-alternative-nvidia。准备解压 .../glx-alternative-nvidia_1.2.2_amd64.deb  ...
正在解压 glx-alternative-nvidia (1.2.2) ...
正在选中未选择的软件包 nvidia-legacy-check。准备解压 .../nvidia-legacy-check_535.183.06-1_amd64.deb  ...
正在解压 nvidia-legacy-check (535.183.06-1) ...
正在选中未选择的软件包 nvidia-support。准备解压 .../nvidia-support_20240109+1_amd64.deb  ...
正在解压 nvidia-support (20240109+1) ...
正在设置 nvidia-legacy-check (535.183.06-1) ...
正在选中未选择的软件包 nvidia-alternative。(正在读取数据库 ... 系统当前共安装有 340773 个文件和目录。)
准备解压 .../00-nvidia-alternative_535.183.06-1_amd64.deb  ...
正在解压 nvidia-alternative (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-ptxjitcompiler1:amd64。准备解压 .../01-libnvidia-ptxjitcompiler1_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-ptxjitcompiler1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-pkcs11-openssl3:amd64。准备解压 .../02-libnvidia-pkcs11-openssl3_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-pkcs11-openssl3:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libcuda1:amd64。准备解压 .../03-libcuda1_535.183.06-1_amd64.deb  ...
正在解压 libcuda1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-glvkspirv:amd64。准备解压 .../04-libnvidia-glvkspirv_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-glvkspirv:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-eglcore:amd64。准备解压 .../05-libnvidia-eglcore_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-eglcore:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-glcore:amd64。准备解压 .../06-libnvidia-glcore_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-glcore:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libglx-nvidia0:amd64。准备解压 .../07-libglx-nvidia0_535.183.06-1_amd64.deb  ...
正在解压 libglx-nvidia0:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libgl1-nvidia-glvnd-glx:amd64。准备解压 .../08-libgl1-nvidia-glvnd-glx_535.183.06-1_amd64.deb  ...
正在解压 libgl1-nvidia-glvnd-glx:amd64 (535.183.06-1) ...
正在选中未选择的软件包 nvidia-egl-common。准备解压 .../09-nvidia-egl-common_535.183.06-1_amd64.deb  ...
正在解压 nvidia-egl-common (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-egl-wayland1:amd64。准备解压 .../10-libnvidia-egl-wayland1_1%3a1.1.15-1_amd64.deb  ...
正在解压 libnvidia-egl-wayland1:amd64 (1:1.1.15-1) ...
正在选中未选择的软件包 libegl-nvidia0:amd64。准备解压 .../11-libegl-nvidia0_535.183.06-1_amd64.deb  ...
正在解压 libegl-nvidia0:amd64 (535.183.06-1) ...
正在选中未选择的软件包 nvidia-egl-icd:amd64。准备解压 .../12-nvidia-egl-icd_535.183.06-1_amd64.deb  ...
正在解压 nvidia-egl-icd:amd64 (535.183.06-1) ...
正在选中未选择的软件包 nvidia-driver-libs:amd64。准备解压 .../13-nvidia-driver-libs_535.183.06-1_amd64.deb  ...
正在解压 nvidia-driver-libs:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-ml1:amd64。准备解压 .../14-libnvidia-ml1_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-ml1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 nvidia-driver-bin。准备解压 .../15-nvidia-driver-bin_535.183.06-1_amd64.deb  ...
正在解压 nvidia-driver-bin (535.183.06-1) ...
正在选中未选择的软件包 xserver-xorg-video-nvidia。准备解压 .../16-xserver-xorg-video-nvidia_535.183.06-1_amd64.deb  ...
正在解压 xserver-xorg-video-nvidia (535.183.06-1) ...
正在选中未选择的软件包 nvidia-vdpau-driver:amd64。准备解压 .../17-nvidia-vdpau-driver_535.183.06-1_amd64.deb  ...
正在解压 nvidia-vdpau-driver:amd64 (535.183.06-1) ...
正在选中未选择的软件包 firmware-nvidia-gsp。准备解压 .../18-firmware-nvidia-gsp_535.183.06-1_amd64.deb  ...
正在解压 firmware-nvidia-gsp (535.183.06-1) ...
正在选中未选择的软件包 nvidia-kernel-common。准备解压 .../19-nvidia-kernel-common_20240109+1_amd64.deb  ...
正在解压 nvidia-kernel-common (20240109+1) ...
正在选中未选择的软件包 nvidia-modprobe。准备解压 .../20-nvidia-modprobe_550.78-1_amd64.deb  ...
正在解压 nvidia-modprobe (550.78-1) ...
正在选中未选择的软件包 nvidia-kernel-support。准备解压 .../21-nvidia-kernel-support_535.183.06-1_amd64.deb  ...
正在解压 nvidia-kernel-support (535.183.06-1) ...
正在选中未选择的软件包 nvidia-kernel-dkms。准备解压 .../22-nvidia-kernel-dkms_535.183.06-1_amd64.deb  ...
正在解压 nvidia-kernel-dkms (535.183.06-1) ...
正在选中未选择的软件包 nvidia-driver。准备解压 .../23-nvidia-driver_535.183.06-1_amd64.deb  ...
正在解压 nvidia-driver (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-cfg1:amd64。准备解压 .../24-libnvidia-cfg1_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-cfg1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 nvidia-persistenced。准备解压 .../25-nvidia-persistenced_535.171.04-1_amd64.deb  ...
正在解压 nvidia-persistenced (535.171.04-1) ...
正在选中未选择的软件包 nvidia-settings。准备解压 .../26-nvidia-settings_535.171.04-1_amd64.deb  ...
正在解压 nvidia-settings (535.171.04-1) ...
正在选中未选择的软件包 libgles1:amd64。准备解压 .../27-libgles1_1.7.0-1+b1_amd64.deb  ...
正在解压 libgles1:amd64 (1.7.0-1+b1) ...
正在选中未选择的软件包 libgles-nvidia1:amd64。准备解压 .../28-libgles-nvidia1_535.183.06-1_amd64.deb  ...
正在解压 libgles-nvidia1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libgles-nvidia2:amd64。准备解压 .../29-libgles-nvidia2_535.183.06-1_amd64.deb  ...
正在解压 libgles-nvidia2:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvcuvid1:amd64。准备解压 .../30-libnvcuvid1_535.183.06-1_amd64.deb  ...
正在解压 libnvcuvid1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-allocator1:amd64。准备解压 .../31-libnvidia-allocator1_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-allocator1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-egl-gbm1:amd64。准备解压 .../32-libnvidia-egl-gbm1_1.1.2-1_amd64.deb  ...
正在解压 libnvidia-egl-gbm1:amd64 (1.1.2-1) ...
正在选中未选择的软件包 libnvidia-encode1:amd64。准备解压 .../33-libnvidia-encode1_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-encode1:amd64 (535.183.06-1) ...
正在选中未选择的软件包 libnvidia-rtcore:amd64。准备解压 .../34-libnvidia-rtcore_535.183.06-1_amd64.deb  ...
正在解压 libnvidia-rtcore:amd64 (535.183.06-1) ...
正在选中未选择的软件包 nvidia-smi。准备解压 .../35-nvidia-smi_535.183.06-1_amd64.deb  ...
正在解压 nvidia-smi (535.183.06-1) ...
正在选中未选择的软件包 nvidia-suspend-common。准备解压 .../36-nvidia-suspend-common_535.183.06-1_amd64.deb  ...
正在解压 nvidia-suspend-common (535.183.06-1) ...
正在选中未选择的软件包 nvidia-vulkan-common。准备解压 .../37-nvidia-vulkan-common_535.183.06-1_amd64.deb  ...
正在解压 nvidia-vulkan-common (535.183.06-1) ...
正在选中未选择的软件包 nvidia-vulkan-icd:amd64。准备解压 .../38-nvidia-vulkan-icd_535.183.06-1_amd64.deb  ...
正在解压 nvidia-vulkan-icd:amd64 (535.183.06-1) ...
正在设置 nvidia-support (20240109+1) ...
正在设置 libnvidia-glvkspirv:amd64 (535.183.06-1) ...
正在设置 libnvidia-eglcore:amd64 (535.183.06-1) ...
正在设置 nvidia-egl-common (535.183.06-1) ...
正在设置 nvidia-kernel-common (20240109+1) ...
正在设置 libnvidia-allocator1:amd64 (535.183.06-1) ...
正在设置 update-glx (1.2.2) ...
正在设置 nvidia-modprobe (550.78-1) ...
正在设置 libnvidia-egl-wayland1:amd64 (1:1.1.15-1) ...
正在设置 libgles1:amd64 (1.7.0-1+b1) ...
正在设置 libnvidia-glcore:amd64 (535.183.06-1) ...
正在设置 libnvidia-ptxjitcompiler1:amd64 (535.183.06-1) ...
正在设置 nvidia-vulkan-common (535.183.06-1) ...
正在设置 firmware-nvidia-gsp (535.183.06-1) ...
正在设置 libnvidia-egl-gbm1:amd64 (1.1.2-1) ...
正在设置 libnvidia-rtcore:amd64 (535.183.06-1) ...
正在设置 nvidia-suspend-common (535.183.06-1) ...
Created symlink '/etc/systemd/system/systemd-hibernate.service.wants/nvidia-hibernate.service' → '/usr/lib/systemd/system/nvidia-hibernate.service'.
Created symlink '/etc/systemd/system/systemd-suspend.service.wants/nvidia-resume.service' → '/usr/lib/systemd/system/nvidia-resume.service'.
Created symlink '/etc/systemd/system/systemd-hibernate.service.wants/nvidia-resume.service' → '/usr/lib/systemd/system/nvidia-resume.service'.
Created symlink '/etc/systemd/system/systemd-suspend.service.wants/nvidia-suspend.service' → '/usr/lib/systemd/system/nvidia-suspend.service'.
正在设置 glx-alternative-mesa (1.2.2) ...
正在设置 glx-diversions (1.2.2) ...
update-alternatives: 使用 /usr/lib/mesa-diverted 来在自动模式中提供 /usr/lib/glx (glx)
正在处理用于 mailcap (3.72) 的触发器 ...
正在处理用于 initramfs-tools (0.145) 的触发器 ...
update-initramfs: Generating /boot/initrd.img-6.10.6-amd64
正在处理用于 hicolor-icon-theme (0.18-1) 的触发器 ...
正在处理用于 libc-bin (2.40-2) 的触发器 ...
正在处理用于 man-db (2.13.0-1) 的触发器 ...
正在处理用于 glx-alternative-mesa (1.2.2) 的触发器 ...
update-alternatives: 链接组 glx 已更改次要链接,故更新候选项 /usr/lib/mesa-diverted
正在设置 glx-alternative-nvidia (1.2.2) ...
正在处理用于 glx-alternative-nvidia (1.2.2) 的触发器 ...
正在设置 nvidia-alternative (535.183.06-1) ...
正在处理用于 nvidia-alternative (535.183.06-1) 的触发器 ...
update-alternatives: 使用 /usr/lib/nvidia/current 来在自动模式中提供 /usr/lib/nvidia/nvidia (nvidia)
正在设置 libnvidia-ml1:amd64 (535.183.06-1) ...
正在设置 libnvidia-cfg1:amd64 (535.183.06-1) ...
正在设置 libglx-nvidia0:amd64 (535.183.06-1) ...
正在设置 nvidia-kernel-support (535.183.06-1) ...
正在设置 xserver-xorg-video-nvidia (535.183.06-1) ...
正在设置 nvidia-vulkan-icd:amd64 (535.183.06-1) ...
正在设置 libnvidia-pkcs11-openssl3:amd64 (535.183.06-1) ...
正在设置 nvidia-vdpau-driver:amd64 (535.183.06-1) ...
正在设置 libgl1-nvidia-glvnd-glx:amd64 (535.183.06-1) ...
正在设置 libgles-nvidia1:amd64 (535.183.06-1) ...
正在设置 libegl-nvidia0:amd64 (535.183.06-1) ...
正在设置 nvidia-settings (535.171.04-1) ...
正在设置 nvidia-smi (535.183.06-1) ...
正在设置 libgles-nvidia2:amd64 (535.183.06-1) ...
正在设置 nvidia-driver-bin (535.183.06-1) ...
正在设置 nvidia-persistenced (535.171.04-1) ...
info: 您指定的主目录 /var/run/nvpd/ 无法访问:No such file or directory

info: 从 100 到 999 中选择 UID...

info: 从 100 到 999 中选择 GID...
info: 正在添加系统用户"nvpd" (UID 116)...
info: 正在添加新组"nvpd" (GID 127)...
info: 正在将新用户"nvpd" (UID 116)添加到组"nvpd"...
info: 无法创建主目录"/var/run/nvpd/"。Created symlink '/etc/systemd/system/multi-user.target.wants/nvidia-persistenced.service' → '/usr/lib/systemd/system/nvidia-persistenced.service'.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 148.
正在设置 libcuda1:amd64 (535.183.06-1) ...
正在设置 nvidia-egl-icd:amd64 (535.183.06-1) ...
正在设置 nvidia-driver-libs:amd64 (535.183.06-1) ...
正在设置 libnvcuvid1:amd64 (535.183.06-1) ...
正在设置 libnvidia-encode1:amd64 (535.183.06-1) ...
正在处理用于 nvidia-alternative (535.183.06-1) 的触发器 ...
update-alternatives: 链接组 nvidia 已更改次要链接,故更新候选项 /usr/lib/nvidia/current
正在设置 nvidia-kernel-dkms (535.183.06-1) ...
Loading new nvidia-current-535.183.06 DKMS files...
Building for 6.10.6-amd64
Building initial module for 6.10.6-amd64
Done.

nvidia-current.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.10.6-amd64/updates/dkms/

nvidia-current-modeset.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.10.6-amd64/updates/dkms/

nvidia-current-drm.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.10.6-amd64/updates/dkms/

nvidia-current-uvm.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.10.6-amd64/updates/dkms/

nvidia-current-peermem.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.10.6-amd64/updates/dkms/
depmod....
正在设置 nvidia-driver (535.183.06-1) ...
正在处理用于 libc-bin (2.40-2) 的触发器 ...
正在处理用于 initramfs-tools (0.145) 的触发器 ...
update-initramfs: Generating /boot/initrd.img-6.10.6-amd64
正在处理用于 update-glx (1.2.2) 的触发器 ...
正在处理用于 glx-alternative-nvidia (1.2.2) 的触发器 ...
update-alternatives: 使用 /usr/lib/nvidia 来在自动模式中提供 /usr/lib/glx (glx)
正在处理用于 glx-alternative-mesa (1.2.2) 的触发器 ...
正在处理用于 libc-bin (2.40-2) 的触发器 ...
正在处理用于 initramfs-tools (0.145) 的触发器 ...
update-initramfs: Generating /boot/initrd.img-6.10.6-amd64

启用Wayland支持

我在安装闭源驱动后发现我已经无法在登陆界面启动Wayland桌面环境了,按照GS同学的提醒,我应该在配置文件中新增一行配置。

[21:04:22] (频道)gsrc:/etc/modprobe.d/nvidia.conf
[21:04:28] (频道)gsrc:options nvidia-drm modeset=1

详情参考:https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
如此操作后Wayland已经可以正常使用了。

Debian13 题外话 Fcitx5输入法

当你从X11切换到Wayland后,你可能面临一个问题:Fcitx5输入法在开机后不可用。
令我感到惊喜的是,这个问题的解决方案会在你尝试启用的时候弹出一个消息通知。如同下面截图显示的那样,对Fctix5开发者们贴心的设计都表示由衷的感谢。
2024-09-02T15:56:56.png

为什么我无法使用podman update container_id --restart=always ?

我猜你在阅读本文之前已经尝试过docker(podman) update了,但是很遗憾Podman update命令主要用于配置容器可用资源和,比如限制容器使用的内存数量。
以下为podman update的可用子命令: 随着podman更新,他们可能会被更改,请参考官方文档podman-update - Update the configuration of a given container

选项描述
--blkio-weight设置块设备 I/O 的权重。权重决定了在多个容器之间进行块 I/O 带宽分配时的优先级。
--blkio-weight-device为特定的块设备设置 I/O 权重。格式为“设备路径:权重”。
--cpu-period设置 CPU 周期的时间长度,单位为微秒。用于与 --cpu-quota 一起限制 CPU 的使用。
--cpu-quota设置 CPU 配额,即容器在一个 CPU 周期内可以使用的微秒数。
--cpu-rt-period设置实时 CPU 调度的周期长度,单位为微秒。用于限制实时任务的 CPU 使用时间。
--cpu-rt-runtime设置实时 CPU 调度的运行时间长度,单位为微秒。
--cpu-shares设置 CPU 权重,用于在多个容器之间分配 CPU 时间。
--cpus.container设置容器可以使用的 CPU 核心数。
--cpuset-cpus设置容器可以使用的 CPU 集合。
--cpuset-mems设置容器可以使用的内存节点集合。
--device-read-bps为特定的设备设置读取带宽限制,单位为字节/秒。格式为“设备路径:带宽”。
--device-read-iops为特定的设备设置读取 I/O 操作限制,单位为操作/秒。格式为“设备路径:I/O 操作数”。
--device-write-bps为特定的设备设置写入带宽限制,单位为字节/秒。格式为“设备路径:带宽”。
--device-write-iops为特定的设备设置写入 I/O 操作限制,单位为操作/秒。格式为“设备路径:I/O 操作数”。
--memory设置容器可以使用的内存大小。
--memory-reservation设置容器内存预留大小,确保容器启动时获得的最小内存量。
--memory-swap设置容器可以使用的总内存(包括内存和交换分区)大小。
--memory-swappiness设置容器的交换倾向性,取值范围为 0 到 100。较高的值意味着容器更倾向于使用交换分区。
--pids-limit设置容器可以创建的进程数限制。

使用Podman更新容器参数的正确做法

假设你不想删除并在重新创建该容器时丢失之前使用的参数
以正在运行的容器natfrp-service为例:

查看容器启动参数

(我使用SakuraFrp官方的脚本部署,但是我现在需要更改--restart=on-failure:5 为:--restart=always 并且我不想重新修改一些其他固定好的参数)
podman inspect natfrp-service | grep -A 15 "CreateCommand"
这里的15取决于你的容器启动参数有多少项,一般来说一项为一行,15即获取字符串“CreateCommand”后的15行。如果你发现过多导致没有完全输出,可以适当增加该值。

停止容器

sudo podman stop natfrp-service

删除容器

sudo podman rm natfrp-service

重新运行容器并添加参数

podman run --name=natfrp-service --restart=always other... natfrp.com/launcher:latest

xfox@orangepi3b:~$ journalctl -xeu cloudflared.service
部分输出如下:

lines 1-95/316 25%
Aug 05 22:50:15 orangepi3b systemd[1]: Starting cloudflared.service - cloudflared...
░░ Subject: A start job for unit cloudflared.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit cloudflared.service has begun execution.
░░
░░ The job identifier is 142.
Aug 05 22:50:20 orangepi3b cloudflared[1116]: 2024-08-05T14:50:20Z INF Starting tunnel tunnelID=740e1ff0-2276-4e32-9028-2a491dbd654a
Aug 05 22:50:20 orangepi3b cloudflared[1116]: 2024-08-05T14:50:20Z INF Version 2024.6.1
Aug 05 22:50:20 orangepi3b cloudflared[1116]: 2024-08-05T14:50:20Z INF GOOS: linux, GOVersion: go1.22.2, GoArch: arm64
Aug 05 22:50:20 orangepi3b cloudflared[1116]: 2024-08-05T14:50:20Z INF Settings: map[no-autoupdate:true token:*****]
Aug 05 22:50:20 orangepi3b cloudflared[1116]: 2024-08-05T14:50:20Z INF Generated Connector ID: f222f304-ee8e-4354-b409-212c19408f21
Aug 05 22:50:20 orangepi3b cloudflared[1116]: 2024-08-05T14:50:20Z INF cloudflared will not automatically update if installed by a package manager.
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR Failed to fetch features, default to disable error="lookup cfd-features.argotunnel.com on [2001:4860:4860::8888]:53: dial udp [2001:4860:4860::8888]:53: connect: network is unreachable"
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR update check failed error="Get \"https://update.argotunnel.com?arch=arm64&clientVersion=2024.6.1&os=linux\": dial tcp: lookup update.argotunnel.com on [2001:4860:4860::8888]:53: dial udp [2001:4860:4860::8888]:53: connect: network is unreachable"
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z WRN Unable to lookup protocol percentage.
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z INF Initial protocol quic
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z INF ICMP proxy will use 0.0.0.0 as source for IPv4
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z INF ICMP proxy will use ::1 in zone lo as source for IPv6
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z WRN The user running cloudflared process has a GID (group ID) that is not within ping_group_range. You might need to add that user to a group within that range, or instead update the range to encompass a group the user is already in by modifying /proc/sys/net/ipv4/ping_group_range. Otherwise cloudflared will not be able to ping this network error="Group ID 0 is not between ping group 1 to 0"
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z WRN ICMP proxy feature is disabled error="cannot create ICMPv4 proxy: Group ID 0 is not between ping group 1 to 0 nor ICMPv6 proxy: socket: permission denied"
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR edge discovery: error looking up Cloudflare edge IPs: the DNS query failed error="lookup _v2-origintunneld._tcp.argotunnel.com on [2001:4860:4860::8888]:53: dial udp [2001:4860:4860::8888]:53: connect: network is unreachable" event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR Please try the following things to diagnose this issue: event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR   1. ensure that argotunnel.com is returning "origintunneld" service records. event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      Run your system's equivalent of: dig srv _origintunneld._tcp.argotunnel.com event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR   2. ensure that your DNS resolver is not returning compressed SRV records. event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      See GitHub issue https://github.com/golang/go/issues/27546 event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      For example, you could use Cloudflare's 1.1.1.1 as your resolver: event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      https://developers.cloudflare.com/1.1.1.1/setting-up-1.1.1.1/ event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z INF Starting metrics server on 127.0.0.1:37845/metrics
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR edge discovery: error looking up Cloudflare edge IPs: the DNS query failed error="lookup _v2-origintunneld._tcp.argotunnel.com on [2001:4860:4860::8888]:53: dial udp [2001:4860:4860::8888]:53: connect: network is unreachable" event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR Please try the following things to diagnose this issue: event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR   1. ensure that argotunnel.com is returning "origintunneld" service records. event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      Run your system's equivalent of: dig srv _origintunneld._tcp.argotunnel.com event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR   2. ensure that your DNS resolver is not returning compressed SRV records. event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      See GitHub issue https://github.com/golang/go/issues/27546 event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      For example, you could use Cloudflare's 1.1.1.1 as your resolver: event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR      https://developers.cloudflare.com/1.1.1.1/setting-up-1.1.1.1/ event=0
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z INF Tunnel server stopped
Aug 05 22:50:21 orangepi3b cloudflared[1116]: 2024-08-05T14:50:21Z ERR Initiating shutdown error="Could not lookup srv records on _v2-origintunneld._tcp.argotunnel.com: lookup _v2-origintunneld._tcp.argotunnel.com on [2001:4860:4860::8888]:53: dial udp [2001:4860:4860::8888]:53: connect: network is unreachable"
Aug 05 22:50:22 orangepi3b cloudflared[1116]: 2024-08-05T14:50:22Z INF Metrics server stopped
Aug 05 22:50:22 orangepi3b cloudflared[1116]: Could not lookup srv records on _v2-origintunneld._tcp.argotunnel.com: lookup _v2-origintunneld._tcp.argotunnel.com on [2001:4860:4860::8888]:53: dial udp [2001:4860:4860::8888]:53: connect: network is unreachable

除了刚执行服务部署的时候,其他时间大部分log只是在重复的报错各种连接失败和重试

在大量的日志中我发现参杂了这条:
2024-08-05T13:47:45Z ERR Failed to fetch features, default to disable error="lookup cfd-features.argotunnel.com on [fe80::1%end1]:53: dial udp [fe80::1%end1]:53: i/o timeout"

看上去是dns解析有问题,所以我去看了看/etc/resolv.conf
内容默认是H2-3V的ipv4地址和一个看上去不太对劲的ipv6内网地址,遂改为如下内容:
nameserver 8.8.8.8 # Google IPv4
nameserver 8.8.4.4 # Google IPv4
nameserver 2001:4860:4860::8888 # Google IPv6
nameserver 2001:4860:4860::8844 # Google IPv6
但是看注释这个文件内容貌似是由NetworkManager生成的,所以规范一点用nmcli解决问题。

xfox@orangepi3b:~$ nmcli connection show
NAME                UUID                                  TYPE      DEVICE
Orange Pi ethernet  b76cc74f-5847-4558-8098-5709829e4eb2  ethernet  end1
lo                  572b3c59-1519-4e09-b290-a48063e98424  loopback  lo
sudo nmcli connection modify "Orange Pi ethernet" ipv4.dns "8.8.8.8,8.8.4.4"
sudo nmcli connection modify "Orange Pi ethernet" ipv6.dns "2001:4860:4860::8888,2001:4860:4860::8844"

启用自动获取dns服务器功能:

可选,特别是你的网络需要被劫持dns才能跳转认证页面完成认证的情况下。(某些大学) 但是对于我参数应为yes,因为我不想用路由器下发的的瘸腿DNS,特别是有这样一条提示:

# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
...
sudo nmcli connection modify "Orange Pi ethernet" ipv4.ignore-auto-dns no
sudo nmcli connection modify "Orange Pi ethernet" ipv6.ignore-auto-dns no

重启网络连接

我使用SSH连接,所以最好一次性执行完所有内容,以免需要重启设备。
sudo nmcli connection down "Orange Pi ethernet" && sudo nmcli connection up "Orange Pi ethernet"

查看当前DNS设置状态

cat /etc/resolv.conf

# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 2001:4860:4860::8844


重新安装cloudflared服务

sudo cloudflared service uninstall
#最好先在cloudfalre zero trust > Networks > Tunnels里刷新一下token
#接着按照面板提供的指令直接安装即可。
sudo cloudflared service install *******
2024-08-05T15:00:44Z INF Using Systemd
2024-08-05T15:00:48Z INF Linux service for cloudflared installed successfully

END

问题成功解决!!!

没错,我又买了一块开发板香橙派3B,第一块Zero2几年前已经送给秋秋了。这块OPI 3B的用途以后再公开。

参考了OrangePi5B修改默认的用户名 如果你去看C*D*的文章,最好记得回来看看怎么给新用户目录授权。

关闭自动登录

我使用的server img没有安装桌面环境,按照官方文档只需要执行如下指令:

sudo auto_login_cli.sh -d
sudo disable_desktop_autologin.sh #如果你安装了桌面环境

修改相关系统配置文件

sed -i "s/orangepi/xfox/g" /etc/passwd
sed -i "s/orangepi/xfox/g" /etc/shadow
sed -i "s/orangepi/xfox/g" /etc/group

修改用户目录名称

mv /home/orangepi /home/xfox

给变更后的新用户目录授权

chown -R xfox:xfox /home/xfox

接下来重启

reboot

END