-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't start X11 in Hyper-V VM because "no screen detected" #57290
Comments
This does indeed work as a workaround to the problem still in 19.09. Is this a result of detection from nixos/modules/virtualisation/hyperv-guest.nix ? I believe that would be the right location for the change as Home Manager doesn't seem to be the right place to put this, it should be the result of detection. |
Thank you for your contributions.
|
Just ran into this. |
This REALLY helped me! |
Thx dude, saved me |
Even using: |
Can you share your X.log? |
Remarkably, I can't even find one. Anyways, it appears that it has something to do video memory. |
This commit adds [Hyper-V Enhanced Session](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/enhanced-session-mode) over RDP to get high-DPI video, using the [tips from](https://the.kalaclista.com/posts/2018/10/21/000000/) and [video from this issue](NixOS/nixpkgs#57290).
I marked this as stale due to inactivity. → More info |
Wanted to report I have the same issue as @SandwichChef, tried running NixOS 22.05 on a Gen 1 and Gen 2 Hyper-V guest on Windows 10. Disappointed that I can't easily test NixOS in a VM without running into graphics issues. |
Not stale. |
Not stale |
I got |
Still an issue. Can't get either X nor Wayland running on Nix OS using Hyper-V. |
The following works for me.
I also changed |
I recently started to look into Hyper-V as well, as I had some problems with VirtualBox on Windows (subpar performance, random freezes). The steps suggested by @on3iropolos fixed the problem for me as well. However, # The video driver hyperv_fb seems to cause a low frame rate.
boot.blacklistedKernelModules = [ "hyperv_fb" ]; See also https://askubuntu.com/a/1336377. Linux 5.14 introduced Maybe it is possible to update Besides that, I also had to take the following three steps to make everything work on Hyper-V (Generation 2):
The guest integration of Hyper-V is unfortunately far behind VirtualBox and VMware. I have not yet found a solution to enable the enhanced session mode. I hope I will find a solution for that as well. PS: If you made an error during the installation and cannot boot the system, you can change the configuration of an installed system after booting the installer from an ISO.lsblk # To identify the right partions.
# I will assume sda2 being the root partition, and sda1 being the boot partition.
sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot
sudo vim /mnt/etc/nixos/configuration.nix # Adjust your configuration
sudo nixos-enter -- nixos-rebuild boot |
Here's a screenshot of my X.log: https://usercontent.irccloud-cdn.com/file/P368XbTL/X.log.png
I added a RemoteFX Graphics Card to my Hyper-V machine config, to no avail. I played around with the hypervGuest module, but it had no effect.
When I asked around on #nixos, someone suggested a fix for this: I had to add
services.xserver = { modules = [ pkgs.xorg.xf86videofbdev ]; videoDrivers = [ "hyperv_fb" ]; };
and now all is well. The question is: Couldn't hypervGuest do this automatically for me?The text was updated successfully, but these errors were encountered: