VirtualBox

Opened 12 months ago

Last modified 10 days ago

#21539 new defect

Ubuntu 22.04 Wayland/gnome-shell freezes on suspend/resume

Reported by: jakobdk Owned by:
Component: other Version: VirtualBox-7.0.4
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

I have a problem with a Ubuntu 22.04 guest on a windows host. When the host (and guest with it) resumes from suspend, wayland and gnome-shell in the guest will hang 50% of the time. I can still ssh to the VM and use it. But the UI will be frozen until I reboot the VM, which is quite annoying.

The host is a Windows 10 22H2 laptop (Dell XPS 9520), running Virtualbox 7.0.4. I have tried 7.0.4, but cannot connect any USB devices to the guest, which is a non-starter for me.

I'm using VMSVGA with 3D acceleration is disabled. Enabling 3D acceleration or switching to VBoxSVGA with and without 3D acceleration results in laggy graphics performance and tearing regardless of NAT networking.

The XPS has a NVIDIA GeForce RTX 3050 Ti Laptop GPU and Intel(R) Iris Xe Graphics. See the attached graphics_info.txt for video driver versions etc.

I also have a forum post on the problem over here: https://forums.virtualbox.org/viewtopic.php?f=3&t=108794 . Notice that the logs attached there are from a previous occurence of the bug.

Looking through the syslog of the guest, it seems the following happens only when the bug is triggered.

Mar 06 09:34:57 platypus gsd-color[2404]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output

Mar 06 09:39:57 platypus update-notifier[3202]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

Mar 06 09:39:57 platypus update-notifier[3202]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Mar 06 09:59:28 platypus kernel: rcu: INFO: rcu_preempt self-detected stall on CPU
Mar 06 09:59:28 platypus kernel: rcu:         11-...!: (1 GPs behind) idle=e25/0/0x1 softirq=750808/750808 fqs=0
Mar 06 09:59:28 platypus kernel:         (t=292525 jiffies g=4112281 q=18 ncpus=12)
Mar 06 09:59:28 platypus kernel: rcu: rcu_preempt kthread timer wakeup didn't happen for 292524 jiffies! g4112281 f0x0 RCU_>
Mar 06 09:59:28 platypus kernel: rcu:         Possible timer handling issue on cpu=2 timer-softirq=215040
Mar 06 09:59:28 platypus kernel: rcu: rcu_preempt kthread starved for 292525 jiffies! g4112281 f0x0 RCU_GP_WAIT_FQS(5) ->st>
Mar 06 09:59:28 platypus kernel: rcu:         Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected beha>
Mar 06 09:59:28 platypus kernel: rcu: RCU grace-period kthread stack dump:
Mar 06 09:59:28 platypus kernel: task:rcu_preempt     state:I stack:    0 pid:   15 ppid:     2 flags:0x00004000
Mar 06 09:59:28 platypus kernel: Call Trace:

Mar 06 09:59:28 platypus systemd[1]: systemd-logind.service: Watchdog timeout (limit 3min)!
Mar 06 09:59:28 platypus systemd[1]: systemd-logind.service: Killing process 959 (systemd-logind) with signal SIGABRT.
Mar 06 09:59:28 platypus systemd[1]: systemd-oomd.service: Watchdog timeout (limit 3min)!
Mar 06 09:59:28 platypus systemd[1]: systemd-oomd.service: Killing process 7090 (systemd-oomd) with signal SIGABRT.
Mar 06 09:59:28 platypus systemd[1]: systemd-resolved.service: Watchdog timeout (limit 3min)!
Mar 06 09:59:28 platypus systemd[1]: systemd-resolved.service: Killing process 796 (systemd-resolve) with signal SIGABRT.
Mar 06 09:59:28 platypus systemd[1]: snapd.service: Watchdog timeout (limit 5min)!
Mar 06 09:59:28 platypus systemd[1]: snapd.service: Killing process 7083 (snapd) with signal SIGABRT.

Mar 06 09:59:27 platypus gnome-shell[1999]: Could not release device '/dev/input/event0' (13,64): Cannot invoke method; proxy is for the well-known name org.freedesktop.login1 without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Mar 06 09:59:27 platypus gnome-shell[1999]: Could not release device '/dev/input/event1' (13,65): Cannot invoke method; proxy is for the well-known name org.freedesktop.login1 without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Mar 06 09:59:27 platypus gnome-shell[1999]: Could not release device '/dev/input/event3' (13,67): Cannot invoke method; proxy is for the well-known name org.freedesktop.login1 without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Mar 06 09:59:27 platypus gnome-shell[1999]: Could not release device '/dev/input/event6' (13,70): Cannot invoke method; proxy is for the well-known name org.freedesktop.login1 without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag


Mar 06 09:59:27 platypus gnome-shell[1999]: Could not release device '/dev/input/event5' (13,69): Cannot invoke method; proxy is for the well-known name org.freedesktop.login1 without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Mar 06 09:59:27 platypus gnome-shell[1999]: Could not release device '/dev/input/event2' (13,66): Cannot invoke method; proxy is for the well-known name org.freedesktop.login1 without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Mar 06 09:59:29 platypus gnome-session-binary[37114]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed

Mar 06 09:59:29 platypus dbus-daemon[37086]: [session uid=127 pid=37086] Activating via systemd: service name='org.freedesk>
Mar 06 09:59:29 platypus whoopsie-upload-all[37067]: ERROR: whoopsie.path is not enabled
Mar 06 09:59:29 platypus gnome-session[37114]: gnome-session-binary[37114]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'e>
Mar 06 09:59:29 platypus gnome-session-binary[37114]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error>

Mar 06 10:04:58 platypus gnome-shell[1999]: Could not open device /dev/input/event0: GDBus.Error:org.freedesktop.login1.Dev>
Mar 06 10:04:58 platypus gnome-shell[1999]: Could not open device /dev/input/event1: GDBus.Error:org.freedesktop.login1.Dev>
Mar 06 10:04:58 platypus gnome-shell[1999]: Could not open device /dev/input/event3: GDBus.Error:org.freedesktop.login1.Dev>
Mar 06 10:04:58 platypus gsd-color[2404]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Mar 06 10:04:58 platypus gnome-shell[1999]: Could not open device /dev/input/event6: GDBus.Error:org.freedesktop.login1.Dev>
Mar 06 10:04:58 platypus gnome-shell[1999]: Could not open device /dev/input/event5: GDBus.Error:org.freedesktop.login1.Dev>
Mar 06 10:04:58 platypus gnome-shell[1999]: Could not open device /dev/input/event2: GDBus.Error:org.freedesktop.login1.Dev>
Mar 06 10:04:58 platypus gnome-shell[1999]: Could not open device /dev/input/event4: GDBus.Error:org.freedesktop.login1.Dev>
Mar 06 10:04:59 platypus gsd-color[37384]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Mar 06 10:04:59 platypus gsd-color[37384]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Mar 06 10:04:59 platypus gsd-color[2404]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output
Mar 06 10:04:59 platypus gsd-color[2404]: unable to get EDID for xrandr-Virtual-1: unable to get EDID for output

Mar 06 10:05:09 platypus gnome-shell[37165]: Connection to xwayland lost
Mar 06 10:05:09 platypus gdm-launch-environment][37026]: pam_unix(gdm-launch-environment:session): session closed for user gdm
Mar 06 10:05:09 platypus ibus-daemon[37556]: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.
Mar 06 10:05:09 platypus gdm-launch-environment][37026]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Mar 06 10:05:09 platypus gdm-launch-environment][37026]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' fai>

Attachments (3)

VBox_platypus-2023-03-06-10-05-10.zip (129.0 KB ) - added by jakobdk 12 months ago.
VBoxHardening_platypus-2023-03-06-10-04-49.zip (31.0 KB ) - added by jakobdk 12 months ago.
graphics_info.txt (2.1 KB ) - added by jakobdk 12 months ago.

Download all attachments as: .zip

Change History (11)

by jakobdk, 12 months ago

Attachment: graphics_info.txt added

comment:1 by jakobdk, 12 months ago

Correction: I have tried 7.0.6, but cannot connect any USB devices to the guest, which is a non-starter for me.

comment:2 by rashxt, 12 months ago

I have the same issue. This was also happening with virtualbox 6.X.

Win 10 host and Ubuntu 22.04 guest.

This seems to be triggered when the guest system is idle, I mean when there are no user interactions (mouse or keyboard) or also when the number of screen changes (for example connecting/disconnecting an external display to the host).

A sort of workaround I found (which just postpones the issue) is to set a screen timeout on the guest OS.

comment:3 by fencekicker, 5 months ago

Happens to me as well; I also have Ubuntu jammy (22.04) on the guest. I started a thread on the virtualbox forum, but haven't bothered to log a ticket.

As for logs, I'm also seeing some of those in my logs:

  • "unable to get EDID for xrandr-Virtual-1:..."
  • "Could not release device '/dev/input/event0'" and
  • "gnome-shell[37165]: Connection to xwayland lost"

comment:4 by fencekicker, 5 months ago

The workaround that I've found was to restart gdm. Go to any of the tty consoles (Ctrl-Alt-F3 or C-A-F4), login there and type 'sudo systemctl restart gdm'. That should drop you to a login screen. There is a bit of a lag until you can actually log in (sometimes I get an error if I type my password quickly). You won't get the windows you had open back, but at least it saves you a reboot.

comment:5 by gilw, 4 months ago

Happens to me as well. Windows 11 host. Happens with: Ubuntu 22.04, 22.10, 23.04, 23.10 guest

comment:6 by danml, 3 months ago

I might have an idea on why this happens. I have experienced a similar issue (Win11 host, RHEL 8 guest, Dell XPS 15 9530) where on wake from sleep my session was reset/lost (I was greeted with login screen in VM and logs showed that systemd-* was killed by watchdog).

I suspect the issue here is that VirtualBox doesn't correctly handle "Modern Standby" sleep mode which seems to be the default in Win11 and newer laptops.

I think the fix is to use ::RegisterSuspendResumeNotification, similarly to how it's done in chromium: https://chromium.googlesource.com/chromium/src/base/+/master/power_monitor/power_monitor_device_source_win.cc#119 around here: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Main/src-server/win/HostPowerWin.cpp#L128

comment:7 by peter toft, 7 weeks ago

I see this error several time a day. Crazy annoying

comment:8 by danml, 10 days ago

Have created a dedicated bug here with a proposed fix: https://www.virtualbox.org/ticket/21917

Hopefully it'll get noticed. In the meantime, have to workaround using windows event scheduler to trigger VM pause on modern standby but sometimes it can fail.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use