When running a Linux virtual machine on Microsoft Hyper-V, you may want to use the Wayland display server for better performance and smoother graphics compared to X11. However, Wayland cannot function correctly if the Hyper-V framebuffer driver (hyperv_fb) is loaded, because it interferes with the kernel’s native framebuffer setup. To enable Wayland, you need to disable (blacklist) the hyperv_fb module.
Below are two methods to do this for Ubuntu and Rocky Linux.
This method edits the GRUB configuration to prevent hyperv_fb from loading at boot time.
-
Edit the GRUB configuration file:
sudo nano /etc/default/grub
-
Find the line that starts with:
GRUB_CMDLINE_LINUX_DEFAULT=or
GRUB_CMDLINE_LINUX= -
Add the following parameter inside the quotes:
modprobe.blacklist=hyperv_fbExample:
GRUB_CMDLINE_LINUX_DEFAULT="verbose modprobe.blacklist=hyperv_fb" -
Update the GRUB configuration:
-
On Ubuntu:
sudo update-grub
-
On Rocky Linux:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline
(If using UEFI:
/boot/efi/EFI/rocky/grub.cfg)
-
-
Reboot the system:
sudo reboot
After rebooting, the hyperv_fb module should no longer be loaded, allowing Wayland to start properly.
This method explicitly blacklists the module at the kernel level and updates the initramfs image.
-
Create a blacklist configuration file:
sudo nano /etc/modprobe.d/blacklist-hyperv_fb.conf
-
Add the following line:
blacklist hyperv_fb -
Update the initramfs (initial RAM filesystem):
-
On Ubuntu:
sudo update-initramfs -u
-
On Rocky Linux:
sudo dracut -f
-
-
Reboot the system:
sudo reboot
After reboot, check whether the module is still loaded:
lsmod | grep hyperv_fbIf no output appears, it means hyperv_fb has been successfully disabled.
You can then enable or switch to Wayland (for example, by choosing the Wayland session at the login screen in GNOME).
| Method | Configuration File | Command to Apply | Works On |
|---|---|---|---|
| GRUB Kernel Argument | /etc/default/grub |
update-grub or grub2-mkconfig |
Ubuntu & Rocky Linux |
| Modprobe Blacklist | /etc/modprobe.d/blacklist-hyperv_fb.conf |
update-initramfs or dracut -f |
Ubuntu & Rocky Linux |
Either method will successfully disable hyperv_fb, allowing your Linux VM on Hyper-V to run Wayland-based desktop sessions smoothly.