Skip to content

Instantly share code, notes, and snippets.

@pwyoung
Last active November 10, 2021 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pwyoung/19e51788a5b80487a2eb6a95b9ca1e10 to your computer and use it in GitHub Desktop.
Save pwyoung/19e51788a5b80487a2eb6a95b9ca1e10 to your computer and use it in GitHub Desktop.
Aus Rog G733QSA attempt to install Fedora and "asus-linux" with Fedora 34 Spin
# Goal: Follow asus-linix Fedora docs as much as possible to get a system working properly
https://asus-linux.org/wiki/fedora-guide/
Notes:
- Before installation, it was confirmed that the iGPU was in "auto" mode in Windows in the Crate software.
- Due to behviour of this laptop (G733QSA), I can not follow the instructions to not use an external monitor (at all times anyway).
https://asus-linux.org/wiki/fedora-guide/#use-the-laptop-screen
There are two cases where booting to a black screen seemed inevitable until I added the second monitor
- The Fedora-34-workstation-spin live usb boots to a black screen when using only the laptop's screen.
Connecting a monitor via HDMI does allow booting to the live usb.
- After installing the NVIDIA drivers, Fedora boots to a black screen when using only the laptop's screen.
A successful boot does happen if:
- A monitor is connected via HDMI AND...
- "quiet" boot arg is removed.
- (*) means boot was done with a monitor connected via HDMI
- (**) means boot was done with a monitor connected via HDMI and "quiet" boot arg was removed.
This was done BECAUSE IT WAS NECESSARY FOR A BOOT TO WORK
This means a boot, with no external monitor, and without editing grub args was attempted and failed.
This means a boot, with an external monitor, and without editing grub args was attempted and failed.
This means a boot, with no external monitor, and editing grub args to only remove "quiet" was attempted and failed.
And yes, (**) in every occurance below means the different configurations were all tried.
################################################################################
# STEPS
################################################################################
- Install via Fedora 34 Spin for workstation live USB (*)
ISO https://dl.fedoraproject.org/pub/alt/live-respins/F34-WORK-x86_64-LIVE-20211101.iso
- Add COPR for asus-linux, update and reboot
Confirmed kernel in use is as expected
kernel-devel.x86_64 5.14.16-300.fc34 @copr:copr.fedorainfracloud.org:lukenukem:asus-linux
- Install Nvidia drivers, update grub, and reboot (**)
Gnome shell was found to be running X11 (Xorg) and
The gnome-shell process is on the Nvidia card (per nvida-smi).
- Install Asusctl (with supergfxd and power-profiles-daemon services) and reboot (**)
################################################################################
# TESTING
################################################################################
#Set the graphics mode to use only the AMDGPU
supergfxctl -m integrated
# reboot
# Discovered that I could boot in this mode *with* a second monitor or edting grub args
#Set the graphics mode to boot up with both NVIDIA and AMDGPU
supergfxctl -m hybrid
# Found that this boots and freezes immediately (long before GDM could come up)
# unless I both: use an external monitor connected with HDMI, and remove "quiet" from grub args
################################################################################
# RESULTS
################################################################################
Glad to have all this functionlity on a new Kernel and general sw stack.
But, I wish I could boot with Nvidia support without having an HDMI connected monitor.
TODO: figure out how to call xrandr as GDM starts. https://gist.github.com/pwyoung/05c928161ef702bfa821ec18e26c0fcb
################################################################################
# DETAILS
################################################################################
# led-mode works
asusctl -k med led-mode static -c 0000ff
supergfxctl -g -p # hybrid suspended
# "suspended" seems wrong since Xorg is running on Nvidia
nvidia-smi | grep Xorg # Xorg is running on NvidiaGpu
# switch to integrated mode caused gnome shell crash and did not change the mode
# but repeating the attempt did work
# --------------------------------------------------------------------------------
supergfxctl -m integrated
If anything fails check `journalctl -b -u supergfxd`
Note that nvidia-drm.modeset=0 is required in kernel cmdline to enable the nvidia drivers to be unloaded on demand`
Graphics mode changed to integrated. User action required is: logout
cat /proc/cmdline
pm_debug_messages amd_pmc.dyndbg=+p acpi.dyndbg=file drivers/acpi/x86/s2idle.c +p BOOT_IMAGE=(hd0,gpt6)/vmlinuz-5.14.16-300.fc34.x86_64 root=UUID=a6c73e61-6411-4e75-8d8a-61891e61afcb ro rootflags=subvol=root rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=0 rhgb
Log out and back in
"gnome-shell quit unexpectedly"
supergfxctl -g
Current graphics mode: hybrid
# reboot (**)
Got the same results
supergfxctl -g
Current graphics mode: hybrid
# reboot (**)
#
# Worked
#
supergfxctl -g
Current graphics mode: integrated
lsmod | egrep -i "nvidia|amdgpu|nouveau"
amdgpu 7802880 2
drm_ttm_helper 16384 1 amdgpu
ttm 86016 2 amdgpu,drm_ttm_helper
iommu_v2 24576 1 amdgpu
gpu_sched 45056 1 amdgpu
i2c_algo_bit 16384 1 amdgpu
drm_kms_helper 303104 1 amdgpu
drm 630784 7 gpu_sched,drm_kms_helper,amdgpu,drm_ttm_helper,ttm
xlsclients | grep gnome
fedora gnome-shell
gnome-shell -> settings -> about : shows WAYLAND
# --------------------------------------------------------------------------------
# Check out the hybrid gpu situation
# Q:is this muxing the same as other Rogs?
# A: probably, seems like there is no Hardware Mux on this
# --------------------------------------------------------------------------------
# kernel support for hw mux
sudo grep -i switcheroo /boot/config-*
/boot/config-5.14.14-200.fc34.x86_64:CONFIG_VGA_SWITCHEROO=y
/boot/config-5.14.16-300.fc34.x86_64:CONFIG_VGA_SWITCHEROO=y
# file is created if this tool ran (which does require XXX.modeset=1 to be set, which it usually is not,
# but this was tested with integraed mode set by supergfx and grub options had "amdgpu.modeset=1")
sudo ls /sys/kernel/debug/vgaswitcheroo
ls: cannot access '/sys/kernel/debug/vgaswitcheroo': No such file or directory
https://help.ubuntu.com/community/HybridGraphics
vga_switcheroo is the kernel mechanism that allows you to switch between GPUs if your machine has a hardware mux. Note that this method is not supported by all machines and only works if you are using the opensource driver (nouveau, radeon) and not the proprietary ones (nvidia, fglrx).
# --------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment