• 0 Posts
  • 2 Comments
Joined 5 months ago
cake
Cake day: September 30th, 2025

help-circle
  • The PC is rather old, 7th Gen i7, officially doesn’t support the GPU. The BIOS is pretty outdated too.

    That shouldn’t effect fan speeds, it’ll give you some performance issues, especially if you don’t have Resizeable BAR enabled, but I don’t see how it could effect any of the sensors.

    Previous owner said the cards ran silent, and the case is very closed so I doubt something moved in shipping

    Hmm, I’ve heard some crazy stories about shipping. Was the GPU reinforced by foam or something? Otherwise it will shake about.

    I already run the nvtopPackages.intel and it displays more than sensors I think.

    Perfect!

    The VRAM temperature fix sounds fun but I think there is no need right now. I should learn how to build “derivations” which is how you apply patches declaratively afaik.

    Edit: Just realised Mastodon really screws up code blocks, view the patch from Lemmy.

    Patch
    From 26cc3d3444564abb2650ad76957dbb3aac3cf1f8 Mon Sep 17 00:00:00 2001
    From: Stephen Horvath <s.horvath@outlook.com.au>
    Date: Sun, 29 Jun 2025 11:50:53 +1000
    Subject: [PATCH] drm/i915/hwmon: Expose VRAM Temperature
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    This patch adds the VRAM temperature to the i915 hwmon driver. The
    temperature is exposed through the temp2_input sysfs attribute.
    
    $ sensors
    i915-pci-0300
    Adapter: PCI adapter
    in0: 663.00 mV
    fan1: 746 RPM
    temp1: +49.0°C
    temp2: +52.0°C
    power1: N/A  (max = 190.00 W, rated max =   0.00 W)
    energy1: 25.04 kJ
    
    Signed-off-by: Stephen Horvath <s.horvath@outlook.com.au>
    ---
     drivers/gpu/drm/i915/i915_hwmon.c        | 41 ++++++++++++++++--------
     drivers/gpu/drm/i915/intel_mchbar_regs.h |  2 ++
     2 files changed, 30 insertions(+), 13 deletions(-)
    
    diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
    index 7dfe1784153f..7d04b6221f4b 100644
    --- a/drivers/gpu/drm/i915/i915_hwmon.c
    +++ b/drivers/gpu/drm/i915/i915_hwmon.c
    @@ -40,6 +40,7 @@ struct hwm_reg {
     	i915_reg_t energy_status_all;
     	i915_reg_t energy_status_tile;
     	i915_reg_t fan_speed;
    +	i915_reg_t vram_temp;
     };
     
     struct hwm_energy_info {
    @@ -282,7 +283,7 @@ static const struct attribute_group *hwm_groups[] = {
     };
     
     static const struct hwmon_channel_info * const hwm_info[] = {
    -	HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
    +	HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT, HWMON_T_INPUT),
     	HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
     	HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
     	HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
    @@ -314,34 +315,46 @@ static int hwm_pcode_write_i1(struct drm_i915_private *i915, u32 uval)
     }
     
     static umode_t
    -hwm_temp_is_visible(const struct hwm_drvdata *ddat, u32 attr)
    +hwm_temp_is_visible(const struct hwm_drvdata *ddat, u32 attr, int chan)
     {
     	struct i915_hwmon *hwmon = ddat->hwmon;
     
    -	if (attr == hwmon_temp_input && i915_mmio_reg_valid(hwmon->rg.pkg_temp))
    +	if (attr == hwmon_temp_input && chan == 0 &&
    +		i915_mmio_reg_valid(hwmon->rg.pkg_temp))
    +		return 0444;
    +
    +	if (attr == hwmon_temp_input && chan == 1 &&
    +		i915_mmio_reg_valid(hwmon->rg.vram_temp))
     		return 0444;
     
     	return 0;
     }
     
     static int
    -hwm_temp_read(struct hwm_drvdata *ddat, u32 attr, long *val)
    +hwm_temp_read(struct hwm_drvdata *ddat, u32 attr, int chan, long *val)
     {
     	struct i915_hwmon *hwmon = ddat->hwmon;
     	intel_wakeref_t wakeref;
     	u32 reg_val;
     
    -	switch (attr) {
    -	case hwmon_temp_input:
    +	if (attr != hwmon_temp_input)
    +		return -EOPNOTSUPP;
    +
    +	switch (chan) {
    +	case 0:
     		with_intel_runtime_pm(ddat->uncore->rpm, wakeref)
     			reg_val = intel_uncore_read(ddat->uncore, hwmon->rg.pkg_temp);
    -
    -		/* HW register value is in degrees Celsius, convert to millidegrees. */
    -		*val = REG_FIELD_GET(TEMP_MASK, reg_val) * MILLIDEGREE_PER_DEGREE;
    -		return 0;
    +		break;
    +	case 1:
    +		with_intel_runtime_pm(ddat->uncore->rpm, wakeref)
    +			reg_val = intel_uncore_read(ddat->uncore, hwmon->rg.vram_temp);
    +		break;
     	default:
    -		return -EOPNOTSUPP;
    +		return -EINVAL;
     	}
    +	/* HW register value is in degrees Celsius, convert to millidegrees. */
    +	*val = REG_FIELD_GET(TEMP_MASK, reg_val) * MILLIDEGREE_PER_DEGREE;
    +	return 0;
     }
     
     static umode_t
    @@ -727,7 +740,7 @@ hwm_is_visible(const void *drvdata, enum hwmon_sensor_types type,
     
     	switch (type) {
     	case hwmon_temp:
    -		return hwm_temp_is_visible(ddat, attr);
    +		return hwm_temp_is_visible(ddat, attr, channel);
     	case hwmon_in:
     		return hwm_in_is_visible(ddat, attr);
     	case hwmon_power:
    @@ -751,7 +764,7 @@ hwm_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
     
     	switch (type) {
     	case hwmon_temp:
    -		return hwm_temp_read(ddat, attr, val);
    +		return hwm_temp_read(ddat, attr, channel, val);
     	case hwmon_in:
     		return hwm_in_read(ddat, attr, val);
     	case hwmon_power:
    @@ -855,6 +868,7 @@ hwm_get_preregistration_info(struct drm_i915_private *i915)
     		hwmon->rg.energy_status_all = PCU_PACKAGE_ENERGY_STATUS;
     		hwmon->rg.energy_status_tile = INVALID_MMIO_REG;
     		hwmon->rg.fan_speed = PCU_PWM_FAN_SPEED;
    +		hwmon->rg.vram_temp = IS_DG2(i915) ? BMG_VRAM_TEMPERATURE : INVALID_MMIO_REG;
     	} else {
     		hwmon->rg.pkg_temp = INVALID_MMIO_REG;
     		hwmon->rg.pkg_power_sku_unit = INVALID_MMIO_REG;
    @@ -863,6 +877,7 @@ hwm_get_preregistration_info(struct drm_i915_private *i915)
     		hwmon->rg.energy_status_all = INVALID_MMIO_REG;
     		hwmon->rg.energy_status_tile = INVALID_MMIO_REG;
     		hwmon->rg.fan_speed = INVALID_MMIO_REG;
    +		hwmon->rg.vram_temp = INVALID_MMIO_REG;
     	}
     
     	with_intel_runtime_pm(uncore->rpm, wakeref) {
    diff --git a/drivers/gpu/drm/i915/intel_mchbar_regs.h b/drivers/gpu/drm/i915/intel_mchbar_regs.h
    index dc2477179c3e..94a9f4680c41 100644
    --- a/drivers/gpu/drm/i915/intel_mchbar_regs.h
    +++ b/drivers/gpu/drm/i915/intel_mchbar_regs.h
    @@ -255,4 +255,6 @@
     
     #define BXT_GT_PERF_STATUS			_MMIO(MCHBAR_MIRROR_BASE_SNB + 0x7070)
     
    +#define BMG_VRAM_TEMPERATURE			_MMIO(0x1382c0)
    +
     #endif /* __INTEL_MCHBAR_REGS */
    
    

  • I don’t have a nixos account so I’m just replying here.

    I run an A770 LE on Debian Testing and most things seemed to work out of the box. I also contributed ARC support into nvtop, so I can explain some of the values from sensors.

    • fan speed still max and no reporting

    Not sure, maybe the fan become slightly unplugged, does it work in Windows? I know the fans on some sparkle cards have a different number of pulses per rotation that can screw with the readings, but it shouldn’t be 0.

    • no voltage or power usage shown

    Voltage only sometimes works for me and I’m not sure what it correlates to. But the power usage is shown, it just shows it in kilojoules since the card got power, not in watts. See this comment I made for a conversion.

    Just fan control…

    AFAIK, there’s nothing you can do.

    I do have a patch somewhere that can display VRAM temperature if you’d like to try it and nixos has a good way of applying patches.