2 天前,我的显卡驱动程序在用 VLC 打开 mp4 文件时崩溃了 - 这种情况我以前也发生过几次。除此之外,电脑仍然可用。当时,系统日志显示了以下错误:
Aug 13 22:49:45 beepbeep kernel: [50420.530049] mmap: qtdemux0:sink (43166): VmData 2664718336 exceed data ulimit 2630227705. Update limits or use boot option ignore_rlimit_data.
Aug 13 22:49:49 beepbeep rtkit-daemon[1519]: Supervising 10 threads of 6 processes of 1 users.
Aug 13 22:49:49 beepbeep rtkit-daemon[1519]: Supervising 10 threads of 6 processes of 1 users.
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: [00005618a8681580] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Aug 13 22:49:50 beepbeep [email protected][2207]: unable to update icon for vlc
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: [00007eff380044d0] gl gl: Initialized libplacebo v4.192.1 (API v192)
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: libva info: VA-API version 1.14.0
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: [00007eff380044d0] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: libva info: VA-API version 1.14.0
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: libva info: Found init function __vaDriverInit_1_14
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: libva info: va_openDriver() returns 0
Aug 13 22:49:50 beepbeep org.gnome.Nautilus[43217]: [00007eff4d9919a0] avcodec decoder: Using Mesa Gallium driver 23.0.4-0ubuntu1~22.04.1 for AMD Radeon RX 6600 (navi23, LLVM 15.0.7, DRM 3.49, 6.2.0-26-generic) for hardware decoding
Aug 13 22:50:00 beepbeep kernel: [50435.990342] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring vcn_dec_0 timeout, signaled seq=22, emitted seq=24
Aug 13 22:50:00 beepbeep kernel: [50435.990927] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process vlc pid 43217 thread vlc:cs0 pid 43239
Aug 13 22:50:00 beepbeep kernel: [50435.991557] amdgpu 0000:0c:00.0: amdgpu: GPU reset begin!
Aug 13 22:50:01 beepbeep kernel: [50436.298174] [drm] Register(0) [mmUVD_POWER_STATUS] failed to reach value 0x00000001 != 0x00000002
Aug 13 22:50:01 beepbeep kernel: [50436.535052] [drm] Register(0) [mmUVD_RBC_RB_RPTR] failed to reach value 0x00000060 != 0x00000270
Aug 13 22:50:01 beepbeep kernel: [50436.772011] [drm] Register(0) [mmUVD_POWER_STATUS] failed to reach value 0x00000001 != 0x00000002
Aug 13 22:50:01 beepbeep kernel: [50436.861316] ------------[ cut here ]------------
Aug 13 22:50:01 beepbeep kernel: [50436.861320] WARNING: CPU: 23 PID: 41263 at drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:600 amdgpu_irq_put+0xa4/0xc0 [amdgpu]
这种情况持续了一段时间,我认为更大的问题出现在我今天尝试修复它时。我去了 AMD 的网站获取最新的驱动程序,最后下载了amdgpu-install_5.5.50503-1_all.deb
。
作为参考,我的操作系统版本uname -a
显示:
Linux beepbeep 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
我按照 AMD 网站上详述的安装过程进行了操作,并发现了以下错误:
Building initial module for 6.2.0-26-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-26-generic (x86_64)
Consult /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/make.log for more information.
dpkg: error processing package amdgpu-dkms (--configure):
installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
amdgpu-dkms
我不太明白它/var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/make.log
在说什么,但这是输出
DKMS make.log for amdgpu-6.0.5-1620033.22.04 for kernel 6.2.0-26-generic (x86_64)
Tue 15 Aug 2023 08:22:31 PM EDT
make: Entering directory '/usr/src/linux-headers-6.2.0-26-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
You are using: gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/scheduler/sched_main.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/scheduler/sched_fence.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/scheduler/sched_entity.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/drm_gem_ttm_helper.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_tt.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_bo.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_bo_util.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_bo_vm.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_module.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/main.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_execbuf_util.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/symbols.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_common.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_range_manager.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/drm_buddy.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_kernel_params.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_resource.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/dma-buf/dma-resv.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_pool.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_backlight.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_device.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_sys_manager.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_ioctl.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_drv.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_kthread.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_io.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_perf_event.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_seq_file.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/ttm_agp_backend.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_device.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_suspend.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_kms.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_pci.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_mm.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_atombios.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_memory.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_sched.o
LD [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amddrm_ttm_helper.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_fence.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_fence_array.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/atombios_crtc.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_reservation.o
LD [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amddrm_buddy.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_cache.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_connectors.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/atom.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_auth.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_fb.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fence.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_ttm.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_object.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_print.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_gart.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_fbmem.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_encoders.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_display.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_i2c.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_crtc.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_connector.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_atomic_helper.o
LD [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/ttm/amdttm.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_device_cgroup.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_mn.o
LD [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/scheduler/amd-sched.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_modes.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_gem.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_time.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_ftrace.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_acpi_table.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_page_alloc.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_numa.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_fs_read_write.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_aperture.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_drv.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_simple_kms_helper.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_bitmap.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_ring.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_vmscan.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_cs.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_dma_fence_chain.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_bios.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_benchmark.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_mce_amd.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_workqueue.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_cpumask.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/atombios_dp.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_dsc_helper.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_afmt.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_drm_hdcp.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_debugfs_inode.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_trace_points.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/atombios_encoders.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_sa.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/kcl_sysfs_emit.o
/var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.c: In function ‘amdgpufb_create’:
/var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.c:236:16: error: implicit declaration of function ‘drm_fb_helper_alloc_fbi’; did you mean ‘drm_fb_helper_alloc_info’? [-Werror=implicit-function-declaration]
236 | info = drm_fb_helper_alloc_fbi(helper);
| ^~~~~~~~~~~~~~~~~~~~~~~
| drm_fb_helper_alloc_info
/var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.c:236:14: warning: assignment to ‘struct fb_info *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
236 | info = drm_fb_helper_alloc_fbi(helper);
| ^
/var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.c:264:73: error: ‘struct drm_mode_config’ has no member named ‘fb_base’
264 | info->apertures->ranges[0].base = adev_to_drm(adev)->mode_config.fb_base;
| ^
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/atombios_i2c.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_dma_buf.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_vm.o
CC [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_vm_pt.o
/var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.c: In function ‘amdgpu_fbdev_destroy’:
/var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.c:306:9: error: implicit declaration of function ‘drm_fb_helper_unregister_fbi’; did you mean ‘drm_fb_helper_unregister_info’? [-Werror=implicit-function-declaration]
306 | drm_fb_helper_unregister_fbi(&rfbdev->helper);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_fb_helper_unregister_info
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu/amdgpu_fb.o] Error 1
make[2]: *** Waiting for unfinished jobs....
LD [M] /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdkcl/amdkcl.o
make[1]: *** [scripts/Makefile.build:512: /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build/amd/amdgpu] Error 2
make: *** [Makefile:2026: /var/lib/dkms/amdgpu/6.0.5-1620033.22.04/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.2.0-26-generic'
我在网上看到有人说尝试进入恢复模式并尝试修复损坏的软件包,但却失败了,出现了类似的 dpkg 错误。
我……我很抱歉。我真的搞砸了 :'(
此时我是否只需要重新安装?想不出其他解决方法。
答案1
在开始之前,您可能需要卸载 amdgpu-dkms 包:
sudo apt remove amdgpu-dkms
我也遇到了这个问题,似乎我可以通过先安装一些软件包来构建 dkms:
sudo apt install amdgpu-dkms-firmware amdgpu-dkms-headers libdrm-amdgpu-dev libdrm-amdgpu-dev linux-hwe-6.2-tools-common linux-headers-generic-hwe-22.04 amdgpu-lib autoconf automake initramfs-tools shim-signed
我还安装了 hwe 内核的 Linux 内核源代码包(我正在运行)。因此我搜索了可用的软件包(您可能必须在软件设置中启用源代码)。
apt-cache search hwe | grep source
然后选择与我在 20.04(linux-hwe-5.15-source-5.15.0)上运行的版本相匹配的版本,因此对你来说它会有所不同(针对 6.2 而不是 5.15)。
然后我运行 sudo apt install amdgpu-dkms
当一切正常后(编译确实花了很长时间),我继续使用安装程序并运行
amdgpu-install --accept-eula
如果这些都不起作用,您仍然可以退出并卸载所有内容。
首先,运行卸载程序:
amdgpu-uninstall
如果说没有安装任何内容,至少删除 amdgpu-dkms:
sudo apt purge amdgpu-dkms-firmware amdgpu-dkms-headers amdgpu-dkms
然后清除安装程序
sudo apt-get purge amdgpu-install
然后重新启动。
如果您遇到任何问题,请在评论中告诉我。