At normal boot, screen is sometimes not detected

Manjaro sometimes fails to boot, lightdm refusing to show up. In the var/logs/lightdm/x-0.log I see that no screen is detected. Going to a different TTY and running startx there, will boot into XFCE, after which, the reboot seems to work again. It does not happen all the time, seems a bit random, but I believe it happens more often after an update or if I have used an external screen on this laptop previously. Still I cannot always predict when it will happen. It’s not a deal breaker, but a bit annoying all the same. Is there a way for Manjaro to always detect the internal screen of the laptop?

Most likely the XFCE did not saved properly the
~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml
so you might want to delete it as it will create a new one next boot. Do you have multiple Monitors and sometimes the external one is not connected?

Sorry for answering so late. It does not seem to be a problem with the displays.xml. I think that makes sense as it happens when starting lightdm, which means that I’m not logged in yet and configs in my homedirectory don’t come into play in this. I first claimed that rebooting after starting XFCE in a different TTY seems to work, but that does not seem to be entirely true. It’s more that it seems to randomly work or not (mostly not). I’m pretty sure the problem is in some config in Xorg, but I don’t have a clue about the inner workings of Xorg, so I don’t know where to look. I should mention that this is a laptop that is sometimes attached to an external screen. When attached, I don’t seem to have any problem, but the problem occurs when running on it’s own screen only. Changing TTY always seems to work, X starts and my desktop comes up without a problem. See below the last part of the Xorg.0.log:

[     4.272] (II) LoadModule: "modesetting"
[     4.272] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[     4.273] (II) Module modesetting: vendor="X.Org Foundation"
[     4.273]    compiled for 1.21.1.4, module version = 1.21.1
[     4.273]    Module class: X.Org Video Driver
[     4.273]    ABI class: X.Org Video Driver, version 25.2
[     4.273] (II) LoadModule: "fbdev"
[     4.273] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[     4.273] (II) Module fbdev: vendor="X.Org Foundation"
[     4.273]    compiled for 1.21.1.1, module version = 0.5.0
[     4.273]    Module class: X.Org Video Driver
[     4.273]    ABI class: X.Org Video Driver, version 25.2
[     4.273] (II) LoadModule: "vesa"
[     4.273] (WW) Warning, couldn't open module vesa
[     4.273] (EE) Failed to load module "vesa" (module does not exist, 0)
[     4.273] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[     4.273] (II) FBDEV: driver for framebuffer: fbdev
[     4.273] (EE) open /dev/dri/card0: No such file or directory
[     4.273] (WW) Falling back to old probe method for modesetting
[     4.273] (EE) open /dev/dri/card0: No such file or directory
[     4.273] (II) Loading sub module "fbdevhw"
[     4.273] (II) LoadModule: "fbdevhw"
[     4.273] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[     4.273] (II) Module fbdevhw: vendor="X.Org Foundation"
[     4.273]    compiled for 1.21.1.4, module version = 0.0.2
[     4.274]    ABI class: X.Org Video Driver, version 25.2
[     4.274] (EE) Unable to find a valid framebuffer device
[     4.274] (WW) Falling back to old probe method for fbdev
[     4.274] (II) Loading sub module "fbdevhw"
[     4.274] (II) LoadModule: "fbdevhw"
[     4.274] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[     4.274] (II) Module fbdevhw: vendor="X.Org Foundation"
[     4.274]    compiled for 1.21.1.4, module version = 0.0.2
[     4.274]    ABI class: X.Org Video Driver, version 25.2
[     4.274] (EE) open /dev/fb0: No such file or directory
[     4.274] (EE) Screen 0 deleted because of no matching config section.
[     4.274] (II) UnloadModule: "modesetting"
[     4.274] (EE) Screen 0 deleted because of no matching config section.
[     4.274] (II) UnloadModule: "fbdev"
[     4.274] (II) UnloadSubModule: "fbdevhw"
[     4.274] (EE) Device(s) detected, but none match those in the config file.
[     4.274] (EE)
Fatal server error:
[     4.274] (EE) no screens found(EE)
[     4.274] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[     4.274] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[     4.274] (EE)
[     4.274] (EE) Server terminated with error (1). Closing log file.

Do you have the video-vesa installed via MHWD? I would suggest to remove it.
Other than that, maybe post some more system details as described here [HowTo] Receive better support