Difference between revisions of "Linux on ASUS ROG Zephyrus G14"

From WTFwiki
Jump to navigation Jump to search
(add FC37 upgrade errata)
 
(5 intermediate revisions by the same user not shown)
Line 43: Line 43:
 
    
 
    
 
   $ nvgpu minecraft --or-whatever
 
   $ nvgpu minecraft --or-whatever
 +
 +
=== Comfort Hacks ===
 +
See also: [[Synergy]]
 +
 +
==== Enable alt+drag windows in Gnome ====
 +
  $ gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier '<Alt>'
 +
 +
==== Switch-to-workspaces keybindings ====
 +
This adds Alt+F# to switch, Super+Alt+F# to move windows, then cleans up a few conflicting default bindings.
 +
<pre>
 +
for i in $(seq 1 12); do gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-${i} "['<Alt>F${i}']"; done
 +
for i in $(seq 1 12); do gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-${i}; done
 +
for i in $(seq 1 12); do gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-${i} "['<Super><Alt>F${i}']"; done
 +
for i in $(seq 1 12); do gsettings get org.gnome.desktop.wm.keybindings move-to-workspace-${i}; done
 +
gsettings set org.gnome.desktop.wm.keybindings unmaximize "['<Super>Down']"
 +
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "[]"
 +
gsettings set org.gnome.desktop.wm.keybindings begin-move "[]"
 +
gsettings set org.gnome.desktop.wm.keybindings begin-resize "[]"
 +
gsettings set org.gnome.desktop.wm.keybindings cycle-group "[]"
 +
</pre>
 +
 +
==== Custom Keybindings ====
 +
<pre>
 +
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name "'Launch new terminal window'"
 +
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command "'gnome-terminal --window --geometry=160x43'"
 +
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding "'<Alt>v'"
 +
 +
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/name "'Launch new maximized terminal window'"
 +
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/command "'gnome-terminal --window --maximize'"
 +
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/binding "'<Shift><Alt>v'"
 +
</pre>
 +
 +
== Fedora Core 36 ==
 +
Skipped this release (upgraded from FC35 -> FC37)
 +
 +
== Fedora Core 37 ==
 +
Note: Upgraded in-place from FC35 -> FC37 using https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
 +
 +
All prior configuration appears to have remained in place and working.
 +
 +
=== GPU / Graphics Drivers ===
 +
NVIDIA GPU proprietary driver did not survive the upgrade in a functional state.  Symptoms of this include failure messages and running on the "nouveau" driver.  "nvidia-smi" and "nvidia-settings" fail to communicate with the driver, and "lsmod | grep -i nvidia" returns nothing.
 +
 +
It was easily repaired with the following:
 +
<pre>
 +
dnf remove *nvidia* --exclude=nvidia-gpu-firmware cuda-drivers
 +
dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
 +
</pre>
 +
 +
After the 'install' step completes, wait 5-10mins, then reboot.  The reboot was not successful: it hung trying to stop a hanging 'modprobe' process, and a hard power off was required.  After subsequent power on, nvidia drivers are loaded, nvgpu script still works to load games, etc.

Latest revision as of 09:57, 21 December 2022

Overview

This page specifically about ASUS ROG Zephyrus G14, covering model GA401QM (2022 model?). May be applicable to others.

See also: https://asus-linux.org/wiki/fedora-guide/ -- The guide indicates many more problems than I had, I don't know if it is out of date or referencing other models.

Mine did not have the animatrix display.

Fedora Core 35

Dual Boot

This install may be done with Secure Boot enabled!

From original Windows (10 or 11) install, Start->Run->diskmgmt.msc and "Shrink volume" the C:, I shrunk it to ~230GB, leaving me with nearly 700GB Unallocated on my 1TB SSD.

From FC installer, select Automatic partitioning w/encryption.

This "Just Worked", except for a hiccup during first boot setup.

Important: when you reboot from Windows, make sure both GPUs are enabled ("iGPU mode off" in ASUS Crate Armory) or the NVIDIA one will not be visible to Linux. If you plan to wipe Windows completely, maybe consider this point carefully. Will update page if I find a way to enable the dGPU from Linux.

Wireless (WiFi)

MediaTek 7961 chip built into this machine, works great under FC35: no problems as of yet.

Sound

Sound worked out of the box, but on one random reboot was unavailable for unknown reasons. Repeated again one time after pressing the mute keycombo (Fn+F1). Fixed without reboot by killing pipewire/pipewire-pulse processes running as my own user (not the ones running as root.)

GPU

This is the sticky point of this machine; there are two GPUs (iGPU/AMD Cezanne, dGPU/NVIDIA GeForce RTX3060 Mobile) in a sort of hybrid config. The "nouveau" driver does not seem to enjoy this when both are enabled and visible: my kernel message buffer was full of crashes and stack traces while this was the case.

I installed the following drivers to combat this:

 $ sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-power

Disable Secure Boot: akmod-nvidia forces this requirement at this time, unfortunately.

To run programs using the dGPU for rendering, use a one-line script, like this, named something like "/usr/local/bin/nvgpu":

 #!/bin/sh
 __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia "@"

To invoke it:

 $ nvgpu origbinary --flags
 
 $ nvgpu minecraft --or-whatever

Comfort Hacks

See also: Synergy

Enable alt+drag windows in Gnome

 $ gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier '<Alt>'

Switch-to-workspaces keybindings

This adds Alt+F# to switch, Super+Alt+F# to move windows, then cleans up a few conflicting default bindings.

for i in $(seq 1 12); do gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-${i} "['<Alt>F${i}']"; done
for i in $(seq 1 12); do gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-${i}; done
for i in $(seq 1 12); do gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-${i} "['<Super><Alt>F${i}']"; done
for i in $(seq 1 12); do gsettings get org.gnome.desktop.wm.keybindings move-to-workspace-${i}; done
gsettings set org.gnome.desktop.wm.keybindings unmaximize "['<Super>Down']"
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "[]"
gsettings set org.gnome.desktop.wm.keybindings begin-move "[]"
gsettings set org.gnome.desktop.wm.keybindings begin-resize "[]"
gsettings set org.gnome.desktop.wm.keybindings cycle-group "[]"

Custom Keybindings

dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name "'Launch new terminal window'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command "'gnome-terminal --window --geometry=160x43'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding "'<Alt>v'"

dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/name "'Launch new maximized terminal window'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/command "'gnome-terminal --window --maximize'"
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/binding "'<Shift><Alt>v'"

Fedora Core 36

Skipped this release (upgraded from FC35 -> FC37)

Fedora Core 37

Note: Upgraded in-place from FC35 -> FC37 using https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/

All prior configuration appears to have remained in place and working.

GPU / Graphics Drivers

NVIDIA GPU proprietary driver did not survive the upgrade in a functional state. Symptoms of this include failure messages and running on the "nouveau" driver. "nvidia-smi" and "nvidia-settings" fail to communicate with the driver, and "lsmod | grep -i nvidia" returns nothing.

It was easily repaired with the following:

dnf remove *nvidia* --exclude=nvidia-gpu-firmware cuda-drivers
dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda

After the 'install' step completes, wait 5-10mins, then reboot. The reboot was not successful: it hung trying to stop a hanging 'modprobe' process, and a hard power off was required. After subsequent power on, nvidia drivers are loaded, nvgpu script still works to load games, etc.