Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 24202

Summary: sensors -s fails with 'Can't access /proc file for writing'
Product: Gentoo Linux Reporter: Bill Carlson <bill-carlson>
Component: New packagesAssignee: Brandon Low (RETIRED) <lostlogic>
Status: RESOLVED INVALID    
Severity: normal CC: mholzer, plasmaroo
Priority: Normal    
Version: 1.4_rc4   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Bill Carlson 2003-07-09 13:49:13 UTC
lm_sensors allows for tweaking of the onboard chipset via modifying
/etc/sensors.conf. However, these modifications aren't communicated to the
hardware until 'sensors -s' is executed.

Running 'sensors -s' (after sensors-detect and /etc/init.d/lm_sensors start)
results in the following:


w83627hf-isa-0290: Can't access /proc file for writing;
Run as root?


Running just sensors gives the expected normal output.

strace sensors -s gives output which doesn't make any sense to me, I can provide
if it would be helpful.
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-07-10 00:33:32 UTC
which kernel ?
do you run as root ?
Comment 2 Bill Carlson 2003-07-10 06:42:22 UTC
Kernel: Linux gentoo.vh.org 2.4.20-gentoo-r5

Yes, running as root. :)
lm-sensors: sys-apps/lm-sensors-2.7.0-r1
ic2: sys-apps/i2c-2.7.0

Here's some of the relevant output from strace sensors -s:

-----
ioctl(3, SNDCTL_TMR_TIMEBASE, 0xbfffeaa0) = -1 ENOTTY (Inappropriate ioctl for device)
_sysctl({{CTL_DEV, 2, 100, 514}, 4, 0x40028d20, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, 0x40028d20, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, ptrace: umoven: Input/output error
(nil), 1074207481, 0x40028d20, 4}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 514}, 4, 0x40028d20, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, 0x40028d20, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e8}, 4, ptrace: umoven: Input/output error
(nil), 1074207481, 0x40028d20, 8}) = -1 EACCES (Permission denied)
_sysctl({{CTL_DEV, 2, 100, 514}, 4, 0x40028d20, 4, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e9}, 4, 0x40028d20, 12, (nil), 0}) = 0
_sysctl({{CTL_DEV, 2, 100, 3e9}, 4, ptrace: umoven: Input/output error
(nil), 1074207481, 0x40028d20, 4}) = -1 EACCES (Permission denied)
<more of the same, then terminate with error message>
----
Comment 3 Brandon Low (RETIRED) gentoo-dev 2003-07-10 07:18:45 UTC
Yeah, I get this too, but actually for most sensors chips it works OK without the set statements...  I guess I'll have to try and figure out the cause of it tho...

Comment 4 Tim Yamin (RETIRED) gentoo-dev 2003-08-13 12:00:12 UTC
"Bug by design"

man sensors
-----------

       -s     Evaluates all `set' statements in the  configuration  file.  You
              must  probably  be  `root'  to do this. If this parameter is not
              specified, no `set' statement is evaluated.

-----------

This seems to be a driver specific error... Please try version 2.8.0 at bug  25004 and see if this resolves your '/proc' problem...
Comment 5 Bill Carlson 2003-08-19 09:01:57 UTC
2.8.0 ebuild results in same problem:

w83627hf-isa-0290: Can't access /proc file for writing;
Run as root?


READ FOR CONTENT: Yes, sensors -s was run as root.

The ability to program the sensor chips is important, as some chips will return data that definitely needs adjusted. For example, I really don't think my current motherboard is currently experiencing 400+ F temperatures. :)

I've verified that the same hardware under Debian stable produces the same error, therefore the problem is the lm_sensor support for this chipset. I'll take the bug to the lm_sensors project.

Side note: Why is the ebuild called lm-sensors instead of lm_sensors? No '_' allowed in package names?

Comment 6 Tim Yamin (RETIRED) gentoo-dev 2003-08-19 09:31:42 UTC
Resolving as INVALID: either a lm-sensors bug or a kernel misconfiguration (?)

----------------------------------------------------------------------
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1376 looks similar

1* You have the GRSEC patch applied to your kernel (90%). Not our fault
   [plasmaroo: You can disable this in the kernel config]
2* You are victim of a bug that is fixed in 2.8.0 (10%). Upgrade.
----------------------------------------------------------------------

Sidenote answer: Looks like it. Most packages use "-" not "_" so I guess that's the tradition. And DNS names usually use dashes not underscores too.

Please report back if you resolve this, thanks!