668f91fbb2
* Clean up quirks. * New AMD default TDP (15w). * Fix GPU perf setting bug.
34 lines
817 B
Bash
Executable file
34 lines
817 B
Bash
Executable file
#!/bin/bash
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
. /etc/profile
|
|
|
|
### Set the default TDP if it isn't defined.
|
|
MYTDP=$(get_setting system.overclock)
|
|
if [ -z "${MYTDP}" ]
|
|
then
|
|
# Set default TDP
|
|
set_settings system.overclock 15w
|
|
fi
|
|
|
|
### Set sleep mode to mem sleep (S3)
|
|
MYSLEEPMODE=$(get_setting system.suspendmode)
|
|
if [ -z "${MYSLEEPMODE}" ]
|
|
then
|
|
/usr/bin/setsuspendmode mem
|
|
fi
|
|
|
|
### Set the default device configuration
|
|
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
|
|
DEVICE_BASE_TDP="15w"
|
|
DEVICE_LED_CONTROL=false
|
|
DEVICE_VOLUMECTL=true
|
|
DEVICE_PLAYBACK_PATH_SPK="SPK"
|
|
DEVICE_PLAYBACK_PATH_HP="HP"
|
|
DEVICE_FUNC_KEYA_MODIFIER="KEY_LEFTCTRL"
|
|
DEVICE_FUNC_KEYB_MODIFIER="KEY_D"
|
|
UI_SERVICE="weston.service"
|
|
|
|
DEVICE_BRIGHTNESS="hardware"
|
|
EOF
|