Systemd service files: Add timeouts, [Install] sections, and fix dependencies#161
Draft
Systemd service files: Add timeouts, [Install] sections, and fix dependencies#161
Conversation
…tion to all 52 systemd service files Co-authored-by: anand-ky <37086488+anand-ky@users.noreply.github.com>
Co-authored-by: anand-ky <37086488+anand-ky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review and improve systemd service files for compatibility
Systemd service files: Add timeouts, [Install] sections, and fix dependencies
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
52 systemd service files lacked timeout directives (risking indefinite hangs on embedded systems), [Install] sections (preventing
systemctl enable), and security isolation. Four files had dependency inconsistencies.Changes
Universal updates (all 52 files)
TimeoutStartSec=30andTimeoutStopSec=10[Install]section withWantedBy=multi-user.target(51 files; wpeframework-powermanager already had it)PrivateTmp=yesfor /tmp namespace isolationDependency fixes
btmgr.service(was mixingbluetooth.servicein Requires andbtmgr.servicein After)wpeframework.servicedependency andConditionPathExists=/tmp/wpeframeworkstartedWants=for optional dependencies to align Requires and After-r 200retry parameterExample
Impact
systemctl enableOriginal prompt
Systemd Service Files Review and Improvements
Objective
Review all systemd service files in
systemd/system/directory against RDK Architecture best practices and implement necessary fixes and improvements for systemd 230+ compatibility.Critical Issues to Address
1. 🔴 Missing Timeout Directives (ALL FILES)
Impact: Services may hang indefinitely during start/stop, blocking boot/shutdown in embedded systems.
Required changes for ALL service files:
TimeoutStartSec=30(or appropriate value)TimeoutStopSec=10(conservative value for embedded systems)Example:
2. 🔴 Service Type Best Practices
Current issue: Several files don't explicitly specify service type or could use better types.
Guidelines:
Type=notifyorType=oneshotoverType=simpleType=oneshot: UseRemainAfterExit=yesfor state-maintaining servicesBefore=/After=directives3. 🔴 Dependency Management Issues
Files with dependency concerns:
wpeframework-bluetooth.service
Requires=bluetooth.servicebutAfter=btmgr.service- inconsistent dependency namingbluetooth.serviceorbtmgr.servicein bothwpeframework-displaysettings.service
wpeframework.servicedependency and noConditionPathExists=/tmp/wpeframeworkstartedwpeframework.serviceto Requires/After and add conditionwpeframework-hdmicecsource.service
Requires=wpeframework.serviceonly, butAfter=includes additional serviceswpeframework-powermanager.service dsmgr.servicetoRequires=or useWants=with proper ordering4. ⚡ Missing [Install] Section
Files missing
[Install]section withWantedBy=multi-user.target:Impact: Services cannot be enabled for automatic boot without manual symlinks.
Fix: Add to all files:
5. 💡 Recommendations for All Files
Add Documentation Comments
Add comments explaining:
Consider PrivateTmp=yes
For security isolation, add to [Service] section:
PrivateTmp=yesTrailing Whitespace
Several files have trailing whitespace - clean this up for consistency.
Implementation Guidelines
For Each Service File:
Add timeout directives:
Add [Install] section:
...
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.