Ludovic Courtès <[email protected]> skribis:
> Commit 945ad48cd8029fa77a643e00c7fd350e98cacca0 added an mcron job to
> ‘vm-image.tmpl’ that resets screen size every second. I’m don’t fully
> understand the problem this was addressing, but it has two drawbacks:
>
> 1. Kicking in every second is inefficient.
>
> 2. Resetting the screen size prevents users from changing it. For
> example, if I run:
>
> $(guix system vm gnu/system/examples/vm-image.tmpl) -m 1024
>
> then go to the Xfce menu, Settings -> Display, and change the screen
> size, I have it immediately reset back to the default value.
There’s a third problem that I initially thought was unrelated:
3. The mcron job starts running before ‘xorg-server’ is up, and that
can cause Xorg to fail to start.
Namely, if you run the command above, you’ll see that Xorg starts and
fails typically a few times in a row, until it eventually succeeds. In
/var/log/messages, you can see that the ‘xorg-server’ process exits with
code 1 (without any indication of what went wrong AFAICS) and the
service gets respawned.
Now if you remove the mcron job and boot the VM, the ‘xorg-server’
service successfully starts. It’s 100% reproducible for me.
I suppose the ‘xrandr’ command can kick in too early while Xorg is
initializing, causing it to exit.
Ludo’.