You are not logged in.

#1 2021-11-13 22:14:42

mijenix
Member
From: Switzerland
Registered: 2007-04-19
Posts: 16

HyperV VM, X terminates with "Cannot run in framebuffer mode"

I use Arch on HyperV but X is not able to start, it fails with:

[     2.762]
This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.
[     2.762]
X.Org X Server 1.21.1.1
X Protocol Version 11, Revision 0
[     2.762] Current Operating System: Linux tux 5.15.2-arch1-1 #1 SMP PREEMPT Fri, 12 Nov 2021 19:22:10 +0000 x86_64
[     2.762] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=97b27936-685c-4abf-a8d8-6ba6c034da84 rw loglevel=3 video=hyperv_fb:1920x1080
[     2.762]
[     2.762] Current version of pixman: 0.40.0
[     2.762]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[     2.762] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     2.762] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Nov 13 22:58:34 2021
[     2.767] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     2.769] (==) No Layout section.  Using the first Screen section.
[     2.769] (==) No screen section available. Using defaults.
[     2.769] (**) |-->Screen "Default Screen Section" (0)
[     2.769] (**) |   |-->Monitor "<default monitor>"
[     2.769] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[     2.769] (==) Automatically adding devices
[     2.769] (==) Automatically enabling devices
[     2.769] (==) Automatically adding GPU devices
[     2.769] (==) Automatically binding GPU devices
[     2.769] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     2.780] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[     2.780]    Entry deleted from font path.
[     2.780] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[     2.780]    Entry deleted from font path.
[     2.784] (==) FontPath set to:
        /usr/share/fonts/misc,
        /usr/share/fonts/TTF,
        /usr/share/fonts/100dpi,
        /usr/share/fonts/75dpi
[     2.784] (==) ModulePath set to "/usr/lib/xorg/modules"
[     2.784] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[     2.784] (II) Module ABI versions:
[     2.784]    X.Org ANSI C Emulation: 0.4
[     2.784]    X.Org Video Driver: 25.2
[     2.784]    X.Org XInput driver : 24.4
[     2.784]    X.Org Server Extension : 10.0
[     2.784] (--) using VT number 2

[     2.784] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     2.784] (II) xfree86: Adding drm device (/dev/dri/card0)
[     2.784] (II) Platform probe for /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/5620e0c7-8062-4dce-aeb7-520c7ef76171/drm/card0
[     2.889] (--) PCI:*(0@0:8:0) 1414:5353:0000:0000 rev 0, Mem @ 0xf8000000/67108864, BIOS @ 0x????????/131072
[     2.890] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[     2.890] (II) LoadModule: "glx"
[     2.898] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     2.912] (II) Module glx: vendor="X.Org Foundation"
[     2.912]    compiled for 1.21.1.1, module version = 1.0.0
[     2.912]    ABI class: X.Org Server Extension, version 10.0
[     2.912] (==) Matched modesetting as autoconfigured driver 0
[     2.912] (==) Matched fbdev as autoconfigured driver 1
[     2.912] (==) Matched vesa as autoconfigured driver 2
[     2.912] (==) Assigned the driver to the xf86ConfigLayout
[     2.912] (II) LoadModule: "modesetting"
[     2.912] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[     2.919] (II) Module modesetting: vendor="X.Org Foundation"
[     2.919]    compiled for 1.21.1.1, module version = 1.21.1
[     2.919]    Module class: X.Org Video Driver
[     2.919]    ABI class: X.Org Video Driver, version 25.2
[     2.919] (II) LoadModule: "fbdev"
[     2.919] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[     2.920] (II) Module fbdev: vendor="X.Org Foundation"
[     2.920]    compiled for 1.21.1.1, module version = 0.5.0
[     2.920]    Module class: X.Org Video Driver
[     2.920]    ABI class: X.Org Video Driver, version 25.2
[     2.920] (II) LoadModule: "vesa"
[     2.920] (WW) Warning, couldn't open module vesa
[     2.920] (EE) Failed to load module "vesa" (module does not exist, 0)
[     2.920] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[     2.920] (II) FBDEV: driver for framebuffer: fbdev
[     2.920] (WW) xf86OpenConsole: setpgid failed: Operation not permitted
[     2.920] (WW) xf86OpenConsole: setsid failed: Operation not permitted
[     3.023] (WW) Falling back to old probe method for modesetting
[     3.094] (II) modeset(1): using default device
[     3.095] (II) Loading sub module "fbdevhw"
[     3.095] (II) LoadModule: "fbdevhw"
[     3.095] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[     3.096] (II) Module fbdevhw: vendor="X.Org Foundation"
[     3.096]    compiled for 1.21.1.1, module version = 0.0.2
[     3.096]    ABI class: X.Org Video Driver, version 25.2
[     3.096] (EE) Unable to find a valid framebuffer device
[     3.096] (WW) Falling back to old probe method for fbdev
[     3.096] (II) Loading sub module "fbdevhw"
[     3.096] (II) LoadModule: "fbdevhw"
[     3.096] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[     3.096] (II) Module fbdevhw: vendor="X.Org Foundation"
[     3.096]    compiled for 1.21.1.1, module version = 0.0.2
[     3.096]    ABI class: X.Org Video Driver, version 25.2
[     3.096] (II) FBDEV(3): using default device
[     3.121] (II) modeset(G0): using drv /dev/dri/card0
[     3.121] (EE) Screen 0 deleted because of no matching config section.
[     3.121] (II) UnloadModule: "modesetting"
[     3.121] (EE) Screen 1 deleted because of no matching config section.
[     3.121] (II) UnloadModule: "fbdev"
[     3.121] (II) UnloadSubModule: "fbdevhw"
[     3.121] (EE)
Fatal server error:
[     3.121] (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
[     3.121] (EE)
[     3.121] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[     3.121] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[     3.121] (EE)
[     3.247] (EE) Server terminated with error (1). Closing log file.

Any ideas why?
Let me know if I can provide more info.

Offline

#2 2021-11-27 10:52:48

cheezy lane
Member
Registered: 2021-11-27
Posts: 1

Re: HyperV VM, X terminates with "Cannot run in framebuffer mode"

I solved this problem by forcing X to use the fbdev driver and providing the framebuffer device id like so.
Create the file:

/etc/X11/xorg.conf.d/99-fbdev.conf

Add the following:

Section "Device"
        Identifier  "Card0"
        Driver      "fbdev"
        BusID       "PCI:0:8:0"
EndSection

Please mind that your BusID might be different. You can just run

Xorg -configure

which will create /root/xorg.conf.new. Then look in this file for your BusID and act accordingly if it differs.

Good Luck!

Last edited by cheezy lane (2021-11-27 11:07:33)

Offline

#3 2021-11-27 12:38:42

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,930

Re: HyperV VM, X terminates with "Cannot run in framebuffer mode"

Mijenix , Is xf86-video-fbdev installed ?

see https://wiki.archlinux.org/title/Hyper-V#Xorg


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2021-11-27 13:19:05

mijenix
Member
From: Switzerland
Registered: 2007-04-19
Posts: 16

Re: HyperV VM, X terminates with "Cannot run in framebuffer mode"

Yes, xf86-video-fbdev is installed.

Yes, I was also able to force X with the mentioned config, which specifies the BusID, but with it I wasn't able to specify any other resolution as 1 default one, I think it was fixed to 1024x768 or the like at least too small for me.

But I was also aware that my HyperV VM was gen1.
I recreated the VM with gen2 and suddenly everything works again, also the new hyperv_drm driver supports mode setting (KMS) with gen2 VMs, so I was able to control the resolution with xrandr.

My guts tells me, that the new hyperv_drm driver (which landed in Kernel 5.14) is just broken with HyperV VM gen1 VMs.

Offline

#5 2022-12-20 14:56:48

0xsource
Member
Registered: 2022-12-20
Posts: 1

Re: HyperV VM, X terminates with "Cannot run in framebuffer mode"

Hey mijenix, thanks for sharing this, it was very useful. Your solution worked on Debian based distribution too.

Hint: you can increase the screen resolution by append the following kernel boot parameter.

video=Virtual-1:1920x1080

Offline

Board footer

Powered by FluxBB