From owner-freebsd-mobile@freebsd.org Sat Oct 14 11:36:14 2017 Return-Path: Delivered-To: freebsd-mobile@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5905E45871; Sat, 14 Oct 2017 11:36:14 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 371BA6DBE2; Sat, 14 Oct 2017 11:36:13 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id v9EBa26m035868; Sat, 14 Oct 2017 22:36:02 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sat, 14 Oct 2017 22:36:02 +1100 (EST) From: Ian Smith To: tech-lists cc: freebsd-hardware@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: problems getting AMD C-70 APU working with powerd/cpufreq In-Reply-To: <20171013123721.GA27736@acer.zyxst.net> Message-ID: <20171014215317.K34192@sola.nimnet.asn.au> References: <20171013123721.GA27736@acer.zyxst.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Oct 2017 11:36:14 -0000 On Fri, 13 Oct 2017 13:37:21 +0100, tech-lists wrote: > Hi, > > I have a netbook with amd c-70 cpu and am trying to get powerd > to work with it. Will this chip not work with cpufreq/powerd? Perhaps not. > system: FreeBSD 11.1-STABLE #0 r324342 > > # sysctl debug.cpufreq.verbose=1 > debug.cpufreq.verbose: 0 -> 1 This shows that cpufreq was alreasy loaded. It's in the GENERIC kernel. Have a good browse through cpufreq(4). > # kldload cpufreq > # Hmm, no message. When I do that (albeit verbose boot enabled) on 9.3: kldload: can't load cpufreq: module already loaded or in kernel > # powerd -vv > powerd: no cpufreq(4) support -- aborting: No such file or directory > > # sysctl -a | grep cpu > > kern.smp.cpus: 2 > kern.smp.maxcpus: 256 > kern.ccpu: 0 > 0, 1 > 0 > 1 > kern.sched.cpusetsize: 32 > kern.pin_pcpu_swi: 0 > kern.racct.pcpu_threshold: 1 > cpu HAMMER > kern.vt.splash_cpu_duration: 10 > kern.vt.splash_cpu_style: 2 > kern.vt.splash_ncpu: 0 > kern.vt.splash_cpu: 0 > vfs.ncpurgeminvnodes: 256 > net.inet.tcp.per_cpu_timers: 0 > debug.cpufreq.verbose: 1 > debug.cpufreq.lowest: 0 > debug.acpi.cpu_unordered: 0 > hw.ncpu: 2 > hw.acpi.cpu.cx_lowest: C2 > dev.acpi_perf.1.%parent: cpu1 > dev.acpi_perf.0.%parent: cpu0 These are interesting. In cpufreq(4) you'll see acpi_perf is one of the absolute frequency control drivers, presumably used (see also in dmesg) because the expected driver for AMD processors, powernow, did not attach - though your verbose dmesg shows nothing about any failure/s to attach. > dev.cpu.1.cx_method: C1/hlt C2/io > dev.cpu.1.cx_usage_counters: 237351 1893186 > dev.cpu.1.cx_usage: 11.14% 88.85% last 156us > dev.cpu.1.cx_lowest: C2 At least you're getting plentiful use of C2 state, though I'm not aware how much power saving that might buy you on that AMD CPU. > dev.cpu.1.cx_supported: C1/1/0 C2/2/100 > dev.cpu.1.temperature: 65.6C > dev.cpu.1.%parent: acpi0 > dev.cpu.1.%pnpinfo: _HID=none _UID=0 > dev.cpu.1.%location: handle=\_PR_.C001 > dev.cpu.1.%driver: cpu > dev.cpu.1.%desc: ACPI CPU > dev.cpu.0.cx_method: C1/hlt C2/io > dev.cpu.0.cx_usage_counters: 368369 2358900 > dev.cpu.0.cx_usage: 13.50% 86.49% last 13us > dev.cpu.0.cx_lowest: C2 Ditto. > dev.cpu.0.cx_supported: C1/1/0 C2/2/100 > dev.cpu.0.temperature: 65.6C > dev.cpu.0.%parent: acpi0 > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%location: handle=\_PR_.C000 > dev.cpu.0.%driver: cpu > dev.cpu.0.%desc: ACPI CPU So, there's no dev.cpu.0.freq nor dev.cpu.0.freq_levels - therefore powerd has nothing to work with. Its (misleading?) message doesn't mean cpufreq not loaded, but that the sysctls powerd relies upon don't exist. > cpuid output: > https://www.zyxst.net/txt/amd-c70-netbook/20171011-cpuid-c70.txt > dmidecode output: > https://www.zyxst.net/txt/amd-c70-netbook/20171011-dmidecode-c70.txt > detailed dmesg: > https://www.zyxst.net/txt/amd-c70-netbook/20171011-2.detailed-dmesg.txt Nothing in any of those suggests that this cpu has any other frequency available than 1000MHz, which seems quite bizarre to me. Of course it's possible FreeBSD hasn't been taught to recognise this particular cpu. You haven't disabled anything in $BIOS related to power or freq control? The cpuid output has a heading "Advanced Power Management Feature Flags" near the bottom, but none are shown. Hope someone else has something more useful to offer, and thanks for mailing me those files when my browser was deemed too old for your site. cheers, Ian