SOLVED Laptop with Kabylake-R (i7 8550) energy saving kernel params not running

Screen resolution, 3D Acceleration, nVidia, ATI
Forum rules
Before you post please read this
Post Reply
SammichPG
Level 1
Level 1
Posts: 4
Joined: Thu Jan 04, 2018 6:43 am

SOLVED Laptop with Kabylake-R (i7 8550) energy saving kernel params not running

Post by SammichPG » Thu Jan 04, 2018 7:02 am

Hi everybody, I just bought an Asus vivobook s510unr with i7 8550 and geforce mx150
I'm running:
- the proprietary nvidia drivers
- I enabled all updates from the manager so kernel should be something like 4.10
- from nvidia x server settings the active card is intel (confirmed by powertop, shouldn't get to 5-6W battery drain with the discrete gpu on)

I'm trying to enable all the power saving features of the intel gpu so I edited /etc/default/grub

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=skylake_hwp i915.enable_guc_loading=1 i915.enable_guc_submission=1 i915.enable_rc6=4 i915.enable_fbc=1 i915.semaphores=1"
I verified that all the parameters are not running by executing systool -m i915 -av that gives this output

Code: Select all

Module = "i915"

  Attributes:
    coresize            = "1449984"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "4"
    srcversion          = "E344723FEE4FBA650921D4D"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    enable_hangcheck    = "Y"

  Sections:
    .altinstr_aux       = "0x0000000000000000"
    .altinstr_replacement= "0x0000000000000000"
    .altinstructions    = "0x0000000000000000"
    .bss                = "0x0000000000000000"
    .data..read_mostly  = "0x0000000000000000"
    .data.unlikely      = "0x0000000000000000"
    .data               = "0x0000000000000000"
    .exit.text          = "0x0000000000000000"
    .fixup              = "0x0000000000000000"
    .gnu.linkonce.this_module= "0x0000000000000000"
    .init.text          = "0x0000000000000000"
    .note.gnu.build-id  = "0x0000000000000000"
    .parainstructions   = "0x0000000000000000"
    .ref.data           = "0x0000000000000000"
    .rodata.str1.1      = "0x0000000000000000"
    .rodata.str1.8      = "0x0000000000000000"
    .rodata             = "0x0000000000000000"
    .smp_locks          = "0x0000000000000000"
    .strtab             = "0x0000000000000000"
    .symtab             = "0x0000000000000000"
    .text               = "0x0000000000000000"
    .text.unlikely      = "0x0000000000000000"
    __bug_table         = "0x0000000000000000"
    __ex_table          = "0x0000000000000000"
    __jump_table        = "0x0000000000000000"
    __ksymtab_gpl       = "0x0000000000000000"
    __ksymtab_strings   = "0x0000000000000000"
    __mcount_loc        = "0x0000000000000000"
    __param             = "0x0000000000000000"
    __tracepoints_ptrs  = "0x0000000000000000"
    __tracepoints       = "0x0000000000000000"
    __tracepoints_strings= "0x0000000000000000"
    _ftrace_events      = "0x0000000000000000"
thinking that maybe using grub kernel parameters wasn't the best way to go about it I then created /etc/modprobe.d/i915.conf

Code: Select all

options i915.enable_guc_loading=1 i915.enable_guc_submission=1 i915.enable_rc6=4 i915.enable_fbc=1 i915.semaphores=1 
and updated update-initramfs -u -k all

I'm quite lost, this is the first time that I'm running a bleeding edge machine with linux and with an nvidia card to make matters more complex (I was previously using a 2008 thinkpad x200s so everything was dead stable and set in stone)
should I download some package to enable kaby lake support or that's the way it is and I will have to deal with the current state until the next LTS?
thank you for reading this :)
Last edited by SammichPG on Wed Jan 10, 2018 2:04 pm, edited 1 time in total.

User avatar
Pjotr
Level 20
Level 20
Posts: 10638
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Laptop with Kabylake-R (i7 8550) energy saving kernel params not running

Post by Pjotr » Thu Jan 04, 2018 7:08 am

First remove all those extra kernel parameters. They might do more harm than good, and what they certainly do create is an unpredictable system.

Then try the 4.13 kernel:

Update Manager - panel: View - Linux kernels

Install the latest kernel from the 4.13 series.

Then reboot.
Tip: 10 things to do after installing Linux Mint 19 Tara
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

SammichPG
Level 1
Level 1
Posts: 4
Joined: Thu Jan 04, 2018 6:43 am

Re: Laptop with Kabylake-R (i7 8550) energy saving kernel params not running

Post by SammichPG » Thu Jan 04, 2018 7:36 am

thak your for the sugestion about the kernel, now I have 4.13.0-21-generic
I purged all the i915 grub parameters and went back to test just rc6=1

Code: Select all

options i915 enable_rc6=1
in /etc/modprobe.d/i915.conf

sadly the systool output seems unchanged

Code: Select all

systool -m i915 -av
Module = "i915"

  Attributes:
    coresize            = "1806336"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "4"
    srcversion          = "F27B28CF28ECAE28997AF44"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    enable_hangcheck    = "Y"

  Sections:
    .altinstr_aux       = "0x0000000000000000"
    .altinstr_replacement= "0x0000000000000000"
    .altinstructions    = "0x0000000000000000"
    .bss                = "0x0000000000000000"
    .data..cacheline_aligned= "0x0000000000000000"
    .data..read_mostly  = "0x0000000000000000"
    .data.unlikely      = "0x0000000000000000"
    .data               = "0x0000000000000000"
    .exit.text          = "0x0000000000000000"
    .fixup              = "0x0000000000000000"
    .gnu.linkonce.this_module= "0x0000000000000000"
    .init.text          = "0x0000000000000000"
    .note.gnu.build-id  = "0x0000000000000000"
    .parainstructions   = "0x0000000000000000"
    .ref.data           = "0x0000000000000000"
    .rodata.str1.1      = "0x0000000000000000"
    .rodata.str1.8      = "0x0000000000000000"
    .rodata             = "0x0000000000000000"
    .smp_locks          = "0x0000000000000000"
    .strtab             = "0x0000000000000000"
    .symtab             = "0x0000000000000000"
    .text               = "0x0000000000000000"
    .text.unlikely      = "0x0000000000000000"
    __bug_table         = "0x0000000000000000"
    __ex_table          = "0x0000000000000000"
    __jump_table        = "0x0000000000000000"
    __ksymtab_gpl       = "0x0000000000000000"
    __ksymtab_strings   = "0x0000000000000000"
    __mcount_loc        = "0x0000000000000000"
    __param             = "0x0000000000000000"
    __tracepoints_ptrs  = "0x0000000000000000"
    __tracepoints       = "0x0000000000000000"
    __tracepoints_strings= "0x0000000000000000"
    _ftrace_events      = "0x0000000000000000"


but

Code: Select all

cat /sys/class/drm/card0/power/rc6_enable
1
reports 1 while it was something like 0 or -1 before

SammichPG
Level 1
Level 1
Posts: 4
Joined: Thu Jan 04, 2018 6:43 am

Re: Laptop with Kabylake-R (i7 8550) energy saving kernel params not running

Post by SammichPG » Thu Jan 04, 2018 10:28 am

classic example of problem between keyboard and user, as stated by one comment in:
https://askubuntu.com/questions/895446/ ... r-the-i915
the systool cmd will report actual settings only if you type it as root (as lambda user, you get indeed only one parameter reported) – Joan Moreau Jun 13 '17 at 5:50
I was running the tool without su privileges, now I have

Code: Select all

systool -v -m i915
Module = "i915"

  Attributes:
    coresize            = "1806336"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "4"
    srcversion          = "F27B28CF28ECAE28997AF44"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    alpha_support       = "N"
    disable_display     = "N"
    disable_power_well  = "1"
    edp_vswing          = "0"
    enable_cmd_parser   = "Y"
    enable_dc           = "-1"
    enable_dp_mst       = "Y"
    enable_dpcd_backlight= "N"
    enable_execlists    = "1"
    enable_fbc          = "1"
    enable_guc_loading  = "0"
    enable_guc_submission= "0"
    enable_gvt          = "N"
    enable_hangcheck    = "Y"
    enable_ips          = "1"
    enable_ppgtt        = "3"
    enable_psr          = "0"
    enable_rc6          = "1"
    error_capture       = "Y"
    fastboot            = "N"
    force_reset_modeset_test= "N"
    guc_firmware_path   = "(null)"
    guc_log_level       = "-1"
    huc_firmware_path   = "(null)"
    inject_load_failure = "0"
    invert_brightness   = "0"
    load_detect_test    = "N"
    lvds_channel_mode   = "0"
    lvds_use_ssc        = "-1"
    mmio_debug          = "0"
    modeset             = "-1"
    nuclear_pageflip    = "N"
    panel_ignore_lid    = "1"
    prefault_disable    = "N"
    reset               = "Y"
    semaphores          = "0"
    use_mmio_flip       = "0"
    vbt_sdvo_panel_type = "-1"
    verbose_state_checks= "Y"

  Sections:
    .altinstr_aux       = "0xffffffffc02c78a1"
    .altinstr_replacement= "0xffffffffc02c7734"
    .altinstructions    = "0xffffffffc032afc4"
    .bss                = "0xffffffffc0344c80"
    .data..cacheline_aligned= "0xffffffffc0344280"
    .data..read_mostly  = "0xffffffffc0341fc0"
    .data.unlikely      = "0xffffffffc0341f68"
    .data               = "0xffffffffc0332ae0"
    .exit.text          = "0xffffffffc02c78e9"
    .fixup              = "0xffffffffc02c7905"
    .gnu.linkonce.this_module= "0xffffffffc0344940"
    .init.text          = "0xffffffffc0386000"
    .note.gnu.build-id  = "0xffffffffc02c8000"
    .parainstructions   = "0xffffffffc02fef20"
    .ref.data           = "0xffffffffc0342200"
    .rodata.str1.1      = "0xffffffffc030022c"
    .rodata.str1.8      = "0xffffffffc030c3d8"
    .rodata             = "0xffffffffc02c8080"
    .smp_locks          = "0xffffffffc032a974"
    .strtab             = "0xffffffffc03af180"
    .symtab             = "0xffffffffc0388000"
    .text               = "0xffffffffc01cc000"
    .text.unlikely      = "0xffffffffc02c6b18"
    __bug_table         = "0xffffffffc033ee90"
    __ex_table          = "0xffffffffc03316f0"
    __jump_table        = "0xffffffffc0332000"
    __ksymtab_gpl       = "0xffffffffc02c8030"
    __ksymtab_strings   = "0xffffffffc0331698"
    __mcount_loc        = "0xffffffffc032b480"
    __param             = "0xffffffffc0331080"
    __tracepoints_ptrs  = "0xffffffffc0331750"
    __tracepoints       = "0xffffffffc03434c0"
    __tracepoints_strings= "0xffffffffc0331910"
    _ftrace_events      = "0xffffffffc0342040"

I tried several ways (including grub) but none of settings stick

could it be a problem with the GUC?
guc_firmware_path = "(null)"


I should have the right firmware for kabylake

Code: Select all

VivoBook crom # cd /lib/firmware/i915/
VivoBook i915 # ls
bxt_dmc_ver1_04.bin        kbl_dmc_ver1.bin           skl_guc_ver4_3.bin
bxt_dmc_ver1_05.bin        kbl_huc_ver02_00_1810.bin  skl_guc_ver4.bin
bxt_dmc_ver1_06.bin        skl_dmc_ver1_23.bin        skl_guc_ver6_1.bin
bxt_dmc_ver1_07.bin        skl_dmc_ver1_26.bin        skl_guc_ver6.bin
bxt_dmc_ver1.bin           skl_dmc_ver1.bin           skl_huc_ver01_07_1398.bin
bxt_huc_ver01_07_1398.bin  skl_guc_ver1_1059.bin
kbl_dmc_ver1_01.bin        skl_guc_ver1.bin

SammichPG
Level 1
Level 1
Posts: 4
Joined: Thu Jan 04, 2018 6:43 am

Re: Laptop with Kabylake-R (i7 8550) energy saving kernel params not running

Post by SammichPG » Sun Jan 07, 2018 6:55 pm

SOLVED after a lot of reading and testing!

1) Download the hc, guc and dmc files from here https://01.org/linuxgraphics/downloads/firmware, the latest guc is 9.39 but I got the 9.14 in working order and stopped there
2) Follow the installation insructions on the website
3) open up your grub config file (/etc/default/grub) and add these boot parameters or use the config.d file

Code: Select all

i915.enable_guc_loading=2 i915.enable_guc_submission=2 i915.enable_rc6=1 i915.enable_rc6=1 i915.enable_psr=1 i915.disable_power_well=0 i915.enable_fbc=1
4) save, exit run update-grub and reboot
5) check that all the features are enabled with

Code: Select all

sudo systool -m i915 -av
6) check that the guc and huc are properly loaded

Code: Select all

sudo cat /sys/kernel/debug/dri/0/i915_huc_load_status
sudo cat /sys/kernel/debug/dri/0/i915_guc_load_status
Fun facts about the kaby lake i915 kernel parameters:
- support for rc6p and rc6pp was removed since Broadwell, there is no point in trying enable_rc6=7, it will only work as rc6=1
- there is no support for semaphores=1
- enable guc loading=1 and guc submission=1 did not work for me, the value 2 is used to enforce the guc loading, some documentation warns about lockups if no guc is present but it made all the difference for me

Systool output showing that it works:

Code: Select all

VivoBook crom # systool -m i915 -av
Module = "i915"

  Attributes:
    coresize            = "1806336"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "4"
    srcversion          = "F27B28CF28ECAE28997AF44"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    alpha_support       = "N"
    disable_display     = "N"
    disable_power_well  = "0"
    edp_vswing          = "0"
    enable_cmd_parser   = "Y"
    enable_dc           = "-1"
    enable_dp_mst       = "Y"
    enable_dpcd_backlight= "N"
    enable_execlists    = "1"
    enable_fbc          = "1"
    enable_guc_loading  = "2"
    enable_guc_submission= "2"
    enable_gvt          = "N"
    enable_hangcheck    = "Y"
    enable_ips          = "1"
    enable_ppgtt        = "3"
    enable_psr          = "1"
    enable_rc6          = "1"
    error_capture       = "Y"
    fastboot            = "N"
    force_reset_modeset_test= "N"
    guc_firmware_path   = "(null)"
    guc_log_level       = "-1"
    huc_firmware_path   = "(null)"
    inject_load_failure = "0"
    invert_brightness   = "0"
    load_detect_test    = "N"
    lvds_channel_mode   = "0"
    lvds_use_ssc        = "-1"
    mmio_debug          = "0"
    modeset             = "-1"
    nuclear_pageflip    = "N"
    panel_ignore_lid    = "1"
    prefault_disable    = "N"
    reset               = "Y"
    semaphores          = "0"
    use_mmio_flip       = "0"
    vbt_sdvo_panel_type = "-1"
    verbose_state_checks= "Y"

  Sections:
    .altinstr_aux       = "0xffffffffc05d78a1"
    .altinstr_replacement= "0xffffffffc05d7734"
    .altinstructions    = "0xffffffffc063afc4"
    .bss                = "0xffffffffc0654c80"
    .data..cacheline_aligned= "0xffffffffc0654280"
    .data..read_mostly  = "0xffffffffc0651fc0"
    .data.unlikely      = "0xffffffffc0651f68"
    .data               = "0xffffffffc0642ae0"
    .exit.text          = "0xffffffffc05d78e9"
    .fixup              = "0xffffffffc05d7905"
    .gnu.linkonce.this_module= "0xffffffffc0654940"
    .init.text          = "0xffffffffc0381000"
    .note.gnu.build-id  = "0xffffffffc05d8000"
    .parainstructions   = "0xffffffffc060ef20"
    .ref.data           = "0xffffffffc0652200"
    .rodata.str1.1      = "0xffffffffc061022c"
    .rodata.str1.8      = "0xffffffffc061c3d8"
    .rodata             = "0xffffffffc05d8080"
    .smp_locks          = "0xffffffffc063a974"
    .strtab             = "0xffffffffc03aa180"
    .symtab             = "0xffffffffc0383000"
    .text               = "0xffffffffc04dc000"
    .text.unlikely      = "0xffffffffc05d6b18"
    __bug_table         = "0xffffffffc064ee90"
    __ex_table          = "0xffffffffc06416f0"
    __jump_table        = "0xffffffffc0642000"
    __ksymtab_gpl       = "0xffffffffc05d8030"
    __ksymtab_strings   = "0xffffffffc0641698"
    __mcount_loc        = "0xffffffffc063b480"
    __param             = "0xffffffffc0641080"
    __tracepoints_ptrs  = "0xffffffffc0641750"
    __tracepoints       = "0xffffffffc06534c0"
    __tracepoints_strings= "0xffffffffc0641910"
    _ftrace_events      = "0xffffffffc0652040"
According to powertop all this trouble is worth around 1-1.5W lower energy consumption (plus working HDMI audio and h265 hw decoding hopefully) :)

Post Reply

Return to “Graphics Cards & Monitors”