Ubuntu- Ubuntu 23.04 on Hyper-V – GUI Freezing – Possible Workaround

Hello World, 

Ubuntu 23.04 has been released in April 2023  and we have started using it. However, we have the feeling that this release is not as good as the previous one provided by Canonical.  We have downloaded the beta version and have noticed that some issues were detected when installing and running Ubuntu 23.04 as a virtual machine.  We have published the following post about these issues 

Initially, we had the problem on all Virtualization platforms.   We have reported the issue and some fixes have been provided mainly for the installer.   However,  as far as we know, there is still a problem with Hyper-V virtual machine and Ubuntu 23.04.   When trying to login or when reaching the gnome desktop interface, the system freeze, there is no way to access the desktop, you cannot use the mouse and the keyboard.   This affect (as far as we know) Ubuntu Edition with the Gnome Desktop.  We have not tested other distributions (kubuntu,Unity….) 

In this post, since some people wants to give it a try to Ubuntu 23.04, we are providing a small workaround that has been provided during the bug report (see https://bugs.launchpad.net/subiquity/+bug/2015100

So, let’s go quickly through the workaround process….  

Overview

So, you have installed Ubuntu 23.04 on your Hyper-V virtualization platform.  The installation went fine.  You have reached the login screen and you notice that you cannot hover  on your name and/or your keyboard is not working.  Another possibility is that you can indeed login but as soon as you are in the desktop freeze and you cannot perform any actions anymore.  You might also notice a black line on your screen.   If this is what you are experiencing,  game over for you.  You are affected by the problem.  

Proposed Workaround

So, based on the feedback provided by the users when we filed the bug report,  the workaround consist of using the nomodeset parameter when you boot your system.   The following steps outline the process 

  • Step 1 –  Perform the install
  • Step 2 – Boot the installed system
  • Step 3 – When prompted to log in on the GUI, ignore and hit CTRL-ATL-F2 to switch to a virtual TTY
  • Step 4 –  Login with your username and password
  • Step 5 – Edit /etc/default/grub as root and update it accordingly (more information below) 
  • Step 6 – Update the grub 
  • Step 7 – Reboot 
  • Step 8 – Login to your Ubuntu 23.04 Virtual machine running on Hyper-V  

Step by step Instructions

So, to have access to your Desktop interface via the Hyper-V VM console,  you will need to perform the following actions 

Step 1 – Boot your machine and reach the login screen 

Click on Picture for Better Resolution

Step 2 – Press CTRL-ALT-F2 in order to access a command line interface 

Click on Picture for Better Resolution

Step 3 –  Login into your system

Click on Picture for Better Resolution

Step 4 –  Edit the /etc/default/grub file.   You have to edit the file with administrative rights.  You issue the following command 

sudo nano /etc/default/grub

You will see the following content 

Click on Picture for Better Resolution

Locate the line  “GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”  and replace it the following line  GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash nomodeset”. When done, save the file.

Click on Picture for Better Resolution

Step 5 – Update Grub.  From the command line, you have to issue the following line 

sudo update-grub2

Click on Picture for Better Resolution

You will see in the screen that some actions are performed in the background 

Click on Picture for Better Resolution

Step 6 –  When the process is completed, you have to reboot the machine.  You simply type in the console the command 

reboot

 

When the machine has rebooted, you should be able to access the GUI Login page,  you can pass your credentials and finally, you should be able to access your Ubuntu Desktop.  The Desktop interface is now  available and is not freezing anymore 

Click on Picture for Better Resolution

Final Notes

This is it for this post ! 

Ubuntu 23.04 has been released recently in April 2023.  However, before the final release, a number of issues was affecting Ubuntu 23.04. One of the issue was that the installation was not going through when using the new Installer.  This issue has been fixed.  Another side effect  was that the desktop interface was not available when Ubuntu 23.04 was running as an Hyper-v virtual machine.  As far as we know, this issue is still there and the only way to access the desktop interface and have it working as it should, it’s to used some workarounds.  One of these workarounds has been presented here and consist of using the “nomodeset” parameter.  

Since we had a lot of issues with Ubuntu 23.04 from the beginning, we are not really keen on using it and our focus is not on this Short Term release.  We are really looking forward into the new LTS release (i.e. Ubuntu 24.04) to see if  Canonical will again deliver something full of surprise and fully functional. 

Till next time 

See ya 

 

 

 

Leave a Reply