Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error and not complete greeting #32

Open
qrockz opened this issue Sep 28, 2021 · 5 comments
Open

syntax error and not complete greeting #32

qrockz opened this issue Sep 28, 2021 · 5 comments

Comments

@qrockz
Copy link

qrockz commented Sep 28, 2021

Fresh manual install and got this incomplete greeting.
Screenshot from 2021-09-28 14-53-48

EDIT: When i remove CPUTEMP the script works fine. No errors then.

@andresgongora
Copy link
Owner

andresgongora commented Sep 28, 2021 via email

@qrockz
Copy link
Author

qrockz commented Sep 29, 2021

Screenshot from 2021-09-29 07-11-32

@andresgongora
Copy link
Owner

andresgongora commented Sep 29, 2021 via email

@cybex-dev
Copy link

cybex-dev commented Feb 27, 2022

Since this is a newer issue, I'll post additional info here.

Firstly, awesome extension, many thanks for creating it.

I have the same issue, looking at lm-sensors it seems it is expected for Ryzen CPUs, see https://bbs.archlinux.org/viewtopic.php?id=266997 for more info, thread from 2021/06.

Setup:
AMD Ryzen 3600 (OC 4.2)

sensors output:

$ sensors
radeon-pci-0a00
Adapter: PCI adapter
temp1:        +39.0°C  (crit = +120.0°C, hyst = +90.0°C)

nvme-pci-0100
Adapter: PCI adapter
Composite:    +46.9°C  (low  = -273.1°C, high = +84.8°C)
                       (crit = +84.8°C)
Sensor 1:     +46.9°C  (low  = -273.1°C, high = +65261.8°C)
Sensor 2:     +52.9°C  (low  = -273.1°C, high = +65261.8°C)

iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:        +44.0°C  

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +46.1°C  
Tccd1:        +40.8°C 

The author suggests AMD CPUs will only report 1 temperature even though there may be multiple cores, the device is represented with the "k10temp-pci-00c3" in my case but digging around there is very little similar problems. Many of the out-of-box solutions work for even AMD systems, wondering if something isn't wrong with my setup.

Reviewing some askubuntu, reddit, linuxquestions threads, it seems there is some info for the k10temp sensor.

@andresgongora
Copy link
Owner

Let's have a look at it

		## GET VALUES
		local temp_line=$(sensors 2>/dev/null |\
		                  grep Core |\
		                  head -n 1 |\
		                  sed 's/^.*:[ \t]*//g;s/[\(\),]//g')
		local units=$(echo $temp_line |\
		              sed -n 's/.*\( [[CF]]*\).*/\1/p' |\
		              sed 's/\ /°/g')
		local current=$(echo $temp_line |\
		                sed -n 's/^.*+\(.*\) [[CF]]*[ \t]*h.*/\1/p')
		local high=$(echo $temp_line |\
		             sed -n 's/^.*high = +\(.*\) [[CF]]*[ \t]*c.*/\1/p')
		local max=$(echo $temp_line |\
		            sed -n 's/^.*crit = +\(.*\) [[CF]]*[ \t]*.*/\1/p')

This is the part of the script that gets the temp and stores it under current . It seems the problem is that the CPU temp is being identified only if it contains the word Core, as in my system:

Adapter: ISA adapter
Package id 0:  +32.0°C  (high = +85.0°C, crit = +105.0°C)
Core 0:        +31.0°C  (high = +85.0°C, crit = +105.0°C)
Core 1:        +24.0°C  (high = +85.0°C, crit = +105.0°C)
Core 2:        +30.0°C  (high = +85.0°C, crit = +105.0°C)
Core 3:        +29.0°C  (high = +85.0°C, crit = +105.0°C)

I'd like the script to be "automatic", but worst case, I could implement a different approach. Still, having the script detect keywords to identify the CPU is much simpler since sensors does not seems o be consistent over the board... unless we find out how we can ask sensors to use a more specific format.

Could you give me hand on this? I'll gladly implement it or merge your pull-request if you want to become a contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants