Fan#

class jtop.core.fan.Fan#

Bases: GenericInterface

This class enable to control your fan or set of fan. Please read the documentation on fan

with jtop() as jetson:
    if jetson.ok():
        jetson.fan.set_profile("tegra_fan", "manual")

Below all methods available using the fan attribute

all_profiles(name)#

Return a list of all profiles available for a fan.

  • Before Jetpack 5
    • temp_control

    • manual

  • After Jetpack 5 jtop map nvfancontrol
    • Quiet

    • Cool

    • Manual (Stop nvfancontrol service)

All fan are always with Manual profile option.

Parameters:

name (str) โ€“ Name of Fan

Raises:

JtopException โ€“ Fan name doesnโ€™t exist

Returns:

List of all profiles available

Return type:

list

get_profile(name)#

Return the current profile is enabled on fan. This value is also readable from fan.

Parameters:

name (str) โ€“ Name of Fan

Raises:

JtopException โ€“ Fan name doesnโ€™t exist

Returns:

fan profile name

Return type:

str

get_profile_default(name)#

Get the default profile for this fan. Usually is the first profile listed in all_profiles()

Parameters:

name (str) โ€“ Name of Fan

Raises:

JtopException โ€“ Fan name doesnโ€™t exist

Returns:

profile default name

Return type:

str

get_rpm(name, idx=0)#

This method return RPM fan. This output is always available on all Jetson. This value is also readable from fan.

Parameters:
  • name (str) โ€“ Name of Fan

  • idx (int, optional) โ€“ Index fan, defaults to 0

Raises:

JtopException โ€“ Fan name doesnโ€™t exist, rpm doesnโ€™t exist or wrong index

Returns:

RPM value

Return type:

int

get_speed(name, idx=0)#

Return for a selected Fan and index the current speed. This value is also readable from fan.

Parameters:
  • name (str) โ€“ Name of Fan

  • idx (int, optional) โ€“ Index fan, defaults to 0

Raises:

JtopException โ€“ Fan name doesnโ€™t exist or wrong index

Returns:

fan speed a number between [0, 100]

Return type:

int

property profile#

This property show the current profile selected on first fan on your board. This is a simplified version of set_profile() where name is the first fan listed.

with jtop() as jetson:
    if jetson.ok():
        # Print profile
        print(jetson.fan.profile)
        # Set new profile
        jetson.fan.profile = 'quiet'
Returns:

current profile in fan

Return type:

str

property rpm#

This property show the current fan selected on first fan on your board.

Note

You can only read RPM, but not set a new speed

You cannot set a new RPM value

with jtop() as jetson:
    if jetson.ok():
        # Read RPM
        print(jetson.fan.rpm)
Returns:

rpm first fan

Return type:

int

set_profile(name, profile)#

Set a new profile for a fan. Check which profile is available with all_profiles().

Parameters:
  • name (str) โ€“ Name of Fan

  • profile (str) โ€“ Profile name

Raises:

JtopException โ€“ Fan name doesnโ€™t exist or wrong profile

set_speed(name, speed, idx=0)#

Set a new speed for a selected fan.

Parameters:
  • name (str) โ€“ Name of Fan

  • speed (float) โ€“ New speed value, a number between [0, 100]

  • idx (int, optional) โ€“ Index fan, defaults to 0

Raises:

JtopException โ€“ Fan name doesnโ€™t exist or wrong index

property speed#

This property show the current speed between [0, 100] on first fan on your board. This is a simplified version of set_speed() where name is the first fan listed.

with jtop() as jetson:
    if jetson.ok():
        # Read speed
        print(jetson.fan.speed)
        # Set new speed
        jetson.fan.speed = 90
Returns:

current fan speed

Return type:

float