PPAs for Quantal (Ubuntu 12.10)

If you have trouble with PHC you can ask and hope for help here.
luckyknight
Posts: 1
Joined: Thu 20. Dec 2012, 19:05

PPAs for Quantal (Ubuntu 12.10)

Post by luckyknight » Sat 19. Jan 2013, 15:03

Are you going to update the repository with 12.10 support? Also will AMD Trinity be supported? I have a A6 5400K. Thanks

ibidem
Posts: 8
Joined: Thu 1. Aug 2013, 05:36

Re: PPAs for Quantal (Ubuntu 12.10)

Post by ibidem » Tue 6. Aug 2013, 04:26

See https://bugs.launchpad.net/ubuntu/+sour ... bug/984288
(New kernel no longer needed; build and boot with the right options.)

ash1991
Posts: 2
Joined: Thu 6. Feb 2014, 18:13

Re: PPAs for Quantal (Ubuntu 12.10)

Post by ash1991 » Thu 6. Feb 2014, 18:53

I used phc-intel-pack-rev13.1 on ubuntu raring(13.04):

Code: Select all

uname -r
3.10.14-031014-generic
Compiled module:

Code: Select all

make
Preparing build area for phc-intel-0.3.2:
searching for patch directory... using inc/3.10
copying files
patching file phc-intel.c
SUCCESS. Build area ready.

make -C /lib/modules/`uname -r`/build SUBDIRS=/home/ali/Downloads/phc-intel-pack-rev13.1 modules
make[1]: Entering directory `/usr/src/linux-headers-3.10.14-031014-generic'
  CC [M]  /home/ali/Downloads/phc-intel-pack-rev13.1/phc-intel.o
/home/ali/Downloads/phc-intel-pack-rev13.1/phc-intel.c: In function ‘extract_msr’:
/home/ali/Downloads/phc-intel-pack-rev13.1/phc-intel.c:247:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/ali/Downloads/phc-intel-pack-rev13.1/phc-intel.mod.o
  LD [M]  /home/ali/Downloads/phc-intel-pack-rev13.1/phc-intel.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.10.14-031014-generic'
Installed module:

Code: Select all

sudo make install
install -m 755 -o root -g root -d /etc/modprobe.d
install -m 644 -o root -g root phc-intel.modprobe /etc/modprobe.d/phc-intel.conf
install -m 755 -o root -g root -d /lib/modules/3.10.14-031014-generic/extra
install -m 644 -o root -g root phc-intel.ko /lib/modules/3.10.14-031014-generic/extra/
depmod 3.10.14-031014-generic -a
Added cpufreq_driver=phc-intel to /etc/default/grub and executed sudo update-grub2 but on reboot I get:

Code: Select all

dmesg | grep phc
[   28.903808] phc_intel: module verification failed: signature and/or required key missing - tainting kernel
any ideas?
Last edited by ash1991 on Sat 8. Mar 2014, 08:09, edited 1 time in total.

lio
Posts: 83
Joined: Wed 2. Mar 2011, 18:37

Re: PPAs for Quantal (Ubuntu 12.10)

Post by lio » Sat 8. Feb 2014, 14:41

The kernel can be made to only load modules which it thinks are trustworthy. It can be used as a countermeasure against rootkits or the like. Add enforcemodulesig=1 as kernel boot parameter if you wanne play with it. In your case the module is not blocked but the kernel is merely flagged as tainted. So if you report a kernel issue to the Ubuntu folks they will more likely notice it and will probably tell you to reproduce the bug with a pristine kernel, because they won't bother hunting bugs in code they can't control.

However, the module should work as expected. Does it? Just ignore the message and if it really bothers you to have a tainted kernel search the internet on how to sign modules (or how to disable the check ;) )

Bzzz
Posts: 6
Joined: Sat 5. Feb 2011, 09:34

Re: PPAs for Quantal (Ubuntu 12.10)

Post by Bzzz » Sun 9. Feb 2014, 21:40

I'm running a similar setup, and the module doesn't work. I had phc not running for quite a while because of all the hassle involved with current ubuntu kernels, but now I tried again.

Code: Select all

dmesg | grep phc
[...]
[   15.202602] phc_intel: module verification failed: signature and/or required key missing - tainting kernel

Code: Select all

lsmod | grep phc
[nothing]

Code: Select all

sudo modprobe phc-intel
ERROR: could not insert 'phc_intel': Invalid argument
running

Code: Select all

uname -r
3.11.0-15-generic

Code: Select all

phc-intel:
Running module version sanity check.

Good news! Module version  for phc-intel.ko
exactly matches what is already found in kernel 3.11.0-15-generic.
DKMS will not replace this module.
You may override by specifying --force.

Code: Select all

dkms status
Error! Could not locate dkms.conf file.
File:  does not exist.
I also removed tp-smapi and the acpi-call from linrunner, which might interfere.

Again, no idea what to do next. When it comes to kernel stuff, I am pretty much lost...

lio
Posts: 83
Joined: Wed 2. Mar 2011, 18:37

Re: PPAs for Quantal (Ubuntu 12.10)

Post by lio » Mon 10. Feb 2014, 12:13

Bzzz wrote:

Code: Select all

sudo modprobe phc-intel
ERROR: could not insert 'phc_intel': Invalid argument
Please try the new package: http://www.linux-phc.org/forum/viewtopic.php?f=7&t=267 and specify cpufreq_driver=phc-intel as an kernel command line argument (e.g. in grub.cfg)

Bzzz
Posts: 6
Joined: Sat 5. Feb 2011, 09:34

Re: PPAs for Quantal (Ubuntu 12.10)

Post by Bzzz » Mon 10. Feb 2014, 23:27

The cpufreq_driver=phc-intel argument was already specified.

With the 13.2 pack, modprobe now accepts the module. /sys/devices/system/cpu/cpu0/cpufreq/phc_* is now there :D Specifying values in the tlp config and reloading, it now says:
/sys/devices/system/cpu/cpu0/cpufreq/phc_controls = 73:31 9:31 6:0 134:0
/sys/devices/system/cpu/cpu0/cpufreq/phc_default_controls = 73:39 9:34 6:23 134:17
/sys/devices/system/cpu/cpu1/cpufreq/phc_controls = 73:31 9:31 6:0 134:0
/sys/devices/system/cpu/cpu1/cpufreq/phc_default_controls = 73:39 9:34 6:23 134:17
Looks like it's working, right? :o

Image
Just did a quick run with 2x burncpu and 2x stress. 2 minutes lowered vids as above, 3 min stock, 2 min lowered again. Still a lot of noise in it and much more fluctuations in the stock voltage area, but the modified vids seem to have overall lower power consumption. Also, xsensors reports a little lower temperatures. So I think it works. Big THX! :D :D


Aaand another edit: Frequency scaling seems slow and doesn't fall back to the lowest possible setting (800 MHz)

Code: Select all

cpupower frequency-info

analyzing CPU 0:
  driver: phc-intel
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.40 GHz
  available frequency steps: 2.40 GHz, 2.40 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 2.40 GHz and 2.40 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.40 GHz.
  cpufreq stats: 2.40 GHz:-nan%, 2.40 GHz:-nan%, 1.60 GHz:-nan%, 800 MHz:-nan%  (29)
  boost state support:
    Supported: no
    Active: no
This hops back and forth, "performance" sets 2.4-2.4 GHz, "ondemand" sets 1.6-1.6 GHz. But it takes half a minute to change between them, so that cannot be optimal. And, as power consumption is also a linear function of frequency, this cannot be the most economic setting as well.

lio
Posts: 83
Joined: Wed 2. Mar 2011, 18:37

Re: PPAs for Quantal (Ubuntu 12.10)

Post by lio » Tue 11. Feb 2014, 18:05

Bzzz wrote:Looks like it's working, right? :o
Yep.
Bzzz wrote:This hops back and forth, "performance" sets 2.4-2.4 GHz, "ondemand" sets 1.6-1.6 GHz. But it takes half a minute to change between them, so that cannot be optimal. And, as power consumption is also a linear function of frequency, this cannot be the most economic setting as well.
The performance governor stays at the highest frequency all the time. No transitions no lower frequency, just pure performance. ;)

By default the ondemand governor switches between lowest and highest available frequencies all the time but cpufreq-set --min and --max can nail the frequency to some specific values (which is great to test carefully every frequency and its undervolted stability). If you set --min and --max appropriately, you can enable all of the steppings.

You mentioned tlp control. Did you specify a min or max frequency in there or. if you use it, in laptop-mode-tools?

Bzzz
Posts: 6
Joined: Sat 5. Feb 2011, 09:34

Re: PPAs for Quantal (Ubuntu 12.10)

Post by Bzzz » Tue 11. Feb 2014, 20:42

lio wrote:By default the ondemand governor switches between lowest and highest available frequencies all the time but cpufreq-set --min and --max can nail the frequency to some specific values (which is great to test carefully every frequency and its undervolted stability). If you set --min and --max appropriately, you can enable all of the steppings.
No, it can't. It wont set 800 or even 1600 als max freq. And although set manually, 800 as min freq is not used.
lio wrote:You mentioned tlp control. Did you specify a min or max frequency in there or. if you use it, in laptop-mode-tools?
Without phc, all steps worked fine. So the phc governor has yet to prove that it is not his fault

from /etc/default/tlp

Code: Select all

#CPU_SCALING_GOVERNOR_ON_AC=ondemand
#CPU_SCALING_GOVERNOR_ON_BAT=ondemand
#CPU_SCALING_MIN_FREQ_ON_AC=0
#CPU_SCALING_MAX_FREQ_ON_AC=0
#CPU_SCALING_MIN_FREQ_ON_BAT=0
#CPU_SCALING_MAX_FREQ_ON_BAT=0
laptop-mode-tools are not installed.


I've also notived that sleep is no longer working. dmesg says:

Code: Select all

[ 6742.626498] perf samples too long (2504 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
[ 6827.797920] hpet_rtc_timer_reinit: 147 callbacks suppressed
[ 6827.797924] hpet1: lost 2 rtc interrupts
[ 6882.588577] PM: Syncing filesystems ... done.
[ 6882.654053] PM: Preparing system for mem sleep
[ 6882.655281] Freezing user space processes ... 
[ 6902.657187] Freezing of tasks failed after 20.001 seconds (1 tasks refusing to freeze, wq_busy=0):
[ 6902.657271] mount.nfs       D ffff8801bbc14580     0  6865      1 0x00000004
[ 6902.657274]  ffff88013d5fdb00 0000000000000046 ffff88013d5fdfd8 0000000000014580
[ 6902.657277]  ffff88013d5fdfd8 0000000000014580 ffff8801442b9770 ffff88005ee49800
[ 6902.657279]  ffff8801442b9770 0000000000000001 ffff8801ae4b9f90 ffff88000f6b2000
[ 6902.657281] Call Trace:
[ 6902.657290]  [<ffffffff816ec5f9>] schedule+0x29/0x70
[ 6902.657308]  [<ffffffffa066978b>] nfs_wait_client_init_complete.part.7+0x5b/0xb0 [nfs]
[ 6902.657312]  [<ffffffff81085510>] ? wake_up_atomic_t+0x30/0x30
[ 6902.657321]  [<ffffffffa066a6af>] nfs_get_client+0x29f/0x360 [nfs]
[ 6902.657335]  [<ffffffffa06fda1a>] nfs4_set_client+0x8a/0x110 [nfsv4]
[ 6902.657345]  [<ffffffffa06feb64>] nfs4_create_server+0xc4/0x310 [nfsv4]
[ 6902.657354]  [<ffffffffa06f7a6e>] nfs4_remote_mount+0x2e/0x60 [nfsv4]
[ 6902.657358]  [<ffffffff811ab1c9>] mount_fs+0x39/0x1b0
[ 6902.657361]  [<ffffffff811c4e67>] ? alloc_vfsmnt+0xd7/0x1b0
[ 6902.657363]  [<ffffffff811c4fe7>] vfs_kern_mount+0x67/0x100
[ 6902.657372]  [<ffffffffa06f7946>] nfs_do_root_mount+0x86/0xc0 [nfsv4]
[ 6902.657381]  [<ffffffffa06f7d8a>] nfs4_try_mount+0x4a/0xd0 [nfsv4]
[ 6902.657388]  [<ffffffffa066b507>] ? get_nfs_version+0x27/0x80 [nfs]
[ 6902.657398]  [<ffffffffa0675e3d>] nfs_fs_mount+0x3dd/0xcf0 [nfs]
[ 6902.657406]  [<ffffffffa0676d70>] ? nfs_clone_super+0x140/0x140 [nfs]
[ 6902.657414]  [<ffffffffa0674f10>] ? param_set_portnr+0x60/0x60 [nfs]
[ 6902.657417]  [<ffffffff811ab1c9>] mount_fs+0x39/0x1b0
[ 6902.657419]  [<ffffffff811c4e67>] ? alloc_vfsmnt+0xd7/0x1b0
[ 6902.657421]  [<ffffffff811c4fe7>] vfs_kern_mount+0x67/0x100
[ 6902.657424]  [<ffffffff811c752e>] do_mount+0x23e/0xa20
[ 6902.657427]  [<ffffffff811433fe>] ? __get_free_pages+0xe/0x50
[ 6902.657430]  [<ffffffff811c7176>] ? copy_mount_options+0x36/0x170
[ 6902.657432]  [<ffffffff811c7d93>] SyS_mount+0x83/0xc0
[ 6902.657435]  [<ffffffff816f725d>] system_call_fastpath+0x1a/0x1f
[ 6902.657446] 
[ 6902.657447] Restarting tasks ... done.
[ 6902.667341] video LNXVIDEO:00: Restoring backlight state
[ 6902.808890] ACPI: \_SB_.PCI0.SATA.PRT1: undocking
[ 6909.054079] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
Did work all the time, I recently had some 30 days "uptime", but put it in sleep mode every night. Atm, it doesn't even shut off the screen and wake up asap, but instead the sleep indicator is blinking for a minute, and then everything is back up. I don't know what the mount.nfs message has to do with it, I have in fact nfs mounts configured, but not active. I do some testing if disabling the boot parameter and therefore not using phc fixes this...

lio
Posts: 83
Joined: Wed 2. Mar 2011, 18:37

Re: PPAs for Quantal (Ubuntu 12.10)

Post by lio » Tue 11. Feb 2014, 21:37

Bzzz wrote:Without phc, all steps worked fine. So the phc governor has yet to prove that it is not his fault
If you don't set any value through the phc-interface at all, you get the stock acpi-cpufreq behaviour. At least it's supposed to be this way. ;) What kind of CPU do you have? Which patch-version do you use: 0.3.2 or 0.4.0?
I've also notived that sleep is no longer working. dmesg says:

Code: Select all

[ 6902.657187] Freezing of tasks failed after 20.001 seconds (1 tasks refusing to freeze, wq_busy=0):
[ 6902.657271] mount.nfs       D ffff8801bbc14580     0  6865      1 0x00000004
Ouch. Could be related, could be coincidence.
but not active. I do some testing if disabling the boot parameter and therefore not using phc fixes this...
Is the suspend-fail reproducible over multiple reboots and does it on the other side succeed with the stock acpi-cpufreq? It could all be related – If you undervolt your system to much it crashs in an instant. No crash does not mean the lower voltage is safe to use. If you use phcintel without applying any settings, does it happen too? Next step would be to test a vanilla kernel from kernel.org with phc applied. ;)

Post Reply