Bug 284144 - [new port] sysutils/bsdsensors: a utility to read sensor data and control fan speed
Summary: [new port] sysutils/bsdsensors: a utility to read sensor data and control fan...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-18 21:54 UTC by Henry Hu
Modified: 2025-01-19 19:35 UTC (History)
1 user (show)

See Also:


Attachments
patch to create the new port (2.68 KB, patch)
2025-01-18 21:54 UTC, Henry Hu
no flags Details | Diff
poudriere log on 13.4-RELEASE (72.61 KB, text/plain)
2025-01-18 21:55 UTC, Henry Hu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2025-01-18 21:54:46 UTC
Created attachment 256781 [details]
patch to create the new port

Here's a new port, which provides a simple utility to read sensor data and control fan speed. Specifically, it supports a few Nuvoton embedded controllers, which are widely used in consumer-grade motherboards.

The utility can
* read temp sensor
* read voltage sensor
* read fan speed
* read fan curve and control information
* write fan curve and control params

It's released under BSD 3-clause.
Comment 1 Henry Hu 2025-01-18 21:55:11 UTC
Created attachment 256782 [details]
poudriere log on 13.4-RELEASE
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-19 02:11:38 UTC
1. "GH_TAGNAME=	${DISTVERSION}" is default value - we can just remove this line.

2. WWW: https://github.com/henryhu/bsdsensors moved from pkg-descr to Makefile.
Comment 3 Henry Hu 2025-01-19 02:12:23 UTC
(In reply to Vladimir Druzenko from comment #2)
Ah, I do have WWW in Makefile; didn't realize that now it's not needed in pkg-descr.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-19 02:14:50 UTC
# bsdsensors --debug
I20250119 05:14:02.497030 0x25dfa1012000 nuvoton_chip.cc:241] HM ports: 0x295 0x296
I20250119 05:14:02.497539 0x25dfa1012000 nuvoton_chip.cc:107] Found Nuvoton chip, ID: 0xa513 at 0x2e
E20250119 05:14:02.497557 0x25dfa1012000 nuvoton_chip.cc:116] Unknown Nuvoton Chip: 0xa513
E20250119 05:14:02.497790 0x25dfa1012000 main.cc:131] No chip detected. Make sure you're running with root privilege.
E20250119 05:14:02.497832 0x25dfa1012000 main.cc:132] You can also try to run with --debug.
Comment 5 Henry Hu 2025-01-19 02:18:21 UTC
(In reply to Vladimir Druzenko from comment #4)
hm... 0xa513? seems to be W83667HG-A; needs to find its datasheet and add support.
As you can see from the code, it's added chip-by-chip. Lots of boards use nuvoTon today; it originated from Winbond.
Comment 6 Henry Hu 2025-01-19 02:35:59 UTC
(In reply to Henry Hu from comment #5)
I can't find data sheet for W83667HG-A for now; I can found W83697, but they might be different. Can you find its datasheet somewhere?
And also, is this an old board? W83697's datasheet was from 1999....
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-19 09:54:23 UTC
(In reply to Henry Hu from comment #6)
> Can you find its datasheet somewhere?
I have same google :-D
Check this:
https://pdf5.datasheet.su/winbond-electronics-corp-america-w83667hg_069d705530.pdf

> And also, is this an old board? W83697's datasheet was from 1999....
It's ASUS P5Q from 2008/2009. Same output have ASUS P6T SE 2009/2010.

I created issues with "my zoo":
https://github.com/HenryHu/bsdsensors/issues/3
Comment 8 Henry Hu 2025-01-19 16:13:11 UTC
(In reply to Vladimir Druzenko from comment #7)
Yeah, but if you open that file, you can see it talks about W83697HF, not 83667
Now I wonder if they're the same thing... anyway let's figure this out in the github issue.
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-19 19:26:42 UTC
Offtopic: check this https://portscout.freebsd.org/henry.hu.sh@gmail.com.html
Comment 10 commit-hook freebsd_committer freebsd_triage 2025-01-19 19:31:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b6f0fbdb2d90744efa0e43c6bfc6a98628afa95b

commit b6f0fbdb2d90744efa0e43c6bfc6a98628afa95b
Author:     Henry Hu <henry.hu.sh@gmail.com>
AuthorDate: 2025-01-19 19:26:43 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-01-19 19:26:43 +0000

    sysutils/bsdsensors: New port: utility to read sensor data and control fan speed

    Here's a new port, which provides a simple utility to read sensor data
    and control fan speed. Specifically, it supports a few Nuvoton embedded
    controllers, which are widely used in consumer-grade motherboards.

    The utility can
    * read temp sensor
    * read voltage sensor
    * read fan speed
    * read fan curve and control information
    * write fan curve and control params

    It's released under BSD 3-clause.

    https://github.com/HenryHu/bsdsensors

    PR:     284144

 sysutils/Makefile                   |  1 +
 sysutils/bsdsensors/Makefile (new)  | 20 ++++++++++++++++++++
 sysutils/bsdsensors/distinfo (new)  |  3 +++
 sysutils/bsdsensors/pkg-descr (new) |  4 ++++
 sysutils/bsdsensors/pkg-plist (new) | 31 +++++++++++++++++++++++++++++++
 5 files changed, 59 insertions(+)
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-19 19:35:22 UTC
Committed!