Public bug reported:

When thermald updates /sys/devices/virtual/powercap/intel-rapl/intel-
rapl:0/constraint_0_power_limit_uw the kernel is emitting the following
message:

[38458.753468] powercap intel-rapl:0: package locked by BIOS, monitoring only
[38637.993447] powercap intel-rapl:0: package locked by BIOS, monitoring only
[38674.154336] powercap intel-rapl:0: package locked by BIOS, monitoring only
[38691.500619] powercap intel-rapl:0: package locked by BIOS, monitoring only

This message comes from set_power_limit() in
drivers/powercap/intel_rapl.c because the domain is locked by the BIOS.
Writing to this interface fails with an error:

open("/sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw",
 O_WRONLY) = 3
write(3, "35000000", 8)                 = -1 ENODATA (No data available)

so in theory thermald should be seeing this failed write and handling it
appropriately rather.

cthd_sysfs_cdev_rapl::set_curr_state() and
cthd_sysfs_cdev_rapl::set_curr_state_raw()  in src/thd_cdev_rapl.cpp
perform the update and they do check that the sysfs write fails:

         if (cdev_sysfs.write(tc_state_dev.str(), state_str.str()) < 0)
                curr_state = (state == 0) ? 0 : max_state;

however,  I believe they should check errno for the failed write and
disable the rapl interface if we get -ENODATA on this interface to avoid
repeated failures and hence repeated spamming of kernel messages

** Affects: thermald (Ubuntu)
     Importance: Medium
     Assignee: Colin Ian King (colin-king)
         Status: In Progress

** Changed in: thermald (Ubuntu)
       Status: New => In Progress

** Changed in: thermald (Ubuntu)
   Importance: Undecided => Medium

** Changed in: thermald (Ubuntu)
     Assignee: (unassigned) => Colin Ian King (colin-king)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1543046

Title:
  thermald spamming kernel log when updating powercap RAPL  powerlimit

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/thermald/+bug/1543046/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to