system-summary fails due to missing file /sys/.../scaling_available_frequencies

Bug #1675824 reported by Alkis Georgopoulos on 2017-03-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
friendly-recovery (Ubuntu)
Undecided
Dimitri John Ledkov

Bug Description

The system-summary menu of friendly-recovery dies in many different CPUs:

sh /lib/recovery-mode/options/system-summary
cat: /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory
/lib/recovery-mode/options/system-summary: 29: /lib/recovery-mode/options/system-summary: arithmetic expression: expecting primary: " / 1000"

I tested in 16.04 and in 17.04, with many different CPUs:
Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz
AMD Phenom(tm) II X6 1090T Processor
Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz

On the other hand, that file did exist on the following CPUs:
Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz

So the code needs to cope with that file possibly missing.

Alkis Georgopoulos (alkisg) wrote :

I'm attaching a patch that solves the issue by using the "cpuinfo_max_freq" virtual file which is much more frequently present than the "scaling_available_frequencies" file.
And even if that file isn't there, it doesn't choke like it used to, it just displays "0".

Alkis Georgopoulos (alkisg) wrote :
tags: added: patch
Dimitri John Ledkov (xnox) wrote :

looks good.

Changed in friendly-recovery (Ubuntu):
assignee: nobody → Dimitri John Ledkov (xnox)
milestone: none → ubuntu-17.04
Changed in friendly-recovery (Ubuntu):
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package friendly-recovery - 0.2.35

---------------
friendly-recovery (0.2.35) experimental; urgency=medium

  * friendly-recovery.service: trigger and settle udevadm before
    launching, drop broken settle down commands. Thanks to Alkis
    Georgopoulos. LP: #1675805
  * system-summary: improve cpu_freq reading, and make the script
    resilient to failures of reading cpu_freq. LP: #1675824

 -- Dimitri John Ledkov <email address hidden> Wed, 29 Mar 2017 17:04:51 +0100

Changed in friendly-recovery (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers