Solved Intel i915 rc6 power saving enabled?

How can you verify that the rc6 power saving is enabled on a Intel HD6000 based gpu?

I have the following in my /boot/loader.conf;
Code:
# Enable GPU power-saving idle states
drm.i915.enable_rc6=7

However I see no mention of it from dmesg or sysctl, e.g.
dmesg | grep rc6
<nothing>

sysctl -a | grep rc6
<nothing>

dmesg | grep drm
Code:
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
[drm] Got stolen memory base 0x8c000000, size 0x4000000
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] Connector eDP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.eDP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-2
[drm]   - kern.vt.fb.default_mode
[drm] Initialized i915 1.6.0 20171222 for drmn0 on minor 0
name=drmn0 flags=0x0 stride=5760 bpp=32
drmn0: fb0: inteldrmfb frame buffer device

sysctl -a | grep drm
Code:
sys.class.drm.card0-HDMI-A-2.modes:
sys.class.drm.card0-HDMI-A-2.dpms: Off
sys.class.drm.card0-HDMI-A-2.enabled: disabled
sys.class.drm.card0-DP-2.modes:
sys.class.drm.card0-DP-2.dpms: Off
sys.class.drm.card0-DP-2.enabled: disabled
sys.class.drm.card0-HDMI-A-1.modes:
sys.class.drm.card0-HDMI-A-1.dpms: Off
sys.class.drm.card0-HDMI-A-1.enabled: disabled
sys.class.drm.card0-DP-1.modes:
sys.class.drm.card0-DP-1.dpms: Off
sys.class.drm.card0-DP-1.enabled: disabled
sys.class.drm.card0-eDP-1.modes: 1440x900
sys.class.drm.card0-eDP-1.dpms: On
sys.class.drm.card0-eDP-1.enabled: enabled
sys.class.drm.version: drm 1.1.0 20060810
dev.drmn.0.%parent: vgapci0
dev.drmn.0.%pnpinfo:
dev.drmn.0.%location:
dev.drmn.0.%driver: drmn
dev.drmn.0.%desc: drmn
dev.drmn.%parent:
dev.drm.0.PCI_ID: 8086:1626
dev.drm.128.PCI_ID: 8086:1626
dev.drm.always_interruptible: 0
dev.drm.error_panic: 0
dev.drm.drm_debug_persist: 0
dev.drm.skip_ddb: 0
dev.drm.drm_debug: 0
compat.linuxkpi.drm_timestamp_precision_usec: 20
compat.linuxkpi.drm_vblankoffdelay: 5000
compat.linuxkpi.drm_poll: 1
compat.linuxkpi.drm_drm_fbdev_overalloc: 100
compat.linuxkpi.drm_fbdev_emulation: 1
compat.linuxkpi.drm_edid_firmware:
compat.linuxkpi.drm_edid_fixup: 6
compat.linuxkpi.drm_debug: 0
compat.linuxkpi.drm_dp_aux_i2c_transfer_size: 16
compat.linuxkpi.drm_dp_aux_i2c_speed_khz: 10

Thanks,
James
 
If you're using linuxkpi-based graphics/drm-kmod then that line ("drm.i915.enable_rc6=7") isn't gonna work at all.
You need something like this:
Code:
# INTEL DRM WITH graphics/drm-kmod PACKAGE (NEW)
# SKIP UNNECESSARY MODE SETS AT BOOT TIME
  compat.linuxkpi.fastboot=1
# USE SEMAPHORES FOR INTER RING SYNC
  compat.linuxkpi.semaphores=1
# ENABLE POWER SAVING RENDER C-STATE 6
  compat.linuxkpi.enable_rc6=7
# ENABLE POWER SAVING DISPLAY C-STATES
  compat.linuxkpi.enable_dc=2
# ENABLE FRAME BUFFER COMPRESSION FOR POWER SAVINGS
  compat.linuxkpi.enable_fbc=1
*Taken from vermaden's incredibly useful website*
 
If you're using linuxkpi-based graphics/drm-kmod then that line ("drm.i915.enable_rc6=7") isn't gonna work at all.

Seems that the module params keep changing, so as you pointed out the one I was previously using is now useless with the latest default version (v4.16) of graphics/drm-kmod.

The best documentation I've found for which params are actually available seems to be the source itself;
https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/i915/i915_params.c
https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/drivers/gpu/drm/i915/i915_params.h

Based on the links above I added the following in boot/loader.conf;
Code:
# Try to skip unnecessary mode sets at boot time
compat.linuxkpi.i915_fastboot=1

# Enable power-saving display C-states (0=disable; 1=up to DC5; 2=up to DC6)
compat.linuxkpi.i915_enable_dc=2

# Disable display power wells when possible (0=power wells always on, 1=power wells disabled when possible)
compat.linuxkpi.i915_disable_power_well=1

# Enable frame buffer compression for power savings
compat.linuxkpi.i915_enable_fbc=1


Reboot then check changes have taken effect;
sysctl compat.linuxkpi | grep i915
 
Thank you so much for this (including vermaden ).

Options do change over time, I guess. I have these for rc6 control:
sys.class.drm.card0.power.rc6_enable=1
sys.class.drm.card0.gt.gt0.rc6_enable=1

I also have:
linux.compat.i915_enable_dc=-1
where -1 is a new option (-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6)

@developers (SirDice Crivens etc):
I have a major problem with the screen starting to flicker on i915 using KDE after the computer is idle for a while. I suspect it's this GPU power control, which has about 30 minute rolling window to measure GPU activity. I'll try turning this off, and if it solves screen flicker after idling, what's the point to have it enabled by default? i915 min frequency is super low, 200MHz in my case, who's gonna feel the power savings if that goes into a low power mode? No one ever. But it's 100% causing screen issues on KDE, which we do want to work flawlessly on FreeBSD to be welcoming to new users.
 
Strangely,

Setting
sys.class.drm.card0.power.rc6_enable=0
sys.class.drm.card0.gt.gt0.rc6_enable=0
in /etc/sysctl.conf

did not have an effect, they still show up as
sys.class.drm.card0.power.rc6_enable=1
sys.class.drm.card0.gt.gt0.rc6_enable=1
after boot.

Setting compat.linuxkpi.i915_enable_dc=0 in /boot/loader.conf did take effect, I'm testing this now, but what's up with sysctl values not registering on boot?
 
Ok, AI explains that these are different tunables. The compat.linuxkpi.i915_enable_dc=0 is the one that prevents GPU going to lower power states, and the rc6_enable is always on and is not tunable. Ok, well, let's see if this works.
 
If the variable is tunable and readonly, /etc/sysctl.conf or sysctl(8) command cannot take effect.

Readonly tunables (like hw.nvidiadrm.modeset for nvidia-drm.ko) needs to be set BEFORE the variable is actually needed (i.e., on loading nvidia-drm.ko for hw.nvidiadrm.modeset tunable), so needed to be set in /boot/loader.conf to be fetched in initializations.

For non-tunable and readonly sysctl variables, there can be really fully readonly for admins. These exists just for exposing how the kernel and/or kmods auto-initialized it and not intended to override the value afterwards.
 
Well, it wasn't pci's aspm either. It's something about Wayland and KDE that's not letting the display turn on properly after turning off...and so it blinks trying to turn on, it does flash what's on the screen at the time but for a split second. I am able to get the display to not blink most of the time by switching to ttyv2 and ttyv3 and then back to ttyv1 with KDE.
 
Back
Top