From owner-freebsd-mobile@FreeBSD.ORG Sun Jul 22 00:28:10 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9012106564A; Sun, 22 Jul 2012 00:28:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE5D8FC1D; Sun, 22 Jul 2012 00:28:10 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so9174058pbb.13 for ; Sat, 21 Jul 2012 17:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=QXJaAXj6LjE9wq8nokFvcdADmmDZdsZ7QCjQEJTeQx8=; b=FnxKd+h1SutGl83rglYQcYmNOTp3hg1JU+WYs+dHeVpoqUXZ21Gb+GIPgolvZjbSLp tixjZaKIvkpOt6UEDqCZgGBk7fD9GR4bv9PfLQY4P+k93UDGPQNxjVuMdCg9fFLT035V TF1CgS1CYReHrFBYqcnWqZyQhahPyrb6NjVmx766Ci47hXAxW889sUIQCs52mvr4/RkG TzzY63uQ/2qTWvqjIxX64Nt9N19whRWIULRDxolv83Mq3AtqvN/O5gawy7OJa3owIGJ7 SU52peo8AoDAVM0I++bICT91YRi3eLKS/y0Sz53C4IC07UyAQVZQy9GFMzSWhtNespZa PIWg== MIME-Version: 1.0 Received: by 10.66.75.162 with SMTP id d2mr21113866paw.59.1342916890143; Sat, 21 Jul 2012 17:28:10 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.191.138 with HTTP; Sat, 21 Jul 2012 17:28:10 -0700 (PDT) In-Reply-To: References: <20120624.022452.67408510.iwasaki@jp.FreeBSD.org> <20120625.225430.106438166.iwasaki@jp.FreeBSD.org> Date: Sat, 21 Jul 2012 17:28:10 -0700 X-Google-Sender-Auth: fydwOvHFpnrXgxRN9UOTCjj7UeY Message-ID: From: Adrian Chadd To: Mitsuru IWASAKI Content-Type: text/plain; charset=ISO-8859-1 Cc: iwasaki@freebsd.org, freebsd-stable@freebsd.org, jkim@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: STABLE/9 SMP ACPI suspend/resume - video mode not being restored X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2012 00:28:10 -0000 Hi! I just tried it. It worked: * resume occured and the video mode was corrupt; * then shortly after it went through all the reattaching, and the video mode was fixed. Why's the video mode starting off corrupted? Adrian From owner-freebsd-mobile@FreeBSD.ORG Mon Jul 23 11:57:20 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A5461065670 for ; Mon, 23 Jul 2012 11:57:20 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id 2EF178FC1B for ; Mon, 23 Jul 2012 11:57:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at BSDLabs AB Message-ID: <500D3C17.7030605@intersonic.se> Date: Mon, 23 Jul 2012 13:57:11 +0200 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120706 Thunderbird/13.0.1 MIME-Version: 1.0 To: mobile@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: ibm-fancontrol.pl X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2012 11:57:20 -0000 Hi, Does anyone happen to have this perl script at hand? I seem to have lost it and it was doing a good job holding temperature at bay for my X61. For some reason Google refuses to tell me where it hides... Thanks, From owner-freebsd-mobile@FreeBSD.ORG Mon Jul 23 16:03:56 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C51F106564A for ; Mon, 23 Jul 2012 16:03:56 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id 3AB408FC0A for ; Mon, 23 Jul 2012 16:03:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at BSDLabs AB Message-ID: <500D75E9.40508@intersonic.se> Date: Mon, 23 Jul 2012 18:03:53 +0200 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120706 Thunderbird/13.0.1 MIME-Version: 1.0 To: mobile@freebsd.org References: <500D3C17.7030605@intersonic.se> In-Reply-To: <500D3C17.7030605@intersonic.se> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: ibm-fancontrol.pl X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2012 16:03:56 -0000 On 2012-07-23 13:57, Per olof Ljungmark wrote: > Hi, > > Does anyone happen to have this perl script at hand? I seem to have lost > it and it was doing a good job holding temperature at bay for my X61. > > For some reason Google refuses to tell me where it hides... Never mind, found a backup. Sorry for the noise. From owner-freebsd-mobile@FreeBSD.ORG Mon Jul 23 18:47:54 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5CA01065679 for ; Mon, 23 Jul 2012 18:47:54 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 465278FC14 for ; Mon, 23 Jul 2012 18:47:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id q6NIlplE097412; Tue, 24 Jul 2012 04:47:52 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 24 Jul 2012 04:47:51 +1000 (EST) From: Ian Smith To: Per olof Ljungmark In-Reply-To: <500D75E9.40508@intersonic.se> Message-ID: <20120724043406.U37097@sola.nimnet.asn.au> References: <500D3C17.7030605@intersonic.se> <500D75E9.40508@intersonic.se> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: mobile@freebsd.org Subject: Re: ibm-fancontrol.pl X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2012 18:47:55 -0000 On Mon, 23 Jul 2012 18:03:53 +0200, Per olof Ljungmark wrote: > On 2012-07-23 13:57, Per olof Ljungmark wrote: > > Hi, > > > > Does anyone happen to have this perl script at hand? I seem to have lost > > it and it was doing a good job holding temperature at bay for my X61. > > > > For some reason Google refuses to tell me where it hides... > > Never mind, found a backup. Sorry for the noise. Not at all .. care to share? :) I've been running a bespoke sh script for fan control on my T23 since November to good effect, but that was easy with only a two speed fan. I'd like to generalise it for N speeds .. yours might include clues :) cheers, Ian From owner-freebsd-mobile@FreeBSD.ORG Mon Jul 23 19:26:12 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 324D9106566B for ; Mon, 23 Jul 2012 19:26:12 +0000 (UTC) (envelope-from peo@intersonic.se) Received: from neonpark.inter-sonic.com (neonpark.inter-sonic.com [212.247.8.98]) by mx1.freebsd.org (Postfix) with ESMTP id 869828FC0C for ; Mon, 23 Jul 2012 19:26:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at BSDLabs AB Message-ID: <500DA54D.4040308@intersonic.se> Date: Mon, 23 Jul 2012 21:26:05 +0200 From: Per olof Ljungmark Organization: Intersonic AB User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120525 Thunderbird/12.0.1 MIME-Version: 1.0 To: Ian Smith References: <500D3C17.7030605@intersonic.se> <500D75E9.40508@intersonic.se> <20120724043406.U37097@sola.nimnet.asn.au> In-Reply-To: <20120724043406.U37097@sola.nimnet.asn.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mobile@freebsd.org Subject: Re: ibm-fancontrol.pl X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2012 19:26:12 -0000 On 07/23/12 20:47, Ian Smith wrote: > On Mon, 23 Jul 2012 18:03:53 +0200, Per olof Ljungmark wrote: > > On 2012-07-23 13:57, Per olof Ljungmark wrote: > > > Hi, > > > > > > Does anyone happen to have this perl script at hand? I seem to have lost > > > it and it was doing a good job holding temperature at bay for my X61. > > > > > > For some reason Google refuses to tell me where it hides... > > > > Never mind, found a backup. Sorry for the noise. > > Not at all .. care to share? :) > > I've been running a bespoke sh script for fan control on my T23 since > November to good effect, but that was easy with only a two speed fan. > I'd like to generalise it for N speeds .. yours might include clues :) > Well, it's not mine and the file has no references to the author, perhaps he/she is on this list? It only requires p5-Proc-Daemon. I've been using it for older T's and X's with good results, never overheats and seems to do a good balance between performance and temperature. Cheeers, --------------- cut here ----------------- #!/usr/bin/perl ############### WARNING ############### # This script takes control of the fan # in your laptop. It works perfectly on # my laptop, but could ruin your laptop! ############### WARNING ############### use strict; use warnings; use diagnostics; use Proc::Daemon; my %curr_temps; my $lowest_cpu_temp = 52; my $highest_cpu_temp = 83; my $cpu_freq_down_time; # my $daemon_pidfile = "/tmp/ibm_fancontrol_fbsd.pid"; my $daemonize = "1"; my $daemondebug = "1"; # # Set powerd_level to 0 if you do not want to run powerd my $powerd_level = 69; my $powerd_pidfile = "/var/run/powerd.pid"; my %sensors = ( "1", "CPU", "2", "Mini PCI Module", "3", "HDD", "4", "GPU", "5", "Built-in battery", "6", "UltraBay battery", "7", "Built-in battery", "8", "UltraBay battery"); my %cpu_temp_fan_levels = ( "52", "1", "53", "1", "54", "1", "55", "2", "56", "2", "57", "2", "58", "3", "59", "3", "60", "3", "61", "4", "62", "4", "63", "4", "64", "5", "65", "5", "66", "5", "67", "6", "68", "6", "69", "6", "70", "7", "71", "7", "72", "7"); sub gettemps { my @temps = split(" ", qx(/sbin/sysctl dev.acpi_ibm.0.thermal)); my $counter = 0; foreach my $temp (@temps) { if ($sensors{$counter}) { $curr_temps{$counter} = $temp; # print "T: $sensors{$counter} - $temp\n"; } $counter++; } } sub powerd_check { if ( -f $powerd_pidfile ) { open(FILE,"$powerd_pidfile") or die "can not open file $powerd_pidfile"; my $powerd_pid=; close(FILE); my $pid_check = system("/bin/ps -p $powerd_pid >/dev/null"); if ( $pid_check == 0 ) { return($powerd_pid); } else { return(0); } } else { return(0); } } sub cpufreq { my $action = shift; my %freqlevels; my $freqlevel; my @cpu_freq = split(" ", qx(/sbin/sysctl dev.cpu.0.freq)); my @cpu_freq_levels = split(" ", qx(/sbin/sysctl dev.cpu.0.freq_levels)); my $freq_nr = 0; foreach my $freq_level (@cpu_freq_levels) { my @freq = split("/", $freq_level); next if ($freq[0] !~ m/^\d+/); if ($freq[0] eq $cpu_freq[1]) { $freqlevel = $freq_nr; } $freqlevels{$freq_nr} = $freq[0]; $freq_nr++; } if ($action eq "higher") { if ($freqlevel ne 0) { $freqlevel--; } return($freqlevels{$freqlevel}); } else { $freqlevel++; return($freqlevels{$freqlevel}); } } ### MAIN PROGRAM ### if ( $daemonize == "1" ) { print "$0: Switching to daemon mode\n"; Proc::Daemon::Init; if ( $daemondebug == 1 ) { my $logfile = "/tmp/debug.log"; open(STDOUT, ">>$logfile") or die "Failed to re-open STDOUT to $logfile"; open(STDERR, ">&STDOUT") or die "Failed to re-open STDERR to STDOUT"; } my $pid = $$; if($pid) { open PIDFILE, ">$daemon_pidfile" or die "$0: can't write to $daemon_pidfile: $!\n"; print PIDFILE "$pid\n"; close(PIDFILE); } while(1) { BeDaemon(); } } else { print "$0: Running in foreground (debug) mode\n"; BeDaemon(); } sub BeDaemon { while(1) { gettemps(); for my $nr (sort keys %curr_temps) { if ( $nr == 1 ) { print "CPU: $nr: $curr_temps{$nr} - $sensors{$nr}\n"; if ( $curr_temps{$nr} <= $powerd_level ) { if ( $powerd_level != 0 ) { # powerd is allowed at this temp # Check if it is allready running else start it my $powerd_pid = powerd_check(); if ( $powerd_pid == 0 ) { print "Starting powerd\n"; system("/usr/sbin/powerd -a adaptive -b adaptive -n adaptive"); } } } if ( $curr_temps{$nr} < $lowest_cpu_temp ) { # Stop the fan system("/sbin/sysctl dev.acpi_ibm.0.fan=0"); system("/sbin/sysctl dev.acpi_ibm.0.fan_level=0"); } elsif ( $curr_temps{$nr} > $highest_cpu_temp ) { # Hot # Run fan at the highest level and slow down the cpu!! system("/sbin/sysctl dev.acpi_ibm.0.fan=0"); system("/sbin/sysctl dev.acpi_ibm.0.fan_level=7"); # We have to stop powerd at this level my $powerd_pid = powerd_check(); if ( $powerd_pid > 0 ) { print "Killing powerd\n"; system("kill $powerd_pid"); } my $new_cpu_freq = cpufreq("lower"); system("/sbin/sysctl dev.cpu.0.freq=$new_cpu_freq"); sleep(10); $cpu_freq_down_time = time(); } else { # We need to change the speed of the fan. # If it's higher than the current value, than # we will not change it to a lower value the next # 30 seconds my @dummy_one = split(" ", qx(/sbin/sysctl dev.acpi_ibm.0.fan_level)); my $fan_level = $dummy_one[1]; if ( $fan_level < $cpu_temp_fan_levels{$curr_temps{$nr}} ) { system("/sbin/sysctl dev.acpi_ibm.0.fan=0"); system("/sbin/sysctl dev.acpi_ibm.0.fan_level=$cpu_temp_fan_levels{$curr_temps{$nr}}"); ### sleep(30); } elsif ( $fan_level > $cpu_temp_fan_levels{$curr_temps{$nr}} ) { system("/sbin/sysctl dev.acpi_ibm.0.fan=0"); system("/sbin/sysctl dev.acpi_ibm.0.fan_level=$cpu_temp_fan_levels{$curr_temps{$nr}}"); my $curr_time = time(); $cpu_freq_down_time = 0 if (! $cpu_freq_down_time); my $time_diff = ($curr_time - $cpu_freq_down_time); if ($time_diff > 60 ) { my $new_cpu_freq = cpufreq("higher"); system("/sbin/sysctl dev.cpu.0.freq=$new_cpu_freq"); sleep(10); } } } } } print "===================================================================================\n"; sleep(1); } } ---------- cut here ---------------- From owner-freebsd-mobile@FreeBSD.ORG Tue Jul 24 17:51:40 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2AC210656EE for ; Tue, 24 Jul 2012 17:51:40 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 45B138FC15 for ; Tue, 24 Jul 2012 17:51:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id q6OHpVvx045875; Wed, 25 Jul 2012 03:51:32 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 25 Jul 2012 03:51:31 +1000 (EST) From: Ian Smith To: Per olof Ljungmark In-Reply-To: <500DA54D.4040308@intersonic.se> Message-ID: <20120725015831.X37097@sola.nimnet.asn.au> References: <500D3C17.7030605@intersonic.se> <500D75E9.40508@intersonic.se> <20120724043406.U37097@sola.nimnet.asn.au> <500DA54D.4040308@intersonic.se> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: mobile@freebsd.org Subject: Re: ibm-fancontrol.pl X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2012 17:51:40 -0000 On Mon, 23 Jul 2012 21:26:05 +0200, Per olof Ljungmark wrote: > On 07/23/12 20:47, Ian Smith wrote: > > On Mon, 23 Jul 2012 18:03:53 +0200, Per olof Ljungmark wrote: > > > On 2012-07-23 13:57, Per olof Ljungmark wrote: > > > > For some reason Google refuses to tell me where it hides... There's one hit now for "ibm-fancontrol.pl" .. your message :) Without the quotes shows some interesting stuff, but nothing FreeBSD-specific. Such as: http://www.thinkwiki.org/wiki/How_to_control_fan_speed > > I'd like to generalise it for N speeds .. yours might include clues :) > > Well, it's not mine and the file has no references to the author, perhaps > he/she is on this list? Or once was? A mystery. I don't recall having seen this one before. > It only requires p5-Proc-Daemon. > > I've been using it for older T's and X's with good results, never overheats > and seems to do a good balance between performance and temperature. It's a lot more heavy duty, starting and stopping powerd and controlling CPU freq directly too. I like the direct mapping of temperatures to fan speeds, though my normal operating range at idle is 44-48C, while on full fan there's nothing I can run to get my T23 over ~80C in summer, ~65C winter (ie now :) so I wasn't looking at powerd interaction too. FWIW, my little script lives at http://smithi.id.au/temp_t23 > --------------- cut here ----------------- Thanks, Ian From owner-freebsd-mobile@FreeBSD.ORG Fri Jul 27 00:09:57 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BB23106564A for ; Fri, 27 Jul 2012 00:09:57 +0000 (UTC) (envelope-from mason@blisses.org) Received: from phlegethon.blisses.org (phlegethon.blisses.org [50.56.97.101]) by mx1.freebsd.org (Postfix) with ESMTP id 99CD78FC12 for ; Fri, 27 Jul 2012 00:09:56 +0000 (UTC) Received: from blisses.org (cocytus.blisses.org [23.25.209.73]) by phlegethon.blisses.org (Postfix) with ESMTPSA id 37A7E14893F for ; Thu, 26 Jul 2012 20:09:56 -0400 (EDT) Date: Thu, 26 Jul 2012 20:09:54 -0400 From: Mason Loring Bliss To: freebsd-mobile@freebsd.org Message-ID: <20120727000954.GC1616@blisses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: suspend to disk? X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2012 00:09:57 -0000 Apologies if this is a FAQ, but I haven't found an answer yet. I'm wondering if some sort of hardware-agnostic suspend-to-disk is in the works for FreeBSD. I see this: http://wiki.freebsd.org/IdeasPage#Suspend_to_disk ...but I'm far away from having the familiarity/experience to attempt it myself. I'm curious if any kernel hackers are actively pursuing it. -- Mason Loring Bliss mason@blisses.org http://blisses.org/ "I am a brother of jackals, and a companion of ostriches." (Job 30 : 29)