我无法在全新安装的 kubuntu 20.04 下运行 nvidia-settings

我无法在全新安装的 kubuntu 20.04 下运行 nvidia-settings

我尝试在全新安装的 kubuntu 下运行 nvidia-settings,并在“设置”/“驱动程序管理器”中选择 418(专有):https://prnt.sc/8wPVX8vBiFd_

但是我使用命令时遇到错误:

$ nvidia-settings                   

(process:58464): Gtk-WARNING **: 07:47:06.107: Locale not supported by C library.
        Using the fallback 'C' locale.

ERROR: NVIDIA driver is not loaded


ERROR: Unable to load info from any available system


(nvidia-settings:58464): GLib-GObject-CRITICAL **: 07:47:07.347: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 07:47:07.352: PRIME: No offloading required. Abort
** Message: 07:47:07.352: PRIME: is it supported? no

我尝试安装 nvidia-prime 但失败了:

$ sudo apt-get install  nvidia-prime
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nvidia-prime is already the newest version (0.8.16~0.20.04.2).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = (unset),
        LC_TIME = "en_001.UTF-8",
        LC_MONETARY = "uk_UA.UTF-8",
        LC_ADDRESS = "uk_UA.UTF-8",
        LC_TELEPHONE = "uk_UA.UTF-8",
        LC_NAME = "uk_UA.UTF-8",
        LC_MEASUREMENT = "uk_UA.UTF-8",
        LC_IDENTIFICATION = "uk_UA.UTF-8",
        LC_NUMERIC = "uk_UA.UTF-8",
        LC_PAPER = "uk_UA.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.13.0-41-generic
I: The initramfs will attempt to resume from /dev/sdb6
I: (UUID=28ee0d89-a0cc-45ab-bb0c-aeaee8072afa)
I: Set the RESUME variable to override this.
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.13.0-41-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

在网上搜索我发现了一个可能的决定:

# apt-get auto-remove && apt-get clean && apt-get update && apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "",
        LC_ALL = (unset),
        LC_TIME = "en_001.UTF-8",
        LC_MONETARY = "uk_UA.UTF-8",
        LC_ADDRESS = "uk_UA.UTF-8",
        LC_TELEPHONE = "uk_UA.UTF-8",
        LC_NAME = "uk_UA.UTF-8",
        LC_MEASUREMENT = "uk_UA.UTF-8",
        LC_IDENTIFICATION = "uk_UA.UTF-8",
        LC_NUMERIC = "uk_UA.UTF-8",
        LC_PAPER = "uk_UA.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.13.0-41-generic
I: The initramfs will attempt to resume from /dev/sdb6
I: (UUID=28ee0d89-a0cc-45ab-bb0c-aeaee8072afa)
I: Set the RESUME variable to override this.
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.13.0-41-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

但再次出现错误。我的操作系统的分区:

# df -HT   
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  4.1G     0  4.1G   0% /dev
tmpfs          tmpfs     826M  2.0M  824M   1% /run
/dev/sdb2      ext4       53G   15G   35G  31% /
tmpfs          tmpfs     4.2G  102M  4.1G   3% /dev/shm
tmpfs          tmpfs     5.3M  4.1k  5.3M   1% /run/lock
tmpfs          tmpfs     4.2G     0  4.2G   0% /sys/fs/cgroup
/dev/sdb7      ext4       30G  3.5G   25G  13% /var
/dev/sdb1      ext4      339M  234M   80M  75% /boot
/dev/loop0     squashfs  140M  140M     0 100% /snap/chromium/1993
/dev/sdb8      fuseblk   399G  132G  267G  34% /mnt/_work_sdb8
/dev/loop1     squashfs  132k  132k     0 100% /snap/bare/5
/dev/loop2     squashfs   47M   47M     0 100% /snap/snapd/15534
/dev/loop3     squashfs   66M   66M     0 100% /snap/core20/1434
/dev/loop4     squashfs  261M  261M     0 100% /snap/gnome-3-38-2004/99
/dev/loop5     squashfs   86M   86M     0 100% /snap/gtk-common-themes/1534
/dev/sda1      fuseblk    65G   58G  7.2G  89% /mnt/Win_sda1
/dev/sda6      fuseblk   237G  122G  115G  52% /mnt/Work_sda6
/dev/sda8      fuseblk   628G  617G   12G  99% /mnt/Media_sda8
tmpfs          tmpfs     826M   17k  826M   1% /run/user/1000


# uname -a
Linux master-at-home 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@master-at-home:/mnt/_work_sdb8/wwwroot/lar/BiCurrencies# 
root@master-at-home:/mnt/_work_sdb8/wwwroot/lar/BiCurrencies# lsb_release -d; uname -r; uname -i
Description:    Ubuntu 20.04.4 LTS
5.13.0-41-generic
x86_64
root@master-at-home:/mnt/_work_sdb8/wwwroot/lar/BiCurrencies# 
root@master-at-home:/mnt/_work_sdb8/wwwroot/lar/BiCurrencies# plasmashell -v
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
plasmashell 5.18.8
root@master-at-home:/mnt/_work_sdb8/wwwroot/lar/BiCurrencies# 
root@master-at-home:/mnt/_work_sdb8/wwwroot/lar/BiCurrencies# kf5-config --version
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Qt: 5.12.8
KDE Frameworks: 5.68.0
kf5-config: 1.0

该怎么解决?

编辑区块:

$ dpkg -l | grep xdg
ii  python3-xdg                                   0.26-1ubuntu1                                                        all          Python 3 library to access freedesktop.org standards
ii  xdg-dbus-proxy                                0.1.2-1                                                              amd64        filtering D-Bus proxy
ii  xdg-desktop-portal                            1.6.0-1                                                              amd64        desktop integration portal for Flatpak and Snap
ii  xdg-desktop-portal-kde                        5.18.5-0ubuntu0.1                                                    amd64        backend implementation for xdg-desktop-portal using Qt
ii  xdg-user-dirs                                 0.17-2ubuntu1                                                        amd64        tool to manage well known user directories
ii  xdg-utils                                     1.1.3-2ubuntu1.20.04.2                                               all          desktop integration utilities from freedesktop.org

谢谢!

相关内容