Skip to content

Instantly share code, notes, and snippets.

@pwyoung
Last active November 14, 2021 02:18
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/4fb4a99915cd44d39f7fd2a67a61d798 to your computer and use it in GitHub Desktop.
Save pwyoung/4fb4a99915cd44d39f7fd2a67a61d798 to your computer and use it in GitHub Desktop.
Add Software to Asus Rog G733QSA
Goal: Record what was done after initial setup of PopOS-21.10 on the laptop.
Background:
- Prior setup steps are here:
- https://gist.github.com/pwyoung/e5bf9e41e166cb89ad63b6e7782ce311
Problems:
- WIFI flakiness.
- Supposedly this wifi chip flakes out on Windows too. But here's the observed behaviour.
- Observed behaviour:
- In Linux or Windows, choosing "restart" and booting to Linux results in the Wifi component being undetected.
- Booting to Windows does cause the Wifi system to work.
- Restarting to Linux again causes the Wifi system to not appear.
- Workaround
- Power off and then boot to Linux always works.
- Conclusion:
- This suggests that the real problem is Linux not resetting the chip since Windows does not
have the same problems. This in turn is probably related to the fact that (external) Linux device drivers
do not exist per-se, but are baked into the Kernel code and the nearest chip is probably being
detected/used although it is not configured correctly by Linux.
- Some people actually recommend changing out the Wifi chips. I will work around this until Linux
Kernel and distros are updated to deal with this new hardware.
- Related:
- https://askubuntu.com/questions/1340800/wifi-not-working-on-asus-rog-zephyrus-g14-2021
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1937004
Steps:
- Clean up UEFI boot entries with "efibootmgr":
- efibootmgr # confirm entries for running OS and Windows (and anything else we want to keep)
- sudo efibootmgr -b X -B # where X is an entry to remove
- Remove EFI boot entries from disk
- mount any /boot/efi partitions
- rm -rf <mount-point>/EFI/<defunct-distro>
- Install refind
- Why?
This makes it easy to switch OSes, and it will remember the last selection chosen which
is very convenient for Windows updates that require multiple reboots.
This can be removed or bypassed easily.
- How
- sudo apt install refind
- enter "yes" to let it install itself in /boot/efi (which is very large here, 2GB)
- For PopOS, boot from the vmlinuz image, the one with the penguin image.
- Install timeshift
- This is not an LTS after all...
- sudo apt install timeshift
- Identify the "timeshift" partition, previously created:
- # This just makes it easy to choose the right device in the timeshift UI
- lsblk -o +FSTYPE,PARTLABEL,LABEL
- Make a snashot
- Settins:
- Rsync, schedule daily and on boot, allow /home and /root to be captured
- Sanity check snapshot size:
- df -h / /run/timeshift/backup
- Check config
- cat /etc/timeshift/timeshift.json
- The exclude section should have "+" on each line, to allow /root and /home/$USER to be backed up.
- Add Asusct (without supergfxctl or power-daemon)
- Why?
- With Fedora-35 and supergfxctl on this hardware, there are problems. So just install asusctl. Details:
- If a monitor is used and then disconnected before boot, then
we may boot into "hybrid" mode to a black screen.
It's possible that will happen again. Test later.
- How:
- Install Rust:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- source $HOME/.cargo/env
- Install dev libs
- sudo apt install libclang-dev libudev-dev
- Build and install asusctl
- mkdir -p ~/git/asus-linux; cd $_
- git clone https://gitlab.com/asus-linux/asusctl.git
- cd ./asusctl/
- # Pick a version: see https://gitlab.com/asus-linux/asusctl/-/blob/main/CHANGELOG.md
- git checkout 4.0.6 -b local-1 # Just picked this. Remembering the commit here for reproducability
- make
- sudo make install
- reboot
- Test
- asusctl -k med led-mode static -c 0000ff # brightness defaults to off
- for i in {1..8}; do echo $i; sleep 5; asusctl led-mode -n; done
- Review Manual
- https://gitlab.com/asus-linux/asusctl/-/blob/main/MANUAL.md#asusctrl-manual
- Remember:
- Without the patches asus-linux has created, some things will not work.
- Show feature support levels with "asusctl -s"
- Asus-linux has patches pending to the Linux Kernel (Since that's how Linux does most device drivers).
and they have a patched kernel they maintain for Fedora which does work well (except that this hardware
struggles to boot anything besides recent PopOS).
- Improve Firefox Codec support:
- Problem: There are videos that Google Chrome can play but Firefox and ungoogled-Chromium can not:
- e.g. https://www.youtube.com/watch?v=nQVNVPAd5FA
- Solution:
- sudo apt install libavcodec-extra ffmpeg
- Try to play a video with DRM (like above)
- Observe Firefox telling you to hit the button in Firefox to allow DRM content. Do it.
- Test:
- Make sure the above video works, and high-res/framerate videos like these:
- https://www.youtube.com/watch?v=LXb3EKWsInQ
- TODO:
- Windows VM using VFIO.
- Useful guides
- Fedora Guide:
- https://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/chap-Virtualization-PCI_passthrough.html
- Assumes PopOS-20.04
- https://www.codefraction.com/index.php/2021/07/06/windows-10-virtual-machine-on-popos-20-04-with-gpu-passthrough/
- Assumes supergfxctl (which probably, currently, implies Fedora-rog kernel, Arch, or Arch-derivative with recent patches)
- https://asus-linux.org/wiki/vfio-guide/
- Question about doing this on Arch (good links)
- https://www.reddit.com/r/VFIO/comments/qqrgp3/libvirt_error_when_passing_gpu_amdnvidia/?utm_source=share&utm_medium=web2x&context=3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment