On 5/11/2015 9:49 AM, Jaroslav Skarvada wrote: > Hi, > > it seems there are virtual environments not correctly implementing the MSR > (e.g. VirtualBox bug: https://www.virtualbox.org/ticket/14099) or not implementing > it at all (e.g. KVM). PowerTOP just exits in such environments and cannot run. > > The proposed patch makes PowerTOP not to exit on MSR read errors, but still > report them. > > Resending as attachment, because the previous e-mail has been probably blocked > somewhere > Hi, I have a slightly different patch in a local repo, but it needed a command line option so I didn't sent it upstream yet. the solution you have makes the app not crash, but it's really not the right thing. the reason is that the statistics code still uses the "native intel msr" model, so it gets all zeroes... it should use "just trust the kernel" model instead. - if (strcmp(vendor, "GenuineIntel") == 0) + if (strcmp(vendor, "GenuineIntel") == 0 && !broken_msrs) something like that in src/cpu/cpu.cpp (3x) is needed instead.... but today the msr logic runs after this code, not before, so I have not yet found a good way to set the broken_msrs variable for the case in question