how to bind an external temperature sensor with fan emc2103 in Linux. As emc2103 has its own temperature sensor which its use to control fan speed. but I want to control fan speed based on CPU temperature. how to build this CPU temperature sensor with this emc2103 fan
how to bind thermal temperature sensor with emc2103 fan
314 Views Asked by asking questions At
1
There are 1 best solutions below
Related Questions in LINUX-KERNEL
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Facing fatal errors while running "yum update" command on CentOS 7/Cloudlinux 7
- crash utility itself crashes while decoding kdump generated from null pointer dereference in kernel module
- How to compile the Linux kernel with -O0 for more detailed debug?
- Linux support for parallel Pixel data Image sensor
- Can't upgrade to newest version of linux-image-6.5.0-26-generic
- How to protect a page so that it cannot be write in mips arch?
- How to extract the .img file into normal kernel source file in the linux?
- Storage size of struct hash_desc desc; isn't known
- How can I intercept failed file openning calls?
- struct nameidata-Linux Kernel Module
- How to modify a 'struct msghdr' in Linux Kernel Module?
- How to allocate 500MB+ physically contiguous memory in a Linux kernel module and copy data to that memory from a userspace process?
- Hyper Threading: nosmt in grub configuration
Related Questions in LINUX-DEVICE-DRIVER
- Linux support for parallel Pixel data Image sensor
- Linux to QNX USB driver convert
- IRQ interrupt obtaining abnormal possibilities
- Error compiling dts (Device Tree source) file for dtb
- How to write the external interrupt callback function of Linux kernel v3.10?
- Does traffic control (tc) command have a rate limit?
- The module first installed the alarm when it started
- How does the Linux kernel now what to put in platform_data?
- How to reduce cached memory used by Linux kernel on embedded linux platform
- Notifying Linux MMC subsystem about power loss
- Linux kernel 6.6 from block_device how to find out if it has mounted file system
- Linux SPI read and write may occasionally be slow?
- gettimeofday calculates the runtime, with occasional significant deviations?
- uImage is not supported in kexec_file
- Linux of_platform_depopulate() does not remove drivers
Related Questions in LM-SENSORS
- "Can't locate Fcntl.pm in @INC" error running "sensors-detect" on Yocto
- Ubuntu lm-sensors: large instantaneous temperature jumps on Intel core i7
- how to monitor cpu temperature using snmp or lm_sensors and config it with zabbix dashboard?
- Bash - Convert String to Number and Store in Variable
- Show temperature without labels/text with "sensors" on ubuntu terminal?
- psutil on Linux shows no CPU Core Temperatures
- how to bind thermal temperature sensor with emc2103 fan
- Get PSU info through PMBus with lm-sensors
- Regular expression in bash with awk
- How to use libsensors in QT application?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It all depends on how is the emc2103 chip configured by BIOS.
Looking at the emc2103 kernel module source code, it should be possible to modify the fan speed by writing to file
fan1_targetin/sys/class/hwmon/hwmonXwhereXis a number assigned to the module. It is the one which is a symlink somewhere toi2c(hwmon2 in my example).However at least on my Odroid H2 machine, the emc2103 chip is controlled by BIOS and writing to the
fan1_targetfile has no effect. If I disable fan control in BIOS, it probably cuts the power to the fan, because I was not able to make it running.But as the emc2103 chip is an i2c device, it can be manually configured via the
i2cgetandi2csetcommands (i2c-toolspackage in Debian). First you need to load thei2c_devkernel module and then determine on which i2c bus is the chip located (you can usei2cdetectcommand for that). The emc2103 chip is at address 0x2E. In case of Odroid H2, it is on the same bus as the DRAM SPD memory chip (dmesg|grep SPD), however on every boot it is assigned different bus number.You can look at the emc2103 datasheet (and the kernel module source) to see which registers to read and write.
Again, for Odroid H2 it was enough to disable use of the Lookup Tables which was enabled by BIOS and then I was able to control the fan speed by writing to
fan1_target. To disable it, you need to write value 0x00 to register 0x50 using command:where bus is the i2c bus number where the device is located. This will fail with the emc2103 kernel module loaded. So either unload it, or add
-fparameter to force it.In my case I want the fan to be run based on HDD temperature, so I will try to utilize the LUT table as setup by BIOS, but add thresholds for Temp3, which I will set to "Pushed Temperature", which can be set using i2c. That way I can have both the board temp (as measure by the chip itself) and HDD temp values automatically evaluated.
Another possibility is to use something like hddfancontrol or fan2go to control the fan speed using the hwmon /sys files.