You are not logged in.
Pages: 1
Hey everyone,
i have an nvidia graphics card which has an integrated monitoring chip ( adt7473 ) used for temperature reading and controlling the gpu fan.
The chip is found by doing a:
sensors-detect
But in order fo it to be initialized at boot you have to do a:
# echo adt7473 0x2e > /sys/bus/i2c/devices/i2c-4/new_device
or else it is not recognized
However using sudo to issue the command gives me a permission denied error while using su -c succceds
[spyros@optimus hwmon]$ ls
hwmon0 hwmon1
spyros@optimus hwmon]$ sudo -i echo adt7473 0x2e > /sys/bus/i2c/devices/i2c-4/new_device
bash: /sys/bus/i2c/devices/i2c-4/new_device: Permission denied
[spyros@optimus hwmon]$ su -c "echo adt7473 0x2e > /sys/bus/i2c/devices/i2c-4/new_device"
Password:
[spyros@optimus hwmon]$ ls
hwmon0 hwmon1 hwmon2
[spyros@optimus hwmon]$
Also i am looking for a way to create a systemd service file to automate this process at boot, i have this so far:
[Unit]
Description=Initialize the nvidia adt7473 chip for fan control throught fancontrol.service
After=lm_sensors.service
Before=fancontrol.service
[Service]
Type=oneshot
StandardOutput=journal
StandardError=journal
ExecStart=/usr/bin/echo adt7473 0x2e > /sys/bus/i2c/devices/i2c-4/new_device
[Install]
WantedBy=multi-user.target
But it is not working. Can someone help? Or maybe has had the same problem.
Last edited by doomguard88 (2013-02-04 21:17:25)
Offline
Did you get help with this? I'd just like to point out that this might work better for you:
...
ExecStart=/bin/sh -c 'echo adt7473 0x2e > /sys/bus/i2c/devices/i2c-4/new_device'
...
And the reason for why you are denied permission is that when you do
sudo cmd > pipe
then the output of the sudoed command is piped as the user, not root, ie. only "cmd" is root, nothing else. You could do
sudo "cmd > pipe"
instead and the pipe would also be sudoed.
Offline
i have an nvidia graphics card which has an integrated monitoring chip ( adt7473 ) used for temperature reading and controlling the gpu fan.
Not sure if you're using the binary driver or nouveau. If the latter, I've got a more permanent solution, at least for my hardware. I've also got an adt7473 sensor and ran into detection problems on kernels > 3.2.x+.
After bisecting the kernel to find the offending commit concerning i2c bitbanging, I've been working with the upstream devs and hoping to see this fixed.
My bug report containing patches for 3.4.x kernel and 3.7.x, 3.8 kernels is:
https://bugs.freedesktop.org/show_bug.cgi?id=60704
The patch is a simple one-liner to modify the i2c datarate. I've been building all my kernels (currently using 3.4.32 and 3.7.9) patched with this fix and my adt7473 PWM fan control is back in action. Nice and quiet!
I'd love to see this patch make it into stable kernel releases, so if you test it out, please provide feedback.
Offline
Pages: 1