Hyper-V: Autostart Dekstop GUI not working

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=3
    G_DIETPI_VERSION_RC=0
    G_GITBRANCH='master'
    G_GITOWNER='MichaIng'
    
  • Distro version | Bookworm
  • Kernel version | Linux DietPi 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux
  • Architecture | amd64
  • SBC model | Virtual Machine (x86_64)
  • Power supply used | N/A
  • SD card used | N/A

Additional Information (if applicable)

I have attempted to create a DietPi Hyper-V VM twice with the same results each time.
I have also tried installing the ‘xserver-xorg-video-fbdev’ package

Steps to reproduce

  1. Create VM with supplied VHDX
  2. Run through basic setup installing the software listed below (extra details).
  3. Enable LightDM login mask for desktop autostart
  4. Reboot VM.

Expected behaviour

Open Hyper-V VM and be presented with Desktop GUI

Actual behaviour

Extra details

  • dietpi-software list | grep " =2 "
    ID 5 | =2 | ALSA: Advanced Linux Sound Architecture |
    ID 6 | =2 | X.Org X Server: aka X11 - X Window System implementation |
    ID 23 | =2 | LXDE: ultra lightweight desktop | +ALSA +X.Org X Server +browser | https://dietpi.com/docs/software/desktop/#lxde
    ID 28 | =2 | TigerVNC Server: desktop for remote connection | +desktop | https://dietpi.com/docs/software/remote_desktop/#tigervnc-server
    ID 29 | =2 | XRDP: remote desktop protocol (rdp) server | +desktop | https://dietpi.com/docs/software/remote_desktop/#xrdp
    ID 103 | =2 | DietPi-RAMlog: Makes /var/log a RAM disk, preserves file structure on reboot | | https://dietpi.com/docs/software/log_system/#dietpi-ramlog
    ID 104 | =2 | Dropbear: Lightweight SSH server | | https://dietpi.com/docs/software/ssh/#dropbear
    ID 113 | =2 | Chromium: web browser for desktop or autostart | +ALSA +X.Org X Server | https://dietpi.com/docs/software/desktop/#chromium
    ID 200 | =2 | DietPi-Dashboard: Official lightweight DietPi web interface (Rust) | | https://dietpi.com/docs/software/system_stats/#dietpi-dashboard
    

I also can’t interact with the VM from Hyper-V. Pressing “enter” does nothing. Not a big deal as I manage via SSH, but I thought I should mention that. If I turn off the autostart, I can interact with the terminal just fine.


I got it working, but I had to fiddle a bit, I found some hints in the Xserver log, if I remember correctly it was at /var/log/Xorg.0.log

There was a config file /root/xorg.conf.new, I copied it to /usr/share/X11/xorg.conf.d/98-custom.conf.

cp /root/xorg.conf.new /usr/share/X11/xorg.conf.d/98-custom.conf

Probably you can also symlink it, it shouldn’t make a difference?!
I think the crucial part is the "Device" section, where you specify to use fbdev driver.

Btw I had to use some “hacky” scripts to get Hyper-V working on a Win 10 Home machine :smiley:

1 Like

Thats why I’m using VirtualBox :slight_smile:

1 Like

Thanks for that info! I’ll give it a shot.