Code Monkey home page Code Monkey logo

Comments (17)

lcpz avatar lcpz commented on May 12, 2024

You're not missing depencencies.

You should have temp file in some subdir of /sys/class/thermal.

Give me the output of

ls -R /sys/class/thermal

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

┌─(t0m5k1@b0x)-(3056/pts/1)-(09:09pm:20/01/14)-
└─>(%:~)
└─>> ls /sys/class/thermal
cooling_device0@ cooling_device1@

On 20 January 2014 23:40, Luke Bonham [email protected] wrote:

You're not missing depencencies.

You should have temp file in some subdir of /sys/class/thermal.

Give me the output of

ls /sys/class/thermal


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-32799652
.

Regards
Thomas Rand

from lain.

bakoenig avatar bakoenig commented on May 12, 2024

Are you running Arch Linux? Which kernel?
Do you have acpi installed?
Maybe the temp file is in /proc/acpi/thermal_zone ?

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

Kernel3.12.7-2-ARCH x86_64
never needed acpi:
┌─(t0m5k1@b0x)-(3056/pts/0)-(11:35am:21/01/14)-
└─>(%:
)
└─>> pacs acpi
[sudo] password for t0m5k1:
community/acpi 1.7-1
Client for battery, power, and thermal readings
community/acpid 2.0.21-1
A daemon for delivering ACPI power management events with netlink
support
community/iasl 20130823-1
Intel ACPI Source Language compiler
community/libacpi 0.2-4
general purpose lib to gather ACPI data

On 21 January 2014 11:25, bakoenig [email protected] wrote:

Are you running Arch Linux? Which kernel?
Do you have acpi installed?
Maybe the temp file is in /proc/acpi/thermal_zone ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-32832322
.

Regards
Thomas Rand

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

just installed acpi & acpid, rebooted & now:
┌─(t0m5k1@b0x)-(3069/pts/0)-(11:55am:21/01/14)-
└─>(%:)
└─>> cat /sys/class/thermal/thermal_zone0/temp; acpi -V
cat: /sys/class/thermal/thermal_zone0/temp: No such file or directory
No support for device type: power_supply
No support for device type: power_supply
Cooling 0: Processor 0 of 0
Cooling 1: Processor 0 of 0
┌─(t0m5k1@b0x)-(3070/pts/0)-(11:56am:21/01/14)-
└─>(%:
)
└─>> cat /proc/acpi/thermal_zone
cat: /proc/acpi/thermal_zone: No such file or directory

So I guess acpi is a prerequisite for this!
ok so now I have to configure this lol
Why not parse the /proc tree as that is present on every machine & gives temps & fan speeds etc

from lain.

bakoenig avatar bakoenig commented on May 12, 2024

Yes, I guess acpi is needed. The temp file has recently been moved from /proc/acpi to /sys/class/thermal (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/756472). That is why there is some confusion.

From your answer, I do not understand if you have the file thermal_zone0/temp or not. If not, maybe you have a file called thermal_zone1/temp or something similar?

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

I just discovered this:

┌─(t0m5k1@b0x)-(3075/pts/0)-(12:07pm:21/01/14)-
└─>(%:~)
└─>> cat /sys/class/hwmon/hwmon1/device/temp
completing files
temp1_alarm temp1_input temp1_min temp1_type temp2_beep temp2_max temp2_offset temp3_alarm temp3_input temp3_min temp3_type
temp1_beep temp1_max temp1_offset temp2_alarm temp2_input temp2_min temp2_type temp3_beep temp3_max temp3_offset

from lain.

bakoenig avatar bakoenig commented on May 12, 2024

I know that finding those sensor files can be a pain sometimes: different machines with different hardware store them at different places and sometimes they even change names after reboot! Usually /sys/class/thermal works.

Maybe this helps: https://bbs.archlinux.org/viewtopic.php?pid=1125622

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

ok progress, I got my hands dirty & made the following changes to temp.lua:

function update()
    --[[
    local f = io.open("/sys/class/thermal/thermal_zone0/temp")
    --]]
    local f = io.open("/sys/class/hwmon/hwmon0/device/temp1_input")
    if f ~= nil
    then

it appears to be working but it is only the temp of 1 core & not an average across both (i think)

from lain.

lcpz avatar lcpz commented on May 12, 2024

I can't control now, but I don't recall having installed acpi.

It's easy to modify the widget in order for the user to set his own temp file path, but it seems your computer stores a temp file for each core. Is it a laptop? If yes, which model?

And give me the output of

ls -R /sys/class/

don't paste it here, try gist or pastebin.

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

result of the command:
http://bpaste.net/show/170455/

I have a pc, here is some info:
System: Host: b0x Kernel: 3.12.7-2-ARCH x86_64 (64 bit) Desktop: Awesome 3.5.2 Distro: Arch Linux
Machine: Mobo: Gigabyte model: M720-US3 version: x.x Bios: Award version: F3m date: 04/24/2009
CPU: Dual core AMD Athlon 64 X2 4200+ (-MCP-) cache: 1024 KB flags: (lm nx sse sse2 sse3 svm)
Clock Speeds: 1: 2357.129 MHz 2: 2357.129 MHz
Graphics: Card: NVIDIA GT218 [GeForce 210] X.Org: 1.15.0 driver: nvidia Resolution: [email protected]
GLX Renderer: GeForce 210/PCIe/SSE2 GLX Version: 3.3.0 NVIDIA 331.38
Audio: Card-1: NVIDIA MCP72XE/MCP72P/MCP78U/MCP78S High Definition Audio driver: snd_hda_intel
Card-2: NVIDIA High Definition Audio Controller driver: snd_hda_intel
Sound: Advanced Linux Sound Architecture ver: k3.12.7-2-ARCH
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
IF: eth0 state: up speed: 100 Mbps duplex: full
Drives: HDD Total Size: 1830.4GB (43.5% used) 1: id: /dev/sda model: ST380817AS size: 80.0GB
2: id: /dev/sdd model: ST3500514NS size: 500.1GB 3: id: /dev/sdb model: WDC_WD2500BB size: 250.1GB
4: id: /dev/sdc model: ST3500514NS size: 500.1GB 5: USB id: /dev/sde model: 0NS size: 500.1GB
Partition: ID: / size: 22G used: 13G (62%) fs: ext4 ID: /home size: 20G used: 12G (61%) fs: ext4
ID: swap-1 size: 1.08GB used: 0.00GB (0%) fs: swap
Sensors: System Temperatures: cpu: 54.0C mobo: 45.0C gpu: 60C
Fan Speeds (in rpm): cpu: 2657 fan-1: 2454 fan-3: 0 fan-4: 0
Info: Processes: 144 Uptime: 1:48 Memory: 931.5/5973.0MB Client: Shell (zsh) inxi: 1.9.18

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

i have no clue why there is so much garbage in the paste's meh

from lain.

lcpz avatar lcpz commented on May 12, 2024

You flagged as solved, but didn't explain how you solved.

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

I changed the path that it is parsing:

function update()
--[[
local f = io.open("/sys/class/thermal/thermal_zone0/temp")
--]]
local f = io.open("/sys/class/hwmon/hwmon0/device/temp1_input")
if f ~= nil
then

it's good enough for me even though it is not an average

I would say this is a bug however because you cannot be sure that the original path is going to be present on every machine that uses this.
I installed acpi, mode probed the modules I wanted & blacklisted the ones I did not, rebooted & yet that path was still not present.
My suggestion would be to look for a more predictable & reliable sensor output if there is one!) to ensure all machines are the same.

from lain.

lcpz avatar lcpz commented on May 12, 2024

acpi is not required, this is a machine related filesystem issue.

I'll wrote a commit looking for any sensor output, if any, instead of hardcoding to a path which I wrongly thought was universal.

from lain.

t0m5k1 avatar t0m5k1 commented on May 12, 2024

cheers luke :)

from lain.

lcpz avatar lcpz commented on May 12, 2024

Since I see this can change from machine to machine, regardless of linux filesystem, I chose the simple way: there's a new variable called tempfile, which stores the path of the coretemp file. It can be redefined if it doesn't match your real file path.

In your case, you could use 3 temp widgets, instead of 1 with the average, or you can have 1 widget, but defining in tempfile the path of a file where you periodically write with a script the average value of temp*_input files.

from lain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.