我有一个让我抓狂的问题,在 web jet 上找不到解决方案,所以如果有人能给我指出正确的方向,我将不胜感激。我有一台运行 kubuntu 22.04 的 MSI prestige 笔记本电脑。我必须安装内核 5.18 才能使用 wifi。我还安装了 nvidia 驱动程序 515.48(这解决了我遇到的一些发热问题)。所以现在看来一切都运行良好,但有一个小的随机问题:等离子并不总是自动启动。通常,当计算机启动时,sddm 会失败,所以我必须切换到另一个控制台,重新启动 sddm,一切正常。这是通常的程序,但有时 sddm 在启动时会自动启动,有时一切都卡住了,我必须重新启动计算机。我在 syslo 中看到的错误是
sddm[1002]: Failed to read display number from pipe
sddm[1002]: Could not start Display server on vt 1
我读过的 grub 中的一些参数可能会有所帮助:
ibt=off rd.driver.blacklist=nouveau nvidia-drm.modeset=1
我读到它可能与 sddm 在 GPU 正确初始化之前启动有关,但不确定是否真的如此以及如何纠正它。
所以如果有人有想法就太好了
journalctl -b0 -u sddm.service
给出
jul 03 13:33:44 valinor systemd[1]: Starting Simple Desktop Display Manager...
jul 03 13:33:44 valinor systemd[1]: Started Simple Desktop Display Manager.
jul 03 13:33:44 valinor sddm[1002]: Initializing...
jul 03 13:33:44 valinor sddm[1002]: Starting...
jul 03 13:33:44 valinor sddm[1002]: Logind interface found
jul 03 13:33:44 valinor sddm[1002]: Adding new display on vt 1 ...
jul 03 13:33:44 valinor sddm[1002]: Loading theme configuration from ""
jul 03 13:33:44 valinor sddm[1002]: Display server starting...
jul 03 13:33:44 valinor sddm[1002]: Adding cookie to "/var/run/sddm/{025b077b-f1fd-44f3-8b88-0a9cb7b3af50}"
jul 03 13:33:44 valinor sddm[1002]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{025b077b-f1fd-44f3-8b88-0a9cb7b3af50} -background none -noreset -displayfd 17 -seat seat0 vt1
jul 03 13:33:44 valinor sddm[1002]: Failed to read display number from pipe
jul 03 13:33:44 valinor sddm[1002]: Could not start Display server on vt 1
jul 03 13:34:39 valinor sddm[1002]: Signal received: SIGTERM
jul 03 13:34:39 valinor systemd[1]: Stopping Simple Desktop Display Manager...
jul 03 13:34:39 valinor systemd[1]: sddm.service: Deactivated successfully.
jul 03 13:34:39 valinor systemd[1]: Stopped Simple Desktop Display Manager.
jul 03 13:34:40 valinor systemd[1]: Starting Simple Desktop Display Manager...
jul 03 13:34:40 valinor systemd[1]: Started Simple Desktop Display Manager.
jul 03 13:34:40 valinor sddm[1384]: Initializing...
jul 03 13:34:40 valinor sddm[1384]: Starting...
jul 03 13:34:40 valinor sddm[1384]: Logind interface found
jul 03 13:34:40 valinor sddm[1384]: Adding new display on vt 1 ...
jul 03 13:34:40 valinor sddm[1384]: Loading theme configuration from ""
jul 03 13:34:40 valinor sddm[1384]: Display server starting...
jul 03 13:34:40 valinor sddm[1384]: Adding cookie to "/var/run/sddm/{be1b0a15-08c9-4487-9982-0b6bfe194842}"
jul 03 13:34:40 valinor sddm[1384]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{be1b0a15-08c9-4487-9982-0b6bfe194842} -background none -noreset -displayfd 17 -seat seat0 vt1
jul 03 13:34:41 valinor sddm[1384]: Setting default cursor
jul 03 13:34:42 valinor sddm[1384]: Running display setup script "/usr/share/sddm/scripts/Xsetup"
jul 03 13:34:44 valinor sddm[1384]: Display server started.
jul 03 13:34:44 valinor sddm[1384]: Socket server starting...
jul 03 13:34:44 valinor sddm[1384]: Socket server started.
jul 03 13:34:44 valinor sddm[1384]: Loading theme configuration from "/usr/share/sddm/themes/ubuntu-theme/theme.conf"
jul 03 13:34:44 valinor sddm[1384]: Greeter starting...
jul 03 13:34:44 valinor sddm-helper[1473]: [PAM] Starting...
jul 03 13:34:44 valinor sddm-helper[1473]: [PAM] Authenticating...
jul 03 13:34:44 valinor sddm-helper[1473]: [PAM] returning.
jul 03 13:34:44 valinor sddm-helper[1473]: pam_unix(sddm-greeter:session): session opened for user sddm(uid=119) by (uid=0)
jul 03 13:34:44 valinor sddm[1384]: Greeter session started successfully
jul 03 13:34:44 valinor sddm[1384]: Message received from greeter: Connect
jul 03 13:34:48 valinor sddm[1384]: Message received from greeter: Login
jul 03 13:34:48 valinor sddm[1384]: Reading from "/usr/share/xsessions/plasma.desktop"
jul 03 13:34:48 valinor sddm[1384]: Reading from "/usr/share/xsessions/plasma.desktop"
jul 03 13:34:48 valinor sddm[1384]: Session "/usr/share/xsessions/plasma.desktop" selected, command: "/usr/bin/startplasma-x11"
jul 03 13:34:48 valinor sddm-helper[1548]: [PAM] Starting...
jul 03 13:34:48 valinor sddm-helper[1548]: [PAM] Authenticating...
jul 03 13:34:48 valinor sddm-helper[1548]: [PAM] Preparing to converse...
jul 03 13:34:48 valinor sddm-helper[1548]: [PAM] Conversation with 1 messages
jul 03 13:34:48 valinor sddm-helper[1548]: pam_kwallet5(sddm:auth): pam_kwallet5: pam_sm_authenticate
jul 03 13:34:48 valinor sddm-helper[1548]: [PAM] returning.
jul 03 13:34:48 valinor sddm[1384]: Authenticated successfully
jul 03 13:34:48 valinor sddm-helper[1548]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
jul 03 13:34:48 valinor sddm-helper[1548]: pam_unix(sddm:session): session opened for user morales(uid=1000) by (uid=0)
jul 03 13:34:48 valinor sddm-helper[1548]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
jul 03 13:34:48 valinor sddm-helper[1548]: Starting: "/etc/sddm/Xsession \"/usr/bin/startplasma-x11\""
jul 03 13:34:48 valinor sddm[1384]: Session started
jul 03 13:34:48 valinor sddm[1384]: Auth: sddm-helper exited successfully
jul 03 13:34:48 valinor sddm[1384]: Greeter stopped.
注意到它在启动时失败,我手动重新启动了 sddm
egrep 'EE|WW' /var/log/Xorg.0.log
[ 60.502] Current Operating System: Linux valinor 5.18.0-051800-generic #202205222030 SMP PREEMPT_DYNAMIC Sun May 22 20:33:46 UTC 2022 x86_64
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 60.503] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 60.503] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 60.503] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 60.503] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 60.503] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 60.693] (WW) Falling back to old probe method for fbdev
[ 61.194] (WW) NVIDIA(G0): Unable to get display device for DPI computation.
[ 61.324] (II) Initializing extension MIT-SCREEN-SAVER
[ 77.145] (WW) Option "xkb_variant" requires a string value
[ 77.145] (WW) Option "xkb_options" requires a string value
[ 2414.441] (EE) event10 - MSNB0001:00 06CB:CDAA Touchpad: kernel bug: Touch jump detected and discarded.
[ 2545.249] (EE) event10 - MSNB0001:00 06CB:CDAA Touchpad: kernel bug: Touch jump detected and discarded.
[ 2550.256] (EE) modeset(0): Failed to set CTM property: -13
[ 2550.257] (EE) modeset(0): failed to set mode: No such file or directory
[ 2583.546] (WW) Option "xkb_variant" requires a string value
[ 2583.546] (WW) Option "xkb_options" requires a string value
我加cat /var/log/gpu-manager.log
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/5.18.0-051800-generic/kernel
Looking for nvidia modules in /lib/modules/5.18.0-051800-generic/updates/dkms
Found nvidia.ko module in /lib/modules/5.18.0-051800-generic/updates/dkms/nvidia.ko
Looking for amdgpu modules in /lib/modules/5.18.0-051800-generic/kernel
Looking for amdgpu modules in /lib/modules/5.18.0-051800-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:46a6
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:25a2
BusID "PCI:1@0:0:0"
can't open /sys/bus/pci/devices/0000:01:00.0/boot_vga
Is boot vga? no
can't open /sys/bus/pci/devices/0000:01:00.0/boot_vga
Chassis type: "10"
Laptop detected
can't access /etc/u-d-c-nvidia-runtimepm-override file
Found json file: /usr/share/doc/nvidia-driver-515-server/supported-gpus.json
File /usr/share/doc/nvidia-driver-515-server/supported-gpus.json not found
Is nvidia runtime pm supported for "0x25a2"? yes
Trying to create new file: /run/nvidia_runtimepm_supported
Checking power status in /proc/driver/nvidia/gpus/0000:01:00.0/power
Runtime D3 status: Enabled (fine-grained)
Is nvidia runtime pm enabled for "0x25a2"? yes
Trying to create new file: /run/nvidia_runtimepm_enabled
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Found "/dev/dri/card1", driven by "i915"
output 0:
card1-eDP-1
output 1:
card1-DP-1
Number of connected outputs for /dev/dri/card1: 2
Does it require offloading? no
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
Has the system changed? No
Takes 0ms to wait for nvidia udev rules completed.
Intel IGP detected
NVIDIA hybrid system
Creating /usr/share/X11/xorg.conf.d/11-nvidia-offload.conf
Setting power control to "auto" in /sys/bus/pci/devices/0000:01:00.0/power/control
和dkms status
nvidia/515.48.07, 5.15.0-39-generic, x86_64: installed
nvidia/515.48.07, 5.18.0-051800-generic, x86_64: installed
答案1
我开始认为该问题与以下问题有关: https://github.com/sddm/sddm/issues/1316
在快速计算机中,sddm 的启动速度太快。
我已将 sddm 的启动延迟了 10 秒。到目前为止,我已启动了计算机两次,一切似乎都正常,sddm 也自动启动了。