修改 Intel Powerclamp 比率时出错?

修改 Intel Powerclamp 比率时出错?

按照 Intel Powerclamp 说明操作(https://www.kernel.org/doc/Documentation/thermal/intel_powerclamp.txt),我尝试使用他们推荐的 Konsole 条目设置比例:sudo sh -c "echo 15 > /sys/class/thermal/cooling_device80/cur_state "这出现了错误:sh: 1: cannot create /sys/class/thermal/cooling_device80/cur_state: Directory nonexistent

编辑0: 我运行了命令并得到:

sarah@ConvergentRefuge:~$ ll /sys/class/thermal/cooling_device* lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device0 -> ../../devices/virtual/thermal/cooling_device0/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device1 -> ../../devices/virtual/thermal/cooling_device1/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device2 -> ../../devices/virtual/thermal/cooling_device2/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device3 -> ../../devices/virtual/thermal/cooling_device3/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device4 -> ../../devices/virtual/thermal/cooling_device4/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device5 -> ../../devices/virtual/thermal/cooling_device5/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device6 -> ../../devices/virtual/thermal/cooling_device6/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device7 -> ../../devices/virtual/thermal/cooling_device7/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device8 -> ../../devices/virtual/thermal/cooling_device8/ lrwxrwxrwx 1 root root 0 Feb 9 09:01 /sys/class/thermal/cooling_device9 -> ../../devices/virtual/thermal/cooling_device9/

但是当我运行时sudo sh -c "echo 15 > /sys/class/thermal/cooling_device0/cur_state" 出现 I/O 错误。

答案1

另一个答案是正确的,但在我的案例中却导致了错误的解决方案。要追踪丢失的文件或目录,请使用以下技术:

$ ll /sys/class/thermal/cooling_device*
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device0 -> ../../devices/virtual/thermal/cooling_device0/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device1 -> ../../devices/virtual/thermal/cooling_device1/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device2 -> ../../devices/virtual/thermal/cooling_device2/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device3 -> ../../devices/virtual/thermal/cooling_device3/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device4 -> ../../devices/virtual/thermal/cooling_device4/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device5 -> ../../devices/virtual/thermal/cooling_device5/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device6 -> ../../devices/virtual/thermal/cooling_device6/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device7 -> ../../devices/virtual/thermal/cooling_device7/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device8 -> ../../devices/virtual/thermal/cooling_device8/
lrwxrwxrwx 1 root root 0 Feb  7 04:33 /sys/class/thermal/cooling_device9 -> ../../devices/virtual/thermal/cooling_device9/

在我的系统中,冷却设备编号0为。您尝试访问的9编号不存在。80

然后查看所有 9 个文件的值,cur_state使用:

$ cat /sys/class/thermal/cooling_device*/cur_state
0
0
0
0
0
0
0
0
-1
0

值得注意的是,cooling_device8设置为-1。我不确定为什么。

答案2

路径中的某个目录cur_state不存在或符号链接已损坏。最有可能的是cooling_device80

相关内容