Skip to content

Conversation

@ben-grande
Copy link
Contributor

@ben-grande ben-grande commented Nov 12, 2025

Checkout other implementation that might make this one partially or totally obsolete:


When the GUI session is established before being paused, the preloaded disposables can use the same GUI session after requesting the qube, thus the time to connect to the session is offset from the request stage to the preload stage.

Reverting initial iteration: 212b148

It isn't the default because it comes with various disadvantages:

  • Depends on apps not autostarting, else they may appear before the qube is paused and can cause confusion;
  • Cannot adapt to monitor changes, screen resize, plugging external monitor;
  • Cannot survive display manager logout+login;
  • Only works after using has logged in to GUI session;

For: QubesOS/qubes-issues#10230
For: QubesOS/qubes-issues#1512


TODO:

  • test how the installer reacts when attempting to preload while there is no display, or is there a display at that time? Still has to pass display manager login screen.

When the GUI session is established before being paused, the preloaded
disposables can use the same GUI session after requesting the qube, thus
the time to connect to the session is offset from the request stage to
the preload stage.

Reverting initial iteration: 212b148

It isn't the default because it comes with various disadvantages:

- Depends on apps not autostarting, else they may appear before the qube
  is paused and can cause confusion;
- Cannot adapt to monitor changes, screen resize, plugging external
  monitor;
- Cannot survive display manager logout+login;
- Only works after using has logged in to GUI session;

For: QubesOS/qubes-issues#10230
For: QubesOS/qubes-issues#1512
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 70.96774% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.67%. Comparing base (6b978a3) to head (32a2dc0).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
qubes/vm/mix/dvmtemplate.py 69.23% 4 Missing ⚠️
qubes/api/admin.py 70.00% 3 Missing ⚠️
qubes/vm/dispvm.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #752      +/-   ##
==========================================
- Coverage   70.68%   70.67%   -0.02%     
==========================================
  Files          61       61              
  Lines       13809    13831      +22     
==========================================
+ Hits         9761     9775      +14     
- Misses       4048     4056       +8     
Flag Coverage Δ
unittests 70.67% <70.96%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ben-grande
Copy link
Contributor Author

QubesOS/qubes-gui-agent-linux#251

With all the patches accompanying that PR, waiting for GUI agent is done on the preload stage while GUID is established only after the preload is used, this connection is quite fast. The slow part always was the GUI agent startup. Therefore, this PR is superseded.

One thing that is still a bit problematic but not much is that preloaded disposables started before there is a GUI session on the GUIVM will have a delayed startup because qubes.Notifications uses wait-for-session. The default systemd start timeout is 45s. The notification agent will only start after the preload is marked as used, which is not problematic, but if made like this:

qvm-run -p --dispvm -- 'notify-send hey'

It will fail as the qubes-notification-agent may not be ready yet. It will be restarted automatically and that will be solved. This seems to be the only problem, very small.

@ben-grande ben-grande closed this Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant