- Welcome
- September 2021 Update
- May 2021 Update
- April 2021 Update
- March 2021 Update
- Build a fedora kernel: Updated
- Feb 2021 Update
- Getting Sound Working
- asusctl Manual
- 🔗 Programs Available
- 🔗 asusd
- 🔗 AniMe control
- 🔗 Config options
- 🔗 Led keyboard control
- 🔗 Supported laptops
- 🔗 Config options
- 🔗 Charge control
- 🔗 Bios control
- 🔗 Profiles
- 🔗 Fan curves
- 🔗 Support controller
- 🔗 asusd-user
- 🔗 Config options: AniMe
- 🔗 asusctl
- 🔗 CLI Usage and help
- 🔗 Keybinds
- 🔗 User NOTIFICATIONS via dbus
- 🔗 License & Trademarks
- Fedora 34 Setup Guide
- 🔗 Preparations
- 🔗 Disable Secure Boot
- 🔗 Use the Laptop Screen
- 🔗 Installation
- 🔗 Setup
- 🔗 Update the System
- 🔗 Using the Terminal
- 🔗 Edit Default Package Repositories
- 🔗 Do Update
- 🔗 Install Nvidia Graphics Drivers
- 🔗 Update System Boot Configuration
- 🔗 Install asusctl
- 🔗 Optional Steps
- 🔗 Keyboard Backlight
- 🔗 RGB Backlights
- 🔗 Switching from Nvidia GPU to AMD Integrated
- 🔗 Hide an Unnecessary Boot Message
- 🔗 Desktop Wigdets
- 🔗 Known Limitations
- 🔗 Nvidia GPU suspend issue on 2020 models of Zephyrus G14 and G15
- 🔗 Nvidia Graphics on Wayland Desktop
Welcome
Asus-Linux.org is an independent community effort that works to improve Linux support for Asus notebooks.
Many but not all ASUS ROG laptops work under Linux quite well. But there are always new models coming out, or older models that got missed. This project aims to solve all the issues you may have, and enable many ROG specific features.
Sound issues are the most common problem , and solving these requires a little more effort and patience — see the blog post about this plus visit the discord for guidance. Do note that the root problem is almost never pulse audio or pipewire — it’s the Realtek codec chip needing specific fixes in the kernel driver.
The second most common issue is that of device feature enablement such as:
- AniMe Matrix display
- RGB keyboard LEDs
- fn+key combos and media controls
- G-Sync enable on capable laptops
- Re-enable the dGPU after setting «iGPU On» in Windows
- and more All of the above is either enabled in asusctl already, or is enabled via patches to the kernel (and we provide pre-built kernels with the patches applied) which are steadily upstreamed.
Extra features we currently support are:
- Control graphics modes without reboots for switching between iGPU, dGPU, on-demand, and vfio (for VM pass-through)
- Set battery charge limit
- Fan curve control
Join the community and fork us on GitLab.com.
2021-09-12 — Reading time: 3 min
September 2021 Update
New kernel patches, asusctl updates and changes, supergfxctl
2021-09-12 — Reading time: 3 min
May 2021 Update
Kernel patches and statuses
2021-05-06 — Reading time: 5 min
April 2021 Update
2021 hardware suspend, project rename, AniMe work
2021-04-16 — Reading time: 5 min
March 2021 Update
2021 hardware, asusctl new features, kernel patches
2021-03-22 — Reading time: 4 min
Build a fedora kernel: Updated
Patches you might require won’t always be backported — this post will help you build a kernel with the required patches
2021-03-02 — Reading time: 3 min
Feb 2021 Update
Update and status of project
2021-02-19 — Reading time: 2 min
Getting Sound Working
An example of making Realtek Codec work on ASUS GX502
Источник
asusctl Manual
asusd is a utility for Linux to control many aspects of various ASUS laptops but can also be used with non-asus laptops with reduced features.
🔗 Programs Available
- asusd : The main system daemon. It is autostarted by a udev rule and systemd unit.
- asusd-user : The user level daemon. Currently will run an anime sequence, with RGB keyboard sequences soon.
- asusctl : The CLI for interacting with the system daemon
- asus-notify : A notification daemon with a user systemd unit that can be enabled.
🔗 asusd
asusd is the main system-level daemon which will control/load/save various settings in a safe way for the user, along with exposing a safe dbus interface for these interactions. This section covers only the daemon plus the various configuration file options.
The functionality that asusd exposes is:
- anime control
- led keyboard control (aura)
- charge limiting
- bios/efivar control
- power profile switching
- fan curves (if supported, this is auto-detected)
each of these will be detailed in sections.
🔗 AniMe control
Controller for the fancy AniMe matrix display on the lid of some machines. This controller is a work in progress.
🔗 Config options
If you have an AniMe device a few system-level config options are enabled for you in /etc/asusd/anime.conf ;
- «system»: [], : currently unused, is intended to be a default continuous sequence in future versions
- «boot»: [], : a sequence that plays on system boot (when asusd is loaded)
- «wake»: [], : a sequence that plays when waking from suspend
- «shutdown»: [], : a sequence that plays when shutdown begins
- «brightness»: : global brightness control, where ` is 0.0-1.0
Some default examples are provided but are minimal. The full range of configuration options will be covered in another section of this manual.
🔗 Led keyboard control
The LED controller (e.g, aura) enables setting many of the factory modes available if a laptop supports them. It also enables per-key RGB settings but this is a WIP and will likely be similar to how AniMe sequences can be created.
🔗 Supported laptops
Models GA401, GA502, GU502 support LED brightness change only (no RGB). However the GA401Q model can actually use three modes; static, breathe, and pulse, plus also use red to control the LED brightness intensity.
All models that have any form of LED mode control need to be enabled via the config file at /etc/asusd/asusd-ledmodes.toml . Unfortunately ASUS doesn’t provide any easy way to find all the supported modes for all laptops (not even through Armory Crate and its various files, that progrma downloads only the required settings for the laptop it runs on) so each model must be added as needed.
🔗 Config options
The defaults are located at /etc/asusd/asusd-ledmodes.toml , and on asusd start it creates /etc/asusd/aura.conf whcih stores the per-mode settings. If you edit the defaults file you must remove /etc/asusd/aura.conf and restart asusd.service with systemctl restart asusd .
🔗 /etc/asusd/asusd-ledmodes.toml
- prod_family : you can find this in journalctl -b -u asusd , or cat /sys/class/dmi/id/product_name . It should be copied as written. There can be multiple led-data groups of the same prod_family with differing board_names .
- board_names : is an array of board names in this product family. Find this in the journal as above or by cat /sys/class/dmi/id/board_name .
- standard are the factory preset modes, the names should corrospond to Armory Crate names
- multizone : some keyboards have 4 zones of LED control, this enables setting a colour in each zone. The keyboard must support this or it has no effect.
- per_key : enable per-key RGB effects. The keyboard must support this or it has no effect.
🔗 /etc/asusd/aura.conf
This file can be manually edited if desired, but the asusctl CLI tool, or dbus methods are the preferred method. Any manual changes to this file mean that the asusd.service will need to be restarted, or you need to cycle between modes to force a reload.
🔗 Charge control
Almost all modern ASUS laptops have charging limit control now. This can be controlled in /etc/asusd/asusd.conf .
where the number is a percentage.
🔗 Bios control
Some options that you find in Armory Crate are available under this controller, so far there is:
- POST sound: this is the sound you here on bios boot post
- G-Sync: this controls if the dGPU (Nvidia) is the only GPU, making it the main GPU and disabling the iGPU
These options are not written to the config file as they are stored in efivars. The only way to change these is to use the exposed safe dbus methods, or use the asusctl CLI tool.
🔗 Profiles
asusctl can support setting a power profile via platform_profile drivers. This requires power-profiles-daemon v0.9.0 minimum. It also requires the kernel patch for platform_profile support to be applied form here — this patch is included in the «rog» kernels we build for fedora and arch, and will hit kernel 5.15 upstream.
A common use of asusctl is to bind the fn+f5 (fan) key to asusctl profile -n to cycle through the 3 profiles:
🔗 Fan curves
Fan curve support requires a laptop that supports it (this is detected automatically) and the kernel patch from here which is still in review as of 29/09/21. As with Profiles, this is included in the kernels we build, and will hit 5.15 kernel upstream.
The fan curve format can be of varying formats:
- 30c:0%,40c:5%,50c:10%,60c:20%,70c:35%,80c:55%,90c:65%,100c:65%»
- 30:0,40:5,50:10,60:20,70:35,80:55,90:65,100:65″
- 30 0,40 5,50 10,60 20,70 35,80 55,90 65,100 65″
- 30 0 40 5 50 10 60 20 70 35 80 55 90 65 100 65″
the order must always be the same «temperature:percentage», lowest from left to rigth being highest.
The config file is located at /etc/asusd/profile.conf and is self-descriptive. On first run it is populated with the system EC defaults.
🔗 Support controller
There is one more controller; the support controller. The sole pupose of this controller is to querie all the other controllers for information about their support level for the host laptop. Returns a json string.
🔗 asusd-user
asusd-user is a usermode daemon. The intended purpose is to provide a method for users to run there own custom per-key keyboard effects and modes, AniMe sequences, and possibly their own profiles — all without overwriting the base system config. As such some parts of the system daemon will migrate to the user daemon over time with the expectation that the Linux system runs both.
As of now only AniMe is active in this with configuration in
/.config/rog/ . On first run defaults are created that are intended to work as examples.
The main config is
🔗 Config options: AniMe
/.config/rog/rog-user.cfg contains a setting «active_anime»: » » where is the name of the AniMe config to use, located in the same directory and without the file postfix, e.g, «active_anime»: «anime-doom»
An AniMe config itself is a file with contents:
is used as a reference internally. «anime»: [] is an array of sequences (WIP).
🔗 «anime» array options
Each object in the array can be one of:
🔗 AsusAnimation
AsusAnimation is specifically for running the gif files that Armory Crate comes with. asusctl includes all of these in /usr/share/asusd/anime/asus/
🔗 AsusImage
Virtually the same as AsusAnimation but for png files, typically created in the same «slanted» style using a template ( diagonal-template.png ) as the ASUS gifs for pixel perfection.
🔗 ImageAnimation
ImageAnimation can play any gif of any size.
🔗 Image
Image currently requires 8bit greyscale png. It will be able to use most in future.
🔗 Pause
A Pause is handy for after an Image to hold the Image on the AniMe for a period.
🔗 Options for objects
Must be full path: «/usr/share/asusd/anime/asus/gaming/Controller.gif» or /home/luke/Downloads/random.gif .
A number from 0.0-1.0.
- brightness : If it is brightness it is combined with the system daemon global brightness
- scale : 1.0 is the original size with lower number shrinking, larger growing
- angle : Rotation angle in radians
- translation : Shift the image X -/+, and y -/+
Time is the length of time to run the gif for:
A cycle is how many gif loops to run:
Infinite means that this gif will never end:
Fade allows an image or gif to fade in and out, and remain at max brightness to n time:
show_for can be null , if it is null then the show_for becomes gif_time_length — fade_in — fade_out . This is period for which the gif or image will be max brightness (as set).
A plain non-float integer.
🔗 asusctl
asusctl is a commandline interface which intends to be the main method of interacting with asusd . I can be used in any place a terminal app can be used.
This program will query asusd for the Support level of the laptop and show or hide options according to this support level.
Most commands are self-explanatory.
🔗 CLI Usage and help
Commands are given by:
Help is available through:
Some commands may have subcommands:
🔗 Keybinds
To switch to next/previous Aura modes you will need to bind both the aura keys (if available) to one of: Next
Previous
To switch Fan/Thermal profiles you need to bind the Fn+F5 key to asusctl profile -n .
🔗 User NOTIFICATIONS via dbus
If you have a notifications handler set up, or are using KDE or Gnome then you can enable the user service to get basic notifications when something changes.
🔗 License & Trademarks
Mozilla Public License 2 (MPL-2.0)
ASUS and ROG Trademark is either a US registered trademark or trademark of ASUSTeK Computer Inc. in the United States and/or other countries.
Reference to any ASUS products, services, processes, or other information and/or use of ASUS Trademarks does not constitute or imply endorsement, sponsorship, or recommendation thereof by ASUS.
The use of ROG and ASUS trademarks within this website and associated tools and libraries is only to provide a recognisable identifier to users to enable them to associate that these tools will work with ASUS ROG laptops.
Источник
Fedora 34 Setup Guide
The recommended flavour of Linux by asus-linux.org is Fedora, for its ease of use for new users, friendly community, and good support for the latest hardware. This guide is written for Fedora 34.
This guide does not cover the choices of running Windows and Linux, or only Linux on your device, and their respective partitioning requirements.
For additional information, see the installation instructions: Official Fedora install guide
For simple USB stick flashing: Fedora Media Writer
🔗 Preparations
🔗 Disable Secure Boot
To make sure Nvidia drivers and the necessary support modules work without issues, Secure Boot must be disabled in the UEFI.
- Press DEL repeatedly during boot to enter UEFI setup screen
- Press F7 for advanced mode
- Security → Secure Boot Control → Disable
- Save and exit
🔗 Use the Laptop Screen
Due to display signal routing on Asus ROG laptops, and the setup process dealing with multiple graphics devices, having external screens connected during setup may result in unpredictable behavior. Please follow this guide with all external displays disconnected.
🔗 Installation
- Download Fedora 34 Workstation ISO file from WORK iso and write it to a USB stick. You must use one of these ISO instead of the official if you have 2021+ hardware.
- On booting from USB, in the Fedora boot menu, select: Troubleshooting → Start Fedora in basic graphics mode
- Follow the steps of the installer, and remove the USB stick when you reboot
🔗 Setup
🔗 Update the System
System update should be done after setting up the repos and copr.
🔗 Using the Terminal
This guide requires typing terminal commands. To type them, start the Terminal application, which opens a window that has a command prompt.
To open the Terminal, simply press the Windows/Meta key to bring up the Activities view, and start typing «term» in the search box. Click on the search result.
Commands that have sudo in front are administrator commands, and may require you to type in your password.
🔗 Edit Default Package Repositories
First, edit the package repositories to exclude kernel updates from Fedora; asusctl uses a copr to get updates:
Edit the package repos:
NOTE: The above command opens three files, each in their own tab. All three files must be edited according to the instructions below.
At the end of the block of lines starting with [fedora] , [updates] , and [updates-testing] respectively in each file add this line at the end of the block:
The end result will look similar to:
Note the new-line after the exclude= line.
Save the files and close the editor.
Add the copr for asusctl and rog kernel
🔗 Do Update
Open Software store
Navigate to Updates tab
Click the Refresh-button in the top left corner
Download all available updates
After the updates have been downloaded, click the «Restart & Update» button
When the updates have been installed, reboot your computer
NOTE: Upon restart the device is still possibly running in software rendering mode, symptoms:
- Laggy desktop
- Black screen after reboot
- Suspend on lid close not working
- Screen brightness control not working
- Multi-touch gestures not working This will all be addressed in the later steps.
🔗 Install Nvidia Graphics Drivers
The next step is to install the drivers for the Nvidia GPU.
Open Software store
Enable 3rd party repositories
Click on the hamburger menu, select Software Repositories
Enable RPM Fusion for Fedora 34 — Nonfree — NVIDIA Driver
Input the following terminal commands:
Enable Nvidia power services:
🔗 Update System Boot Configuration
In Terminal, launch the text editor to edit the system boot options.
Edit the file to look like below.
There are usually only two modifications to make:
- Change the value of nvidia-drm.modeset=1 to nvidia-drm.modeset=0 . This change is needed to allow switching between graphics devices without needing a reboot.
- Fedora installer may create duplicates of rd.driver.blacklist=nouveau , modprobe.blacklist=nouveau , and nvidia-drm.modeset=1 . These duplicates can be safely deleted.
Optionally, if the install guide has been deviated from, the same line of text that contains the previous changes may also contain a standalone word nomodeset . This must be removed or graphics acceleration is disabled.
Save the file and close the editor.
The edits made to the grub file need to be updated to the system. This is just a single terminal command.
🔗 Install asusctl
The final section is to install asusctl and its supporting software. This enables controls for the Asus ROG hardware on the laptop.
After the reboot, you should have a fully functional Fedora laptop, with ROG hardware features enabled.
Please note that asusctl is under continuous development, and will improve in capability over time.
🔗 Optional Steps
🔗 Keyboard Backlight
If the keyboard backlight does not work automatically, set a mode in asusctl:
🔗 RGB Backlights
If an RGB capable laptop has no led modes available, then the /etc/asusd/asusd-ledmodes.toml file needs adjusting:
Edit the configuration file and add the needed values:
Save the file and close the text editor.
🔗 Switching from Nvidia GPU to AMD Integrated
If the laptop has booted in Nvidia mode, switching to AMD integrated graphics and the Wayland desktop requires a reboot. To fix this so the switch only requires a logout/login, change the following:
Edit this line of text to have a hash in the front, as in the example. This will disable the setting.
You ma Save the file and close the editor.
Reboot to enable the change.
🔗 Hide an Unnecessary Boot Message
When booting the computer in integrated mode, a message displays «Nvidia kernel module not found. Falling back to Nouveau.» This is harmless and normal for asusctl integrated mode, but may feel distracting. To disable the message, input this terminal command:
🔗 Desktop Wigdets
A desktop widget to operate asusctl is currently in development: asusctl Gnome extension
🔗 Known Limitations
🔗 Nvidia GPU suspend issue on 2020 models of Zephyrus G14 and G15
Be aware that the Nvidia GPU on the 2020 models of G14 and G15 has an issue concerning power draw. In general, the GPU fails to enter a low-power state even when idle, and this causes unnecessary power draw and heat generation. This issue has been addressed in the 2021 models. Things have improved for the 2020 models with Wayland and the 470 driver (read below).
🔗 Nvidia Graphics on Wayland Desktop
The default Gnome desktop in Fedora 34 uses a new protocol called Wayland. Since the 470 Nvidia driver version it is possible to run Wayland desktop on Nvidia GPUs. This is a major update to the capability and utility of Nvidia graphics on ROG laptops, but because this is a new development, there are still lingering issues.
Exclusive Nvidia mode does not work Currently the asusctl Nvidia mode which runs everything exclusively on the more powerful GPU does not work. This is due to a remaining issue on the 470 driver related to technology called Reverse-PRIME, a method of passing graphics rendered by the Nvidia GPU back to the AMD integrated graphics.
USB-C DisplayPort output does not work on Wayland Another Reverse-PRIME issue is that if you need to use an external display with the DisplayPort connection (via USB-C or a dock), it only works on the X.org desktop. This issue does not affect all ROG laptop models, but depends on their internal signal routing.
Compute vs. hybrid on Zephyrus G14 and G15 Currently the best way to take advantage of Nvidia graphics on Wayland desktop is to use asusctl integrated graphics mode, and enable compute if you wish to run applications using the Nvidia GPU. In compute mode, the Nvidia GPU automatically suspends even on 2020 models when it has no active processes, reducing power consumption. On these laptops, compute mode can also be disabled manually without requiring a logout/login.
Hybrid mode is also operational on Wayland, and there are early reports of a slight performance benefit. On 2020 G14 and G15 the hybrid mode suffers from the GPU suspend issue, increasing power consumption and heat output when idle.
Both modes currently offer the same functionality despite their naming because Wayland does not respect X.org settings.
Disabling compute If asusctl fails to disable compute, there are likely active processes still using the Nvidia device. Check for these with nvidia-smi and lsof /dev/nvidia* commands.
Resuming from suspend Applications that were running on the Nvidia GPU may have all-black windows after resuming from sleep. No workaround for this issue exists yet. Enabling Nvidia suspend/resume/hibernate services does not address the matter.
For older Nvidia drivers (pre-470) whenever Nvidia graphics are enabled, in either standalone or hybrid mode, using the X.org desktop is necessary.
To select the correct desktop environment, click on the gear icon in the bottom right corner of the login screen. Select «Gnome» with asusctl in integrated graphics mode to run Wayland, or «Gnome on Xorg» when Nvidia graphics are enabled in hybrid or exclusive mode.
Источник