Since Alt-SysRq-w gives nothing, I'm sure the long delay is not a
kernel/driver issue but a user space issue. It looks due to some reason
I just can not reproduce the long delay. :-(

In the Hyper-V Virtual Machine Connection window's "View" menu, there is
an item "Enhanced Session". In my Ubuntu 19.10 VM created by "Quick
Create...", the xrdp daemon/service is configured to automatically run
during the boot-up procedure; I think as soon as the xrdp daemon starts
to run, the "Enhanced Session" item becomes clickable/usable, and I can
click it to toggle between "Enhanced Session" mode (i.e. xrdp mode) and
the native Xorg GUI mode; when I'm in the xrdp mode, I click VM
Connection window's Action | Shut Down, then Start, and the VM will boot
up to the xrdp login screen in about 14 seconds; when I'm in the Xorg
mode, I click Shutdown then Start, the VM will boot up to the Xorg GUI
desktop in about 30 seconds. If I shut down the VM, close the VM
Connection window, and start the VM and open VM Connection window, I'll
be prompted by a small pop-up window to choose a resolution when (I
think) the xrdp daemon starts to run: 1) if I click the close icon of
the small window, I'll be in the Xorg GUI mode; if I accept the default
resolution (or change to a different resolution) and click "connect" in
the small window, I'll be in the xrdp mode. So all these work pretty
good for me.

Note: after I just created the 19.10 VM by "Quick Create..." and set up
the host name and user name/password stuff, I rebooted the VM and when
the VM booted up, I found the "Enhanced Session" was not
clickable/usable -- this looks like a bug -- while I still don't know
the root cause, it looks this can be resolved by manually adding the
line "initrd        /boot/initrd.img-5.3.0-23-generic  #This line is
added by Dexuan manually" into "/boot/grub/grub.cfg":

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os 
$menuentry_id_option 'gnulinux-simple-55829715-0091-4b86-b060-1cb88f342faf' {
...
        if [ "${initrdfail}" = 1 ]; then
          linux /boot/vmlinuz-5.3.0-23-generic 
root=PARTUUID=43e99d31-1277-402c-a13b-6cc8fb93169b ro  quiet splash $vt_handoff
          initrd        /boot/initrd.img-5.3.0-23-generic
        else
          linux /boot/vmlinuz-5.3.0-23-generic 
root=PARTUUID=43e99d31-1277-402c-a13b-6cc8fb93169b ro  quiet splash $vt_handoff 
panic=-1
          initrd        /boot/initrd.img-5.3.0-23-generic  #This line is added 
by Dexuan manually!!!
        fi
        initrdfail
}

With the addition of the line, it looks "GRUB_TIMEOUT=0" in "/etc/default/grub" 
is always really applied every time I reboot the VM.
Without the line, it looks sometimes the grub timeout is 30 second and 
sometimes it's 0 second.
BTW, I reported a bug for the missing initrd line a few weeks ago for a 
different issue: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1870189.

I suggest you also manually add the line, then I guess you should be
able to reliably toggle between xrdp mode and Xorg mode.

Note: "/boot/grub/grub.cfg" is overwritten when update-grub is run by us
or some automatic-update daemon, so we may want to check if the line is
still there when we see something unexpected (i.e. unable to use xrdp
mode, or see a grub timeout of 30s). I hope Bug 1870189 will be fixed by
somebody ASAP...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1848534

Title:
  [Microsoft Hyper-V guest] System shows graphic artifacts for a moment,
  then text cursor for about minute and then starts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1848534/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to