Power Controlling for ASUS laptops
This application is created based on the scripts provided by u/desentizised in this Reddit post "How to gain even more control of your Flow X13". There are 4 profiles you can choose from (ULTRA, SILENT, BALANCED and PERFORMANCE), which are fully customizable through the applications.propreties. You may compile the application yourself, which is created with Java and JavaFX, or run it straight away through the ready executable.
Windows |
---|
![]() ![]() ![]() |
Windows |
---|
Download |
Since version 1.1 the executable image is not created with GraalVM and Gluon Client, since there is luck of AWT support which is needed for System Tray icons. Hence, jpackage is used to create the application image.
To compile the software code yourself in Windows you would need to apply the following steps:
Windows Sample
set JAVA_HOME=C:\Programs\Java\jdk-17.0.4
The below gradle command will create AsusProfiler-1.3.jar under ./build/libs
gradlew.bat clean build
set PATH=%PATH%;%JAVA_HOME%\bin
Since the application GUI is created with JavaFX you will need to download the latest jmods from here. Once downloaded, extract the zip file in your preffered path. In this example I have download jmods 18.0.2 and extracted them under C:\Programs\Java\javafx-jmods-18.0.2.
jpackage --input build/libs ^
--name AsusProfiler ^
--main-jar AsusProfiler-1.3.jar ^
--type app-image ^
--module-path "C:\Programs\Java\javafx-jmods-18.0.2" ^
--add-modules javafx.controls,javafx.fxml,javafx.graphics ^
--app-version 1.3 ^
--vendor "JavaSuns" ^
--copyright "Copyright (C) 2022-23" ^
--icon src\main\resources\javasuns\profiler\asus\image\Logo.ico
The AsusProfiler directory is created with the Windows executable in it. You would need to add the application.properties file in it before being able to run it.
To compile the software code yourself in Windows you would need to apply the following steps:
In order to create Microsft Windows native apps you will need Microsoft Visual Studio. Instructions can be found in Gluon's website.
GraalVM is mandatory for creating native apps. It is available for download on the GraalVM website. If you have a JDK already installed on your PC, it would be a wise to place GraalVM binaries under the same Java directory for consolidation. ASUS Profiler app has been tested against OpenJDK version 17.0.4 and GraalVM Community Edition 22.0.
Windows Sample
set JAVA_HOME=C:\Programs\Java\jdk-17.0.4
set GRAALVM_HOME=C:\Programs\Java\graalvm-ce-java17-22.1.0
You can run the regular tasks to build and run your project as a regular Java project:
gradlew.bat clean build
gradlew.bat run
Once you are able to run the pure Java project, you proceed with the native taks:
This task does the AOT compilation. It is a very intensive and lengthy task (several minutes, depending on your project and CPU).
Run the below commands through x64 Native Tools Command Prompt for VS 2022:
gradlew.bat nativeCompile # AOT Compilation
gradlew.bat nativeLink # Generates native executable
gradlew.bat nativeRun # Runs the generated executable
Alternatively, you may combine all the above commands into one:
gradlew.bat nativeBuild nativeRun # "nativeBuild" combines nativeCompile and nativeLink.