Keresés

Új hozzászólás Aktív témák

  • .-..-.

    tag

    válasz .-..-. #101830 üzenetére

    Valamiért nem sikerült a programkód formázás :N

    #!/bin/bash
    if [[ "$USER" != "root" ]]; then
        echo "You need to run this as root"
        exit 1
    fi
    # you might need to adjust this, in my case it's card1,
    # for you it might be card0 or something else entirely
    cd /sys/class/drm/card1/device/gpu_od/fan_ctrl
    echo "0 30 30" > fan_curve
    echo "1 50 50" > fan_curve
    echo "2 60 60" > fan_curve
    echo "3 65 75" > fan_curve
    echo "4 70 100" > fan_curve
    echo "c" > fan_curve
    cat fan_curve

    Én most így csinálom:
    (bent hagytam pár paramétert is amit nem használok éppen, de a lényeg kivehető)

    #!/bin/bash
    if [[ "$USER" != "root" ]]; then
        echo "You need to run this as root"
        exit 1
    fi
    # Config Sapphire RX 7800 XT Nitro+
    CARD_ID=card1
    HWMON_ID=hwmon2
    PL=200        # Watts, default 212 (212000000)
    SCLK_MAX=2000 # MHz, default 2639
    MCLK_MAX=1000 # MHz, default 1219
    VOLT_OFF=-50  # millivolts, default 0
    TEMP_TGT=60   # celsius, default 90
    GPU_SYSFS="/sys/class/drm/$CARD_ID/device"
    HWMON_SYSFS="$GPU_SYSFS/hwmon/$HWMON_ID"
    FAN_CTRL_SYSFS="$GPU_SYSFS/gpu_od/fan_ctrl"
    # set fan curve
    echo "$TEMP_TGT" > "$FAN_CTRL_SYSFS/fan_target_temperature"
    # confirm
    echo "c" | tee "$FAN_CTRL_SYSFS/fan_target_temperature" 1>/dev/null

Új hozzászólás Aktív témák