add cpu power mode
This commit is contained in:
@@ -141,11 +141,11 @@ if ! sudo visudo -c; then
|
||||
error "Sudoers file has syntax errors! Please fix manually with 'sudo visudo'"
|
||||
fi
|
||||
|
||||
# Open all UART serial ports and disable HDMI (avoid duplication)
|
||||
info "Configuring UART serial ports and disabling HDMI to save power..."
|
||||
# Open all UART serial ports and disable HDMI + Bluetooth (avoid duplication)
|
||||
info "Configuring UART serial ports and disabling HDMI/Bluetooth to save power..."
|
||||
if ! grep -q "enable_uart=1" /boot/firmware/config.txt; then
|
||||
echo -e "\nenable_uart=1\ndtoverlay=uart0\ndtoverlay=uart1\ndtoverlay=uart2\ndtoverlay=uart3\ndtoverlay=uart4\ndtoverlay=uart5\n\n# Disable HDMI to save power (~20-30mA)\nhdmi_blanking=2" | sudo tee -a /boot/firmware/config.txt > /dev/null
|
||||
success "UART configuration and HDMI disable added."
|
||||
echo -e "\nenable_uart=1\ndtoverlay=uart0\ndtoverlay=uart1\ndtoverlay=uart2\ndtoverlay=uart3\ndtoverlay=uart4\ndtoverlay=uart5\n\n# Disable HDMI to save power (~20-30mA)\nhdmi_blanking=2\n\n# Disable Bluetooth to save power (~20-30mA)\ndtoverlay=disable-bt" | sudo tee -a /boot/firmware/config.txt > /dev/null
|
||||
success "UART configuration, HDMI and Bluetooth disable added."
|
||||
else
|
||||
warning "UART configuration already set. Skipping."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user