[K10] no phc files in /sys/devices/system/cpu/cpu*/cpufreq/

If you have trouble with PHC you can ask and hope for help here.
Post Reply
McLovin
Posts: 1
Joined: Sat 1. Aug 2015, 04:23

[K10] no phc files in /sys/devices/system/cpu/cpu*/cpufreq/

Post by McLovin » Sat 1. Aug 2015, 04:43

Hey guys,

i have installed a fresh Ubuntu Server 15.04 x64 with all patches and updates.

This is my hardware:

Code: Select all

eduard@nas2:~$ sudo lshw
[sudo] password for eduard:
nas2
    description: Computer
    width: 64 bits
    capabilities: smbios-2.6 vsyscall32
  *-core
       description: Motherboard
       physical id: 0
     *-memory
          description: System memory
          physical id: 0
          size: 7857MiB
     *-cpu
          product: AMD Athlon(tm) II X2 215 Processor
          vendor: Advanced Micro Devices [AMD]
          physical id: 1
          bus info: cpu@0
          size: 1500MHz
          capacity: 2700MHz
          width: 64 bits
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp x86-64 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall cpufreq
     *-pci:0
          description: Host bridge
          product: RS690 Host Bridge
          vendor: Advanced Micro Devices, Inc. [AMD/ATI]
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 00
          width: 32 bits
          clock: 66MHz
        *-pci:0
             description: PCI bridge
             product: RS690 PCI to PCI Bridge (Internal gfx)
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 1
             bus info: pci@0000:00:01.0
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: pci ht normal_decode bus_master cap_list
             resources: ioport:c000(size=4096) memory:fe800000-fe9fffff ioport:f0000000(size=134217728)
           *-display
                description: VGA compatible controller
                product: RS740 [Radeon 2100]
                vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                physical id: 5
                bus info: pci@0000:01:05.0
                version: 00
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi vga_controller bus_master cap_list rom
                configuration: driver=radeon latency=64
                resources: irq:18 memory:f0000000-f7ffffff memory:fe9f0000-fe9fffff ioport:c000(size=256) memory:fe800000-fe8fffff
        *-pci:1
             description: PCI bridge
             product: RS690 PCI to PCI Bridge (PCI Express Port 1)
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 5
             bus info: pci@0000:00:05.0
             version: 00
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:24 ioport:d000(size=4096) memory:fea00000-feafffff ioport:fdf00000(size=1048576)
           *-network
                description: Ethernet interface
                product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: p4p1
                version: 03
                serial: 00:24:21:f2:97:ee
                size: 100Mbit/s
                capacity: 1Gbit/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8168d-1.fw ip=192.168.1.232 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
                resources: irq:25 ioport:d800(size=256) memory:fdfff000-fdffffff memory:fdff8000-fdffbfff memory:feae0000-feafffff
        *-storage
             description: SATA controller
             product: SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode]
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 11
             bus info: pci@0000:00:11.0
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: storage pm ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=64
             resources: irq:22 ioport:b000(size=8) ioport:a000(size=4) ioport:9000(size=8) ioport:8000(size=4) ioport:7000(size=16) memory:fe7ffc00-fe7fffff
        *-usb:0
             description: USB controller
             product: SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 12
             bus info: pci@0000:00:12.0
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: ohci bus_master
             configuration: driver=ohci-pci latency=64
             resources: irq:16 memory:fe7fe000-fe7fefff
           *-usbhost
                product: OHCI PCI host controller
                vendor: Linux 3.19.0-25-generic ohci_hcd
                physical id: 1
                bus info: usb@3
                logical name: usb3
                version: 3.19
                capabilities: usb-1.10
                configuration: driver=hub slots=3 speed=12Mbit/s
              *-usb
                   description: Mouse
                   product: USB-PS/2 Optical Mouse
                   vendor: Logitech
                   physical id: 3
                   bus info: usb@3:3
                   version: 24.30
                   capabilities: usb-2.00
                   configuration: driver=usbhid maxpower=98mA speed=2Mbit/s
        *-usb:1
             description: USB controller
             product: SB7x0 USB OHCI1 Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 12.1
             bus info: pci@0000:00:12.1
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: ohci bus_master
             configuration: driver=ohci-pci latency=64
             resources: irq:16 memory:fe7fd000-fe7fdfff
           *-usbhost
                product: OHCI PCI host controller
                vendor: Linux 3.19.0-25-generic ohci_hcd
                physical id: 1
                bus info: usb@4
                logical name: usb4
                version: 3.19
                capabilities: usb-1.10
                configuration: driver=hub slots=3 speed=12Mbit/s
              *-usb
                   description: USB hub
                   product: Generic USB K/B Hub
                   vendor: Genesys Logic, Inc.
                   physical id: 1
                   bus info: usb@4:1
                   version: 1.00
                   capabilities: usb-1.10
                   configuration: driver=hub maxpower=100mA slots=3 speed=12Mbit/s
                 *-usb
                      description: Keyboard
                      product: Generic USB K/B Hub
                      vendor: Genesys Logic, Inc.
                      physical id: 3
                      bus info: usb@4:1.3
                      version: 1.00
                      capabilities: usb-1.10
                      configuration: driver=usbhid maxpower=48mA speed=12Mbit/s
        *-usb:2
             description: USB controller
             product: SB7x0/SB8x0/SB9x0 USB EHCI Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 12.2
             bus info: pci@0000:00:12.2
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci-pci latency=64
             resources: irq:17 memory:fe7ff800-fe7ff8ff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 3.19.0-25-generic ehci_hcd
                physical id: 1
                bus info: usb@1
                logical name: usb1
                version: 3.19
                capabilities: usb-2.00
                configuration: driver=hub slots=6 speed=480Mbit/s
              *-usb
                   description: Mass storage device
                   product: STORE N GO
                   vendor: Verbatim
                   physical id: 6
                   bus info: usb@1:6
                   logical name: scsi6
                   version: 1.10
                   serial: 078904801C6E
                   capabilities: usb-2.00 scsi emulated scsi-host
                   configuration: driver=usb-storage maxpower=200mA speed=480Mbit/s
                 *-disk
                      description: SCSI Disk
                      physical id: 0.0.0
                      bus info: scsi@6:0.0.0
                      logical name: /dev/sdb
                      size: 3822MiB (4007MB)
                      capabilities: partitioned partitioned:dos
                      configuration: logicalsectorsize=512 sectorsize=512 signature=0023583d
                    *-volume
                         description: Windows FAT volume
                         vendor: SYSLINUX
                         physical id: 1
                         bus info: scsi@6:0.0.0,1
                         logical name: /dev/sdb1
                         version: FAT32
                         serial: 0911-0c45
                         size: 3819MiB
                         capacity: 3821MiB
                         capabilities: primary bootable fat initialized
                         configuration: FATs=2 filesystem=fat label=UUI
        *-usb:3
             description: USB controller
             product: SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 13
             bus info: pci@0000:00:13.0
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: ohci bus_master
             configuration: driver=ohci-pci latency=64
             resources: irq:18 memory:fe7fc000-fe7fcfff
           *-usbhost
                product: OHCI PCI host controller
                vendor: Linux 3.19.0-25-generic ohci_hcd
                physical id: 1
                bus info: usb@5
                logical name: usb5
                version: 3.19
                capabilities: usb-1.10
                configuration: driver=hub slots=3 speed=12Mbit/s
        *-usb:4
             description: USB controller
             product: SB7x0 USB OHCI1 Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 13.1
             bus info: pci@0000:00:13.1
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: ohci bus_master
             configuration: driver=ohci-pci latency=64
             resources: irq:18 memory:fe7fb000-fe7fbfff
           *-usbhost
                product: OHCI PCI host controller
                vendor: Linux 3.19.0-25-generic ohci_hcd
                physical id: 1
                bus info: usb@6
                logical name: usb6
                version: 3.19
                capabilities: usb-1.10
                configuration: driver=hub slots=3 speed=12Mbit/s
        *-usb:5
             description: USB controller
             product: SB7x0/SB8x0/SB9x0 USB EHCI Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 13.2
             bus info: pci@0000:00:13.2
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci-pci latency=64
             resources: irq:19 memory:fe7ff400-fe7ff4ff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 3.19.0-25-generic ehci_hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 3.19
                capabilities: usb-2.00
                configuration: driver=hub slots=6 speed=480Mbit/s
        *-serial UNCLAIMED
             description: SMBus
             product: SBx00 SMBus Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 3c
             width: 32 bits
             clock: 66MHz
             capabilities: ht cap_list
             configuration: latency=0
        *-ide
             description: IDE interface
             product: SB7x0/SB8x0/SB9x0 IDE Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 14.1
             bus info: pci@0000:00:14.1
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: ide msi bus_master cap_list
             configuration: driver=pata_atiixp latency=64
             resources: irq:16 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:ff00(size=16)
        *-isa
             description: ISA bridge
             product: SB7x0/SB8x0/SB9x0 LPC host controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 14.3
             bus info: pci@0000:00:14.3
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: isa bus_master
             configuration: latency=0
        *-pci:2
             description: PCI bridge
             product: SBx00 PCI to PCI Bridge
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 14.4
             bus info: pci@0000:00:14.4
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: pci subtractive_decode bus_master
             resources: ioport:e000(size=4096) memory:feb00000-febfffff
           *-network DISABLED
                description: Ethernet interface
                product: DGE-528T Gigabit Ethernet Adapter
                vendor: D-Link System Inc
                physical id: 2
                bus info: pci@0000:03:02.0
                logical name: eth1
                version: 10
                serial: 00:13:46:39:eb:fc
                size: 10Mbit/s
                capacity: 1Gbit/s
                width: 32 bits
                clock: 66MHz
                capabilities: pm bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=64 link=no maxlatency=64 mingnt=32 multicast=yes port=MII speed=10Mbit/s
                resources: irq:20 ioport:e800(size=256) memory:febffc00-febffcff memory:febc0000-febdffff
        *-usb:6
             description: USB controller
             product: SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 14.5
             bus info: pci@0000:00:14.5
             version: 00
             width: 32 bits
             clock: 66MHz
             capabilities: ohci bus_master
             configuration: driver=ohci-pci latency=64
             resources: irq:18 memory:fe7fa000-fe7fafff
           *-usbhost
                product: OHCI PCI host controller
                vendor: Linux 3.19.0-25-generic ohci_hcd
                physical id: 1
                bus info: usb@7
                logical name: usb7
                version: 3.19
                capabilities: usb-1.10
                configuration: driver=hub slots=2 speed=12Mbit/s
     *-pci:1
          description: Host bridge
          product: Family 10h Processor HyperTransport Configuration
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 101
          bus info: pci@0000:00:18.0
          version: 00
          width: 32 bits
          clock: 33MHz
     *-pci:2
          description: Host bridge
          product: Family 10h Processor Address Map
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 102
          bus info: pci@0000:00:18.1
          version: 00
          width: 32 bits
          clock: 33MHz
     *-pci:3
          description: Host bridge
          product: Family 10h Processor DRAM Controller
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 103
          bus info: pci@0000:00:18.2
          version: 00
          width: 32 bits
          clock: 33MHz
     *-pci:4
          description: Host bridge
          product: Family 10h Processor Miscellaneous Control
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 104
          bus info: pci@0000:00:18.3
          version: 00
          width: 32 bits
          clock: 33MHz
          configuration: driver=k10temp
          resources: irq:0
     *-pci:5
          description: Host bridge
          product: Family 10h Processor Link Control
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 105
          bus info: pci@0000:00:18.4
          version: 00
          width: 32 bits
          clock: 33MHz
     *-scsi
          physical id: 2
          logical name: scsi5
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: Maxtor 6L250R0
             vendor: Maxtor
             physical id: 0.0.0
             bus info: scsi@5:0.0.0
             logical name: /dev/sda
             version: 1G20
             serial: L50Z629H
             size: 233GiB (250GB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=d7f06749
           *-volume:0
                description: Windows NTFS volume
                physical id: 1
                bus info: scsi@5:0.0.0,1
                logical name: /dev/sda1
                version: 3.1
                serial: 66d4ac2f-fc34-bc4d-a82f-c37d9df52fa1
                size: 29GiB
                capacity: 29GiB
                capabilities: primary bootable ntfs initialized
                configuration: clustersize=4096 created=2015-07-31 08:07:56 filesystem=ntfs state=clean
           *-volume:1
                description: Windows NTFS volume
                physical id: 2
                bus info: scsi@5:0.0.0,2
                logical name: /dev/sda2
                version: 3.1
                serial: 30efbe4b-9a9a-2448-909a-7d9ac26dd316
                size: 28GiB
                capacity: 28GiB
                capabilities: primary ntfs initialized
                configuration: clustersize=4096 created=2015-07-31 08:08:15 filesystem=ntfs state=clean
           *-volume:2
                description: Extended partition
                physical id: 3
                bus info: scsi@5:0.0.0,3
                logical name: /dev/sda3
                size: 175GiB
                capacity: 175GiB
                capabilities: primary extended partitioned partitioned:extended
              *-logicalvolume:0
                   description: Linux filesystem partition
                   physical id: 5
                   logical name: /dev/sda5
                   logical name: /
                   capacity: 13GiB
                   configuration: mount.fstype=ext4 mount.options=rw,relatime,errors=remount-ro,data=ordered state=mounted
              *-logicalvolume:1
                   description: Linux filesystem partition
                   physical id: 6
                   logical name: /dev/sda6
                   logical name: /home
                   capacity: 160GiB
                   configuration: mount.fstype=ext4 mount.options=rw,relatime,data=ordered state=mounted
              *-logicalvolume:2
                   description: Linux swap / Solaris partition
                   physical id: 7
                   logical name: /dev/sda7
                   capacity: 995MiB
                   capabilities: nofs
eduard@nas2:~$

Code: Select all

eduard@nas2:~$ sudo cat /proc/cpuinfo
[sudo] password for eduard:
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 215 Processor
stepping        : 2
microcode       : 0x10000c7
cpu MHz         : 2700.000
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall
bugs            : tlb_mmatch fxsave_leak
bogomips        : 5400.15
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 215 Processor
stepping        : 2
microcode       : 0x10000c7
cpu MHz         : 800.000
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall
bugs            : tlb_mmatch fxsave_leak
bogomips        : 5400.15
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

eduard@nas2:~$
Then installed PHC:

Code: Select all

eduard@nas2:~/archiv/linux$ tar -xzf phc-k8_v0.4.6.tar.gz -C .

eduard@nas2:~/archiv/linux$ cd phc-k8_v0.4.6/

eduard@nas2:~/archiv/linux/phc-k8_v0.4.6$ sudo make dkms_install
mkdir -p /usr/src/phc-k8-0.4.6
install -m 644 -o root -g root Makefile dkms.conf phc-k8.c phc-k8.h mperf.c mperf.h /usr/src/phc-k8-0.4.6
install -m 744 -o root -g root phc-k8.add /usr/src/phc-k8-0.4.6
dkms add build install -m phc-k8 -v 0.4.6

Creating symlink /var/lib/dkms/phc-k8/0.4.6/source ->
                 /usr/src/phc-k8-0.4.6

Running the post_add script:

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.19.0-25-generic -C /lib/modules/3.19.0-25-generic/build SUBDIRS=/var/lib/dkms/phc-k8/0.4.6/build mo                                                            dules.....
cleaning build area....

DKMS: build completed.

phc-k8:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.19.0-25-generic/updates/dkms/

/etc/modprobe.d/dkms.conf: added 'install powernow-k8 /sbin/modprobe phc-k8 || { /sbin/modprobe --ignore-install powerno                                                            w-k8; }'
/etc/modprobe.d/dkms.conf: added 'remove powernow-k8 /sbin/modprobe -r cpufreq_stats && { /sbin/modprobe --ignore-remove                                                             -r powernow-k8 ; }'
/etc/modprobe.d/phc-k8.conf: added 'install powernow-k8 /sbin/modprobe phc-k8 || { /sbin/modprobe --ignore-install power                                                            now-k8; }'
/etc/modprobe.d/phc-k8.conf: added 'remove powernow-k8 /sbin/modprobe -r cpufreq_stats && { /sbin/modprobe --ignore-remo                                                            ve -r powernow-k8 ; }'
depmod.......

DKMS: install completed.
eduard@nas2:~/archiv/linux/phc-k8_v0.4.6$
Tried to load the installed module without any errors:

Code: Select all

eduard@nas2:~$ sudo modprobe -v phc-k8
insmod /lib/modules/3.19.0-25-generic/updates/dkms/phc-k8.ko
eduard@nas2:~$
This i can see in /var/log/syslog after loading the module:

Code: Select all

Aug  1 03:54:04 nas2 kernel: [  621.643049] phc_k8: Found 1 AMD Athlon(tm) II X2 215 Processor (2 cpu cores) 
But now, the module hasnt been loaded:

Code: Select all

eduard@nas2:~$ lsmod
Module                  Size  Used by
amdkfd                 81920  1
amd_iommu_v2           20480  1 amdkfd
radeon               1556480  1
ppdev                  20480  0
kvm_amd                61440  0
kvm                   483328  1 kvm_amd
ttm                    98304  1 radeon
drm_kms_helper        126976  1 radeon
edac_core              53248  0
drm                   344064  4 ttm,drm_kms_helper,radeon
edac_mce_amd           24576  0
k10temp                16384  0
serio_raw              16384  0
8250_fintek            16384  0
i2c_algo_bit           16384  1 radeon
wmi                    20480  0
shpchp                 40960  0
parport_pc             32768  0
tpm_infineon           20480  0
parport                45056  2 ppdev,parport_pc
i2c_piix4              24576  0
mac_hid                16384  0
autofs4                40960  2
uas                    24576  0
usb_storage            69632  1 uas
pata_acpi              16384  0
hid_generic            16384  0
usbhid                 53248  0
hid                   110592  2 hid_generic,usbhid
psmouse               118784  0
r8169                  81920  0
pata_atiixp            16384  3
ahci                   36864  0
libahci                32768  1 ahci
mii                    16384  1 r8169
eduard@nas2:~$
Also no phc files in /sys/devices/system/cpu/cpu0/cpufreq/:

Code: Select all

eduard@nas2:~$ ll -alh /sys/devices/system/cpu/cpu0/cpufreq/
total 0
drwxr-xr-x 3 root root    0 Aug  1 03:46 ./
drwxr-xr-x 7 root root    0 Aug  1 03:46 ../
-r--r--r-- 1 root root 4.0K Aug  1 03:46 affected_cpus
-r--r--r-- 1 root root 4.0K Aug  1 03:46 bios_limit
-rw-r--r-- 1 root root 4.0K Aug  1 03:46 cpb
-r-------- 1 root root 4.0K Aug  1 03:46 cpuinfo_cur_freq
-r--r--r-- 1 root root 4.0K Aug  1 03:46 cpuinfo_max_freq
-r--r--r-- 1 root root 4.0K Aug  1 03:46 cpuinfo_min_freq
-r--r--r-- 1 root root 4.0K Aug  1 03:46 cpuinfo_transition_latency
-r--r--r-- 1 root root 4.0K Aug  1 03:46 freqdomain_cpus
-r--r--r-- 1 root root 4.0K Aug  1 03:46 related_cpus
-r--r--r-- 1 root root 4.0K Aug  1 03:46 scaling_available_frequencies
-r--r--r-- 1 root root 4.0K Aug  1 03:46 scaling_available_governors
-r--r--r-- 1 root root 4.0K Aug  1 03:46 scaling_cur_freq
-r--r--r-- 1 root root 4.0K Aug  1 03:46 scaling_driver
-rw-r--r-- 1 root root 4.0K Aug  1 03:44 scaling_governor
-rw-r--r-- 1 root root 4.0K Aug  1 03:46 scaling_max_freq
-rw-r--r-- 1 root root 4.0K Aug  1 03:46 scaling_min_freq
-rw-r--r-- 1 root root 4.0K Aug  1 03:46 scaling_setspeed
drwxr-xr-x 2 root root    0 Aug  1 03:46 stats/
eduard@nas2:~$
This are the finding for 'phc*':

Code: Select all

eduard@nas2:~$ sudo find / -name 'phc*'
/lib/modules/3.19.0-25-generic/updates/dkms/phc-k8.ko
/var/lib/dkms/phc-k8
/var/lib/dkms/phc-k8/0.4.6/build/phc-k8.h
/var/lib/dkms/phc-k8/0.4.6/build/.tmp_versions/phc-k8.mod
/var/lib/dkms/phc-k8/0.4.6/build/phc-k8.add
/var/lib/dkms/phc-k8/0.4.6/build/phc-k8.c
/var/lib/dkms/phc-k8/0.4.6/3.19.0-25-generic/x86_64/module/phc-k8.ko
/etc/modprobe.d/phc-k8.conf
/usr/src/phc-k8-0.4.6
/usr/src/phc-k8-0.4.6/phc-k8.h
/usr/src/phc-k8-0.4.6/phc-k8.add
/usr/src/phc-k8-0.4.6/phc-k8.c
/home/eduard/archiv/linux/phc-k8_v0.4.6.tar.gz
/home/eduard/archiv/linux/phc-k8_v0.4.6
/home/eduard/archiv/linux/phc-k8_v0.4.6/phc-k8.c
/home/eduard/archiv/linux/phc-k8_v0.4.6/phc-k8.modprobe
/home/eduard/archiv/linux/phc-k8_v0.4.6/phc-k8.h
/home/eduard/archiv/linux/phc-k8_v0.4.6/phc-k8.add
eduard@nas2:~$
and modinfo:

Code: Select all

eduard@nas2:~$ sudo modinfo phc-k8
filename:       /lib/modules/3.19.0-25-generic/updates/dkms/phc-k8.ko
license:        GPL
description:    AMD Athlon 64 and Opteron processor frequency driver (Linux-PHC version).
author:         David Gaarenstroom <david.gaarenstroom@gmail.com>
srcversion:     021B453DBA07D998FFABFE0
alias:          cpu:type:x86,ven*fam*mod*:feature:*00E8*
alias:          cpu:type:x86,ven0002fam000Fmod*:feature:*
depends:
vermagic:       3.19.0-25-generic SMP mod_unload modversions
parm:           direct_transitions:Use direct P-States transitions (bool)
parm:           min_800MHz:Allow 800MHz as lowest frequency with direct transitions enabled (bool)
parm:           be_maxfid:Override max FID for Black Edition processors (int)
eduard@nas2:~$ sudo modprobe -v phc-k8
insmod /lib/modules/3.19.0-25-generic/updates/dkms/phc-k8.ko
eduard@nas2:~$
Do you have an idea, what could be wrong here?
Thank you and best regards
Eduard

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

Re: [K10] no phc files in /sys/devices/system/cpu/cpu*/cpufr

Post by lio » Sun 2. Aug 2015, 09:00

Hi,

It's Ubuntu so it's different. Try adding "cpufreq_driver=phc-k8" to your kernel command line. Probably you are using grub, so GRUB_CMDLINE_LINUX_DEFAULT or GRUB_CMDLINE_LINUX is the variable you have to look at in /etc/default/grub.cfg. Afterwards run update-grub.

After restart, the phc-k8 driver should be active.

SuiciWD
Posts: 2
Joined: Mon 11. Jul 2016, 07:04

Re: [K10] no phc files in /sys/devices/system/cpu/cpu*/cpufr

Post by SuiciWD » Mon 11. Jul 2016, 07:17

lio wrote:Hi,

It's Ubuntu so it's different. Try adding "cpufreq_driver=phc-k8" to your kernel command line. Probably you are using grub, so GRUB_CMDLINE_LINUX_DEFAULT or GRUB_CMDLINE_LINUX is the variable you have to look at in /etc/default/grub.cfg. Afterwards run update-grub.

After restart, the phc-k8 driver should be active.
After adding cpufreq_driver=phc-k8 to the kernel command line I get a kernel panic at boot :shock:

Code: Select all

[   46.670211] kernel BUG at /var/lib/dkms/phc-k8/0.4.6/build/phc-k8.c:667!
[   46.670253] invalid opcode: 0000 [#1] SMP 
[   46.670281] Modules linked in: phc_k8(OE+) kvm_amd(+) dm_multipath scsi_dh kvm crct10dif_pclmul crc32_pclmul aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd snd_seq_midi snd_seq_midi_event snd_rawmidi snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_codec_generic arc4 psmouse snd_hda_intel bnep snd_hda_controller snd_seq snd_hda_codec snd_hwdep rt2800pci serio_raw rt2800mmio snd_seq_device rt2800lib rt2x00pci rt2x00mmio rt2x00lib k10temp mac80211 rtbth(OE) snd_pcm r8169 rfcomm rtsx_pci mii cfg80211 i2c_piix4 snd_timer bluetooth eeprom_93cx6 crc_ccitt snd shpchp soundcore amd_iommu_v2 hp_accel lis3lv02d input_polldev hp_wireless mac_hid parport_pc ppdev lp parport binfmt_misc nls_iso8859_1 ahci libahci wmi video
[   46.670758] CPU: 2 PID: 548 Comm: systemd-udevd Tainted: G           OE  3.19.0-59-generic #66~14.04.1-Ubuntu
[   46.670817] Hardware name: Hewlett-Packard HP Pavilion g7 Notebook PC/184B, BIOS F.15 10/04/2012
[   46.670871] task: ffff8800aecc89d0 ti: ffff88018b9a0000 task.ti: ffff88018b9a0000
[   46.670916] RIP: 0010:[<ffffffffc080ea14>]  [<ffffffffc080ea14>] freq_from_fid_did+0x44/0x50 [phc_k8]
[   46.670975] RSP: 0018:ffff88018b9a3b28  EFLAGS: 00010202
[   46.671009] RAX: 0000000000000015 RBX: 0000000000006800 RCX: 000000000000000f
[   46.671053] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000000c
[   46.671096] RBP: ffff88018b9a3b28 R08: ffff88019ec0a108 R09: ffff880198801a00
[   46.671140] R10: ffffffffc0810c21 R11: 0000000000000005 R12: 0000000000000004
[   46.671183] R13: ffff88018b97b300 R14: ffff88018b9a3bc8 R15: ffff88018b9ba200
[   46.671227] FS:  00007f2a08f56880(0000) GS:ffff88019ed00000(0000) knlGS:0000000000000000
[   46.671275] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   46.671311] CR2: 00007f2a08f14360 CR3: 000000018b9e5000 CR4: 00000000000407e0
[   46.671353] Stack:
[   46.673098]  ffff88018b9a3b58 ffffffffc080eb23 00000000ffffffed ffff88018b97b300
[   46.674891]  0000000000000004 000000000000a100 ffff88018b9a3c08 ffffffffc08116ad
[   46.676686]  0000000000000096 ffffffff81c546d0 ffff88018b9ba200 ffff88018b9a3bc8
[   46.678498] Call Trace:
[   46.680308]  [<ffffffffc080eb23>] print_basics+0x103/0x130 [phc_k8]
[   46.682152]  [<ffffffffc08116ad>] powernowk8_cpu_init+0x12bd/0x14e0 [phc_k8]
[   46.682158]  [<ffffffff8164b1d2>] __cpufreq_add_dev.isra.24+0x312/0xa10
[   46.682162]  [<ffffffff817a613e>] ? klist_next+0x7e/0xf0
[   46.682167]  [<ffffffffc08118d0>] ? powernowk8_cpu_init+0x14e0/0x14e0 [phc_k8]
[   46.682170]  [<ffffffff8164b8de>] cpufreq_add_dev+0xe/0x10
[   46.682175]  [<ffffffff814f82c9>] subsys_interface_register+0xa9/0xf0
[   46.682178]  [<ffffffff8164bdb8>] cpufreq_register_driver+0x118/0x330
[   46.682182]  [<ffffffffc0811a78>] powernowk8_init+0x1a8/0x20f [phc_k8]
[   46.682187]  [<ffffffffc08118d0>] ? powernowk8_cpu_init+0x14e0/0x14e0 [phc_k8]
[   46.682191]  [<ffffffff81002144>] do_one_initcall+0xd4/0x210
[   46.682200]  [<ffffffff811d1085>] ? kmem_cache_alloc_trace+0x1d5/0x270
[   46.682204]  [<ffffffff810f9c5c>] ? load_module+0x164c/0x1ce0
[   46.682207]  [<ffffffff810f9c95>] load_module+0x1685/0x1ce0
[   46.682209]  [<ffffffff810f55a0>] ? store_uevent+0x40/0x40
[   46.682215]  [<ffffffff810fa466>] SyS_finit_module+0x86/0xb0
[   46.682220]  [<ffffffff817bdbcd>] system_call_fastpath+0x16/0x1b
[   46.682247] Code: c7 64 89 f1 5d 05 20 03 00 00 d3 e8 69 c0 e8 03 00 00 c3 0f 1f 40 00 6b c7 64 89 f1 5d 05 40 06 00 00 d3 e8 69 c0 e8 03 00 00 c3 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 e5 
[   46.682252] RIP  [<ffffffffc080ea14>] freq_from_fid_did+0x44/0x50 [phc_k8]
[   46.682253]  RSP <ffff88018b9a3b28>
But the system boots and the PHC module is not loaded and I cannot see the PHC files :( . The module seems to have a bug which happens on newer CPUs and the code that seems to be causing it is the following.

Code: Select all

static u32 freq_from_fid_did(u32 fid, u32 did)
{
	u32 mhz = 0;

	if (boot_cpu_data.x86 == 0x10)
		mhz = (100 * (fid + 0x10)) >> did;
	else if (boot_cpu_data.x86 == 0x11)
		mhz = (100 * (fid + 8)) >> did;
	else
		BUG(); //[color=#FF0000]This is the line that causes the crash for my CPU.I don't know why the color doesn't change[/color]

	return mhz * 1000;
}
HP Pavilion g7 2269wm

CPU - AMD A8-4500M APU with Radeon(tm) HD Graphics
GPU - Radeon HD 7640G
RAM - 6GB DDR3
HDD - WDC WD5000BPVT-24HXZT1
Display - 17.3 inch LED HD
WiFi - Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe

User avatar
DavidG
Posts: 180
Joined: Fri 18. Jul 2008, 11:25
Contact:

Re: [K10] no phc files in /sys/devices/system/cpu/cpu*/cpufr

Post by DavidG » Sat 6. Aug 2016, 22:13

Thanks for the very thorough report. I have been very busy lately, but I will try to look into it as soon as possible. Your CPU family appears to be 16 (0x10) so that BUG should not be triggered. You could change that line into this to see if that helps:

Code: Select all

   if (boot_cpu_data.x86 == 0x10)
      mhz = (100 * (fid + 0x10)) >> did;
   else if (boot_cpu_data.x86 == 0x11)
      mhz = (100 * (fid + 8)) >> did;
   else
      mhz = (100 * (fid + 0x10)) >> did; // YOLO
Your CPU frequency calculation could be off - I would do no harm though.

I am going to need to update the phc-k8 driver to newer kernels as well, could you help me test it on your hardware when it is ready?
A bank is a place where they lend you an umbrella in fair weather and ask for it back when it begins to rain -- R. Frost

SuiciWD
Posts: 2
Joined: Mon 11. Jul 2016, 07:04

Re: [K10] no phc files in /sys/devices/system/cpu/cpu*/cpufr

Post by SuiciWD » Tue 24. Apr 2018, 17:58

DavidG wrote:
Sat 6. Aug 2016, 22:13
Thanks for the very thorough report. I have been very busy lately, but I will try to look into it as soon as possible. Your CPU family appears to be 16 (0x10) so that BUG should not be triggered. You could change that line into this to see if that helps:

Code: Select all

   if (boot_cpu_data.x86 == 0x10)
      mhz = (100 * (fid + 0x10)) >> did;
   else if (boot_cpu_data.x86 == 0x11)
      mhz = (100 * (fid + 8)) >> did;
   else
      mhz = (100 * (fid + 0x10)) >> did; // YOLO
Your CPU frequency calculation could be off - I would do no harm though.

I am going to need to update the phc-k8 driver to newer kernels as well, could you help me test it on your hardware when it is ready?
Sorry for the extremely late (almost 2 years) reply but I can try to test it

Post Reply