For some time now, I have had a little problem at startup.
When the PC starts cold (turned off for at least a quarter of an hour), the desktop appears then the screen flashes (at least ten times or even twenty) as if it were looking for the display or resolution.
When it is warm or it restarts no problem, when I start with Windows, no problem. After that everything works perfectly.
That's why I dismissed a hardware problem (but you never know) and call on you.
I have an i5 7400 and an ASUS PRIME B250M-A motherboard with an SSD for root and Windows and an HDD for Home.
I run Ubuntu Mate and Windows 10 in dual boot.
A 27 inch screen HDMI.
HD Graphics 630 graphics card, driver used i915.
No worries until recently. The problem started with version 18.04.4 i think.
I installed the 20.04 thinking of fixing the problem and not...
I updated the BIOS recently, I use compiz but I try to desactivate it, it does not change anything.
I also use a command at startup to prevent the screen from going to sleep (xset -display: 0 s off -dpms) but even removed, the problem persists.