aboutsummarylogtreecommitdiffstats
path: root/README.md
blob: 119b712678381f5354b8569ff40e4c0d0e20358c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

### `linux-xanmod-rog`

This is an Arch linux `linux-xanmod` derived kernel with hardware enablement patches for ASUS ROG laptops.

Package repo: https://gitlab.com/arglebargle-arch/xanmod-rog-PKGBUILD

### Notes:

  - Suspend on systems using modern hybrid sleep (usually S0i3) can be a little dodgy, this kernel package includes
      current work collected from various kernel mailing lists and any useful patches collected from the amdgpu issue
      tracker but you may still encounter the occasional problem. If you're willing to help improve support visit the
      [amdgpu issue tracker][2] and find an issue that matches your problem or open a new one.

      Xanmod-rog builds with most useful s0ix kernel cmdline flags enabled at compile time, any dmesg or kernel journal
      logs captured during a failure should be useful. See the included `capture_stb.sh` script if a developer asks you
      to supply SmartTrace Buffer (STB) logs during a suspend failure, the script will gather them for you automatically
      during every suspend. These STB logs can be found in /root/amd-stb-captures/.

  - Upstream Xanmod builds with the `performance` governor set as the boot-time default; this is great for performance
      but reduces battery life when used on laptops. Since this kernel package is primarily targeted at ROG laptop users
      I've switched the build config to use `schedutil` instead. I strongly suggest making a couple of bash aliases to
      make switching modes/governors easier, this wll allow you to easily boost performance or conserve battery power as
      needed.

    for asusctl >= 4.0.0:

    * `alias goboost='(set -x; powerprofilesctl set performance; sudo cpupower frequency-set -g performance >&/dev/null;)'`
    * `alias gonormal='(set -x; powerprofilesctl set balanced; sudo cpupower frequency-set -g schedutil >&/dev/null;)'`
    * `alias gosilent='(set -x; powerprofilesctl set power-saver; sudo cpupower frequency-set -g schedutil >&/dev/null;)'`

    for asusctl <= 3.7.2: 

    * `alias goboost='(set -x; asusctl profile boost -t true -f boost; sudo cpupower frequency-set -g performance >&/dev/null;)'`
    * `alias gonormal='(set -x; asusctl profile normal -t true -f normal; sudo cpupower frequency-set -g schedutil >&/dev/null;)'`
    * `alias gosilent='(set -x; asusctl profile silent -t false -f silent; sudo cpupower frequency-set -g schedutil >&/dev/null;)'`

    * Eg: To switch performance profiles during a kernel build you'd run something like: `goboost; makepkg -Ccsr; gonormal`
      You can use powerprofilesctl directly if you like but the aliases will alow you to switch governors as well as
      profiles.

  - You can place a script named `myconfig` in the package directory to make minor changes to the kernel configuration
      during build. See the comments near the end of the prepare() section in the PKGBUILD.

  - We now build for the `x86-64-v3` target by default; this supports Haswell era and newer CPUs and should be ~10%
      more performant than a generic `x86_64` build while maintaining wide compatibility. This supports all recent ROG
      laptops, including Intel machines.
  - Package now requires GCC >= 11 to support the new default build target.
  - Suggested architecture build targets:

    * `_microarchitecture=14 makepkg ...` Zen2 optimization; AMD 4000 series CPUs, 2020 AMD ROG laptops
    * `_microarchitecture=15 makepkg ...` Zen3 optimization; most AMD 5000 series CPUs, 2021 AMD ROG laptops
    * `_microarchitecture=38 makepkg ...` Skylake optimization; Use this on [Comet Lake][1] machines
    * `_microarchitecture=92 makepkg ...` x86-64-v2; compatible with most machines from 2008 onward
    * `_microarchitecture=93 makepkg ...` x86-64-v3; PKGBUILD default, most machines from 2013/2014 onward are supported
    * `_microarchitecture=98 makepkg ...` Intel -march=native
    * `_microarchitecture=99 makepkg ...` AMD -march=native 

  - Building using Clang ThinLTO is well tested and stable but may not be compatible with some DKMS modules, and you'll
      need to patch your `/usr/bin/dkms` script for it to work with LLVM/clang at all. See further discussion here:
      https://github.com/dell/dkms/issues/124 if you're going to use this feature.

  - GA503Q models hava an ACPI DSDT table bug in all currently available BIOS that prevents the machine from suspending
      correctly.

    Errors generated by this will look like the following in `dmesg` or the system journal:
    ```log
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: I/O 460 QID 3 timeout, aborting
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: I/O 461 QID 3 timeout, aborting
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: I/O 462 QID 3 timeout, aborting
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: I/O 463 QID 3 timeout, aborting
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: I/O 0 QID 0 timeout, reset controller
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: Abort status: 0x371
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: Abort status: 0x371
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: Abort status: 0x371
    Jun 19 18:56:26 arch-zephyrus kernel: nvme nvme0: Abort status: 0x371
    ```
    If you're experiencing this yourself *please* go make a vendor support ticket with ASUS and ask them to fix their
    BIOS.

    See the project below to generate an ACPI override ramdisk that works around the issue while you wait for ASUS to
    publish a fixed BIOS:

    https://gitlab.com/smbruce/GA503QR-StorageD3Enable-DSDT-Patch


See the commit log for full version history and changes.

[1]: https://wiki.gentoo.org/wiki/Safe_CFLAGS#Skylake.2C_Kaby_Lake.2C_Kaby_Lake_R.2C_Coffee_Lake.2C_Comet_Lake
[2]: https://gitlab.freedesktop.org/drm/amd/-/issues?label_name[]=s0ix
[//]: # ( vim: set tw=120: )