From owner-freebsd-stable@FreeBSD.ORG Tue May 20 10:37:53 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F236BB0; Tue, 20 May 2014 10:37:53 +0000 (UTC) Received: from mail-yh0-x235.google.com (mail-yh0-x235.google.com [IPv6:2607:f8b0:4002:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 256632624; Tue, 20 May 2014 10:37:53 +0000 (UTC) Received: by mail-yh0-f53.google.com with SMTP id i57so176804yha.12 for ; Tue, 20 May 2014 03:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=+aksq5HhX6JZGupQFKZPNjNepDs2jYHCmosFOhTwbKs=; b=0M1I6egXG8WEWgz/gKM0BqB0nsHENuJgOkf2FOLBWFS5RO6Zo7HHJWVUIGjGtWO4+w 5TBfGHDHAy3HPDNxknJQoXoYI4v6j8w56ajKZBq/IvISBJPDtf7Dlsjji/o3ot3s1tmb cACkdoprGphANHGnx2vVq0BlWuCSjjbHRdzWgfUh0vwLW60tJWAzGwHJGGOMpyVRdVH1 iwLbUIHHOldXs8qYx+A5FAAldLQYAkIlQcETyVnCb1/oD+bj6jg5lhy78b8eFe33NlNb wT86bEYVegDEkucoQaU58VHGjvZYV0orEESShz7NZ0AP7QLfx9smYRZP4qQG1KWQZtMf rOzg== MIME-Version: 1.0 X-Received: by 10.236.201.108 with SMTP id a72mr41233671yho.9.1400582272357; Tue, 20 May 2014 03:37:52 -0700 (PDT) Received: by 10.170.154.212 with HTTP; Tue, 20 May 2014 03:37:52 -0700 (PDT) Reply-To: huanghwh@gmail.com In-Reply-To: <537B1DD7.70206@freebsd.org> References: <537A0121.6090102@freebsd.org> <537B1DD7.70206@freebsd.org> Date: Tue, 20 May 2014 18:37:52 +0800 Message-ID: Subject: Re: r266165: powerd hang sytem on MacbookPro 2013 From: Huang Wen Hui To: Stefan Esser , "freebsd-stable@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 10:37:53 -0000 2014-05-20 17:18 GMT+08:00 Stefan Esser : > Am 20.05.2014 08:13, schrieb Huang Wen Hui: > > 2014-05-19 21:03 GMT+08:00, Colin Percival : > >> On 05/18/14 15:43, Adrian Chadd wrote: > >>> On 18 May 2014 08:32, Huang Wen Hui wrote: > >>>> Hi, > >>>> Before r266165, There is no "dev.cpu.0.freq" on my MacbookPro 2013, > now > >>>> I > >>>> got: > >>>> > >>>> #sysctl dev.cpu.0.freq > >>>> dev.cpu.0.freq: 2601 > >>>> > >>>> but If start powerd, system will quickly hang, both keyboard and > >>>> ethernet > >>>> are not respond. > >> > >> Well, the good news is that r266165 is working: It makes that sysctl > >> visible > >> in situations where it used to be (accidentally) inoperative. The bad > news > >> is that you seem to be running into a problem with the now-functional > power > >> management code. > >> > >> I suggest disabling powerd in /etc/rc.conf, and manually adjusting the > >> clock > >> frequency using dev.cpu.0.freq. Does it repeatably die at a certain > point? > >> Does it die immediately at that point, or after some time? Do you > always > >> get the same hang? > > OK, I use sysctl dev.cpu.0.freq=xxxx many times, all freq change cause > > 100% hang, detail: > > freq 1000, 1200, 1500, 1700, 1900, it hangs after some time. > > freq 800, 2100, 2600, it hangs immediately, but not 100%. > > freq 2400, it always hangs immediately, I could not see command sysctl > > return message. > > > > I think I got the same hang, keyboard and ethernet no respond, but no > > panic message. > > While it is not OK, that your system is unstable or crashes > immediately if you try to manually set the core frequency, > these frequency adjustments may not be required on your > system, anyway. > > AFAIR, tests showed that frequency changes do not affect > power consumption as much as higher C states. The reason is, > that the CPU takes a lot less power at a lower frequency > (e.g. 1/4 at half effective clock rate), the other components > have near constant power demand, unless put to sleep. > > The effect of reduced CPU power may thus be over compensated > by keeping RAM and other resources active for a longer time > (since the calculation will take longer). > > Therefore, the advice was to keep the CPU running at nominal > clock rate, but to enable all features that increase idle > power savings. > > The frequencies in your list let me guess, that throttling > is enabled on your notebook. That has just been disabled in > -CURRENT by default, since it causes bad effects (including > crashes) on modern hardware. > > You may want to add the following two lines to your > /boot/loader.conf: > > hint.p4tcc.0.disabled="1" > hint.acpi_throttle.0.disabled="1" > > Regards, STefan > I already disable throttling, this is my /boot/loader.conf: #boot_verbose="YES" boot_single="YES" #kern.msgbufsize=6553600 #Firewire for debug hw.firewire.phydma_enable=1 hw.firewire.dcons_crom.force_console=1 boot_multicons="YES" dcons_gdb=1 # openjdk need it in 10.0-release vm.pmap.pcid_enabled="0" # SSD quickly no respond without this hint.ahci.0.msi=0 #hint.ahcich.0.pm_level=5 #coretemp_load="YES" #if_bge_load="YES" #cuse4bsd_load="YES" cpuctl_load="YES" if_ipheth_load="YES" nvidia_load="YES" sem_load="YES" # save power hint.p4tcc.0.disabled=1 hint.acpi_throttle.0.disabled=1 hw.pci.do_power_nodriver=3 hw.snd.latency=7 # disable ng_ubt and bluetooth # remove ng_ubt.ko in /boot/kernel #disable nvidia audio hint.hdaa.0.nid4.config="as=0" hint.hdaa.0.nid5.config="as=0" hint.hdaa.0.nid6.config="as=0" hint.hdaa.0.nid7.config="as=0" # red light in headphone, but this enable sound output hint.hdaa.1.gpio_config="0=set" # seq=15 misc=1 enable sound output into headdphone hint.hdaa.1.nid16.config="as=2 seq=15 conn=Jack device=Headphones misc=1" #very bad sound quality output, set "as=0" disable it. hint.hdaa.1.nid18.config="as=0 seq=0 conn=Fixed device=Speaker misc=1" #This is good quality speaker. hint.hdaa.1.nid19.config="as=1 seq=2 conn=Fixed device=Speaker misc=1" hint.hdaa.1.nid24.config="as=4 seq=0 device=Mic conn=jack misc=1 " hint.hdaa.1.nid28.config="as=4 seq=1 device=Mic conn=Fixed" hint.hdaa.1.nid33.config="as=3 seq=0 device=SPDIF-out conn=Jack"