A modern Flutter application for controlling MSI laptop features with a beautiful, intuitive interface.
- Features
- Technical Architecture
- Technical Implementation
- Prerequisites
- Installation
- Configuration
- Project Structure
- Contributing
- License
- Acknowledgments
- Customizable fan speed profiles
- Auto and Advanced speed modes
- CPU generation-specific optimizations
- Real-time fan speed monitoring
- Temperature-based fan curve control
- Multiple fan zones support (CPU, GPU)
- Universal and Custom profile support
- Persistent configuration storage
- Profile switching capabilities
- Responsive design
- Intuitive controls
- Real-time monitoring dashboard
graph TD
subgraph Application Layer
A[Dragon Center App]
C[Config Manager]
D[Fan Control]
B[Setup Service]
end
subgraph Hardware Layer
H[EC Helper]
I[System Integration]
J[Fan Profiles]
K[Temperature Monitoring]
L[Speed Control]
end
subgraph Storage Layer
F[Shared Preferences]
G[Configuration Files]
M[Profile Storage]
end
A --> B
A --> C
A --> D
B --> F
C --> G
D --> H
D --> J
D --> K
D --> L
C --> M
class A,B,C,D app;
class H,I,J,K,L hw;
class F,G,M storage;
graph LR
subgraph Application
A[Fan Control Service]
B[Temperature Monitor]
C[Battery Service]
end
subgraph EC Interface
D[EC Helper]
E[Register Manager]
F[Error Handler]
end
subgraph Hardware Registers
G[Fan Control Registers]
H[Temperature Registers]
I[Battery Control Registers]
end
A --> D
B --> D
C --> D
D --> E
E --> F
E --> G
E --> H
E --> I
class A,B,C app;
class D,E,F interface;
class G,H,I hw;
sequenceDiagram
participant UI as User Interface
participant FC as Fan Controller
participant EC as EC Helper
participant HW as Hardware
Note over UI,HW: Fan Speed Update Process
UI->>FC: Set Fan Speed
activate FC
FC->>FC: Validate Speed Range
FC->>EC: Write Speed Value
activate EC
EC->>EC: Validate Register Access
EC->>HW: Update Hardware Register
activate HW
HW-->>EC: Confirm Update
deactivate HW
EC-->>FC: Return Status
deactivate EC
FC-->>UI: Update Display
deactivate FC
Note over UI,HW: Temperature Monitoring Process
loop Every 500ms
HW->>EC: Temperature Update
EC->>FC: Process Temperature
FC->>FC: Calculate Required Speed
FC->>EC: Adjust Speed if Needed
EC->>HW: Update Fan Speed
end
- PWM-based control (0-100 range)
- RPM monitoring (0-5000 RPM)
- Temperature-based adjustment
- Profile-based management
- Real-time sensor reading (500ms intervals)
- Temperature thresholds:
- Warning: 60°C
- Critical: 80°C
- Automatic fan speed adjustment
graph LR
A[User Input] --> B[Config Manager]
B --> C[Validation]
C --> D[Storage]
D --> E[Profile]
E --> F[Hardware]
- Direct EC register access
- Low-level hardware control
- Real-time monitoring
- Hardware state validation
- Flutter SDK (>=3.0.0)
- Dart SDK (>=3.0.0)
- Linux development tools:
sudo apt update sudo apt install build-essential cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- Linux system with MSI laptop
- Required system permissions for EC access
- D-Bus system service
- System tray support
- Hardware-specific drivers
- ACPI EC Driver (acpi_ec)
The Dragon Center comes with an automated installer script that handles all setup tasks:
# Clone the repository if you haven't already
git clone https://github.com/agnath18K/dragon_center_linux.git
cd dragon_center_linux
# Run the installer script with sudo
sudo ./install_dragon_service.shThe installer script provides three options:
- Full Install - Installs the ACPI EC driver, adds your user to the 'ec' group, installs the .deb package, and sets up the systemd service
- Service-Only Install - Only sets up the systemd service (useful if you've already installed the driver and application)
- Uninstall - Removes the Dragon service, ACPI EC driver, and optionally the application files
If you prefer to install components manually:
# Clone the acpi_ec repository
git clone https://github.com/agnath18K/acpi_ec.git
cd acpi_ec
# Install build dependencies
sudo apt update
sudo apt install build-essential linux-headers-$(uname -r)
# Install the driver
sudo ./install.sh
# Add your user to the ec group (required for EC access)
sudo usermod -a -G ec $USERNote: You'll need to log out and back in for the group changes to take effect.
# Install the package
sudo dpkg -i debian/packages/dragoncenter_1.0.1_amd64.debCreate a systemd service file at /etc/systemd/system/dragon-service.service:
[Unit]
Description=Flutter Binary Service for Dragon
After=display-manager.service
Wants=display-manager.service
[Service]
Type=simple
User=root
ExecStartPre=/bin/bash -lc "xhost +SI:localuser:root"
ExecStartPre=/bin/sleep 10
ExecStart=/usr/local/lib/dragoncenter/dragon
WorkingDirectory=/usr/local/lib/dragoncenter
Restart=always
RestartSec=5
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/YOUR_USERNAME/.Xauthority
ExecStop=/bin/kill -s SIGTERM $MAINPID
[Install]
WantedBy=graphical.target
Then enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable dragon-service.service
sudo systemctl start dragon-service.serviceIf you encounter any issues with EC access:
- Verify the acpi_ec driver is loaded:
lsmod | grep acpi_ec- Check driver status:
dmesg | grep acpi_ec- Verify device file permissions:
ls -l /dev/ec*- Check your group membership:
groups- Pre-configured settings
- Automatic temperature management
- User-defined fan curves
- Temperature thresholds
- Custom monitoring options
- Custom fan curves
- Temperature thresholds
- Minimum/maximum speeds
lib/
├── core/
│ ├── presentation/ # UI components
│ │ ├── pages/ # Application pages
│ │ ├── widgets/ # Reusable widgets
│ │ └── themes/ # UI themes
│ ├── services/ # Business logic
│ │ ├── setup/ # Setup services
│ │ ├── fan/ # Fan control
│ │ └── system/ # System integration
│ └── utils/ # Helper functions
│ ├── ec/ # EC communication
│ ├── config/ # Configuration
│ └── logging/ # Logging system
├── models/ # Data models
│ ├── fan/ # Fan-related models
│ ├── system/ # System models
│ └── config/ # Configuration models
├── shared/ # Shared components
│ ├── widgets/ # Common widgets
│ ├── constants/ # Constants
│ └── types/ # Type definitions
└── main.dart # Application entry point
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow Flutter's style guide
- Add tests for new features
- Update documentation
- Maintain backward compatibility
- Handle errors gracefully
This project is licensed under the MIT License - see the LICENSE file for details.
- MSI for their laptop hardware
- Flutter team for the amazing framework
- All contributors who have helped shape this project
- Open-source community for inspiration and tools



