TABLE OF CONTENTS
Overview
By default, the Cardshark system image is configured to conserve battery power by automatically entering a low-power sleep state after approximately 20 minutes of inactivity when running on battery. This behavior is designed to extend battery life during periods when the device is not actively in use.
Details
Automatic Sleep: After about 20 minutes on battery power, the system transitions into a sleep state. Depending on your configuration, this may involve suspend, hibernate, or a hybrid-sleep mode.
Benefits: This feature helps preserve battery life in field operations or during periods of inactivity.
Considerations: While sleep mode conserves battery, it may interfere with applications that require continuous operation. In such cases, you might prefer to disable the sleep functionality.
System Configuration Files
Sleep and power management behavior are governed by systemd configuration files. Two key files are:
/etc/systemd/sleep.conf: This file controls sleep behavior (suspend, hibernate, hybrid-sleep, etc.). By default, it uses compile-time settings. You can modify its options directly or create drop-in files under /etc/systemd/sleep.conf.d/ to customize your sleep behavior.
/etc/systemd/logind.conf: This file manages session and power key events, including idle time behavior. The defaults are set at compile time, but you can override them by editing this file or adding drop-in files in the /etc/systemd/logind.conf.d/ directory. For example, to disable any automatic idle action (such as locking or sleeping due to inactivity), you could set:
[Login] IdleAction=ignore IdleActionSec=0
Disabling Sleep Mode
If continuous operation is required, you can disable the automatic sleep functionality by masking the related systemd targets. Execute the following command:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
After running the command, reboot the system for the changes to take effect. Once rebooted, the device will remain active without automatically entering a low-power sleep state.
Warning
Disabling sleep mode will lead to increased power consumption and reduced battery life during periods of inactivity. Be sure that continuous operation is necessary for your use case before applying these changes.
Suspend Mode
If the application permits, the Cardshark may be put into a suspended state intentionally. This will lower the power draw to roughly 100mA.
Enter Suspend Mode
- From a host computer or other host device run the suspend suspend command on the Cardshark unit.
Leave Suspend Mode
- From an attached keyboard, pressing any key will wake the system.
- Placing the magnetic commissioning tool on the back of device will wake the system.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article