Skip to content

minimal-vms: mask gvfs-daemon to prevent dbus timeout#636

Merged
marmarek merged 1 commit intoQubesOS:mainfrom
Guiiix:minimal-vms
Mar 21, 2026
Merged

minimal-vms: mask gvfs-daemon to prevent dbus timeout#636
marmarek merged 1 commit intoQubesOS:mainfrom
Guiiix:minimal-vms

Conversation

@Guiiix
Copy link
Copy Markdown
Member

@Guiiix Guiiix commented Feb 8, 2026

Some programs try to start gvfs-daemon, which refusing to start when minimal-vm is enabled, using a dbus method call and resulting in timeouts.

Trying to start a masked service is detected by Dbus and doesn't trigger any timeout.

The service is masked at runtime thanks to a new service executed when running a qube with minimal-netvm or minimal-usbvm.

Fixes QubesOS/qubes-issues#10165 (comment)

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.30%. Comparing base (f26fc08) to head (a811d95).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #636   +/-   ##
=======================================
  Coverage   70.30%   70.30%           
=======================================
  Files           3        3           
  Lines         495      495           
=======================================
  Hits          348      348           
  Misses        147      147           

☔ 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.

@qubesos-bot
Copy link
Copy Markdown

qubesos-bot commented Feb 11, 2026

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026031800-4.3&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026020304-devel&flavor=update

  • system_tests_pvgrub_salt_storage

  • system_tests_guivm_gui_interactive

    • collect_logs: wait_serial (wait serial expected)
      # wait_serial expected: qr/PXxYu-\d+-/...

    • collect_logs: Failed (test died + timed out)
      # Test died: command 'curl --form upload=@journalctl.log --form upn...

    • collect_logs: wait_serial (wait serial expected)
      # wait_serial expected: qr/y_zzX-\d+-/...

  • system_tests_network_ipv6

  • system_tests_network_updates

    • TC_11_QvmTemplateMgmtVM_debian-13-xfce: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_debian-13-xfce: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

    • TC_11_QvmTemplateMgmtVM_fedora-42-xfce: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_fedora-42-xfce: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

    • TC_11_QvmTemplateMgmtVM_whonix-gateway-18: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_whonix-gateway-18: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

  • system_tests_qwt_win10_seamless@hw13

    • windows_install: Failed (test died)
      # Test died: Install failed with code 1 at qubesos/tests/windows_in...
  • system_tests_qwt_win11@hw13

  • system_tests_basic_vm_qrexec_gui_xfs

    • TC_20_NonAudio_whonix-gateway-18-pool: test_010_run_xterm (error)
      subprocess.CalledProcessError: Command 'qubes.WaitForSession' retur...
  • system_tests_basic_vm_qrexec_gui@hw7

Failed tests

24 failures
  • system_tests_whonix

    • whonixcheck: fail (unknown)
      Whonixcheck for whonix-gateway-18 failed...

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: fail (unknown)
      Whonixcheck for whonix-workstation-18 failed...

    • whonixcheck: Failed (test died)
      # Test died: systemcheck failed at qubesos/tests/whonixcheck.pm lin...

  • system_tests_network

  • system_tests_pvgrub_salt_storage

    • TC_41_HVMGrub_debian-13-xfce: test_010_template_based_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_011_template_based_vm_dracut (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_fedora-42-xfce: test_000_standalone_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_fedora-42-xfce: test_010_template_based_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_guivm_gui_interactive

    • collect_logs: wait_serial (wait serial expected)
      # wait_serial expected: qr/PXxYu-\d+-/...

    • collect_logs: Failed (test died + timed out)
      # Test died: command 'curl --form upload=@journalctl.log --form upn...

    • collect_logs: wait_serial (wait serial expected)
      # wait_serial expected: qr/y_zzX-\d+-/...

  • system_tests_network_ipv6

  • system_tests_network_updates

    • TC_11_QvmTemplateMgmtVM_debian-13-xfce: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_debian-13-xfce: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

    • TC_11_QvmTemplateMgmtVM_fedora-42-xfce: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_fedora-42-xfce: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

    • TC_11_QvmTemplateMgmtVM_whonix-gateway-18: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_whonix-gateway-18: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

  • system_tests_qwt_win10_seamless@hw13

    • windows_install: Failed (test died)
      # Test died: Install failed with code 1 at qubesos/tests/windows_in...
  • system_tests_qwt_win11@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-apps-features...
  • system_tests_basic_vm_qrexec_gui_xfs

    • TC_20_NonAudio_whonix-gateway-18-pool: test_010_run_xterm (error)
      subprocess.CalledProcessError: Command 'qubes.WaitForSession' retur...
  • system_tests_basic_vm_qrexec_gui@hw7

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/166096#dependencies

25 fixed
  • system_tests_whonix

    • whonixcheck: wait_serial (wait serial expected)
      # wait_serial expected: qr/D8rIe-\d+-/...
  • system_tests_network

  • system_tests_gui_interactive

    • collect_logs: wait_serial (wait serial expected)
      # wait_serial expected: qr/m~uU4-\d+-/...

    • collect_logs: Failed (test died + timed out)
      # Test died: command 'curl --form upload=@journalctl.log --form upn...

  • system_tests_network_ipv6

  • system_tests_network_updates

    • TC_00_Dom0Upgrade_whonix-gateway-18: test_000_update_salt (failure)
      ?[0;31mDuration: 139139.863 ms?[0;0m... ?[0;31m Changes: ?[0;0m
  • system_tests_dispvm

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.dispvm failed (exit code 1), details report...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_20_DispVM_whonix-workstation-18: test_015_preload_race_more (error)
      raise TimeoutError from exc_val... TimeoutError

  • system_tests_guivm_vnc_gui_interactive

    • guivm_manager: unnamed test (unknown)

    • guivm_manager: Failed (test died)
      # Test died: no candidate needle with tag(s) 'menu-qubes-tools' mat...

    • guivm_manager: wait_serial (wait serial expected)
      # wait_serial expected: qr/yp0HG-\d+-/...

  • system_tests_audio

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.audio failed (exit code 1), details reporte...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_20_AudioVM_PipeWire_whonix-workstation-18: test_260_audio_mic_enabled_switch_audiovm (failure)
      AssertionError: Failed to get mic attach/detach status!

  • system_tests_qwt_win10@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-setup-no...
  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-setup-no...
  • system_tests_qwt_win11@hw13

Unstable tests

Details
  • system_tests_gui_interactive

    collect_logs/Failed (1/5 times with errors)
    • job 169132 # Test died: command 'curl --form upload=@journalctl.log --form upn...
    collect_logs/wait_serial (1/5 times with errors)
    • job 169132 # wait_serial expected: qr/GJUz8-\d+-/...
    collect_logs/wait_serial (1/5 times with errors)
    • job 169132 # wait_serial expected: qr/EAW0M-\d+-/...
  • system_tests_gui_interactive@hw7

    collect_logs/Failed (1/5 times with errors)
    • job 169132 # Test died: command 'curl --form upload=@journalctl.log --form upn...
    collect_logs/wait_serial (1/5 times with errors)
    • job 169132 # wait_serial expected: qr/GJUz8-\d+-/...
    collect_logs/wait_serial (1/5 times with errors)
    • job 169132 # wait_serial expected: qr/EAW0M-\d+-/...

Performance Tests

Performance degradation:

4 performance degradations
  • debian-13-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:4.595): 55.14 🔻 ( previous job: 47.01, degradation: 117.31%)
  • debian-13-xfce_dom0-vm-gui-api (mean:0.045): 0.54 🔻 ( previous job: 0.48, degradation: 112.06%)
  • fedora-42-xfce_dom0-dispvm-preload-4-api (mean:3.746): 44.95 🔻 ( previous job: 39.46, degradation: 113.93%)
  • whonix-workstation-18_dom0-vm-gui-api (mean:0.078): 0.93 🔻 ( previous job: 0.65, degradation: 144.58%)

Remaining performance tests:

35 tests
  • debian-13-xfce_dom0-dispvm-api (mean:6.937): 83.24 🔻 ( previous job: 79.83, degradation: 104.27%)
  • debian-13-xfce_dom0-dispvm-gui-api (mean:7.742): 92.91 🔻 ( previous job: 92.49, degradation: 100.45%)
  • debian-13-xfce_dom0-dispvm-preload-2-api (mean:3.615): 43.38 🟢 ( previous job: 44.94, improvement: 96.52%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-0-api (mean:3.586): 43.03 🔻 ( previous job: 41.46, degradation: 103.78%)
  • debian-13-xfce_dom0-dispvm-preload-4-api (mean:3.399): 40.79 🔻 ( previous job: 37.67, degradation: 108.26%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-0-api (mean:3.321): 39.86 🔻 ( previous job: 36.76, degradation: 108.42%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:3.471): 41.65 🔻 ( previous job: 37.87, degradation: 109.98%)
  • debian-13-xfce_dom0-dispvm-preload-2-gui-api (mean:4.845): 58.14 🔻 ( previous job: 55.58, degradation: 104.60%)
  • debian-13-xfce_dom0-dispvm-preload-4-gui-api (mean:3.533): 42.40 🟢 ( previous job: 47.73, improvement: 88.84%)
  • debian-13-xfce_dom0-dispvm-preload-6-gui-api (mean:3.649): 43.79 🟢 ( previous job: 47.11, improvement: 92.95%)
  • debian-13-xfce_dom0-vm-api (mean:0.037): 0.44 🔻 ( previous job: 0.41, degradation: 106.30%)
  • fedora-42-xfce_dom0-dispvm-api (mean:7.145): 85.74 🔻 ( previous job: 84.64, degradation: 101.29%)
  • fedora-42-xfce_dom0-dispvm-gui-api (mean:8.52): 102.23 🔻 ( previous job: 99.96, degradation: 102.27%)
  • fedora-42-xfce_dom0-dispvm-preload-2-api (mean:4.135): 49.62 🔻 ( previous job: 47.97, degradation: 103.45%)
  • fedora-42-xfce_dom0-dispvm-preload-2-delay-0-api (mean:4.095): 49.14 🔻 ( previous job: 48.54, degradation: 101.25%)
  • fedora-42-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:4.328): 51.94 🔻 ( previous job: 50.22, degradation: 103.42%)
  • fedora-42-xfce_dom0-dispvm-preload-4-delay-0-api (mean:3.454): 41.44 🔻 ( previous job: 40.12, degradation: 103.30%)
  • fedora-42-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:3.786): 45.43 🔻 ( previous job: 42.41, degradation: 107.12%)
  • fedora-42-xfce_dom0-dispvm-preload-2-gui-api (mean:4.72): 56.64 🟢 ( previous job: 62.27, improvement: 90.95%)
  • fedora-42-xfce_dom0-dispvm-preload-4-gui-api (mean:4.279): 51.35 🟢 ( previous job: 54.33, improvement: 94.52%)
  • fedora-42-xfce_dom0-dispvm-preload-6-gui-api (mean:3.755): 45.05 🟢 ( previous job: 54.25, improvement: 83.05%)
  • fedora-42-xfce_dom0-vm-api (mean:0.04): 0.48 🟢 ( previous job: 0.50, improvement: 95.24%)
  • fedora-42-xfce_dom0-vm-gui-api (mean:0.04): 0.48 🟢 ( previous job: 0.49, improvement: 97.15%)
  • whonix-workstation-18_dom0-dispvm-api (mean:9.044): 108.53 🟢 ( previous job: 110.52, improvement: 98.21%)
  • whonix-workstation-18_dom0-dispvm-gui-api (mean:10.518): 126.22 🔻 ( previous job: 121.96, degradation: 103.49%)
  • whonix-workstation-18_dom0-dispvm-preload-2-api (mean:5.59): 67.08 🔻 ( previous job: 64.20, degradation: 104.48%)
  • whonix-workstation-18_dom0-dispvm-preload-2-delay-0-api (mean:5.207): 62.49 🔻 ( previous job: 61.89, degradation: 100.97%)
  • whonix-workstation-18_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:6.012): 72.15 🔻 ( previous job: 69.42, degradation: 103.93%)
  • whonix-workstation-18_dom0-dispvm-preload-4-api (mean:4.666): 55.99 🟢 ( previous job: 56.66, improvement: 98.83%)
  • whonix-workstation-18_dom0-dispvm-preload-4-delay-0-api (mean:5.22): 62.64 🔻 ( previous job: 60.57, degradation: 103.42%)
  • whonix-workstation-18_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:4.673): 56.07 🟢 ( previous job: 59.37, improvement: 94.44%)
  • whonix-workstation-18_dom0-dispvm-preload-2-gui-api (mean:6.422): 77.06 🟢 ( previous job: 77.58, improvement: 99.32%)
  • whonix-workstation-18_dom0-dispvm-preload-4-gui-api (mean:4.942): 59.31 🟢 ( previous job: 69.81, improvement: 84.96%)
  • whonix-workstation-18_dom0-dispvm-preload-6-gui-api (mean:5.31): 63.72 🟢 ( previous job: 68.61, improvement: 92.87%)
  • whonix-workstation-18_dom0-vm-api (mean:0.031): 0.38 🟢 ( previous job: 0.42, improvement: 90.41%)

@marmarek
Copy link
Copy Markdown
Member

You can keep it a system unit and use systemctl --global instead of systemctl --user. This way it will be also easier to do it before relevant user units are started.

@Guiiix
Copy link
Copy Markdown
Member Author

Guiiix commented Mar 1, 2026

You can keep it a system unit and use systemctl --global instead of systemctl --user. This way it will be also easier to do it before relevant user units are started.

Oh god you're absolutely right! I made it way more complicated than it needed to be... I force pushed a new commit. Now there's a single service which is simply runs systemctl --global --runtime mask gvfs-daemon.service and it works fine :)

Comment thread vm-systemd/setup-minimal-vm Outdated
setup_minimal_netvm() {
if [ "$UID" == "0" ]; then
/usr/lib/systemd/systemd-sysctl /etc/sysctl.d/82-qubes-minimal-sys-net.conf.optional
/usr/bin/systemctl --global --runtime mask gvfs-daemon.service
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hardcode the path to /usr/bin?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No particular reason, if you think it might cause issues, I'll remove it

Copy link
Copy Markdown
Contributor

@ben-grande ben-grande Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a recent problem of the merge of /usr/sbin with /usr/bin, because some paths were hardcoded, package migration was painful and scripts broke. I don't think /usr/bin will ever change, but if you are worried about path, than everything should be hardcoded: /bin/test etc. I prefer no hardcoding of path. The the environment variable PATH decide.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok make sense. Thank you, let me fix that :)

Comment thread vm-systemd/setup-minimal-vm Outdated
fi
}

is_minimal_netvm && setup_minimal_netvm
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, being the last line, will cause the service to be considered failed in non-minimal vm. Better use if syntax to avoid this side effect.

Comment thread vm-systemd/setup-minimal-vm Outdated


setup_minimal_netvm() {
if [ "$UID" == "0" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing that requires bash is this line, ==. What about:

#!/bin/sh
...
if test "$(id -u)" = "0"; then
...

Some programs try to start gvfs-daemon, which refusing
to start when minimal-vm is enabled, using a dbus method call
and resulting in timeouts.

Trying to start a masked service is detected by Dbus and doesn't
trigger any timeout.

The service is masked at runtime thanks to a new service executed
when running a qube with minimal-netvm or minimal-usbvm.
@marmarek marmarek merged commit 0a67a77 into QubesOS:main Mar 21, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some GUI programs from sys-net and sys-usb take a long time to start

4 participants