Score:1

How i make Ubuntu 18.04/20.04 use xorg by default instead of xrandr?

fr flag

I want to change the color depth of a Ubuntu VM installed on a server. Lower color depth reduce the bandwidth (smoother screen) when connecting over SPICE-gtk. With xrandr I can't change the color depth to 16 like with Xorg.

I made a xorg.conf in /etc/X11 with the following code:

Section "Screen"
    Identifier "Virtual-screen"
    SubSection "Display"
        Depth 16
        Modes "1600x900" "800x600" "640x480"
    EndSubSection
EndSection

When I use: Identifier "Virtual-screen" in the xorg.conf I'm not able to pass the login screen after restarting gdm. But when I use Identifier "Virtual-0" I am able to login but nothing changes, the machine is still using xrandr and $ xwininfo -root | grep Depth keeps telling me 24.

When I reboot my machine it keeps using xrandr settings too, even after removing ./config/monitors.xml

Same issue with a /usr/share/X11/xorg.conf.d/ config.

Additional information:

$ xrandr
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 8192 x 8192
Virtual-0 connected primary 1600x900+0+0 0mm x 0mm

I have no other active displays.

What am I doing wrong and how to make it work?

Levente avatar
cn flag
I thought that xrandr is a runtime thingy on top of xorg, capable of updating / overriding xorg config on the fly. So I would assume that whatever settings xrandr presents as "its" defaults, it took them originally from some form of xorg config. If therefore your defaults are not what you desire, I would assume that your xorg config attempt does not take effect... I too would gladly learn more about this.
ch flag
What display manager are you using? What graphic card driver are you using? Are you using Ubuntu Desktop or Server?
fr flag
@Serg Libvirt VM (Ubuntu desktop) installed on an Ubuntu server. Driver = qxl
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.