SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

Failed services on Steam Deck

Open docwhat opened this issue 3 years ago • 3 comments

Your system information

  • Steam client version: 1661822214
  • SteamOS version: 3.3.1
  • Opted into Steam client beta?: Yes (Steam Deck with Preview enabled)
  • Opted into SteamOS beta?: Yes (Steam Deck with Preview enabled)
  • Have you checked for updates in Settings > System?: Yes

Please describe your issue in as much detail as possible:

No services should be failed. I "Switched to Desktop Mode" and I get these failed services:

(deck@steamdeck ~)$ systemctl --failed
  UNIT                                  LOAD   ACTIVE SUB    DESCRIPTION                                 
● grub-recordfail.service               loaded failed failed Record successful boot for GRUB
● shadow.service                        loaded failed failed Verify integrity of password and group files
● steamos-finish-oobe-migration.service loaded failed failed Finish migration from OOBE build

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
3 loaded units listed.
(deck@steamdeck ~)$

Steps for reproducing this issue:

  1. Switch to Desktop Mode (Steam Deck)
  2. systemctl --failed

Notes by docwhat

  • grub-recordfail.service is failing because it is trying to write to /boot/grub/grubenv. It is trying to unset any recordfail being set by grub-editenv. Since the partition is readonly, this isn't a problem. You can systemctl disable --now grub-recordfail.service to prevent this error in the future.

  • shadow.service is failing because the directory /var/lib/ntp is missing. It's checking /etc/passwd and is making sure all the home directories exist. Either remove ntpd or created the directory.

  • steamos-finish-oobe-migration.service is incorrectly failing. The bash script /usr/lib/steamos/steamos-finish-oobe-migration has this line:

    # Shouldn't have been invoked if $old_home isn't here or is a symlink.
    [[ -d $old_home && ! -L $old_home ]] || die "'$old_home' does not exist or is not a folder, nothing to migrate"
    

    It should read:

    # Shouldn't have been invoked if $old_home isn't here or is a symlink.
    if [[ -d $old_home && ! -L $old_home ]]; then
      warn "'$old_home' does not exist or is not a folder, nothing to migrate"
      exit 0
    fi
    

Loving the Steam Deck so far!

docwhat avatar Sep 01 '22 01:09 docwhat

steamos-finish-oobe-migration.service is incorrectly failing. The bash script /usr/lib/steamos/steamos-finish-oobe-migration has this line:

# Shouldn't have been invoked if $old_home isn't here or is a symlink. [[ -d $old_home && ! -L $old_home ]] || die "'$old_home' does not exist or is not a folder, nothing to migrate"

What's wrong with this? It works fine for me here.

bertogg avatar Sep 01 '22 13:09 bertogg

It shouldn't be using die which exits with a non-zero exit code and causes systemctl --failed to show that service as failing.

If the $old_home is a symlink to a directory then that means the script has run at some point in the past and completed successfully or it never needed migration. There is no error, this is a good thing.

The correct response is to log a warn or an info and exit with an exit code of 0 to tell systemd that the service is happy.

docwhat avatar Sep 05 '22 03:09 docwhat

Ah, I see, I think that the problem is that the service shouldn't run in the first place.

ConditionPathIsDirectory=/home/doorstop is not enough because this check follows symbolic links. Because of that the doorstop -> deck symlink doesn't prevent the service from running, and it fails as you point out.

Thanks!

bertogg avatar Sep 05 '22 14:09 bertogg

steamos-finish-oobe-migration.service can be fixed by adding another condition:

--- /usr/lib/systemd/system/steamos-finish-oobe-migration.service
+++ /usr/lib/systemd/system/steamos-finish-oobe-migration.service
@@ -16,6 +16,7 @@
 Before=multi-user.target
 Before=steamos-create-homedir.service
 ConditionPathIsDirectory=/home/doorstop
+ConditionPathIsSymbolicLink=!/home/doorstop

 [Service]
 Type=oneshot

baodrate avatar Nov 03 '22 16:11 baodrate

Yes, that fix is correct :slightly_smiling_face:

Just to clarify, these issues are being handled and will be fixed in a future release.

bertogg avatar Nov 03 '22 17:11 bertogg

These services should be working fine now. We can close this issue.

bertogg avatar Feb 09 '24 14:02 bertogg