Last active
October 5, 2025 15:02
-
Star
(297)
You must be signed in to star a gist -
Fork
(38)
You must be signed in to fork a gist
-
-
Save Brainiarc7/aa43570f512906e882ad6cdd835efe57 to your computer and use it in GitHub Desktop.
Revisions
-
Brainiarc7 revised this gist
May 27, 2019 . 1 changed file with 112 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,17 +34,33 @@ It may be wise to install the `linux-firmware-nonfree` package as it may contain Now, to the real meat: **See the supported module options:** Let's see if the features we're after are supported: ```sh sudo modinfo i915 | egrep -i "guc|huc|dmc" firmware: i915/bxt_dmc_ver1_07.bin firmware: i915/skl_dmc_ver1_27.bin firmware: i915/kbl_dmc_ver1_04.bin firmware: i915/glk_dmc_ver1_04.bin firmware: i915/cnl_dmc_ver1_07.bin firmware: i915/icl_dmc_ver1_07.bin firmware: i915/kbl_guc_ver9_39.bin firmware: i915/bxt_guc_ver9_29.bin firmware: i915/skl_guc_ver9_33.bin firmware: i915/kbl_huc_ver02_00_1810.bin firmware: i915/bxt_huc_ver01_8_2893.bin firmware: i915/skl_huc_ver01_07_1398.bin parm: enable_guc:Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto, 0=disable [default], 1=GuC submission, 2=HuC load) (int) parm: guc_log_level:GuC firmware logging level. Requires GuC to be loaded. (-1=auto [default], 0=disable, 1..4=enable with verbosity min..max) (int) parm: guc_firmware_path:GuC firmware path to use instead of the default one (charp) parm: huc_firmware_path:HuC firmware path to use instead of the default one (charp) parm: dmc_firmware_path:DMC firmware path to use instead of the default one (charp) ``` **Note:** The `intel_pstate driver` is the default since Linux 4.10 on SKL+. Thanks for the updates on this @pcordes and the correction on module options syntax in `/etc/modprobe.d/i915.conf`, @vinzent. Gr33ts ;-) Then, update grub on Fedora: @@ -87,7 +103,7 @@ In the following syntax: options i915 enable_guc=3 Other safe options to pass are `enable_fbc=1`. **Reference:** @@ -115,7 +131,7 @@ The following set of options should be generally safe to enable: /etc/modprobe.d/i915.conf options i915 enable_fbc=1 enable_guc=3 On Linux 4.16+, GuC firmware loading and submission is now handled by the `enable_guc` parameter in place of the former `enable_guc_loading=1` and `enable_guc_submission=1` parameters. Adjust as needed. @@ -161,6 +177,89 @@ And also look at the output of: journalctl -b -o short-monotonic -k To confirm that the settings you wanted have been applied, run: ```sh dmesg | grep -iE "huc|guc|dmc" ``` Output may look like this: ``` [ 2.014699] Setting dangerous option enable_guc - tainting kernel [ 2.019971] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4) [ 2.030651] [drm] HuC: Loaded firmware i915/kbl_huc_ver02_00_1810.bin (version 2.0) [ 2.040648] [drm] GuC: Loaded firmware i915/kbl_guc_ver9_39.bin (version 9.39) [ 2.051850] i915 0000:00:02.0: GuC firmware version 9.39 [ 2.051850] i915 0000:00:02.0: GuC submission enabled [ 2.051851] i915 0000:00:02.0: HuC enabled ``` Which means you're good to go. You can also take a look at: 1. GuC load status: ```sh sudo cat /sys/kernel/debug/dri/0/i915_guc_load_status ``` ```sh GuC firmware: i915/kbl_guc_ver9_39.bin status: fetch SUCCESS, load SUCCESS version: wanted 9.39, found 9.39 header: offset 0, size 128 uCode: offset 128, size 147392 RSA: offset 147520, size 256 GuC status 0x800330ec: Bootrom status = 0x76 uKernel status = 0x30 MIA Core status = 0x3 Scratch registers: 0: 0xf0000000 1: 0x1 2: 0xc 3: 0x0 4: 0x2 5: 0x0 6: 0x7f2000 7: 0x8 8: 0x3 9: 0x403240 10: 0x0 11: 0x0 12: 0x0 13: 0x0 14: 0x0 15: 0x0 ``` 2. HuC load status: ```sh sudo cat /sys/kernel/debug/dri/0/i915_huc_load_status ``` ```sh HuC firmware: i915/kbl_huc_ver02_00_1810.bin status: fetch SUCCESS, load SUCCESS version: wanted 2.0, found 2.0 header: offset 0, size 128 uCode: offset 128, size 218304 RSA: offset 218432, size 256 HuC status 0x00006080: ``` Also see: https://01.org/linuxgraphics/downloads/firmware **Screen corruption observed when waking up from suspend** -
Brainiarc7 revised this gist
Jun 24, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -115,15 +115,15 @@ The following set of options should be generally safe to enable: /etc/modprobe.d/i915.conf options i915 enable_dc=1 enable_fbc=1 semaphores=1 enable_guc=3 On Linux 4.16+, GuC firmware loading and submission is now handled by the `enable_guc` parameter in place of the former `enable_guc_loading=1` and `enable_guc_submission=1` parameters. Adjust as needed. **RC6 sleep modes (`enable_rc6`):** You can experiment with higher values for enable_rc6, but your GPU may not support them or the activation of the other options: The available `enable_dc` values are a bitmask with bit values `RC6=1`, `RC6p=2`, `RC6pp=4[4]` - where "`RC6p`" and "`RC6pp`" are lower power states. To confirm the current running RC6 level, you can look in sysfs: -
Brainiarc7 revised this gist
Jun 24, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -85,7 +85,7 @@ You can also add this to: `/etc/modprobe.d/i915.conf` In the following syntax: options i915 enable_guc=3 Other safe options to pass are `enable_rc6=1`, `enable_fbc=1`, `enable_psr=1`, `disable_power_well=0` and `semaphores=1` @@ -115,7 +115,7 @@ The following set of options should be generally safe to enable: /etc/modprobe.d/i915.conf options i915 enable_rc6=1 enable_fbc=1 semaphores=1 enable_guc=3 On Linux 4.16+, GuC firmware loading and submission is now handled by the `enable_guc` parameter in place of the former `enable_guc_loading=1` and `enable_guc_submission=1` parameters. Adjust as needed. -
Brainiarc7 revised this gist
May 25, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -116,6 +116,8 @@ The following set of options should be generally safe to enable: /etc/modprobe.d/i915.conf options i915 enable_rc6=1 enable_fbc=1 semaphores=1 enable_guc_loading=1 enable_guc_submission=1 On Linux 4.16+, GuC firmware loading and submission is now handled by the `enable_guc` parameter in place of the former `enable_guc_loading=1` and `enable_guc_submission=1` parameters. Adjust as needed. **RC6 sleep modes (`enable_rc6`):** -
Brainiarc7 revised this gist
Mar 29, 2018 . 1 changed file with 20 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,9 @@ Add this to the kernel boot parameters on `/etc/default/grub`: The `intel_pstate=skylake_hwp option` enables Intel's Hardware P-States, known commonly by the marketing moniker "SpeedShift". Note that Intel's IOMMU for VT-d (enabled in the kernel by passing `intel_iommu=on` to the kernel boot options) cannot be used together with frame buffer compression (`i915.enable_fbc=1` argument passed to the i915). Frame Buffer Compression will be disabled automatically to prevent screen tearing in this case. **Note:** The intel_pstate driver is the default since Linux 4.10 on SKL+. Thanks for the updates on this @pcordes and the correction on module options syntax in `/etc/modprobe.d/i915.conf`, @vinzent. Gr33ts ;-) Then, update grub on Fedora: @@ -58,23 +60,32 @@ And if you're still booting up in [legacy BIOS mode on an MBR-style partitioning grub2-mkconfig -o /boot/grub2/grub.cfg Then rebuild initramfs: **On Fedora**: dracut --force **On Debian-based distributions:** Simply run: sudo update-initramfs update-grub Then reboot. Your modern Intel HD Graphics processor graphics will work just fine. You can also add this to: `/etc/modprobe.d/i915.conf` In the following syntax: options i915 enable_guc_loading=1 enable_guc_submission=1 Other safe options to pass are `enable_rc6=1`, `enable_fbc=1`, `enable_psr=1`, `disable_power_well=0` and `semaphores=1` @@ -104,7 +115,7 @@ The following set of options should be generally safe to enable: /etc/modprobe.d/i915.conf options i915 enable_rc6=1 enable_fbc=1 semaphores=1 enable_guc_loading=1 enable_guc_submission=1 **RC6 sleep modes (`enable_rc6`):** @@ -134,8 +145,12 @@ With the SNA acceleration method enabled, tearing may be observed. To fix this, Option "TearFree" "true" This is not needed on server-grade SKUs where Xorg is unwelcome. **Debugging:** Simply inspect dmesg: dmesg | grep drm -
Brainiarc7 revised this gist
Aug 22, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -38,10 +38,11 @@ Now, to the real meat: Add this to the kernel boot parameters on `/etc/default/grub`: intel_pstate=skylake_hwp The `intel_pstate=skylake_hwp option` enables Intel's Hardware P-States, known commonly by the marketing moniker "SpeedShift". Note that Intel's IOMMU for VT-d (enabled in the kernel by passing `intel_iommu=on` to the kernel boot options) cannot be used together with frame buffer compression (`i915.enable_fbc=1` argument passed to the i915). Frame Buffer Compression will be disabled automatically to prevent screen tearing in this case. Then, update grub on Fedora: -
Brainiarc7 revised this gist
May 25, 2017 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,11 +15,11 @@ Note that the firmware for these GPUs is often packaged by your distributor, and Sample output: /usr/lib/firmware/i915 /usr/lib/firmware/i915/bxt_dmc_ver1_07.bin /usr/lib/firmware/i915/kbl_dmc_ver1.bin /usr/lib/firmware/i915/kbl_dmc_ver1_01.bin /usr/lib/firmware/i915/skl_dmc_ver1_23.bin /usr/lib/firmware/i915/skl_guc_ver1.bin /usr/lib/firmware/i915/skl_guc_ver4.bin /usr/lib/firmware/i915/skl_guc_ver6.bin @@ -38,10 +38,10 @@ Now, to the real meat: Add this to the kernel boot parameters on `/etc/default/grub`: i915.enable_guc_loading=1 i915.enable_guc_submission=1 intel_pstate=skylake_hwp i915.enable_psr=1 i915.disable_power_well=0 The `intel_pstate=skylake_hwp option` enables Intel's Hardware P-States, known commonly by the marketing moniker "SpeedShift". Then, update grub on Fedora: @@ -75,7 +75,7 @@ In the following syntax: options i915.enable_guc_loading=1 i915.enable_guc_submission=1 Other safe options to pass are `enable_rc6=1`, `enable_fbc=1`, `enable_psr=1`, `disable_power_well=0` and `semaphores=1` **Reference:** -
Brainiarc7 revised this gist
May 17, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -128,7 +128,7 @@ Framebuffer compression may be unreliable or unavailable on Intel GPU generation **Tear-free video:** With the SNA acceleration method enabled, tearing may be observed. To fix this, enable the "`TearFree`" option in the driver by adding the following line to your xorg.conf (or ideally, a sub-configuration file under xorg.conf.d) configuration file: Option "TearFree" "true" -
Brainiarc7 revised this gist
Apr 6, 2017 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -38,7 +38,10 @@ Now, to the real meat: Add this to the kernel boot parameters on `/etc/default/grub`: i915.enable_guc_loading=1 i915.enable_guc_submission=1 intel_pstate=skylake_hwp The last option enables Intel's Hardware P-States, known commonly by the marketing moniker "SpeedShift". Then, update grub on Fedora: -
Brainiarc7 revised this gist
Mar 31, 2017 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -139,7 +139,18 @@ Simply inspect dmesg: And also look at the output of: journalctl -b -o short-monotonic -k **Screen corruption observed when waking up from suspend** This is often observed as font and screen corruption in GTK+ applications (missing glyphs after suspend/resume). Should you experience missing font glyphs in GTK+ applications, the following workaround might help. Edit `/etc/environment` to add the following line: /etc/environment COGL_ATLAS_DEFAULT_BLIT_MODE=framebuffer See [this bug](https://bugs.freedesktop.org/show_bug.cgi?id=88584) here for more details. Thanks and regards, @@ -149,3 +160,5 @@ Brainiarc7 -
Brainiarc7 revised this gist
Mar 28, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -100,7 +100,7 @@ The following set of options should be generally safe to enable: /etc/modprobe.d/i915.conf options i915.enable_rc6=1 i915.enable_fbc=1 i915.semaphores=1 **RC6 sleep modes (`enable_rc6`):** -
Brainiarc7 revised this gist
Mar 21, 2017 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -128,6 +128,17 @@ Framebuffer compression may be unreliable or unavailable on Intel GPU generation With the SNA acceleration method enabled, tearing may be observed. To fix this, enable the "`TearFree`" option in the driver by adding the following line to your configuration file: Option "TearFree" "true" **Debugging:** Simply inspect dmesg: dmesg | grep drm And also look at the output of: journalctl -b -o short-monotonic -k -
Brainiarc7 created this gist
Mar 21, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,140 @@ **Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:** Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto [binary-only firmware](https://01.org/linuxgraphics/downloads/firmware), and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality. Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot. **Instructions provided for both Fedora and Ubuntu (including Debian):** Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running: **1. On Fedora:** rpm -ql linux-firmware | fgrep i915 Sample output: /usr/lib/firmware/i915 /usr/lib/firmware/i915/bxt_dmc_ver1_07.bin /usr/lib/firmware/i915/kbl_dmc_ver1.bin /usr/lib/firmware/i915/kbl_dmc_ver1_01.bin /usr/lib/firmware/i915/skl_dmc_ver1_23.bin /usr/lib/firmware/i915/skl_guc_ver1.bin /usr/lib/firmware/i915/skl_guc_ver4.bin /usr/lib/firmware/i915/skl_guc_ver6.bin /usr/lib/firmware/i915/skl_guc_ver6_1.bin /usr/share/doc/linux-firmware/LICENSE.i915 **2. On Ubuntu:** dpkg -L linux-firmware | fgrep i915 It may be wise to install the `linux-firmware-nonfree` package as it may contain extra firmware blobs on Ubuntu releases *prior to 16.04LTS*. Don't install this on 16.04LTS and above. Now, to the real meat: **GUC loading on Skylake and above:** Add this to the kernel boot parameters on `/etc/default/grub`: i915.enable_guc_loading=1 i915.enable_guc_submission=1 Then, update grub on Fedora: (Run commands as root): For [EFI boot](https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface) (More common): grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg And if you're still booting up in [legacy BIOS mode on an MBR-style partitioning scheme](https://wiki.archlinux.org/index.php/partitioning#Master_Boot_Record) or with [CSM enabled](http://www.rodsbooks.com/efi-bootloaders/csm-good-bad-ugly.html) on Fedora for whatever reason: grub2-mkconfig -o /boot/grub2/grub.cfg **On Ubuntu:** Simply run: update-grub Then reboot. Your Skylake processor graphics will work just fine. You can also add this to: `/etc/modprobe.d/i915.conf` In the following syntax: options i915.enable_guc_loading=1 i915.enable_guc_submission=1 Other safe options to pass are `enable_rc6=1`, `enable_fbc=1` and `semaphores=1` **Reference:** See modinfo output for i915 for available GuC options: modinfo i915 | grep guc **Further notes:** A list of all options along with short descriptions and default values can be generated with the following command: $ modinfo -p i915 To check which options are currently enabled, run: # systool -m i915 -av You will note that many options default to -1, resulting in per-chip power-saving defaults. It is however possible to configure more aggressive powersaving by using module options. Warning: Diverting from the defaults will mark the kernel as tainted from Linux 3.18 onwards. This basically implies using other options than the per-chip defaults is considered experimental and not supported by the developers. The following set of options should be generally safe to enable: /etc/modprobe.d/i915.conf options i915 enable_rc6=1 enable_fbc=1 semaphores=1 **RC6 sleep modes (`enable_rc6`):** You can experiment with higher values for enable_rc6, but your GPU may not support them or the activation of the other options: The available enable_rc6 values are a bitmask with bit values `RC6=1`, `RC6p=2`, `RC6pp=4[4]` - where "`RC6p`" and "`RC6pp`" are lower power states. To confirm the current running RC6 level, you can look in sysfs: # cat /sys/class/drm/card0/power/rc6_enable If the value read is a lower number than expected, the other RC6 level are probably not supported. Passing `drm.debug=0xe` to the kernel boot options will add DRM debugging information to the kernel log - possibly including a line like this: [drm:sanitize_rc6_option] Adjusting RC6 mask to 1 (requested 7, valid 1) **Framebuffer compression (`enable_fbc`):** Framebuffer compression may be unreliable or unavailable on Intel GPU generations before Sandy Bridge (generation 6). This results in messages logged to the system journal similar to this one: kernel: drm: not enough stolen space for compressed buffer, disabling. **Tear-free video:** With the SNA acceleration method enabled, tearing may be observed. To fix this, enable the "`TearFree`" option in the driver by adding the following line to your configuration file: Option "TearFree" "true" Thanks and regards, Brainiarc7