Qubes-core Service failed to start

A week ago, for no apparent reason except for updating dom0 regularly (even just prior the time of writing this post), qubes-core.service began to failed to start.

I have searched forum and github for an error, but couldn’t find anything even remotely related to it that I’m able to actually relate it, haha.

Can someone else at least check their logs to confirm no error on this, please?

Any help appreciated.

Qubes Os v4.2.3
xen_version            : 4.17.4
Linux 6.10.10-1.qubes.fc37.x86_64
  
Installed Packages:  
  
kernel-latest-qubes-vm.x86_64                     	1000:6.10.10-1.qubes.fc37 
kernel-qubes-vm.x86_64                            	1000:6.6.48-1.qubes.fc37 
qubes-core-admin-client.noarch                    	4.2.14-1.fc37 
qubes-core-dom0.noarch                            	4.2.34-1.fc37 
qubes-core-dom0-linux.x86_64                      	4.2.28-1.fc37 
qubes-core-dom0-linux-kernel-install.x86_64       	4.2.28-1.fc37 
qubes-core-qrexec-dom0.x86_64                     	4.2.21-1.fc37

Here are some logs and outputs.

[user@dom0 ~]$ sudo journalctl | grep qubes-core

dom0 systemd[1]: /usr/lib/systemd/system/qubes-core.service:8: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
dom0 systemd[1]: Starting qubes-core.service - Qubes Dom0 startup setup...
dom0 systemd[1]: qubes-core.service: Main process exited, code=exited, status=1/FAILURE
dom0 systemd[1]: qubes-core.service: Failed with result 'exit-code'.
dom0 systemd[1]: Failed to start qubes-core.service - Qubes Dom0 startup setup.
dom0 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-core comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
dom0 kernel: audit: type=1130 audit(1726917623.960:179): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=qubes-core comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

[user@dom0 ~]$ sudo systemctl start qubes-core.service

Job for qubes-core.service failed because the control process exited with error code.
See "systemctl status qubes-core.service" and "journalctl -xeu qubes-core.service" for details.

[user@dom0 ~]$ sudo systemctl status qubes-core.service

× qubes-core.service - Qubes Dom0 startup setup
     Loaded: loaded (/usr/lib/systemd/system/qubes-core.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat  EDT; 9s ago
    Process: 7654 ExecStart=/usr/lib/qubes/startup-misc.sh (code=exited, status=1/FAILURE)
   Main PID: 7654 (code=exited, status=1/FAILURE)
        CPU: 402ms

dom0 systemd[1]: Starting qubes-core.service - Qubes Dom0 startup setup...
dom0 startup-misc.sh[7678]: libxl: error: libxl_sched.c:232:sched_credit_domain_set: Getting domain sched credit: Invalid argument
dom0 startup-misc.sh[7678]: libxl_domain_sched_params_set failed.
dom0 startup-misc.sh[7654]: /usr/lib/qubes/startup-misc.sh: line 84: echo: write error: Invalid argument
dom0 systemd[1]: qubes-core.service: Main process exited, code=exited, status=1/FAILURE
dom0 systemd[1]: qubes-core.service: Failed with result 'exit-code'.
dom0 systemd[1]: Failed to start qubes-core.service - Qubes Dom0 startup setup.

[user@dom0 ~]$ sudo journalctl -xeu qubes-core.service

Journal file /var/log/journal/954038e67e744b0f8327af5b1ef58693/user-1000@00061e8efedd072b-fd4972d2fe2b2352.journal~ is truncated, ignoring file.
Sep  dom0 startup-misc.sh[6524]: /usr/lib/qubes/startup-misc.sh: line 84: echo: write error: Invalid argument
Sep  dom0 systemd[1]: qubes-core.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit qubes-core.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
dom0 systemd[1]: qubes-core.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit qubes-core.service has entered the 'failed' state with result 'exit-code'.
dom0 systemd[1]: Failed to start qubes-core.service - Qubes Dom0 startup setup.
░░ Subject: A start job for unit qubes-core.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit qubes-core.service has finished with a failure.
░░ 
░░ The job identifier is 2396 and the job result is failed.

Do you have mem_sleep_default=deep in your kernel command line options?
Check the output of this command in dom0 terminal:

cat /proc/cmdline

If yes then try to remove it from /etc/default/grub and rebuild the GRUB config by running this command in dom0 terminal:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Maybe you’ve specified this option but your machine is not supporting S3 sleep.

I do, thanks.

Exactly, but it was God knows how long ago, not a week before?

Can you please explain a bit more relation between mem_sleep and qubes-core?
Do you think it would resolve the issue? I’m asking, because rebooting Qubes is a process in my case which takes an hour or more, setting the environment as I prefer it, haha.

I can see now that the last time I edited grub was around beginning of August, and I had multiple reboots after that, but the error started to be found in logs a week ago, as I said…?

It should fix your issue.
I guess there was a recent change related to sleep in Qubes OS.
The qubes-core expects for startup-misc.sh script to successfully finish but it’s failing because you’ve set S3 sleep in the kernel command line options but the actual S3 sleep mode capability is missing in the system.

1 Like

Thanks. Once I restart machine I will be back to hopefully mark your post as solution.

That was definitively it. Solution.

Thanks!