From nobody Sat Jan 25 13:25:30 2025 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YgFmW2R3dz5lLN2 for ; Sat, 25 Jan 2025 13:25:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YgFmW1kDKz3wsL for ; Sat, 25 Jan 2025 13:25:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737811531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0r6CXjlY9YFb0bA3R8IZwvUDkiUKxgAW+wTTndJe0Q=; b=fKniUbkeZEtli/eAff+2u4zw0RJgS6/HNrZNOJacl7ylw5HW+IQdwkFG4Kp6kgz7m5m2ZJ 14ib/EJaTJwWQ3le6BASJeaix1pmWqMc6SS2a0pr1Kf1lzDfR6FgdRSSTjJh/CsyrrUVhU lMc9ZGSZMGZ4Y/rWmIaxicQZYwrm0dQwrA3YxAadyIReM3Fy7nCTVgFzH404uzUlwQdE4c iTEX/wYv6y8IZXrv23m42XGTGa/xGIh+sx+S/2mJ17/YKlsd3yev8UVRSgDM0kykFkppXY 3eDCFZctgWZhbvAfzYCcCyVD+Y3laW5RAWO8rqjzZMsXZDN1PmrZOddib8+mqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737811531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0r6CXjlY9YFb0bA3R8IZwvUDkiUKxgAW+wTTndJe0Q=; b=RkAPAVJrFG5FFtz4+MchpIzHzJQx6REH/YOfLbInKxvGZLHmzrZacHGxmCVWkz45p/2eb1 hs1umvEJJ5p0N3SHEOuC3xdwrpUUPx8s2OyGpDjBvT5yOOzyZDyjhiVcOirPn1W8YHIpuW aywsCk1LHpfB7Vg3nP+lgE+YIEgd+7ibvm5RE4CoJiw1UWinCPWbmIpVwRbSA0VkaWg4OO F2h/GMAgIhuoyHR+bnVyuBrt8trUNRbpodHGgKGHEQfzPXl8VbfEwJjl409TIUCDUi7d+u 2RESCJClbJrUoDImrBUnmSujiepg52aAYgh4TaUEVkLTE2OJ0j+1fbEwkiTyXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737811531; a=rsa-sha256; cv=none; b=P/nfa+DYFoAsib5JgTbOV9ICgGnOqW6SZYCDg6J0S67nrBLszHY56LUSdHte7BzPtMOU9M gjbUSoOBQ/0dvLzulqTZzF2kx3BbW25ja98i32E+/Ud3+n4miuaNb5sZb1hPXvIfXdZbv4 YTtW8KuLIT49gWoZVxvQkOTwdmStEK1sX+ob1hRLZDMMyo5Eg3geFT+n1K7rI/C+DsQ9zM vutbv+U+GkEpbrWMfKa9CntDEx52FwsT8leRPdQqzxXJx4WV/kW9fp70UWv+zfVdjcd0Ed kHlb9vWVWViVU3b+XTLQJz+DSe9cRGtGslRGc2SrpVCSqyVcO+7oXeamv3NOjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YgFmW1Chvz1D5T for ; Sat, 25 Jan 2025 13:25:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 50PDPVQJ008230 for ; Sat, 25 Jan 2025 13:25:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 50PDPVZo008229 for ports-bugs@FreeBSD.org; Sat, 25 Jan 2025 13:25:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 284338] x11/sfwbar: cpu-temp.widget shows wrong temperature in FreeBSD Date: Sat, 25 Jan 2025 13:25:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: fabio.comolli@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284338 Bug ID: 284338 Summary: x11/sfwbar: cpu-temp.widget shows wrong temperature in FreeBSD Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: fabio.comolli@gmail.com CC: tino.engel@mail.de CC: tino.engel@mail.de Flags: maintainer-feedback?(tino.engel@mail.de) x11/sfwbar cpu-temp.widget uses cpu-temp.source to assign a value to BsdCpuTemp, using BSDCtl("dev.cpu.0.temperature"). This function gets the v= aule in HEX and then converts it in DEC. The widget assumes that this value is i= n =C2=B0C and expressed with four digits without decimals, therefore it prints: value =3D Str(XCpuTemp/1000,0)+"C" This is wrong as the sysctl HEX value is expressed in deciKelvin and thus to convert it to Celsius you need to divide the value by 10 and subtract 273.1= 5 . Something like: value =3D Str(XCpuTemp/10-273.15)+"C" I think that there's also another bug, this time in cpu-temp.source : the l= ine=20 set XCpuTemp =3D If(!Ident(BSDCtl),CPUTemp,Val(BsdCPUTemp)) should read as: set XCpuTemp =3D If(!Ident(BSDCtl),CPUTemp,BsdCPUTemp) otherwise the temperature value will always be reported as zero. --=20 You are receiving this mail because: You are the assignee for the bug.=