LINUX.ORG.RU

IOMMU ломает suspend

 , ,


1

2

Привет, ЛОР.

Потыкав немного различные статьи завёл себе виртуалку. И вот главная проблема, которая появилась на хосте указана в заголовке. Если загружаться без IOMMU, то система спокойно ходит в суспенд, после однократного нажатия на кнопку питания. С IOMMU засыпает на пару секунд и снова просыпается.

Собственно кусок dmesg (от нажатия кнопки и до возврата к рабочему столу):

[ 1826.316538] PM: Syncing filesystems ... done.
[ 1826.324608] PM: Preparing system for sleep (mem)
[ 1826.326727] Freezing user space processes ... (elapsed 0.015 seconds) done.
[ 1826.342106] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1826.343279] PM: Suspending system (mem)
[ 1826.343304] Suspending console(s) (use no_console_suspend to debug)
[ 1826.662438] wlp3s0: deauthenticating from 38:d5:47:d8:a3:f0 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1826.666038] sd 5:0:0:0: [sdb] Synchronizing SCSI cache
[ 1826.666159] sd 5:0:0:0: [sdb] Stopping disk
[ 1826.666495] serial 00:04: disabled
[ 1826.666953] parport_pc 00:01: disabled
[ 1826.667478] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1826.675479] sd 0:0:0:0: [sda] Stopping disk
[ 1826.683561] DMAR: DRHD: handling fault status reg 2
[ 1826.683564] DMAR: [DMA Read] Request device [02:00.0] fault addr 0 [fault reason 06] PTE Read access is not set
[ 1826.690047] queueing ieee80211 work while going to suspend
[ 1826.705394] xhci_hcd 0000:02:00.0: WARN: xHC save state timeout
[ 1826.705419] suspend_common(): xhci_pci_suspend+0x0/0xd0 [xhci_pci] returns -110
[ 1826.705423] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 [usbcore] returns -110
[ 1826.705427] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -110
[ 1826.705429] PM: Device 0000:02:00.0 failed to suspend async: error -110
[ 1827.196379] PM: Some devices failed to suspend, or early wake event detected
[ 1827.198445] sd 0:0:0:0: [sda] Starting disk
[ 1827.198464] sd 5:0:0:0: [sdb] Starting disk
[ 1827.201357] parport_pc 00:01: activated
[ 1827.202591] [drm] GuC firmware load skipped
[ 1827.202932] serial 00:04: activated
[ 1827.202935] rtc_cmos 00:07: System wakeup disabled by ACPI
[ 1827.372102] PM: resume of devices complete after 175.717 msecs
[ 1827.372732] PM: Finishing wakeup.
[ 1827.372734] Restarting tasks ... done.
[ 1827.380824] video LNXVIDEO:00: Restoring backlight state
[ 1827.380847] PM: Syncing filesystems ... 
[ 1827.382544] [drm] RC6 on
[ 1827.549445] ata3: SATA link down (SStatus 4 SControl 300)
[ 1827.549472] ata4: SATA link down (SStatus 4 SControl 300)
[ 1827.549493] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1827.549516] ata2: SATA link down (SStatus 4 SControl 300)
[ 1827.549535] ata5: SATA link down (SStatus 4 SControl 300)
[ 1827.549807] ata1.00: configured for UDMA/133
[ 1828.299278] wlp3s0: authenticate with 14:dd:a9:f2:05:48
[ 1828.323702] wlp3s0: send auth to 14:dd:a9:f2:05:48 (try 1/3)
[ 1828.365632] wlp3s0: send auth to 14:dd:a9:f2:05:48 (try 2/3)
[ 1828.515356] wlp3s0: send auth to 14:dd:a9:f2:05:48 (try 3/3)
[ 1828.662048] wlp3s0: authentication with 14:dd:a9:f2:05:48 timed out
[ 1828.754100] done.
[ 1828.754105] PM: Preparing system for sleep (freeze)
[ 1828.754422] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 1828.756956] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1828.758325] PM: Suspending system (freeze)
[ 1828.758327] Suspending console(s) (use no_console_suspend to debug)
[ 1829.079202] sd 5:0:0:0: [sdb] Synchronizing SCSI cache
[ 1829.079273] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1829.079314] sd 5:0:0:0: [sdb] Stopping disk
[ 1829.079800] queueing ieee80211 work while going to suspend
[ 1829.080267] serial 00:04: disabled
[ 1829.080690] parport_pc 00:01: disabled
[ 1829.091336] sd 0:0:0:0: [sda] Stopping disk
[ 1829.103829] xhci_hcd 0000:02:00.0: WARN: xHC save state timeout
[ 1829.103884] suspend_common(): xhci_pci_suspend+0x0/0xd0 [xhci_pci] returns -110
[ 1829.103887] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 [usbcore] returns -110
[ 1829.103890] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -110
[ 1829.103891] PM: Device 0000:02:00.0 failed to suspend async: error -110
[ 1829.624925] PM: Some devices failed to suspend, or early wake event detected
[ 1829.628086] parport_pc 00:01: activated
[ 1829.629243] sd 0:0:0:0: [sda] Starting disk
[ 1829.629496] sd 5:0:0:0: [sdb] Starting disk
[ 1829.629866] serial 00:04: activated
[ 1829.629868] rtc_cmos 00:07: System wakeup disabled by ACPI
[ 1829.630975] [drm] GuC firmware load skipped
[ 1829.798707] PM: resume of devices complete after 173.777 msecs
[ 1829.799278] PM: Finishing wakeup.
[ 1829.799279] Restarting tasks ... 
[ 1829.800410] [drm] RC6 on
[ 1829.805486] done.
[ 1829.805615] video LNXVIDEO:00: Restoring backlight state
[ 1829.969594] ata3: SATA link down (SStatus 4 SControl 300)
[ 1829.969622] ata5: SATA link down (SStatus 4 SControl 300)
[ 1829.969641] ata2: SATA link down (SStatus 4 SControl 300)
[ 1829.985815] ata4: SATA link down (SStatus 4 SControl 300)
[ 1830.652641] wlp3s0: authenticate with 38:d5:47:d8:a3:f0
[ 1830.676401] wlp3s0: send auth to 38:d5:47:d8:a3:f0 (try 1/3)
[ 1830.678174] wlp3s0: authenticated
[ 1830.678725] wlp3s0: associate with 38:d5:47:d8:a3:f0 (try 1/3)
[ 1830.685548] wlp3s0: RX AssocResp from 38:d5:47:d8:a3:f0 (capab=0x1431 status=0 aid=3)
[ 1830.685665] wlp3s0: associated

lspci говорит:

02:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller (prog-if 30 [XHCI])
	Subsystem: Micro-Star International Co., Ltd. [MSI] Device 7971
	Flags: bus master, fast devsel, latency 0, IRQ 18
	Memory at df300000 (64-bit, non-prefetchable) [size=32K]
	Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
	Capabilities: [68] MSI-X: Enable+ Count=8 Masked-
	Capabilities: [78] Power Management version 3
	Capabilities: [80] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [200] Advanced Error Reporting
	Capabilities: [280] #19
	Capabilities: [300] Latency Tolerance Reporting
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

В /proc/acpi/wakeup:

PXSX	  S4	*enabled   pci:0000:02:00.0

В этих наших интернетах находил истории узбека, дескать надо в /proc/acpi/wakeup писать. Не помогает. Всегда enabled.
Что надо модули xhci-hcd и xhci-pci перед суспендом выгружать, а после загружать обратно. Фигня всё. Как просыпался, так и просыпается.

Так как это победить?

UPD. Решено. Но это не точно.
Нагуглил, что для решения нужно заменить в cmdline intel_iommu=on на intel_iommu=pt. Но у меня это не сработало. IOMMU так вообще не заводится.
Сделал несколько иначе. Просто добавил iommu=pt. Вроде работает.

intel_iommu=on intel_iommu=igfx_off iommu=pt

★★★★

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.