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

SystemD dropins for minimal sys-net and sys-usb #540

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Guiiix
Copy link
Contributor

@Guiiix Guiiix commented Dec 21, 2024

Some unnecessary services are running on sys-net and sys-usb which consumes RAM for nothing. SystemD dropins are added to automatically disable identified unecessary services by enabling minimal-netvm or minimal-usbvm service on the sys-vms with qvm-service.

@marmarek
Copy link
Member

packaging need an update, both RPM and DEB. See CI logs, for example:

14:34:27 [qb.build_rpm.core-agent-linux.vm-fc40.build] DEBUG:     Installed (but unpackaged) file(s) found:
14:34:27 [qb.build_rpm.core-agent-linux.vm-fc40.build] DEBUG:    /usr/lib/systemd/user/at-spi-dbus-bus.service.d/30_qubes.conf
14:34:27 [qb.build_rpm.core-agent-linux.vm-fc40.build] DEBUG:    /usr/lib/systemd/user/gvfs-daemon.service.d/30_qubes.conf
14:34:27 [qb.build_rpm.core-agent-linux.vm-fc40.build] DEBUG:    /usr/lib/systemd/user/pipewire.service.d/30_qubes.conf
14:34:27 [qb.build_rpm.core-agent-linux.vm-fc40.build] DEBUG:    /usr/lib/systemd/user/wireplumber.service.d/30_qubes.conf

@marmarek
Copy link
Member

PipelineRetry

@Guiiix Guiiix force-pushed the main branch 4 times, most recently from b66e7fa to 20f59e3 Compare December 27, 2024 09:19
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.14%. Comparing base (8bfa751) to head (f4b3d19).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #540      +/-   ##
==========================================
- Coverage   70.57%   70.14%   -0.43%     
==========================================
  Files           3        3              
  Lines         469      469              
==========================================
- Hits          331      329       -2     
- Misses        138      140       +2     

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

@qubesos-bot
Copy link

qubesos-bot commented Dec 27, 2024

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025010617-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=2024111705-4.3&flavor=update

  • system_tests_pvgrub_salt_storage

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

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

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

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

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

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

  • system_tests_extra

    • TC_00_QVCTest_whonix-workstation-17: test_010_screenshare (failure)
      AssertionError: 13.069686413555461 not less than 2.0

    • TC_01_InputProxyExclude_debian-12-xfce: test_000_qemu_tablet (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_01_InputProxyExclude_fedora-41-xfce: test_000_qemu_tablet (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_manager

    • tests: test_vm_settings (error)
      ModuleNotFoundError: No module named 'pytest'

    • tests: test_clone_vm (error)
      ModuleNotFoundError: No module named 'pytest'

    • tests: test_backup (error)
      ModuleNotFoundError: No module named 'pytest'

    • tests: test_qube_manager (error)
      ModuleNotFoundError: No module named 'pytest'

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

Failed tests

15 failures
  • system_tests_pvgrub_salt_storage

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

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

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

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

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

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

  • system_tests_extra

    • TC_00_QVCTest_whonix-workstation-17: test_010_screenshare (failure)
      AssertionError: 13.069686413555461 not less than 2.0

    • TC_01_InputProxyExclude_debian-12-xfce: test_000_qemu_tablet (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_01_InputProxyExclude_fedora-41-xfce: test_000_qemu_tablet (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_manager

    • tests: test_vm_settings (error)
      ModuleNotFoundError: No module named 'pytest'

    • tests: test_clone_vm (error)
      ModuleNotFoundError: No module named 'pytest'

    • tests: test_backup (error)
      ModuleNotFoundError: No module named 'pytest'

    • tests: test_qube_manager (error)
      ModuleNotFoundError: No module named 'pytest'

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

Fixed failures

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

3 fixed
  • system_tests_extra

    • TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError: 0 == 0
  • system_tests_basic_vm_qrexec_gui_zfs

    • switch_pool: Failed (test died)
      # Test died: command 'dnf install -y ./zfs-release.rpm' failed at /...
  • system_tests_audio@hw1

Unstable tests

  • system_tests_update

    update2/Failed (1/5 times with errors)
    • job 121711 # Test died: command '(set -o pipefail; qubesctl --show-output stat...
  • system_tests_update@hw7

    update2/Failed (1/5 times with errors)
    • job 121711 # Test died: command '(set -o pipefail; qubesctl --show-output stat...
  • system_tests_update@hw1

    update2/Failed (1/5 times with errors)
    • job 121711 # Test died: command '(set -o pipefail; qubesctl --show-output stat...

@marmarek
Copy link
Member

Pipewire drop-in needs a different name:

fedora-41-xfce:err: Transaction test error:
fedora-41-xfce:err:   file /usr/lib/systemd/user/pipewire.service.d/30_qubes.conf conflicts between attempted installs of pipewire-qubes-4.3.4-1.fc41.x86_64 and qubes-core-agent-systemd-4.3.14-1.3.fc41.x86_64

@marmarek
Copy link
Member

Without polkit(?), the right click nm-applet checkboxes ("enable networking", "enable wifi") don't work...

@Guiiix
Copy link
Contributor Author

Guiiix commented Dec 28, 2024

@marmarek this is a mistake. Polkit should be disabled only for minimal sys-usb. Same for Bluetooth.

Some unnecessary services are running on sys-net and sys-usb which consumes RAM for nothing.
SystemD dropins are added to automatically disable identified unecessary services by enabling minimal-netvm or minimal-usbvm  service on the sys-vms with qvm-service.
@marmarek
Copy link
Member

marmarek commented Jan 3, 2025

I've tested it a bit on Novacustom V56 laptop, and with sys-net set to 300MB wifi quite often crashes (page allocation failure in dmesg) after system suspend. In fact, it happens also quite ofen with 350MB too...

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.

3 participants