Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] lm_sensor missing with ryzen cpu
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Sat Jan 06, 2018 1:58 am    Post subject: [solved] lm_sensor missing with ryzen cpu Reply with quote

I enabled every single kerneloption as module in hardware monitoring section of kernel, and sensors-detect says:

Now follows a summary of the probes I have just done.
Just press ENTER to continue: y

Driver `to-be-written':
* ISA bus, address 0x290
Chip `ITE IT8655E Super IO Sensors' (confidence: 9)

Note: there is no driver for ITE IT8655E Super IO Sensors yet.
Check http://www.lm-sensors.org/wiki/Devices for updates.

No modules to load, skipping modules configuration.

How can I enable temperature and fan control for my ryzen 5 on a asus prime b350 plus mainboard?

Only gpu temp and fanspeed shows up in sensors.

Do I have to do it like described here ? Is this the correct way to implement ?
https://linuxconfig.org/monitor-amd-ryzen-temperatures-in-linux-with-latest-kernel-modules


Last edited by Elleni on Thu Feb 01, 2018 7:15 pm; edited 4 times in total
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 1766
Location: Here and Away Again

PostPosted: Sat Jan 06, 2018 6:22 pm    Post subject: ><)))°€ Reply with quote

The correct way, in my opinion, is that it would just work as expected. :]

It seems like the 'it87' driver included in the kernel is not new enough to have the support it does upstream.

See: github.com/groeck/it87 - Add support for IT8655E #11

So while 'sensors-detect' won't be of help, just plain 'sensors' should give out a reading, as long as a recent enough version of the 'it87' driver has been loaded up successfully.

Your post actually made me finally look more deeply into this, since my Asus Prime X370-A has the same chip, and I've been unable to get it to work myself. So thank you!

I just built the module from upstream, and it does do something:

Code:
it8655-isa-0290
Adapter: ISA adapter
in0:          +1.01 V  (min =  +1.38 V, max =  +1.11 V)  ALARM
in1:          +2.51 V  (min =  +2.08 V, max =  +1.82 V)  ALARM
in2:          +2.02 V  (min =  +1.91 V, max =  +2.38 V)
in3:          +2.02 V  (min =  +1.89 V, max =  +2.63 V)
in4:          +2.01 V  (min =  +2.68 V, max =  +1.49 V)  ALARM
in5:          +1.93 V  (min =  +0.22 V, max =  +2.69 V)
in6:          +2.02 V  (min =  +2.57 V, max =  +2.02 V)  ALARM
3VSB:         +3.33 V  (min =  +1.77 V, max =  +1.94 V)  ALARM
Vbat:         +3.27 V 
+3.3V:        +3.36 V 
fan1:        1144 RPM  (min =   12 RPM)
fan2:           0 RPM  (min =   42 RPM)  ALARM
fan3:           0 RPM  (min =   20 RPM)  ALARM
temp1:        +36.0°C  (low  = -110.0°C, high = +125.0°C)
temp2:        +29.0°C  (low  = +115.0°C, high = -17.0°C)  ALARM  sensor = thermistor
temp3:        +37.0°C  (low  = +127.0°C, high = -45.0°C)  ALARM  sensor = thermistor
intrusion0:  ALARM

Them voltages seem a bit 'alarming', if accurate (could require scaling, though there is a user reporting no need for it any longer). Would not be surprising though, considering the issues I've been having, and the PSU's age (the 5-year warranty came to an end not too long ago).
_________________
Kind Regards,
~ The Noob Unlimited ~

Sore wa sore, kore wa kore.
Back to top
View user's profile Send private message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Sat Jan 06, 2018 8:25 pm    Post subject: Reply with quote

I tried that module from the link and with that one it works. I have just to modprobe the module myself, as it is aparently not loaded automatically by udev. Thanks for confirmation. I was thinking too, that this should work out of the box, as kernel contains this module. But this workaround works.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3235
Location: Gainesville, Florida

PostPosted: Tue Jan 09, 2018 5:36 am    Post subject: Reply with quote

Elleni,
Try putting
Quote:
modules_4_14_12_gentoo="it87"
in your /etc/conf.d/modules file, and it should load at boot automatically.
Of course you will be using the particular kernel you are using. lsmod should confirm it was loaded. You can have as many kernels as you wish listed, but each will need its own module line.

I've always liked GKrellM monitor for the sensors (and many other items) graphical readout- extremely configurable, and really nice to keep track of things in those long compiles. Once you enable the sensors, they generally work accurately with no fiddling around with any odd offsets :)
_________________
Main box- AsRock x370 Gaming K4
Ryzen 1700, 3.0GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.29-r2, gcc-9.1.0 kernel-5.1.16-gentoo USE=experimental
Back to top
View user's profile Send private message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Tue Jan 09, 2018 12:08 pm    Post subject: Reply with quote

Hi, I managed to let it autoload adding it to /etc/modules-load.d/it87.conf following the instructions on
https://linuxconfig.org/monitor-amd-ryzen-temperatures-in-linux-with-latest-kernel-modules

But not adding the option options it87 force_id=0x8622 in /etc/modprobe.d/it87.conf

Also emerged gkrellm :) ty
Back to top
View user's profile Send private message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Wed Jan 31, 2018 8:40 pm    Post subject: Reply with quote

This module does not compile anymore with kernel-4.15. Is there a way to get it working with new kernel ? It built with every kernel from 4.9.66 up to 4.14.15 :cry:
Code:
make -j5
  CC [M]  /root/ryzen/it87/it87.o
In file included from ./include/linux/list.h:9:0,
                 from ./include/linux/module.h:9,
                 from /root/ryzen/it87/it87.c:62:
./include/linux/kernel.h:6:10: schwerwiegender Fehler: stdarg.h: Datei oder Verzeichnis nicht gefunden
 #include <stdarg.h>
          ^~~~~~~~~~
Kompilierung beendet.
make[2]: *** [scripts/Makefile.build:323: /root/ryzen/it87/it87.o] Fehler 1
make[1]: *** [Makefile:1508: _module_/root/ryzen/it87] Fehler 2
make: *** [Makefile:55: modules] Fehler 2


Is there a way getting it87 for my box with new kernel back ?

Edit: On the other side, it worked with git-sources 4.15-rc9 before. Could it have something to do with the fact, that I updated to gcc 7.3 and binutils 2.30 followed by emerge -e world ?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3235
Location: Gainesville, Florida

PostPosted: Wed Jan 31, 2018 10:53 pm    Post subject: Reply with quote

I don't have it87 on my new AM4 system (had it on several AM3+ boards), but I just looked in my 4.15.0 source, and it's still right there in the kernel .config file, where it always has been for many years.
# CONFIG_SENSORS_IT87 is not set

When you compile the 4.15.0 kernel just enable it as a module. Some AM4 board use it87, but others are using CONFIG_SENSORS_NCT6775=m.

Are you sure your board is using the it87 sensors chip? My ASrock boards (B350 and x370 models) are both using the Nuvoton NCT5577D/NCT6776F Super IO Sensors chip.

If you have easy access you could look on the motherboard to check what sensor chip it has.

EDIT: Just realized after reading Chiitoo's post above that maybe the it87 code has changed in 4.15.0.

I recall doing something like replacing ( the relevant file(s) in the new kernel with the same file(s) from a recent kernel that worked (for my wifi adapter), before compiling the new kernel that didn't work. Worked like a charm.

If nothing else works, might be worth a shot trying the same sort of thing with the it87, assuming that's the chip you actually have on the board.

Not sure about the gcc 7.3 and binutils 2.30 followed by emerge -e world. Did you compile the kernel before or after the -e @world?

EDIT2: I did check the /usr/src/linux-4.14.15-gentoo/drivers/hwmon/it87.c file in both 4.14.15 and 4.15.0, and they are both 104,147 in size, but 4.14.15 was modified jan. 28, 2018, and 4.14.15 modified nov. 12,2017 and 4.14.13 file was identical to 4.14.15
_________________
Main box- AsRock x370 Gaming K4
Ryzen 1700, 3.0GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.29-r2, gcc-9.1.0 kernel-5.1.16-gentoo USE=experimental
Back to top
View user's profile Send private message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Thu Feb 01, 2018 7:00 pm    Post subject: Reply with quote

Hello,

the point is, yes it87 is in kernel but it is not in a new enough version aparently. See Chiitoo's post. Thus I had installed it87 from following link, which worked perfectly:

https://linuxconfig.org/monitor-amd-ryzen-temperatures-in-linux-with-latest-kernel-modules

This still works - i come from trying - with 4.14 kernels and older. Even with actual system, compiled with gcc-7.3 and binutils-2.30 so those are not the source of the problem.

I then retried with it87 compiled as module in the version gentoo-sources deliver, and it is aparently still not recent enough it87 as

modprobe it87 gives modprobe: ERROR: could not insert 'it87': No such device

Unfortunately the procedure linked above does not work anymore with new 4.15 kernel. Trying to build module for this kernel:

Code:
make -j5
  CC [M]  /root/ryzen/it87/it87.o
In file included from ./include/linux/list.h:9:0,
                 from ./include/linux/module.h:9,
                 from /root/ryzen/it87/it87.c:62:
./include/linux/kernel.h:6:10: schwerwiegender Fehler: stdarg.h: Datei oder Verzeichnis nicht gefunden
 #include <stdarg.h>
          ^~~~~~~~~~
Kompilierung beendet.
make[2]: *** [scripts/Makefile.build:323: /root/ryzen/it87/it87.o] Fehler 1
make[1]: *** [Makefile:1508: _module_/root/ryzen/it87] Fehler 2
make: *** [Makefile:55: modules] Fehler 2
Back to top
View user's profile Send private message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Thu Feb 01, 2018 7:14 pm    Post subject: Reply with quote

After having seen, that the newest file on github are ~3 weeks old, I decided to delete source, I used for the last months and issued:

git clone https://github.com/groeck/it87.git

to get newest source. And that did the trick. Now it compiles fine and I have my sensors back for 4.15 kernel. -> solved :D
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3235
Location: Gainesville, Florida

PostPosted: Thu Feb 01, 2018 8:59 pm    Post subject: Reply with quote

Nice job on fixing this one!. So it87 in 4.15.rc9 works and 4.15.0 doesn't, and github version does? Weird. Seems like nothing should have changed in one little sensor file from rc9. :roll:
_________________
Main box- AsRock x370 Gaming K4
Ryzen 1700, 3.0GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
Gentoo ~amd64 plasma, glibc-2.29-r2, gcc-9.1.0 kernel-5.1.16-gentoo USE=experimental
Back to top
View user's profile Send private message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Thu Feb 01, 2018 9:38 pm    Post subject: Reply with quote

Exactly thats why I was not thinking about to need to update the sources I had downloaded some months ago. And yes, I had tested them on git-sources 4.15-rc9. I would appreciate to see them in main kernel sources but until that I can live with manual compile of this module.

I just wanted to mail the maintainer of this, and then thought maybe just test with re-download sources first.
Back to top
View user's profile Send private message
marcuse
n00b
n00b


Joined: 17 Jan 2003
Posts: 22

PostPosted: Mon Feb 05, 2018 2:40 am    Post subject: Reply with quote

In Kernel 4.15 the k10temp was updated to support Ryzen temperatures directly, no need for it87 et al.
_________________
windows -- from people who brought you edlin ...
Back to top
View user's profile Send private message
Elleni
l33t
l33t


Joined: 23 May 2006
Posts: 858

PostPosted: Mon Feb 05, 2018 11:40 pm    Post subject: Reply with quote

Well yes and no. Thanks for the pointer. I come from trying and indeed temperature works with k10temp. But still need it87 for Voltages. Then it reports 3 different temperatures whereas k10temp just shows one. And last but not least it87 shows rpm of my 3 fans. Until I find inkernel alternatives, it87 is still usefull for me. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum