ubuntu 22.04LTS guest freeze after host resume from suspend

Discussions related to using VirtualBox on Linux hosts.
Post Reply
miraculin
Posts: 2
Joined: 23. Jan 2024, 10:32

ubuntu 22.04LTS guest freeze after host resume from suspend

Post by miraculin »

Hi,
I'm new to virtualbox, everything works well except ubuntu guest always freeze after host being suspended.
The setup
I'm using update archlinux host, running virtualbox 7.0.14.
  • Base mem 8GB
    video mem 128MB
    enable nested paging using KVM
    enable 3D acceleration
What's the problem:
When resume from host suspend, the GUI interface of ubuntu went wrong in 2 ways. The first situation, the ubuntu is responding(I can ssh to the guest and work normally, and when mouse hovering over the desktop icons, the highlighting of the icon is displayed), the second situation where everything just stop responding include GUI, ssh. GUI just stays the same as before suspend. When trying to stop, guest stucks at "stopping" state.
How to reproduce:
Start the ubuntu guest, then close laptop lid make host suspend. Open the lid make host resumue.
I've attached the pic represent the first situation and part of the log below. If I'm missing something pls tell me.
Thanks a lot!
The log

Code: Select all

Changing the VM state from 'POWERING_ON' to 'RUNNING'
00:00:00.960586 Console: Machine state changed to 'Running'
00:00:00.961359 VMMDev: Guest Log: BIOS: VirtualBox 7.0.14
00:00:00.961400 PCI: Setting up resources and interrupts
00:00:00.961913 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:00.963686 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 2534x704
00:00:00.969201 GUI: HID LEDs sync is not supported on this platform
00:00:00.974352 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:00.976569 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
00:00:00.976713 VMMDev: Guest Log: CPUID EDX: 0x178bfbff
00:00:00.976905 AHCI#0: Reset the HBA
00:00:00.976907 VD#0: Cancelling all active requests
00:00:00.976931 AHCI#0: Port 0 reset
00:00:00.976947 VD#0: Cancelling all active requests
00:00:00.977154 VMMDev: Guest Log: BIOS: AHCI 0-P#0: PCHS=16383/16/63 LCHS=1024/255/63 0x0000000004e79340 sectors
00:00:00.978776 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:01.003415 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
00:00:01.003432 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=00007633ff000000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
00:00:03.462207 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:03.462315 VMMDev: Guest Log: BIOS: Boot : bseqnr=1, bootseq=0012
00:00:03.463543 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:03.470861 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:00:03.627045 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=00007633ff000000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
00:00:04.283378 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:04.436546 GIM: KVM: VCPU  0: Enabled system-time struct. at 0x0000000155601000 - u32TscScale=0xa04cf405 i8TscShift=-1 uVersion=2 fFlags=0x1 uTsc=0x295940c13 uVirtNanoTS=0xcf21b30f TscKHz=3193998
00:00:04.436629 TM: Switching TSC mode from 'VirtTSCEmulated' to 'RealTSCOffset'
00:00:04.496289 GIM: KVM: Enabled wall-clock struct. at 0x0000000155600000 - u32Sec=1705998242 u32Nano=609367000 uVersion=2
00:00:04.505035 PIT: mode=2 count=0x12a5 (4773) - 249.98 Hz (ch=0)
00:00:04.505267 APIC0: Switched mode to x2APIC
00:00:04.638452 PIT: mode=0 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:04.639827 APIC1: Switched mode to x2APIC
00:00:04.639849 GIM: KVM: VCPU  1: Enabled system-time struct. at 0x0000000155601040 - u32TscScale=0xa04cf405 i8TscShift=-1 uVersion=2 fFlags=0x1 uTsc=0x2bc4df654 uVirtNanoTS=0xdb419e51 TscKHz=3193998
00:00:04.642108 APIC2: Switched mode to x2APIC
00:00:04.642127 GIM: KVM: VCPU  2: Enabled system-time struct. at 0x0000000155601080 - u32TscScale=0xa04cf405 i8TscShift=-1 uVersion=2 fFlags=0x1 uTsc=0x2bcbd0a74 uVirtNanoTS=0xdb64654d TscKHz=3193998
00:00:04.644322 APIC3: Switched mode to x2APIC
00:00:04.644340 GIM: KVM: VCPU  3: Enabled system-time struct. at 0x00000001556010c0 - u32TscScale=0xa04cf405 i8TscShift=-1 uVersion=2 fFlags=0x1 uTsc=0x2bd28d774 uVirtNanoTS=0xdb862591 TscKHz=3193998
00:00:06.074752 xHCI: Hardware reset
00:00:06.076451 xHCI: USB Operational
00:00:06.077427 AHCI#0: Reset the HBA
00:00:06.077432 VD#0: Cancelling all active requests
00:00:06.079394 AHCI#0: Port 0 reset
00:00:06.080445 VD#0: Cancelling all active requests
00:00:06.085032 xHCI: Root hub-attached device reset completed with VINF_SUCCESS
00:00:06.085043 xHCI: Root hub-attached device reset completed with VINF_SUCCESS
00:00:06.085077 xHCI: Root hub-attached device reset completed with VINF_SUCCESS
00:00:08.146272 VMMDev: Guest Log: vboxguest: host-version: 7.0.14r161095 0x8000000f
00:00:08.146301 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
00:00:08.146313 VMMDev: Guest Additions information report: Interface = 0x00010004 osType = 0x00053100 (Linux >= 2.6, 64-bit)
00:00:08.146364 VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
00:00:08.146385 VMMDev: vmmDevReqHandler_HeartbeatConfigure: No change (fHeartbeatActive=false)
00:00:08.146392 VMMDev: Heartbeat flatline timer set to trigger after 4 000 000 000 ns
00:00:08.146458 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:00:08.146464 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:08.146469 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:00:08.146471 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:08.146574 VMMDev: Guest Log: vbg_heartbeat_init: Setting up heartbeat to trigger every 2000 milliseconds
00:00:08.161909 GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners
00:00:08.161927 GUI: UIMachineViewNormal::adjustGuestScreenSize: Adjust guest-screen size if necessary
00:00:08.162040 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:00:08.162043 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:08.241993 Enabling different vbva mode
00:00:08.252751 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000763368201a00 w=1280 h=800 bpp=32 cbLine=0x1400 flags=0x1 origin=0,0
00:00:08.416078 *FLUSH*
00:00:08.415958 IEM: rdmsr(0x3a) -> #GP(0)
00:00:08.415969 IEM: rdmsr(0xd90) -> #GP(0)
00:00:08.415974 IEM: rdmsr(0x48) -> #GP(0)
00:00:08.415979 IEM: rdmsr(0x122) -> #GP(0)
00:00:08.415985 IEM: rdmsr(0x570) -> #GP(0)
00:00:08.415989 IEM: rdmsr(0x571) -> #GP(0)
00:00:08.415994 IEM: rdmsr(0x572) -> #GP(0)
00:00:08.415999 IEM: rdmsr(0x560) -> #GP(0)
00:00:08.416003 IEM: rdmsr(0x561) -> #GP(0)
00:00:08.416008 IEM: rdmsr(0x580) -> #GP(0)
00:00:08.416015 IEM: rdmsr(0x581) -> #GP(0)
00:00:08.416021 IEM: rdmsr(0x582) -> #GP(0)
00:00:08.416025 IEM: rdmsr(0x583) -> #GP(0)
00:00:08.416031 IEM: rdmsr(0x584) -> #GP(0)
00:00:08.416035 IEM: rdmsr(0x585) -> #GP(0)
00:00:08.416041 IEM: rdmsr(0x586) -> #GP(0)
00:00:08.416046 IEM: rdmsr(0x587) -> #GP(0)
00:00:08.416051 IEM: rdmsr(0xe1) -> #GP(0)
00:00:08.416055 IEM: rdmsr(0x1c4) -> #GP(0)
00:00:08.416061 IEM: rdmsr(0x1c5) -> #GP(0)
00:00:08.416101 *END*
00:00:08.416163 NAT: Link up
00:00:08.539807 AC97: Reset
00:00:08.539821 AC97: Mixer reset (EAID=0x809, EACS=0x9)
00:00:08.539823 AC97: Record select to left=mic, right=mic
00:00:08.539929 AC97: Reset
00:00:08.539930 AC97: Mixer reset (EAID=0x809, EACS=0x9)
00:00:08.539931 AC97: Record select to left=mic, right=mic
00:00:08.540881 AC97: Record select to left=mic, right=mic
00:00:09.049772 NAT: resolv.conf: nameserver 61.130.254.34
00:00:09.049794 NAT: resolv.conf: nameserver 114.114.114.114
00:00:09.049800 NAT: DNS#0: 61.130.254.34
00:00:09.049802 NAT: DNS#1: 114.114.114.114
00:00:09.049806 NAT: DHCP offered IP address 10.0.2.15
00:00:09.075955 NAT: IPv6 not supported
00:00:14.118795 VMMDev: Guest Log: 08:24:09.801815 main     VBoxService 6.1.34 r150636 (verbosity: 0) linux.amd64 (Mar 23 2022 00:46:49) release log
00:00:14.118969 VMMDev: Guest Log: 08:24:09.801808:24:09.802149 main     OS Product: Linux
00:00:14.119112 VMMDev: Guest Log: 08:24:09.802280 main     OS Release: 6.5.0-14-generic
00:00:14.119357 VMMDev: Guest Log: 08:24:09.802412 main     OS Version: #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2
00:00:14.119567 VMMDev: Guest Log: 08:24:09.802661 main     Executable: /opt/VBoxGuestAdditions-6.1.34/sbin/VBoxService
00:00:14.119662 VMMDev: Guest Log: 08:24:09.802661 main     Process ID: 1203
00:00:14.120613 VMMDev: Guest Log: 08:24:09.803746 main     6.1.34 r150636 started. Verbose level = 0
00:00:14.121336 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:00:14.121347 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:14.121625 VMMDev: Guest Log: 08:24:09.804695 main     vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
00:00:14.121696 Guest Control: GUEST_MSG_REPORT_FEATURES: 0x7, 0x8000000000000000
00:00:14.136675 GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners
00:00:14.136690 GUI: UIMachineViewNormal::adjustGuestScreenSize: Adjust guest-screen size if necessary
00:00:14.136780 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:00:14.136782 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:14.598507 ALSA: Using output device "default"
00:00:14.611219 ALSA: Using input device "default"
00:00:16.844325 VMMDev: Guest Log: Service: Shared Clipboard
00:00:16.852016 VMMDev: Guest Log: Service: Host Version Check
00:00:16.860961 VMMDev: Guest Log: Service: Seamless
00:00:16.864426 VMMDev: Guest Log: Service: Drag and Drop (DnD)
00:00:16.870922 VMMDev: Guest Log: Service: Display SVGA X11
00:00:16.874385 VMMDev: Guest Log: Starting DRM client.
00:00:16.883114 VMMDev: Guest Additions capability report: (0x0 -> 0x4) seamless: no, hostWindowMapping: no, graphics: yes
00:00:16.898389 GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners
00:00:16.898414 GUI: UIMachineViewNormal::adjustGuestScreenSize: Adjust guest-screen size if necessary
00:00:16.898538 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:00:16.898541 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:00:17.763592 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=1280 h=800 bpp=0 cbLine=0x0 flags=0x2 origin=0,0
00:00:17.765184 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000076339f800010 w=2534 h=704 bpp=32 cbLine=0x2798 flags=0x1 origin=0,0
00:00:17.766709 GUI: UIMachineLogic: Guest-screen count changed
00:00:18.166323 VMMDev: Guest Additions capability report: (0x4 -> 0x5) seamless: yes, hostWindowMapping: no, graphics: yes
00:00:18.168872 DnD: Feature is disabled, ignoring request from guest
00:00:18.170090 VMMDev: Guest Log: Proxy window=14680065, root window=246 ...
00:00:18.170900 VMMDev: Guest Log: Started
00:00:18.170965 VMMDev: Guest Log: 6.1.34r150636
00:00:18.173094 VMMDev: Guest Log: Worker loop running
00:00:18.181685 GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners
00:00:18.181728 GUI: UIMachineViewNormal::adjustGuestScreenSize: Adjust guest-screen size if necessary
00:00:18.181851 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:00:18.181855 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:19:46.055410 Pausing VM execution, reason 'HostSuspend'
00:19:46.055528 Changing the VM state from 'RUNNING' to 'SUSPENDING'
00:19:46.077805 AIOMgr: Endpoint for file '/home/miraculin/VirtualBox VMs/ubuntuROS/ubuntu_ROS.vdi' (flags 000c0781) created successfully
00:19:46.079399 PDMR3Suspend: 23 825 924 ns run time
00:19:46.079404 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'
00:19:46.079412 Console: Machine state changed to 'Paused'
00:19:49.383380 Resuming VM execution, reason 'HostResume'
00:19:49.383463 Changing the VM state from 'SUSPENDED' to 'RESUMING'
00:19:49.383733 AIOMgr: Endpoint for file '/home/miraculin/VirtualBox VMs/ubuntuROS/ubuntu_ROS.vdi' (flags 000c0723) created successfully
00:19:49.394105 NAT: Link down
00:19:49.394170 Changing the VM state from 'RESUMING' to 'RUNNING'
00:19:49.394190 Console: Machine state changed to 'Running'
00:19:54.394562 NAT: Link up
00:19:55.745247 NAT: DHCP offered IP address 10.0.2.15
00:19:57.856985 GUI: UIMultiScreenLayout::update: GUI/AutomountGuestScreens is disabled
00:19:57.869956 GUI: UIMachineViewFullscreen::adjustGuestScreenSize: Desired hint 2560x1600 for guest-screen #0 differs from the one in IDisplay, adjustment is required.
00:19:57.869981 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 2560x1600
00:19:57.869993 VMMDev: SetVideoModeHint: Got a video mode hint (2560x1600x32)@(0x0),(1;0) at 0
00:19:57.871622 QDBus error. No screen saver service found among registered DBus services.GUI: UIMediumEnumerator: Medium-enumeration finished!
00:20:06.120704 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 2534x704
00:20:06.138823 QDBus error. No screen saver service found among registered DBus services.GUI: UIMediumEnumerator: Medium-enumeration finished!
00:20:06.422446 GUI: UIMachineView::sltPerformGuestResize: Omitting to send size-hint 2534x704 to guest-screen 0 because frame-buffer is already of the same size.
00:21:03.646876 Console: Machine state changed to 'Stopping'
00:21:03.647234 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)
00:21:03.647531 Changing the VM state from 'RUNNING' to 'POWERING_OFF'
Attachments
2024-01-23_16-58.png
2024-01-23_16-58.png (2.24 KiB) Viewed 1041 times
miraculin
Posts: 2
Joined: 23. Jan 2024, 10:32

Re: ubuntu 22.04LTS guest freeze after host resume from suspend

Post by miraculin »

I solved this problem.
It turns out to be I'm installing the wrong version of guest additions.(Didn't read wiki well enough) So when I enable 3D acceleration, it won't resume from a suspension successfully.
To solve this, first uninstall the guest additions if previously installed, then get the guest additions iso from archlinux repo. Finnally mount in host to install.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: ubuntu 22.04LTS guest freeze after host resume from suspend

Post by scottgus1 »

Great! Glad you kept up the hunt and found a solution!
Post Reply