This document details the persistence mechanisms implemented to ensure reliable Bluetooth operation across system reboots and various system states.
- Automatic startup at boot via systemd
- Service dependencies properly configured
- Automatic restart on failures
- Proper shutdown handling
- Persistent udev rules for device detection
- Power management settings preservation
- USB device reset handling
- BCM chip-specific configurations
- Automatic power management optimization
- Sleep/resume handling
- USB autosuspend control
- Device state preservation
- Persistent log storage in /var/log/bluetooth-monitor/
- Log rotation configuration
- State tracking across reboots
- Recovery action history
Location: /etc/systemd/system/bluetooth-monitor.service
Purpose: Ensures the monitoring service starts automatically and persists across reboots.
Location: /etc/udev/rules.d/99-bluetooth-apple.rules
Purpose: Provides persistent device configuration and power management settings.
Location: /etc/logrotate.d/bluetooth-monitor
Purpose: Ensures proper log management and rotation.
- Persistent storage of device states
- Recovery action tracking
- Progressive recovery strategies
- Firmware presence verification
- Proper firmware loading
- Version tracking
- Persistent error tracking
- Recovery success rate monitoring
- Issue pattern recognition
In cases where automatic persistence mechanisms fail:
-
Check systemd service status:
sudo systemctl status bluetooth-monitor
-
Verify udev rules:
sudo udevadm control --reload-rules sudo udevadm trigger
-
Review logs:
journalctl -u bluetooth-monitor cat /var/log/bluetooth-monitor/bluetooth_monitor.log
-
Reset persistence:
sudo systemctl restart bluetooth-monitor