[Solved] How to get rid of "Qemu Monitor"?

I’m starting my regular Haiku installation, that I usually boot into, with Qemu from Linux every 6 months or so. Last time I noticed it was in some non-native resolution (I guess 1440x900 instead of the ususal 1920x1080).

Back in the natively booted Haiku, I notice that the Workspaces app shows the non-active workspaces in that lower resolution. The current workspace always shows the right resolution.

This is the start of the settings file ~/config/settings/system/app_server/workspaces:

$> message workspaces 
BMessage('asws') {
        columns = int32(0x4 or 4)
        rows = int32(0x1 or 1)
        workspace[0] = BMessage(0x0) {
                screen[0] = BMessage(0x0) {
                        id = int32(0x0 or 0)
                        vendor = string("LGD", 4 bytes)
                        name = string("", 1 bytes)
                        product id = int32(0x323 or 803)
                        serial = string("", 1 bytes)
                        produced week = int32(0x0 or 0)
                        produced year = int32(0x7dc or 2012)
                        frame = BRect(l:0.0, t:0.0, r:1919.0, b:1079.0)
                        mode = (type = 'RAWT')(size = 40)
                        brightness = float(0.1765)
                }
                screen[1] = BMessage(0x0) {
                        id = int32(0x0 or 0)
                        vendor = string("RHT", 4 bytes)
                        name = string("QEMU Monitor", 13 bytes)
                        product id = int32(0x1234 or 4660)
                        serial = string("", 1 bytes)
                        produced week = int32(0x2a or 42)
                        produced year = int32(0x7de or 2014)
                        frame = BRect(l:0.0, t:0.0, r:1439.0, b:899.0)
                        mode = (type = 'RAWT')(size = 40)
                        brightness = float(0.0000)
                }
                color = int32(0xff986633 or 4288177715)
        }

As you can see, there’s now two screen entries (I have one panel on my notebook). screen[1] is named “QEMU Monitor”, so I assume that gets created by Qemu.

Now, weirdly, if I delete the workspaces file, open the Screen prefs and change some settings, the settings file ~/config/settings/system/app_server/workspaces is recreated. But still with the “QEMU Monitor”!
What’s going on, and how do I get rid of that 2nd Qemu screen?

Also, considering the Workspaces behaviour, that would be a bug, right?

I’m dumb.
Got rid of the Qemu monitor by doing the obvious. First delete the “workspaces” settings file, then reboot.
Using the Screen prefs obviously writes the app_server config that was initialized with the old 2-screen-Qemu setting…

2 Likes

This is intentional, the idea is that display resolution is stored separately for each display you connect your machine to (identified by its vendor and product id, as well as its serial number if it provides one).

This way, if you have several displays with different resolutions, the OS remembers how you have configured each of them. You may have a laptop with an unusual internal resolution (1900x1200 for example), but sometimes use it docked to a 1080p display. Or use a lower resolution beamer. Or a 4K external screen.

When you connect to a display that’s not found in the workspace preferences, a default video mode will be selected depending on its EDID data.

Makes sense. That the Workspaces app uses the Qemu Monitor for non-current workspaces and the my notebook’s screen for the current workspace is a bug though, right?

Ah, yes, that seems unexpected.

I would guess it detected the display change when booting Haiku, and set up the first workspace using that, but for the other workspaces it just used whichever settings were found in the file?

Unfortunately, I don’t have the old workspaces config file, but I’m quite sure all my 4 set-up workspaces had screen[0] = my notebook panel, and screen[1] = Qemu Monitor.