{"id":18797103,"url":"https://github.com/fred78290/nct6687d","last_synced_at":"2025-05-16T13:06:03.196Z","repository":{"id":37036276,"uuid":"310947595","full_name":"Fred78290/nct6687d","owner":"Fred78290","description":"Linux kernel module for Nuvoton NCT6687-R","archived":false,"fork":false,"pushed_at":"2025-02-07T09:51:02.000Z","size":419,"stargazers_count":240,"open_issues_count":45,"forks_count":45,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-03T09:10:07.017Z","etag":null,"topics":["b550","fan-speed","h410m","h510m","kernel","li","linux","linux-kernel","linux-kernel-module","module","modules","motherboard","nc6687d","nct6687","sensor","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fred78290.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-07T23:03:58.000Z","updated_at":"2025-03-26T17:03:54.000Z","dependencies_parsed_at":"2023-09-22T13:46:03.844Z","dependency_job_id":"6a92e5cb-8732-4fc4-b46b-75a4d6484225","html_url":"https://github.com/Fred78290/nct6687d","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fnct6687d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fnct6687d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fnct6687d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fred78290%2Fnct6687d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fred78290","download_url":"https://codeload.github.com/Fred78290/nct6687d/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530928,"owners_count":21119664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["b550","fan-speed","h410m","h510m","kernel","li","linux","linux-kernel","linux-kernel-module","module","modules","motherboard","nc6687d","nct6687","sensor","ubuntu"],"created_at":"2024-11-07T22:07:06.889Z","updated_at":"2025-04-12T07:21:57.926Z","avatar_url":"https://github.com/Fred78290.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![https://valid.x86.fr/vsb4yv](https://valid.x86.fr/cache/banner/vsb4yv-6.png)\n![https://valid.x86.fr/20aiek](https://valid.x86.fr/cache/banner/20aiek-6.png)\n# NCT6687D Kernel module\n\nThis kernel module permit to recognize the chipset Nuvoton NCT6687-R in lm-sensors package.\nThis sensor is present on some B550 motherboard such as MSI or ASUS.\n\nThe implementation is minimalist and was done by reverse coding of Windows 10 source code from [LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor)\n\u003cbr\u003e\u003cbr\u003e\n\n## Installation\n### via package manager\n#### .deb package\n- Clone this repository\n```shell\n~$ git clone https://github.com/Fred78290/nct6687d\n~$ cd nct6687d\n```\n- Build package\n```shell\n~$ make deb\n```\n- Install package\n```shell\n~$ dpkg -i ../nct6687d-dkms_*.deb\n```\n\u003cbr\u003e\n\n#### .rpm package (akmod)\n- Clone this repository\n```shell\n~$ git clone https://github.com/Fred78290/nct6687d\n~$ cd nct6687d\n```\n- Build \u0026 install package\n```shell\n~$ make akmod\n```\n\u003cbr\u003e\u003cbr\u003e\n\n### Manual Install\n#### Dependencies:\n- Ubuntu/Debian:\n\t ```apt-get install build-essential linux-headers-$(uname -r) dkms dh-dkms```\n- Fedora/CentOS/RHEL:\n\t```yum install make automake gcc gcc-c++ kernel-devel kernel-headers dkms```\n- ArchLinux:\n\t ```pacman -S make automake linux-firmware linux-headers dkms base-devel```\n- openSUSE:\n\t ```zypper in git make gcc dkms```\n\u003cbr\u003e\n\n#### Build with DKMS\n```shell\n~$ git clone https://github.com/Fred78290/nct6687d\n~$ cd nct6687d\n~$ make dkms/install\n```\n\u003cbr\u003e\n\n#### Manual build\n```shell\n~$ git clone (this-repo)\n~$ cd nct6687d\n~$ make install\n```\n\u003cbr\u003e\n\n## Sensors\n\nBy running the command sensors, you got this output\n\n```\nnct6687-isa-0a20\nAdapter: ISA adapter\n+12V:           12.17 V  (min = +12.17 V, max = +12.19 V)\n+5V:             5.14 V  (min =  +5.14 V, max =  +5.14 V)\n+3.3V:           3.38 V  (min =  +3.38 V, max =  +3.38 V)\nCPU Soc:         1.11 V  (min =  +1.11 V, max =  +1.11 V)\nCPU Vcore:       1.05 V  (min =  +0.97 V, max =  +1.05 V)\nCPU 1P8:         1.84 V  (min =  +1.84 V, max =  +1.84 V)\nCPU VDDP:        0.00 V  (min =  +0.00 V, max =  +0.00 V)\nDRAM:            1.34 V  (min =  +1.34 V, max =  +1.35 V)\nChipset:       890.00 mV (min =  +0.89 V, max =  +0.89 V)\nCPU Fan:       1192 RPM  (min = 1192 RPM, max = 1202 RPM)\nPump Fan:      1538 RPM  (min = 1526 RPM, max = 1538 RPM)\nSystem Fan #1:  922 RPM  (min =  920 RPM, max =  922 RPM)\nSystem Fan #2:  953 RPM  (min =  953 RPM, max =  953 RPM)\nSystem Fan #3: 1393 RPM  (min = 1393 RPM, max = 1393 RPM)\nSystem Fan #4:    0 RPM  (min =    0 RPM, max =    0 RPM)\nSystem Fan #5: 1007 RPM  (min = 1007 RPM, max = 1007 RPM)\nSystem Fan #6:    0 RPM  (min =    0 RPM, max =    0 RPM)\nCPU:            +59.0°C  (low  = +52.0°C, high = +59.0°C)\nSystem:         +34.0°C  (low  = +34.0°C, high = +34.0°C)\nVRM MOS:        +31.0°C  (low  = +31.0°C, high = +31.0°C)\nPCH:            +40.0°C  (low  = +40.0°C, high = +40.0°C)\nCPU Socket:     +33.0°C  (low  = +33.0°C, high = +33.0°C)\nPCIe x1:        +32.0°C  (low  = +32.0°C, high = +32.0°C)\nM2_1:            +0.0°C  (low  =  +0.0°C, high =  +0.0°C)\n```\n\n\u003cbr\u003e\n\n## Load(prob) Sensors on boot\n\nTo make it loaded after system boots\n\nJust add nct6687 into /etc/modules\n\n`sudo sh -c 'echo \"nct6687\" \u003e\u003e /etc/modules'`\n\n### Arch-Linux with systemd\n\n`sudo sh -c 'echo \"nct6687\" \u003e\u003e /etc/modules-load.d/nct6687.conf'`\n\n\u003cbr\u003e\n\n## Gnome sensors extensions\n\n![Fan](./images/fan.png) ![Voltage](./images/voltage.png)\n\n\u003cbr\u003e\n\n## Tested\n\nThis module was tested on Ubuntu 20.04 with all kernel available on motherboard [MAG-B550-TOMAHAWK](https://www.msi.com//Motherboard/MAG-B550-TOMAHAWK) running an [AMD 3900X/AMD 5900X](https://www.amd.com/en/products/cpu/amd-ryzen-9-3900x), and on RL8(RHEL8) [MAG-B550M-MORTAR](https://www.msi.com/Motherboard/MAG-B550M-MORTAR) running an [AMD 5700G](https://www.amd.com/en/products/apu/amd-ryzen-7-5700g)\n\n\u003cbr\u003e\n\n## Other motherboard supported\n- Many people have reported compatibility with MB having Intel H410M \u0026 H510M chipset from some manufacturer. See [issue](https://github.com/Fred78290/nct6687d/issues) report.\n\u003cbr\u003e\n\n## CHANGELOG\n\n- Add support for MSI B460M Bazooka having NCT6687 with another device ID\n- Add support to use generic voltage input without multiplier, allows sensors custom conf\n- Support giving fan control back to the firmware\n\u003cbr\u003e\n\n## VOLTAGE MANUAL CONFIGURATION\n\nSome people report that voltage are wrong. The reason is with some motherboard, voltage sensors are not connected on the same nct6687 register.\n\nAs example the **VCore** sensor is connected on the **5th** register for AMD but is connected on the **3rd** register for INTEL.\n\u003cbr\u003e\nAlso the **DIMM** sensor is connected on the **4th** register for AMD but connected to **5th** register for INTEL.\n\nTo allow customize voltage configuration you must add **manual=1** parameter passed to the module at load\n\n`sudo sh -c 'echo \"nct6687 manual=1\" \u003e\u003e /etc/modules'`\n\nAnd use a sensors conf like this **/etc/sensors.d/B460M-7C83.conf**\n\n```\n# Micro-Star International Co., Ltd.\n# MAG B460M BAZOOKA (MS-7C83)\n\nchip \"nct6687-*\"\n    label in0         \"+12V\"\n    label in1         \"+5V\"\n    label in2         \"VCore\"\n    label in3         \"Voltage #1\"\n    label in4         \"DIMM\"\n    label in5         \"CPU I/O\"\n    label in6         \"CPU SA\"\n    label in7         \"Voltage #2\"\n    label in8         \"+3.3V\"\n    label in9         \"VTT\"\n    label in10        \"VRef\"\n    label in11        \"VSB\"\n    label in12        \"AVSB\"\n    label in13        \"VBat\"\n\n    ignore in3\n    ignore in7\n    ignore in9\n    ignore in10\n    ignore in13\n\n    ignore temp6\n    ignore temp7\n\n    compute in0       (@ * 12), (@ / 12)\n    compute in1       (@ * 5), (@ / 5)\n    compute in4       (@ * 2), (@ / 2)\n```\n\n## MODULE PARAMETERS\n\n- **force** (bool) (default: false)\n  Set to enable support for unknown vendors.\n\n- **manual** (bool) (default: false)\n  Set voltage input and voltage label configured with external sensors file.\n  You can use custom labels and ignore inputs without setting this option if\n  you can figure out their names (see which `*_label` contains builtin label).\n\n## CONFIGURATION VIA SYSFS\n\nIn order to be able to use this interface you need to know the path as which\nit's published. The path isn't fixed and depends on the order in which chips are\nregistered by the kernel. One way to find it is by device class (`hwmon`) via a\nsimple command like this:\n```\nfor d in /sys/class/hwmon/*; do echo \"$d: $(cat \"$d/name\")\"; done | grep nct6687\n```\n\nPossible output:\n```\n/sys/class/hwmon/hwmon5: nct6687\n```\n\nThis means that your base path for examples below is `/sys/class/hwmon/hwmon5`\n(note that adding/removing hardware can change the path, drop `grep` from the\ncommand above to see all sensors and their relative ordering).\n\nAnother way to look it up is by a device (class path actually just points to\ndevice path) like in:\n\n`cd /sys/devices/platform/nct6687.*/hwmon/hwmon*`\n\nThe first asterisk will be expanded to an address (`2592` which is `0xa20` that\nyou can see in `sensors` output) and the second one to a number like `5` from\nabove.\n\n### `pwm[1-8]`\n\nGets/sets PWM duty cycle or DC value that defines fan speed.  Which unit is used\ndepends on what was configured by firmware.\n\nAccepted values: `0`-`255` (slowest to full speed).\n\nWriting to this file changes fan control to manual mode.\n\nExample:\n\n```\n# slow down a fan as much as possible (will stop it if the fan supports zero RPM mode)\necho 0 \u003e pwm6\n# fix a fan at around half its speed (actual behaviour depends on the fan)\necho 128 \u003e pwm6\n# full speed\necho 255 \u003e pwm6\n```\n\n### `pwm[1-8]_enable`\n\nGets/sets controls mode of fan/temperature control.\n\nAccepted values:\n * `1` - manual speed management through `pwm[1-8]`\n * `99` - whatever automatic mode was configured by firmware\n          (this is a deliberately weird value to be dropped after adding more\n           modes)\n\nExample:\n\n```\n# fix a fan at current speed (`echo pwm6` will be constant from now on)\necho 1 \u003e pwm6_enable\n# switch back to automatic control set up by firmware (`echo pwm6` is again dynamic after this)\necho 99 \u003e pwm6_enable\n# switch to ~25% of max speed\necho 64 \u003e pwm6\n# automatic\necho 99 \u003e pwm6_enable\n# back to ~25% (it seems to be remembered)\necho 1 \u003e pwm6_enable\n```\n\n## VERIFIED\n**1. Fan speed control**\n\n- Changing fan speed was tested successfully by users, see in [reported issues](https://github.com/Fred78290/nct6687d/issues).\n\n## Issues\n### ACPI\nloading nct6687 fails. `journalctl` shows `ACPI: OSL: Resource conflict; ACPI support missing from driver?`:\n* add `acpi_enforce_resources=lax` as a kernel parameter\n\n### Loading fails during startup\n`dmesg` / `journalctl` shows \n```\nkernel: nct6687: EC base I/O port unconfigured\nsystemd-modules-load[339]: Failed to insert module 'nct6687': No such device\n```\n* add `softdep nct6687 pre: i2c_i801` to e.g. `/etc/modprobe.d/sensors.conf`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffred78290%2Fnct6687d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffred78290%2Fnct6687d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffred78290%2Fnct6687d/lists"}