You are not logged in.

#1 2025-03-19 03:12:55

steve___
Member
Registered: 2008-02-24
Posts: 454

Optimal setting for an Intel Gen6 GPU

Hello, I recently updated an old ThinkPad x220 (i5-2540M w/a Gen6 GPU).  It was running arch from 2022-Dec-09. After the update, the video playback via mpv is much more laboured. Using the mpv options, '--profile=fast' and '--hwdec=auto-safe' help a lot, but the laptop still runs hot.

I'm hoping someone out there is running the same GPU and can let me know what the current optimal settings are for X, as well as mpv.

Specific info from the laptop:

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

I was using this video driver, xf86-video-intel-1:2.99.917+916+g31486f40 & mesa-amber-21.3.9-2

After the upgrade I'm now using this driver:

$ pacman -Qi xf86-video-intel | head -2
Name            : xf86-video-intel
Version         : 1:2.99.917+923+gb74b67f0-2

$ pacman -Qi mesa-amber | head -2
Name            : mesa-amber
Version         : 21.3.9-6

Here is what I have in xorg.conf.d:

$ cat /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
   Identifier   "Intel Graphics"
   Driver       "intel"
   Option       "AccelMethod"   "sna"
   Option       "TearFree"      "true"
   Option       "DRI"           "3"
EndSection

Kernel module settings that I set a few years ago:

$ cat /etc/modprobe.d/i915.conf
options i915 enable_fbc=1 enable_guc=0 fastboot=1

Current kernel module settings:

$ systool -m i915 -av
Module = "i915"

  Attributes:
    coresize            = "4489216"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "6"
    srcversion          = "2B9FD4FCD221DCCB51D93AF"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    disable_display     = "N"
    disable_power_well  = "-1"
    dmc_firmware_path   = "(null)"
    edp_vswing          = "0"
    enable_dc           = "-1"
    enable_dmc_wl       = "N"
    enable_dp_mst       = "Y"
    enable_dpcd_backlight= "-1"
    enable_dpt          = "Y"
    enable_fbc          = "1"
    enable_guc          = "2"
    enable_gvt          = "N"
    enable_hangcheck    = "Y"
    enable_ips          = "Y"
    enable_psr2_sel_fetch= "Y"
    enable_psr          = "-1"
    enable_sagv         = "Y"
    error_capture       = "Y"
    force_probe         = "*"
    force_reset_modeset_test= "N"
    gsc_firmware_path   = "(null)"
    guc_firmware_path   = "(null)"
    guc_log_level       = "-1"
    huc_firmware_path   = "(null)"
    invert_brightness   = "0"
    lmem_bar_size       = "0"
    lmem_size           = "0"
    load_detect_test    = "N"
    lvds_channel_mode   = "0"
    memtest             = "N"
    mitigations         = "auto"
    mmio_debug          = "0"
    modeset             = "-1"
    nuclear_pageflip    = "N"
    panel_use_ssc       = "-1"
    psr_safest_params   = "N"
    request_timeout_ms  = "20000"
    reset               = "3"
    vbt_firmware        = "(null)"
    vbt_sdvo_panel_type = "-1"
    verbose_state_checks= "Y"

  Sections:
    .altinstr_aux       = "0xffffffffc05d1d6f"
    .altinstr_replacement= "0xffffffffc05d1a6e"
    .altinstructions    = "0xffffffffc06bc1f8"
    .bss                = "0xffffffffc05f0700"
    .call_sites         = "0xffffffffc076778e"
    .data..read_mostly  = "0xffffffffc05eb740"
    .data.once          = "0xffffffffc05eb6c0"
    .data               = "0xffffffffc05e2400"
    .exit.data          = "0xffffffffc05eb820"
    .exit.text          = "0xffffffffc05d1a20"
    .gnu.linkonce.this_module= "0xffffffffc05f01c0"
    .ibt_endbr_seal     = "0xffffffffc078b0ce"
    .init.data          = "0xffffffffc081f000"
    .init.text          = "0xffffffffc0366000"
    .note.Linux         = "0xffffffffc081ccfc"
    .note.gnu.build-id  = "0xffffffffc081ccd8"
    .note.gnu.property  = "0xffffffffc081cc98"
    .orc_header         = "0xffffffffc081d208"
    .orc_unwind         = "0xffffffffc078d3fe"
    .orc_unwind_ip      = "0xffffffffc07e35f4"
    .printk_index       = "0xffffffffc05e9850"
    .ref.data           = "0xffffffffc05ebf40"
    .retpoline_sites    = "0xffffffffc075bdd2"
    .return_sites       = "0xffffffffc0761d6e"
    .rodata             = "0xffffffffc06bcda0"
    .rodata.cst2        = "0xffffffffc075b798"
    .rodata.str1.1      = "0xffffffffc074c72c"
    .rodata.str1.8      = "0xffffffffc070c530"
    .smp_locks          = "0xffffffffc074b134"
    .static_call.text   = "0xffffffffc05d1da8"
    .static_call_sites  = "0xffffffffc05ede50"
    .strtab             = "0xffffffffc088ce68"
    .symtab             = "0xffffffffc081f008"
    .text               = "0xffffffffc03d6000"
    .text.unlikely      = "0xffffffffc05c4fc0"
    __bpf_raw_tp_map    = "0xffffffffc05eb860"
    __bug_table         = "0xffffffffc05d3000"
    __dyndbg_classes    = "0xffffffffc05eb828"
    __ex_table          = "0xffffffffc075b7a4"
    __jump_table        = "0xffffffffc0363000"
    __ksymtab_gpl       = "0xffffffffc06bc000"
    __ksymtab_strings   = "0xffffffffc081cd2c"
    __mcount_loc        = "0xffffffffc0701e4c"
    __param             = "0xffffffffc075b130"
    __patchable_function_entries= "0xffffffffc05d7780"
    __tracepoints_ptrs  = "0xffffffffc075b84c"
    __tracepoints_strings= "0xffffffffc075b900"
    __tracepoints       = "0xffffffffc05ecde0"
    _ftrace_events      = "0xffffffffc05ebde0"

Let me know if I missed any relevant info.

edit: updated incorrect GPU Gen version

Last edited by steve___ (2025-03-19 13:01:41)

Offline

#2 2025-03-19 06:50:45

jonno2002
Member
Registered: 2016-11-21
Posts: 845

Re: Optimal setting for an Intel Gen6 GPU

no you have a gen6 gpu, see here and here, get rid of mesa amber and use regular mesa, also get rid of xf86-video-intel and use modesetting instead, remove those xorg and modprobe settings, setup vaapi properly (use the "libva-intel-driver") and make sure it works then add "hwdec=vaapi" to your mpv.conf.
see how that goes..

Offline

#3 2025-03-20 18:07:30

steve___
Member
Registered: 2008-02-24
Posts: 454

Re: Optimal setting for an Intel Gen6 GPU

@jonno2002 thanks a lot for the direction.  In case someone stumbles across this post, here is what I did:

$ pacman -S mesa                ## install mesa; this removes mesa-amber
$ pacman -R xf86-video-intel    ## remove xf86-video-intel
$ mv /etc/X11/xorg.conf.d/20-intel.conf /etc/modprobe.d/i915.conf ~/tmp     ## remove xorg and modprobe settings
$ vi /etc/X11/xorg.conf.d/20-intel.conf     ## setup modesetting, is this required?
    Section "Device"
        Identifier "Intel Graphics"
        Driver "modesetting"
    EndSection

## Setup vaapi properly (use the "libva-intel-driver") and make sure it works
https://wiki.archlinux.org/title/Hardware_video_acceleration
$ pacman -S libva-intel-driver  ## already installed
$ reboot

$ pacman -S libva-utils
$ vainfo
    Trying display: wayland
    Trying display: x11
    vainfo: VA-API version: 1.22 (libva 2.22.0)
    vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Mobile - 2.4.1
    vainfo: Supported profile and entrypoints
          VAProfileMPEG2Simple            : VAEntrypointVLD
          VAProfileMPEG2Main              : VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
          VAProfileH264Main               : VAEntrypointVLD
          VAProfileH264Main               : VAEntrypointEncSlice
          VAProfileH264High               : VAEntrypointVLD
          VAProfileH264High               : VAEntrypointEncSlice
          VAProfileH264StereoHigh         : VAEntrypointVLD
          VAProfileVC1Simple              : VAEntrypointVLD
          VAProfileVC1Main                : VAEntrypointVLD
          VAProfileVC1Advanced            : VAEntrypointVLD
          VAProfileNone                   : VAEntrypointVideoProc

$ pacman -S intel-gpu-tools
$ intel_gpu_top

$ vi ~/.config/mpv/mpv.conf
    hwdec=vaapi

$ vi ~/.config/picom.conf    ## fix video tearing in mpv
    vsync = true;

Last edited by steve___ (2025-03-20 19:07:34)

Offline

#4 2025-03-20 18:25:45

jonno2002
Member
Registered: 2016-11-21
Posts: 845

Re: Optimal setting for an Intel Gen6 GPU

glad to hear that fixed the prob, the xorg conf file for modesetting is not required, also you can use ctrl-h to toggle hardware accel in mpv to compare the difference in cpu load

Offline

Board footer

Powered by FluxBB