| | #!/bin/bash |
| | |
| |
|
| | echo "Setting up power profile test environment..." |
| |
|
| | |
| | if command -v powerprofilesctl &> /dev/null; then |
| | echo "Using powerprofilesctl..." |
| | powerprofilesctl set balanced |
| | current_profile=$(powerprofilesctl get) |
| | echo "Current power profile: $current_profile" |
| | |
| | if [ "$current_profile" = "balanced" ]; then |
| | echo "Setup completed successfully - power profile set to balanced" |
| | else |
| | echo "Setup failed - could not set power profile to balanced" |
| | exit 1 |
| | fi |
| | else |
| | echo "powerprofilesctl not available, trying alternative methods..." |
| | |
| | |
| | if command -v cpupower &> /dev/null; then |
| | echo "Using cpupower..." |
| | cpupower frequency-set -g conservative |
| | echo "Set CPU governor to conservative (power-saving mode)" |
| | else |
| | echo "No power management tools available" |
| | echo "This is a simulation - assuming balanced mode is set" |
| | fi |
| | |
| | echo "Setup completed (using available tools)" |
| | fi |