我有一台戴尔 XPS 15,它既有集成的英特尔 GPU,也有独立的 Nvidia GPU。出于省电原因,我使用 Nvidia X Server Settings 程序将系统设置为使用英特尔 GPU。无论如何,nouveau 驱动程序都会加载,在这种情况下,大多数时候当我尝试挂起时,挂起都会失败,我最终只能进入锁定屏幕(但可以正常解锁)。不过,偶尔它也能正常工作。
现在,我很高兴能找到一个可以让 nouveau 驱动程序与挂起功能一起工作的解决方案,但我也可以根本不加载它们,因为无论如何我都会使用英特尔 GPU。
我正在运行 18.04 和内核 4.15.0-20。
输出sudo lshw -C display
:
*-display
description: 3D controller
product: GP107M [GeForce GTX 1050 Mobile]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom
configuration: driver=nouveau latency=0
resources: irq:141 memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:ed000000-ed07ffff
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:130 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff
如果使用 Nvidia X 服务器设置切换到专有 nvidia 驱动程序,则上述更改会反映这一点,并且挂起功能可以正常工作。(实际上情况并非如此,但它会以不同的、不太激烈的方式中断,我不在乎。)
我有一些文件/etc/modprobe.d/
(不是我创建的),我认为它们会被列入 nouveau 黑名单。输出cat /etc/modprobe.d/nvidia-graphics-drivers.conf /etc/modprobe.d/blacklist-nvidia.conf
:
blacklist nouveau
blacklist lbm-nouveau
alias nouveau off
alias lbm-nouveau off
# Do not modify
# This file was generated by nvidia-prime
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
alias nvidia off
alias nvidia-drm off
alias nvidia-modeset off
在/var/log/syslog
尝试暂停失败后,我发现以下内容:
systemd[1]: Starting TLP suspend/resume...
kernel: [ 113.015159] msr: Direct access to MSR 1b0
systemd[1]: Started TLP suspend/resume.
systemd[1]: Reached target Sleep.
systemd[1]: Starting Suspend...
systemd-sleep[2460]: Suspending system...
kernel: [ 113.045574] PM: suspend entry (deep)
kernel: [ 113.045575] PM: Syncing filesystems ... done.
kernel: [ 113.056901] Freezing user space processes ... (elapsed 0.001 seconds) done.
kernel: [ 113.058642] OOM killer disabled.
kernel: [ 113.058643] Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
kernel: [ 113.059619] Suspending console(s) (use no_console_suspend to debug)
kernel: [ 113.263840] psmouse serio1: Failed to disable mouse on isa0060/serio1
kernel: [ 116.155267] ------------[ cut here ]------------
kernel: [ 116.155268] nouveau 0000:01:00.0: timeout
kernel: [ 116.155299] WARNING: CPU: 7 PID: 611 at /build/linux-5s7Xkn/linux-4.15.0/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c:207 gf100_vmm_flush_+0x15c/0x1a0 [nouveau]
kernel: [ 116.155299] Modules linked in: rfcomm ccm thunderbolt msr cmac bnep arc4 uvcvideo btusb videobuf2_vmalloc videobuf2_memops btrtl btbcm videobuf2_v4l2 btintel videobuf2_core bluetooth videodev media ecdh_generic nouveau ttm nls_iso8859_1 snd_hda_codec_hdmi hid_multitouch snd_hda_codec_realtek snd_hda_codec_generic dell_smbios_wmi dell_wmi wmi_bmof dell_wmi_descriptor dell_laptop mxm_wmi intel_wmi_thunderbolt dell_smbios_smm dell_smbios dcdbas dell_smm_hwmon snd_hda_intel snd_hda_codec intel_rapl ath10k_pci snd_hda_core x86_pkg_temp_thermal intel_powerclamp snd_hwdep ath10k_core snd_pcm coretemp kvm_intel snd_seq_midi ath snd_seq_midi_event kvm mac80211 snd_rawmidi snd_seq irqbypass intel_cstate snd_seq_device intel_rapl_perf snd_timer rtsx_pci_ms cfg80211 memstick idma64 virt_dma snd joydev input_leds
kernel: [ 116.155320] mei_me serio_raw soundcore intel_lpss_pci processor_thermal_device mei shpchp intel_pch_thermal intel_lpss intel_soc_dts_iosf int3403_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad intel_hid wmi mac_hid tpm_crb sparse_keymap sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 algif_skcipher af_alg dm_crypt usbhid rtsx_pci_sdmmc i915 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd i2c_algo_bit glue_helper cryptd drm_kms_helper syscopyarea sysfillrect psmouse sysimgblt fb_sys_fops nvme drm nvme_core ahci rtsx_pci libahci i2c_hid hid video
kernel: [ 116.155339] CPU: 7 PID: 611 Comm: kworker/u16:6 Tainted: G W 4.15.0-20-generic #21-Ubuntu
kernel: [ 116.155340] Hardware name: Dell Inc. XPS 15 9560/05FFDN, BIOS 1.7.1 01/25/2018
kernel: [ 116.155342] Workqueue: events_unbound async_run_entry_fn
kernel: [ 116.155358] RIP: 0010:gf100_vmm_flush_+0x15c/0x1a0 [nouveau]
kernel: [ 116.155359] RSP: 0018:ffffb7cfc23d3710 EFLAGS: 00010286
kernel: [ 116.155359] RAX: 0000000000000000 RBX: ffff9ba8eb20ea00 RCX: ffffffffb94628a8
kernel: [ 116.155360] RDX: ffffffffb94628a8 RSI: 0000000000000086 RDI: 0000000000000202
kernel: [ 116.155361] RBP: ffffb7cfc23d3748 R08: 0000000000000000 R09: 000000000000001d
kernel: [ 116.155361] R10: ffffffffc0cc01e0 R11: 0000000000000620 R12: ffff9ba8e8809800
kernel: [ 116.155361] R13: ffff9ba8eb7cb3c0 R14: 0000001a942e54c0 R15: ffff9ba8ae5c5a00
kernel: [ 116.155362] FS: 0000000000000000(0000) GS:ffff9ba8fe5c0000(0000) knlGS:0000000000000000
kernel: [ 116.155363] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: [ 116.155363] CR2: 000055d23a343286 CR3: 00000001e4a0a001 CR4: 00000000003606e0
kernel: [ 116.155364] Call Trace:
kernel: [ 116.155380] gp100_vmm_flush+0x17/0x20 [nouveau]
kernel: [ 116.155394] nvkm_vmm_iter.constprop.13+0x2e5/0x880 [nouveau]
kernel: [ 116.155408] ? gp100_vmm_pgt_sparse+0xd0/0xd0 [nouveau]
kernel: [ 116.155417] ? nvkm_object_init+0xc2/0x190 [nouveau]
kernel: [ 116.155430] nvkm_vmm_unmap_locked+0x8a/0xc0 [nouveau]
kernel: [ 116.155442] ? gp100_vmm_pgt_sparse+0xd0/0xd0 [nouveau]
kernel: [ 116.155454] nvkm_uvmm_mthd+0x662/0x8d0 [nouveau]
kernel: [ 116.155463] nvkm_object_mthd+0x1a/0x30 [nouveau]
kernel: [ 116.155471] nvkm_ioctl_mthd+0x5d/0xb0 [nouveau]
kernel: [ 116.155479] nvkm_ioctl+0x11d/0x280 [nouveau]
kernel: [ 116.155522] nvkm_client_ioctl+0x12/0x20 [nouveau]
kernel: [ 116.155530] nvif_object_ioctl+0x47/0x50 [nouveau]
kernel: [ 116.155538] nvif_object_mthd+0x129/0x150 [nouveau]
kernel: [ 116.155581] ? nouveau_mem_host+0x122/0x1b0 [nouveau]
kernel: [ 116.155590] nvif_vmm_unmap+0x3b/0x60 [nouveau]
kernel: [ 116.155605] nouveau_vma_unmap+0x24/0x40 [nouveau]
kernel: [ 116.155620] nouveau_bo_move_ntfy+0x9e/0xe0 [nouveau]
kernel: [ 116.155623] ttm_bo_handle_move_mem+0x251/0x5c0 [ttm]
kernel: [ 116.155625] ? ttm_bo_mem_space+0x39d/0x470 [ttm]
kernel: [ 116.155627] ttm_bo_evict+0x13d/0x340 [ttm]
kernel: [ 116.155629] ttm_mem_evict_first+0x159/0x1b0 [ttm]
kernel: [ 116.155631] ttm_bo_force_list_clean+0x6c/0x120 [ttm]
kernel: [ 116.155633] ttm_bo_evict_mm+0x26/0x50 [ttm]
kernel: [ 116.155647] nouveau_do_suspend+0x81/0x2c0 [nouveau]
kernel: [ 116.155661] nouveau_pmops_suspend+0x39/0x80 [nouveau]
kernel: [ 116.155663] pci_pm_suspend+0x8c/0x150
kernel: [ 116.155665] dpm_run_callback+0x5a/0x150
kernel: [ 116.155666] ? pci_pm_resume+0xb0/0xb0
kernel: [ 116.155667] __device_suspend+0x126/0x450
kernel: [ 116.155668] async_suspend+0x1f/0xa0
kernel: [ 116.155669] async_run_entry_fn+0x3c/0x150
kernel: [ 116.155670] process_one_work+0x1de/0x410
kernel: [ 116.155671] worker_thread+0x32/0x410
kernel: [ 116.155673] kthread+0x121/0x140
kernel: [ 116.155674] ? process_one_work+0x410/0x410
kernel: [ 116.155675] ? kthread_create_worker_on_cpu+0x70/0x70
kernel: [ 116.155677] ret_from_fork+0x35/0x40
kernel: [ 116.155677] Code: 41 5e 41 5f 5d c3 49 8b 7c 24 10 48 8b 5f 50 48 85 db 74 47 e8 86 39 a2 f7 48 89 da 48 89 c6 48 c7 c7 28 47 d1 c0 e8 a4 bb 46 f7 <0f> 0b eb bf 49 8b 7c 24 10 48 8b 5f 50 48 85 db 74 24 e8 5d 39
kernel: [ 116.155693] ---[ end trace 3ca36c17fb64f8b9 ]---
kernel: [ 118.156703] ------------[ cut here ]------------
kernel: [ 118.156703] nouveau 0000:01:00.0: timeout
kernel: [ 118.156735] WARNING: CPU: 3 PID: 611 at /build/linux-5s7Xkn/linux-4.15.0/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c:207 gf100_vmm_flush_+0x15c/0x1a0 [nouveau]
kernel: [ 118.156736] Modules linked in: rfcomm ccm thunderbolt msr cmac bnep arc4 uvcvideo btusb videobuf2_vmalloc videobuf2_memops btrtl btbcm videobuf2_v4l2 btintel videobuf2_core bluetooth videodev media ecdh_generic nouveau ttm nls_iso8859_1 snd_hda_codec_hdmi hid_multitouch snd_hda_codec_realtek snd_hda_codec_generic dell_smbios_wmi dell_wmi wmi_bmof dell_wmi_descriptor dell_laptop mxm_wmi intel_wmi_thunderbolt dell_smbios_smm dell_smbios dcdbas dell_smm_hwmon snd_hda_intel snd_hda_codec intel_rapl ath10k_pci snd_hda_core x86_pkg_temp_thermal intel_powerclamp snd_hwdep ath10k_core snd_pcm coretemp kvm_intel snd_seq_midi ath snd_seq_midi_event kvm mac80211 snd_rawmidi snd_seq irqbypass intel_cstate snd_seq_device intel_rapl_perf snd_timer rtsx_pci_ms cfg80211 memstick idma64 virt_dma snd joydev input_leds
kernel: [ 118.156751] mei_me serio_raw soundcore intel_lpss_pci processor_thermal_device mei shpchp intel_pch_thermal intel_lpss intel_soc_dts_iosf int3403_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad intel_hid wmi mac_hid tpm_crb sparse_keymap sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 algif_skcipher af_alg dm_crypt usbhid rtsx_pci_sdmmc i915 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd i2c_algo_bit glue_helper cryptd drm_kms_helper syscopyarea sysfillrect psmouse sysimgblt fb_sys_fops nvme drm nvme_core ahci rtsx_pci libahci i2c_hid hid video
kernel: [ 118.156765] CPU: 3 PID: 611 Comm: kworker/u16:6 Tainted: G W 4.15.0-20-generic #21-Ubuntu
kernel: [ 118.156766] Hardware name: Dell Inc. XPS 15 9560/05FFDN, BIOS 1.7.1 01/25/2018
kernel: [ 118.156767] Workqueue: events_unbound async_run_entry_fn
kernel: [ 118.156782] RIP: 0010:gf100_vmm_flush_+0x15c/0x1a0 [nouveau]
kernel: [ 118.156782] RSP: 0018:ffffb7cfc23d3540 EFLAGS: 00010286
kernel: [ 118.156783] RAX: 0000000000000000 RBX: ffff9ba8eb20ea00 RCX: ffffffffb94628a8
kernel: [ 118.156784] RDX: ffffffffb94628a8 RSI: 0000000000000086 RDI: 0000000000000202
kernel: [ 118.156784] RBP: ffffb7cfc23d3578 R08: 0000000000000000 R09: 000000000000001d
kernel: [ 118.156785] R10: ffffffffc0c136d0 R11: 000000000000065a R12: ffff9ba8e8809800
kernel: [ 118.156785] R13: ffff9ba8eb7cb3c0 R14: 0000001b0b7aeb40 R15: ffff9ba8e524e400
kernel: [ 118.156786] FS: 0000000000000000(0000) GS:ffff9ba8fe4c0000(0000) knlGS:0000000000000000
kernel: [ 118.156786] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: [ 118.156787] CR2: 0000556f80622ec6 CR3: 00000001e4a0a001 CR4: 00000000003606e0
kernel: [ 118.156787] Call Trace:
kernel: [ 118.156802] gp100_vmm_flush+0x17/0x20 [nouveau]
kernel: [ 118.156816] nvkm_vmm_iter.constprop.13+0x2e5/0x880 [nouveau]
kernel: [ 118.156818] ? down_trylock+0x2e/0x40
kernel: [ 118.156831] ? gp100_vmm_pgt_sgl+0x180/0x180 [nouveau]
kernel: [ 118.156844] ? nvkm_vmm_map_choose+0xb0/0xb0 [nouveau]
kernel: [ 118.156845] ? vprintk_emit+0x326/0x3a0
kernel: [ 118.156846] ? vprintk_default+0x29/0x50
kernel: [ 118.156859] nvkm_vmm_map+0x21e/0x400 [nouveau]
kernel: [ 118.156871] ? gp100_vmm_pgt_sgl+0x180/0x180 [nouveau]
kernel: [ 118.156872] ? __switch_to_asm+0x34/0x70
kernel: [ 118.156884] nvkm_vram_map+0x57/0x80 [nouveau]
kernel: [ 118.156897] nvkm_uvmm_mthd+0x792/0x8d0 [nouveau]
kernel: [ 118.156906] nvkm_object_mthd+0x1a/0x30 [nouveau]
kernel: [ 118.156914] nvkm_ioctl_mthd+0x5d/0xb0 [nouveau]
kernel: [ 118.156922] nvkm_ioctl+0x11d/0x280 [nouveau]
kernel: [ 118.156938] nvkm_client_ioctl+0x12/0x20 [nouveau]
kernel: [ 118.156946] nvif_object_ioctl+0x47/0x50 [nouveau]
kernel: [ 118.156953] nvif_object_mthd+0x129/0x150 [nouveau]
kernel: [ 118.156969] ? nv50_grctx_generate+0xbd0/0x16e0 [nouveau]
kernel: [ 118.156971] ? _cond_resched+0x19/0x40
kernel: [ 118.156972] ? __kmalloc+0x18e/0x220
kernel: [ 118.156980] nvif_vmm_map+0x88/0xb0 [nouveau]
kernel: [ 118.156996] nouveau_mem_map+0x88/0xf0 [nouveau]
kernel: [ 118.157011] nouveau_bo_move_m2mf.constprop.24+0x1a3/0x1d0 [nouveau]
kernel: [ 118.157025] nouveau_bo_move+0xab/0x440 [nouveau]
kernel: [ 118.157033] ? nvif_vmm_unmap+0x3b/0x60 [nouveau]
kernel: [ 118.157047] ? nouveau_vma_unmap+0x24/0x40 [nouveau]
kernel: [ 118.157050] ttm_bo_handle_move_mem+0x29f/0x5c0 [ttm]
kernel: [ 118.157052] ? ttm_bo_mem_space+0x39d/0x470 [ttm]
kernel: [ 118.157054] ttm_bo_evict+0x13d/0x340 [ttm]
kernel: [ 118.157056] ttm_mem_evict_first+0x159/0x1b0 [ttm]
kernel: [ 118.157058] ttm_bo_force_list_clean+0x6c/0x120 [ttm]
kernel: [ 118.157059] ttm_bo_evict_mm+0x26/0x50 [ttm]
kernel: [ 118.157073] nouveau_do_suspend+0x81/0x2c0 [nouveau]
kernel: [ 118.157087] nouveau_pmops_suspend+0x39/0x80 [nouveau]
kernel: [ 118.157088] pci_pm_suspend+0x8c/0x150
kernel: [ 118.157089] dpm_run_callback+0x5a/0x150
kernel: [ 118.157090] ? pci_pm_resume+0xb0/0xb0
kernel: [ 118.157091] __device_suspend+0x126/0x450
kernel: [ 118.157092] async_suspend+0x1f/0xa0
kernel: [ 118.157093] async_run_entry_fn+0x3c/0x150
kernel: [ 118.157094] process_one_work+0x1de/0x410
kernel: [ 118.157095] worker_thread+0x32/0x410
kernel: [ 118.157096] kthread+0x121/0x140
kernel: [ 118.157097] ? process_one_work+0x410/0x410
kernel: [ 118.157098] ? kthread_create_worker_on_cpu+0x70/0x70
kernel: [ 118.157099] ret_from_fork+0x35/0x40
kernel: [ 118.157100] Code: 41 5e 41 5f 5d c3 49 8b 7c 24 10 48 8b 5f 50 48 85 db 74 47 e8 86 39 a2 f7 48 89 da 48 89 c6 48 c7 c7 28 47 d1 c0 e8 a4 bb 46 f7 <0f> 0b eb bf 49 8b 7c 24 10 48 8b 5f 50 48 85 db 74 24 e8 5d 39
kernel: [ 118.157116] ---[ end trace 3ca36c17fb64f8ba ]---
kernel: [ 120.157961] ------------[ cut here ]------------
kernel: [ 120.157962] nouveau 0000:01:00.0: timeout
.
. the same kind of crap repeated multiple times
.
kernel: [ 140.182517] nouveau 0000:01:00.0: fifo: channel 0 [DRM] kick timeout
kernel: [ 140.182520] nouveau 0000:01:00.0: fifo: channel 0: killed
kernel: [ 140.182521] nouveau 0000:01:00.0: fifo: runlist 0: scheduled for recovery
kernel: [ 140.182525] nouveau 0000:01:00.0: fifo: engine 7: scheduled for recovery
kernel: [ 140.182527] nouveau: DRM:00000000:0000c06f: detach ce0 failed, -110
kernel: [ 140.182528] nouveau: DRM:0004c1b5:0000c1b5: suspend failed with -110
kernel: [ 140.182531] nouveau 0000:01:00.0: DRM: channel 0 killed!
kernel: [ 140.182618] pci_pm_suspend(): nouveau_pmops_suspend+0x0/0x80 [nouveau] returns -110
kernel: [ 140.182620] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -110
kernel: [ 140.182622] PM: Device 0000:01:00.0 failed to suspend async: error -110
kernel: [ 140.182737] PM: Some devices failed to suspend, or early wake event detected
kernel: [ 140.184000] ACPI: button: The lid device is not compliant to SW_LID.
kernel: [ 140.558982] ata2: SATA link down (SStatus 4 SControl 300)
kernel: [ 140.683376] acpi LNXPOWER:16: Turning OFF
kernel: [ 140.683519] acpi LNXPOWER:15: Turning OFF
kernel: [ 140.683655] acpi LNXPOWER:14: Turning OFF
kernel: [ 140.683790] acpi LNXPOWER:13: Turning OFF
kernel: [ 140.683924] acpi LNXPOWER:12: Turning OFF
kernel: [ 140.684058] acpi LNXPOWER:11: Turning OFF
kernel: [ 140.684190] acpi LNXPOWER:10: Turning OFF
kernel: [ 140.684324] acpi LNXPOWER:0f: Turning OFF
kernel: [ 140.684459] acpi LNXPOWER:0e: Turning OFF
kernel: [ 140.684592] acpi LNXPOWER:0d: Turning OFF
kernel: [ 140.684726] acpi LNXPOWER:0c: Turning OFF
kernel: [ 140.684860] acpi LNXPOWER:0b: Turning OFF
kernel: [ 140.684995] acpi LNXPOWER:0a: Turning OFF
kernel: [ 140.685128] acpi LNXPOWER:09: Turning OFF
kernel: [ 140.685264] acpi LNXPOWER:08: Turning OFF
kernel: [ 140.685398] acpi LNXPOWER:07: Turning OFF
kernel: [ 140.685532] acpi LNXPOWER:06: Turning OFF
kernel: [ 140.685666] acpi LNXPOWER:05: Turning OFF
kernel: [ 140.685800] acpi LNXPOWER:04: Turning OFF
kernel: [ 140.685933] acpi LNXPOWER:03: Turning OFF
kernel: [ 140.686032] OOM killer enabled.
kernel: [ 140.686033] Restarting tasks ...
kernel: [ 140.687401] [drm] RC6 on
kernel: [ 140.688963] done.
rtkit-daemon[1207]: The canary thread is apparently starving. Taking action.
rtkit-daemon[1207]: Demoting known real-time threads.
rtkit-daemon[1207]: Successfully demoted thread 1814 of process 1806 (n/a).
rtkit-daemon[1207]: Successfully demoted thread 1813 of process 1806 (n/a).
rtkit-daemon[1207]: Successfully demoted thread 1806 of process 1806 (n/a).
rtkit-daemon[1207]: Demoted 3 threads.
kernel: [ 140.720271] PM: suspend exit
kernel: [ 140.720299] PM: suspend entry (s2idle)
kernel: [ 140.720300] PM: Syncing filesystems ... done.
kernel: [ 140.734445] Freezing user space processes ... (elapsed 0.001 seconds) done.
kernel: [ 140.736143] OOM killer disabled.
kernel: [ 140.736144] Freezing remaining freezable tasks ... (elapsed 0.128 seconds) done.
kernel: [ 140.865009] Suspending console(s) (use no_console_suspend to debug)
kernel: [ 149.147400] psmouse serio1: Failed to disable mouse on isa0060/serio1
kernel: [ 151.838519] ------------[ cut here ]------------
kernel: [ 151.838520] nouveau 0000:01:00.0: timeout
kernel: [ 151.838550] WARNING: CPU: 5 PID: 2498 at /build/linux-5s7Xkn/linux-4.15.0/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c:207 gf100_vmm_flush_+0x15c/0x1a0 [nouveau]
kernel: [ 151.838551] Modules linked in: rfcomm ccm thunderbolt msr cmac bnep arc4 uvcvideo btusb videobuf2_vmalloc videobuf2_memops btrtl btbcm videobuf2_v4l2 btintel videobuf2_core bluetooth videodev media ecdh_generic nouveau ttm nls_iso8859_1 snd_hda_codec_hdmi hid_multitouch snd_hda_codec_realtek snd_hda_codec_generic dell_smbios_wmi dell_wmi wmi_bmof dell_wmi_descriptor dell_laptop mxm_wmi intel_wmi_thunderbolt dell_smbios_smm dell_smbios dcdbas dell_smm_hwmon snd_hda_intel snd_hda_codec intel_rapl ath10k_pci snd_hda_core x86_pkg_temp_thermal intel_powerclamp snd_hwdep ath10k_core snd_pcm coretemp kvm_intel snd_seq_midi ath snd_seq_midi_event kvm mac80211 snd_rawmidi snd_seq irqbypass intel_cstate snd_seq_device intel_rapl_perf snd_timer rtsx_pci_ms cfg80211 memstick idma64 virt_dma snd joydev input_leds
kernel: [ 151.838572] mei_me serio_raw soundcore intel_lpss_pci processor_thermal_device mei shpchp intel_pch_thermal intel_lpss intel_soc_dts_iosf int3403_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad intel_hid wmi mac_hid tpm_crb sparse_keymap sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 algif_skcipher af_alg dm_crypt usbhid rtsx_pci_sdmmc i915 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd i2c_algo_bit glue_helper cryptd drm_kms_helper syscopyarea sysfillrect psmouse sysimgblt fb_sys_fops nvme drm nvme_core ahci rtsx_pci libahci i2c_hid hid video
kernel: [ 151.838591] CPU: 5 PID: 2498 Comm: kworker/u16:40 Tainted: G W 4.15.0-20-generic #21-Ubuntu
kernel: [ 151.838591] Hardware name: Dell Inc. XPS 15 9560/05FFDN, BIOS 1.7.1 01/25/2018
kernel: [ 151.838594] Workqueue: events_unbound async_run_entry_fn
kernel: [ 151.838609] RIP: 0010:gf100_vmm_flush_+0x15c/0x1a0 [nouveau]
kernel: [ 151.838610] RSP: 0000:ffffb7cfc39b7830 EFLAGS: 00010282
kernel: [ 151.838611] RAX: 0000000000000000 RBX: ffff9ba8eb20ea00 RCX: ffffffffb94628a8
kernel: [ 151.838612] RDX: ffffffffb94628a8 RSI: 0000000000000082 RDI: 0000000000000202
kernel: [ 151.838612] RBP: ffffb7cfc39b7868 R08: 0000000000000000 R09: 000000000000001d
kernel: [ 151.838613] R10: ffffffffc0c136d0 R11: 00000000000009a5 R12: ffff9ba8e8809800
kernel: [ 151.838613] R13: ffff9ba8eb7cb3c0 R14: 00000022e315a340 R15: ffff9ba8e524e000
kernel: [ 151.838614] FS: 0000000000000000(0000) GS:ffff9ba8fe540000(0000) knlGS:0000000000000000
kernel: [ 151.838614] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: [ 151.838615] CR2: 00007f374fbba508 CR3: 00000001e4a0a005 CR4: 00000000003606e0
kernel: [ 151.838615] Call Trace:
kernel: [ 151.838632] gp100_vmm_flush+0x17/0x20 [nouveau]
kernel: [ 151.838645] nvkm_vmm_iter.constprop.13+0x2e5/0x880 [nouveau]
kernel: [ 151.838659] ? gp100_vmm_pgt_sgl+0x180/0x180 [nouveau]
kernel: [ 151.838671] ? nvkm_vmm_map_choose+0xb0/0xb0 [nouveau]
kernel: [ 151.838684] nvkm_vmm_map+0x21e/0x400 [nouveau]
kernel: [ 151.838696] ? gp100_vmm_pgt_sgl+0x180/0x180 [nouveau]
kernel: [ 151.838708] nvkm_vram_map+0x57/0x80 [nouveau]
kernel: [ 151.838721] nv50_instobj_map+0x19/0x20 [nouveau]
kernel: [ 151.838729] nvkm_gpuobj_heap_map+0x19/0x20 [nouveau]
kernel: [ 151.838744] gm200_secboot_run_blob+0xa4/0x1c0 [nouveau]
kernel: [ 151.838758] gp102_secboot_run_blob+0x1d9/0x2e0 [nouveau]
kernel: [ 151.838759] ? flush_work+0x5b/0x1e0
kernel: [ 151.838761] ? _cond_resched+0x19/0x40
kernel: [ 151.838775] acr_r352_shutdown+0x47/0x150 [nouveau]
kernel: [ 151.838787] acr_r352_fini+0xe/0x10 [nouveau]
kernel: [ 151.838799] gm200_secboot_fini+0x29/0x30 [nouveau]
kernel: [ 151.838811] nvkm_secboot_fini+0x23/0x30 [nouveau]
kernel: [ 151.838820] nvkm_subdev_fini+0x5f/0x150 [nouveau]
kernel: [ 151.838834] nvkm_device_fini+0x87/0x1c0 [nouveau]
kernel: [ 151.838848] nvkm_udevice_fini+0x53/0x70 [nouveau]
kernel: [ 151.838857] nvkm_object_fini+0xbd/0x220 [nouveau]
kernel: [ 151.838865] nvkm_object_fini+0x78/0x220 [nouveau]
kernel: [ 151.838882] nvkm_client_suspend+0x13/0x20 [nouveau]
kernel: [ 151.838890] nvif_client_suspend+0x1d/0x20 [nouveau]
kernel: [ 151.838906] nouveau_do_suspend+0x1a0/0x2c0 [nouveau]
kernel: [ 151.838920] nouveau_pmops_suspend+0x39/0x80 [nouveau]
kernel: [ 151.838922] pci_pm_suspend+0x8c/0x150
kernel: [ 151.838924] dpm_run_callback+0x5a/0x150
kernel: [ 151.838925] ? pci_pm_resume+0xb0/0xb0
kernel: [ 151.838926] __device_suspend+0x126/0x450
kernel: [ 151.838927] async_suspend+0x1f/0xa0
kernel: [ 151.838928] async_run_entry_fn+0x3c/0x150
kernel: [ 151.838929] process_one_work+0x1de/0x410
kernel: [ 151.838930] worker_thread+0x32/0x410
kernel: [ 151.838931] kthread+0x121/0x140
kernel: [ 151.838932] ? process_one_work+0x410/0x410
kernel: [ 151.838933] ? kthread_create_worker_on_cpu+0x70/0x70
kernel: [ 151.838935] ret_from_fork+0x35/0x40
kernel: [ 151.838935] Code: 41 5e 41 5f 5d c3 49 8b 7c 24 10 48 8b 5f 50 48 85 db 74 47 e8 86 39 a2 f7 48 89 da 48 89 c6 48 c7 c7 28 47 d1 c0 e8 a4 bb 46 f7 <0f> 0b eb bf 49 8b 7c 24 10 48 8b 5f 50 48 85 db 74 24 e8 5d 39
kernel: [ 151.838951] ---[ end trace 3ca36c17fb64f8c6 ]---
.
. a few more times the same timeout what-not blahblah
.
kernel: [ 153.861931] nouveau 0000:01:00.0: secboot: suspend failed, -110
kernel: [ 153.861957] nouveau: DRM-master:00000000:00000080: suspend failed with -110
kernel: [ 153.862060] pci_pm_suspend(): nouveau_pmops_suspend+0x0/0x80 [nouveau] returns -110
kernel: [ 153.862062] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -110
kernel: [ 153.862064] PM: Device 0000:01:00.0 failed to suspend async: error -110
kernel: [ 154.159403] PM: Some devices failed to suspend, or early wake event detected
kernel: [ 154.332079] OOM killer enabled.
kernel: [ 154.332080] Restarting tasks ... done.
/usr/lib/gdm3/gdm-x-session[1640]: (EE) client bug: timer event7 keyboard: offset negative (-12669ms)
/usr/lib/gdm3/gdm-x-session[1640]: (EE) client bug: timer event12 keyboard: offset negative (-12669ms)
rtkit-daemon[1207]: The canary thread is apparently starving. Taking action.
systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
rtkit-daemon[1207]: Demoting known real-time threads.
systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
rtkit-daemon[1207]: Successfully demoted thread 1814 of process 1806 (n/a).
systemd[1]: Failed to start Suspend.
kernel: [ 154.384596] PM: suspend exit
rtkit-daemon[1207]: Successfully demoted thread 1813 of process 1806 (n/a).
systemd[1]: Dependency failed for Suspend.
rtkit-daemon[1207]: Successfully demoted thread 1806 of process 1806 (n/a).
systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
rtkit-daemon[1207]: Demoted 3 threads.
systemd[1]: sleep.target: Unit not needed anymore. Stopping.
systemd[1]: Stopped target Sleep.
systemd[1]: tlp-sleep.service: Unit not needed anymore. Stopping.
systemd[1]: Stopping TLP suspend/resume...
同样,每次启动时/var/log/syslog
都会出现类似的投诉nouveau 0000:01:00.0: timeout
。在极少数情况下,暂停成功,日志中缺少有关 nouveau 的所有废话。
有没有关于如何修复该问题(很好)或禁用 nouveau(好)的提示?为什么/etc/modprobe.d/
黑名单文件不能阻止整个驱动程序的加载?我该如何手动卸载它?(我试过了,但modprobe -r
没有成功。)
答案1
我通过安装 bumblebee 解决了这个问题,它接管了管理要加载哪些驱动程序的任务。它现在为我的独立 GPU 加载专有的 nvidia 驱动程序,因此暂停功能可以正常工作,而且我的电池和耳膜仍然没有被耗尽,因为除非另有要求,否则 bumblebee 默认使用 Intel GPU。
这不是最好的解决方案,更像是一种变通方法,所以请随意发布一些更好的解决方案。不过我已经得到了我想要的,懒得进一步研究了。
答案2
因为这个问题是搜索pci_pm_suspend(): nouveau_pmops_suspend+0x0/0x80 [nouveau] returns -16
(++ dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -16
)的第一个结果PM: Device 0000:01:00.0 failed to suspend async: error -16
,所以我想指出另一个:Kubuntu 18.04 挂起后立即唤醒(无法挂起)
注意我仅在第一次休眠后添加此错误,然后我需要重新启动才能使休眠再次工作。
添加nouveau.modeset=0
后GRUB_CMDLINE_LINUX_DEFAULT
休眠功能始终有效。
答案3
睡眠存在多种问题,取决于内核版本、驱动程序版本(也包括 nvidia 版本)和其他软件。
我建议检查:/lib/systemd/system-sleep/ 中是否存在可能会干扰睡眠的可疑软件。
就我而言,它要么是 hdparm,要么是 ltp。另外,我相信 4.70 之前的 Nvidia 驱动程序会留下中断睡眠的链接。
我从来没有在使用 Nvidia 驱动程序时遇到过睡眠问题,我目前在内核 5.15.0.22 上使用最新的 Ubuntu 22.04、nouveau 驱动程序、Wayland 和 5.5 displaylink 驱动程序,睡眠似乎现在工作正常 - 很确定是 hdparm 搞乱了我的(我将其删除了,因为我只有 SSD 磁盘)。
我有一台戴尔 Inspiron 5482,所以我在 /etc/default/grub 中有这个
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"
确保使用深度睡眠而不是 S3。