Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HVM Standalone Qubes GUI Not Spawning in sys-gui Session #9385

Open
MerrierWinter opened this issue Jul 31, 2024 · 6 comments
Open

HVM Standalone Qubes GUI Not Spawning in sys-gui Session #9385

MerrierWinter opened this issue Jul 31, 2024 · 6 comments
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: gui-domain needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@MerrierWinter
Copy link

MerrierWinter commented Jul 31, 2024

How to file a helpful issue

Qubes OS release

Qubes OS R4.2.2

Brief summary

virtual machines in HVM mode don't get their GUI screen spawned when sys-gui is setup as default_guivm , I tested that inside GUI Domain session , different standalone HVMs (windows, ubuntu etc ) the problem persisted on all 3 devices after following the GUI domain documentation , the same VMs work well in normal xfce session before setting up GUI Domain functionality .

Steps to reproduce

1-Set sys-gui as the default GUI domain.
2-Start an HVM (e.g., Windows, Ubuntu).
3-Observe the behavior. (No GUI).

Expected behavior

The GUI should appear for the HVM.

Actual behavior

The GUI does not appear, but the VM can be accessed via “Open console in qube” from Qubes Manager in dom0 , then switching back to GUI Domain.

Note 1 : I can supply the logs if needed but I couldn't tell whether these are relevant.
Note 2 the issue doesn't apply to VMs running in pvh mode, those are integrated And their GUI appears.

@MerrierWinter MerrierWinter added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Jul 31, 2024
@MerrierWinter MerrierWinter changed the title HVM Standalone Qubes don't spawn their GUI screen during sys-gui (GUI Domain) session HVM Standalone Qubes GUI Not Spawning in sys-gui Session Jul 31, 2024
@andrewdavidwong andrewdavidwong added C: gui-domain needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.2 This issue affects Qubes OS 4.2. labels Aug 1, 2024
@ddevz
Copy link

ddevz commented Dec 2, 2024

This seems to happen in sys-gui-vnc as well.

Also, some people have reported it happening in sys-gui-gpu: https://forum.qubes-os.org/t/win-qubes-and-sys-gui-gpu/28077

@ddevz
Copy link

ddevz commented Dec 2, 2024

Just tested: A HVM that uses seamless mode does successfully display in sys-gui.

@MerrierWinter : were all your standalone HVM qubes set up to be seamy? (I.E. not seamless (I.E. showing one big desktop instead of individual windows)). If so the conflict appears to be sys-gui and "lack of seamless mode", not HVM or standalone.

@MerrierWinter
Copy link
Author

MerrierWinter commented Dec 3, 2024

Just tested: A HVM that uses seamless mode does successfully display in sys-gui.

@MerrierWinter : were all your standalone HVM qubes set up to be seamy? (I.E. not seamless (I.E. showing one big desktop instead of individual windows)). If so the conflict appears to be sys-gui and "lack of seamless mode", not HVM or standalone.

Thanks for testing!
I have never used seamless mode on any HVM and I'm not aware whether enabling seamless mode on HVMs can be done on anything other than windows (with Qubes Windows tools -QWT- installed).

I think If there's any OS that can't have seamless mode where seamless mode is not planned for it, then I expect it to be able to show a GUI without seamless mode so that it can be accessed when logged in sys-gui.
However if seamless mode was possible for any arbitrary OS (which i don't think is the case given I only heard about seamless mode being toggleable for windows with QWT) , then having seamless mode could have resolved the issue at hand.

It's good to know that seamless mode is able to resolve it when you tested and it seems related.

I didn't understand whether you meant that providing seamless mode is the solution in general or for windows VMs (which are vital for sure)

Update : okay I think I understood you now, if it supported 'seamy mode' as in showing one big window then all would work, yes that's what i implied initially when i filed the bug report, thanks

@ddevz
Copy link

ddevz commented Dec 3, 2024

I was just adding information to help people diagnose the situation. I'm not claiming to have a solution.

I have a new procedure confirming it:
in dom0 xfce terminal(not sys-gui), create a new standalone from a debian template.

qvm-create --class StandaloneVM --label red --property virt_mode=hvm --template debian-12-xfce standalone-test-01
qvm-prefs  standalone-test-01 guivm sys-gui

Notes:

  • replace "sys-gui" with "sys-gui-vnc" if you are using sys-gui-vnc
  • your debian template might be named something other then debian-12-xfce

Then to make sure they make it into your menu:

  • Shut down sys-gui or sys-gui-vnc (whichever you are using)
  • Start sys-gui or sys-gui-vnc again

(restarting sys-gui or sys-gui-vnc is done to make sure the main menu and other widgets acknoledge the new qubes for sys-gui/sys-gui-vnc)

Then either:

  • logout and log into sys-gui (if using sys-gui)
  • or just open up your terminal to sys-gui-vnc (if using sys-gui-vnc)

Possibly optional:

  • Then open the settings for standalone-test-01, go to apps and hit "sync apps"

  • After they sync, shut down standalone-test-01

  • launch a terminal for standalone-test-01
    (via either the main menu, or via the "qubes domains" widget (or maybe by the qube manager))

The terminal should display. if it does not, try shutting down standalone-test-01 then running the terminal again.

This is a standalone hvm, with all the qubes drivers installed, that does display.

However, I just tried windows 7 seamless mode and it did not work, so that complicates things.

Anyone know if there is a way to try disabling seamless mode on debian templates (or other official templates) to see if that causes the problem?

quick side note: debugging can happen much faster using sys-gui-vnc then using sys-gui (because #1 you dont need to log out every time you need to go back and run a command under dom0, and #2 you will actually see policy permission errors when they happen). If you become interested in using sys-gui-vnc for this, there are comments on it at: https://forum.qubes-os.org/t/how-to-use-the-qubes-admin-policies-api-despite-the-lack-of-documentation-wip/29863#p-137862-sys-gui-vnc-for-debugging-ie-with-no-networking-14

@ddevz
Copy link

ddevz commented Dec 3, 2024

Follow up:

A hvm standalone made from a "official" debian template, given to sys-gui-vnc and put into debug mode will show the terminal window, but not the "boot window". The only thing that seems to display in sys-gui's are graphics that use the qubes seamless driver for linux. (I don't know the drivers name... maybe xserver-xorg-video-dummyqbs?)

@marmarek is the cause of the problem obvious to you? or would spending (my) time on further tests to narrow down the cause be helpful?

@marmarek
Copy link
Member

marmarek commented Dec 3, 2024

I'm not sure what exactly went wrong, but the guivm setting for the proper gui agent is done differently than for the VGA window ("boot window" as you call it). The former goes through qubesdb (/qubes-gui-domain-xid entry) and the latter goes through qemu cmdline - you can find it in the stubdomain logs (look for -display option). Maybe one of those is not set properly?

As for Windows, the Qubes Windows Tools as you can find right now do not support guivm at all. The upcoming build hopefully will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: gui-domain needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants