Wait for user session for preloaded disposables#757
Wait for user session for preloaded disposables#757ben-grande wants to merge 3 commits intoQubesOS:mainfrom
Conversation
7351532 to
e28c131
Compare
22d069b to
4644fb9
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #757 +/- ##
==========================================
- Coverage 70.21% 70.13% -0.09%
==========================================
Files 61 61
Lines 13942 13961 +19
==========================================
+ Hits 9790 9792 +2
- Misses 4152 4169 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4644fb9 to
f66f7c3
Compare
|
It is taking a lot of time for the user session to complete... maybe there is something timing out? QubesOS/qubes-gui-agent-linux#251 (comment)
|
So, |
This is very strange because the long time doesn't happen when calling the script manually, only when calling from qubesd. The following is very fast (0.02-1.5s) (do not preload): time qvm-run -p --dispvm=default-dvm-gui --service qubes.WaitForSession
time qvm-run -p --dispvm=default-dvm-gui 'time /etc/qubes-rpc/qubes.WaitForSession'
time qvm-run -p --dispvm=default-dvm-gui 'time systemctl --user --wait is-system-running'So why is qubesd variant so slow? |
|
maybe add |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026020704-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026020304-devel&flavor=update
Failed tests7 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/166096#dependencies 31 fixed
Unstable testsDetailsPerformance TestsPerformance degradation:No issues Remaining performance tests:No remaining performance tests |
This should not fail restoring a backup... (not sure if this PR is to blame, but it's likely) |
| return False | ||
| supported = True | ||
| missing_services = [] | ||
| for service in ["qubes.WaitForRunningSystem", "qubes.WaitForSession"]: |
There was a problem hiding this comment.
Just supporting qubes.WaitForSession RPC doesn't guarantee it supports late gui-daemon connection. I'll add some explicit feature about that.
There was a problem hiding this comment.
Fixed. This code remains the same, it changes only on vm/dispvm.py.
This was fixed. |
QubesOS/qubes-gui-agent-linux#251 (comment)
I don't know why |
f66f7c3 to
41714fd
Compare
|
Hum, what is the chance that OpenQA ran without QubesOS/qubes-notification-proxy@7b82428? I will run the integration tests but it seems to be working correctly.
|
By default, it resolves the link path literally, which causes problem if other commands do not run on the same directory the link is at. For: QubesOS/qubes-core-admin#757 For: QubesOS/qubes-notification-proxy#13 For: QubesOS/qubes-issues#9940 For: QubesOS/qubes-issues#1512
QubesOS/qubes-gui-agent-linux#255 Apparently, I removed |
ceabe8e to
d341b15
Compare
|
openQArun PR_LABEL=openqa-pending TEST=system_tests_dispvm,system_tests_dispvm_perf TEST_TEMPLATES=debian-13-xfce |
d341b15 to
11f85ed
Compare
Or if GUID of the client can be found on the server. This script will be replicated to qubes-core-agent-linux. For: QubesOS/qubes-notification-proxy#13 For: QubesOS/qubes-gui-agent-linux#251 For: QubesOS/qubes-core-admin#757 For: QubesOS/qubes-issues#1512 For: QubesOS/qubes-issues#9940 Fixes: QubesOS/qubes-issues#10443
It is also used by dom0, to avoid duplication, merge into a single package. For: QubesOS/qubes-notification-proxy#13 For: QubesOS/qubes-gui-agent-linux#251 For: QubesOS/qubes-core-admin#757 For: QubesOS/qubes-issues#1512 For: QubesOS/qubes-issues#9940 Fixes: QubesOS/qubes-issues#10443
|
Good results now. More important is the response time for the first 1-2
requests.
Without this PR (1.4-2.0 seconds on first preloads):
-
https://openqa.qubes-os.org/tests/165001/file/system_tests-dispvm_perf-debian-13-xfce_graph_04_line_01_05_response_gui-small.png
-
https://openqa.qubes-os.org/tests/165001/file/system_tests-dispvm_perf-debian-13-xfce_graph_04_line_03_05_response_gui-large.png
With this PR (0.1-0.3 seconds on first preloads):
-
https://openqa.qubes-os.org/tests/165102/file/system_tests-dispvm_perf-debian-13-xfce_graph_04_line_01_05_response_gui-small.png
-
https://openqa.qubes-os.org/tests/165102/file/system_tests-dispvm_perf-debian-13-xfce_graph_04_line_03_05_response_gui-large.png
The call to an an already running qube takes 0.03-0.05s. The best GUI call
is 0.1s. Time to unpause is 0.01s, time to app.save varies but can be 0.03
to 0.07s. The only way for sub 0.1s is to skip app.save on request (when
marking as used), I guess the spread is tolerable for now.
For comparison, XTerm takes 0.4s to launch, Thunar takes 2s, Firefox takes
6s. The spread can only be lightly felt on applications that launch in less
than 0.4s, (+0.1s is +20%), so pretty narrow, and +0.1s to launch Thunar is
nothing on 2s (+5%).
…On Fri, Jan 9, 2026, 6:18 PM ben-grande ***@***.***> wrote:
*ben-grande* left a comment (QubesOS/qubes-core-admin#757)
<#757 (comment)>
openQArun PR_LABEL=openqa-pending
TEST=system_tests_dispvm,system_tests_dispvm_perf
TEST_TEMPLATES=debian-13-xfce
—
Reply to this email directly, view it on GitHub
<#757 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCE2O4IWIQPX3P2IBYPMYG34F7PHTAVCNFSM6AAAAACNJUOADOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMRZHA3DQMBWGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
11f85ed to
7b42702
Compare
|
I made a mistake of removing guivm when it should have one... but this led to find some slow behavior when creating a qube:
Having a GUIVM slows down the creation of a qube ( |
It is It takes >400ms to create, >300ms to remove. |
With the GUI agent patch, it can start before the GUI daemon connects, allowing the user session to complete. Wait both services to guarantee no enabled user or system service tries to start after the preload is used. Requires: QubesOS/qubes-gui-agent-linux#251 Requires: QubesOS/qubes-gui-agent-linux#255 Fixes: QubesOS/qubes-issues#9940 For: QubesOS/qubes-issues#1512
1dc6b4c to
9ecad91
Compare
With the GUI agent patch, it can start before the GUI daemon connects, allowing the user session to complete. Wait both services to guarantee no enabled user or system service tries to start after the preload is used.
Requires: QubesOS/qubes-gui-agent-linux#251
Requires: QubesOS/qubes-gui-agent-linux#255
Fixes: QubesOS/qubes-issues#9940
For: QubesOS/qubes-issues#1512