Re: Suspend/Resume on Thinkpad x40

2009-08-22 Thread Joe Snikeris
On Fri, Aug 21, 2009 at 11:53 PM, Ian Smith wrote:
> On Fri, 21 Aug 2009, Joe Snikeris wrote:
>  > On Thu, Aug 20, 2009 at 10:58 PM, Ian Smith wrote:
>  > > On Thu, 20 Aug 2009 14:03:29 -0500 Joe Snikeris  
> wrote:
>  > >
>  > >  > First off, I apologize if this is not the right forum for this
>  > >  > question.  I was torn between posting this in mobile, ACPI, X11 and
>  > >  > here.  If I might get a better response in one of those forums, please
>  > >  > let me know and I'll post there instead.
>  > >
>  > > I suspect -mobile might be the best list for this one, perhaps -acpi
>  > > but that's usually more about development than usage.  You might try
>  > > searching the archives of either for mention of the X40.
>  > >
>  > >  > I'm having some trouble getting the kinks worked out of the
>  > >  > suspend/resume functionality on my laptop, an IBM Thinkpad X40.  It is
>  > >  > mostly working now, but I am still experiencing some strange behavior.
>  > >  >  I can suspend and resume from a console just fine (except for the
>  > >  > fact that the console comes up blank and only displays new
>  > >  > characters); however, suspending and resuming in X is problematic.
>  > >  >
>  > >  > The first suspend and resume in X works perfectly, but the next time I
>  > >  > hit suspend, the machine locks up while still displaying whatever I
>  > >  > was doing in X.  Note that if I switch to a virtual terminal before
>  > >  > hitting suspend, this problem does not occur.  Does anyone have any
>  > >  > suggestions on what I might do to get this resolved?  The details of
>  > >  > my machine follows; please let me know if any additional information
>  > >  > would be helpful.
>  > >
>  > > My T23 requires hw.syscons.sc_no_suspend_vtswitch=1 to suspend/resume
>  > > cleanly (7.0), so does my old Compaq Armada (but that's APM, not ACPI)
>  >
>  > Thanks Ian.  This fixed the problem where suspend would hang the
>  > second time it was executed in X.
>
> Good to know another model that this works on, for the archives.
>
>  > At any rate, I gave up on ACPI.  I've got suspend-to-ram and
>  > suspend-to-disk (hibernation) working perfectly using APM.
>  >
>  > Does anyone know if there are any disadvantages related to
>  > power-saving features when using APM over ACPI?  Is powerd able to do
>  > its job just as well?
>
> The answer to that (at 5.5-STABLE) used to be 'no', but there is some
> APM code in powerd.c, related to how it determines the AC line state,
> though it's not clear to me if it would require compiling APM in kernel.
>
> Certainly /etc/rc.d/power_profile can't set CPU CX states without ACPI.

Ok.  Just did a search to find out what CPU CX states were.  For a
good explanation of the CX states:

http://lists.freebsd.org/pipermail/freebsd-current/2009-May/006436.html


>
> Switching speeds relies on the dev.cpu.0.freq and dev.cpu.0.freq_levels
> sysctls - are these available when you're running on APM?  If so, try
> running powerd(8) in verbose foreground mode (-v) and see what happens.

Yes they are.  And powerd in verbose foreground mode shows that it is
lowering the frequency all the way down to 75 MHz depending on the
load.  Cool.

Thanks again, Ian.

Take care,
Joe
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Suspend/Resume on Thinkpad x40

2009-08-21 Thread Joe Snikeris
On Thu, Aug 20, 2009 at 10:58 PM, Ian Smith wrote:
> On Thu, 20 Aug 2009 14:03:29 -0500 Joe Snikeris  wrote:
>
>  > First off, I apologize if this is not the right forum for this
>  > question.  I was torn between posting this in mobile, ACPI, X11 and
>  > here.  If I might get a better response in one of those forums, please
>  > let me know and I'll post there instead.
>
> I suspect -mobile might be the best list for this one, perhaps -acpi
> but that's usually more about development than usage.  You might try
> searching the archives of either for mention of the X40.
>
>  > I'm having some trouble getting the kinks worked out of the
>  > suspend/resume functionality on my laptop, an IBM Thinkpad X40.  It is
>  > mostly working now, but I am still experiencing some strange behavior.
>  >  I can suspend and resume from a console just fine (except for the
>  > fact that the console comes up blank and only displays new
>  > characters); however, suspending and resuming in X is problematic.
>  >
>  > The first suspend and resume in X works perfectly, but the next time I
>  > hit suspend, the machine locks up while still displaying whatever I
>  > was doing in X.  Note that if I switch to a virtual terminal before
>  > hitting suspend, this problem does not occur.  Does anyone have any
>  > suggestions on what I might do to get this resolved?  The details of
>  > my machine follows; please let me know if any additional information
>  > would be helpful.
>
> My T23 requires hw.syscons.sc_no_suspend_vtswitch=1 to suspend/resume
> cleanly (7.0), so does my old Compaq Armada (but that's APM, not ACPI)

Thanks Ian.  This fixed the problem where suspend would hang the
second time it was executed in X.

At any rate, I gave up on ACPI.  I've got suspend-to-ram and
suspend-to-disk (hibernation) working perfectly using APM.

Does anyone know if there are any disadvantages related to
power-saving features when using APM over ACPI?  Is powerd able to do
its job just as well?

>
>  > > uname -a
>  > FreeBSD sussman.snikeris.com 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0:
>  > Wed Jun 24 00:57:44 UTC 2009
>  > r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>  >
>  > > cat /boot/loader.conf
>  > # Disable boot menu
>  > beastie_disable="YES"
>  > autoboot_delay=-1
>  >
>  > # Needed for firefox to display certain HTML5 elements
>  > sem_load="YES"
>  >
>  > # Needed so we can resume from suspend w/ a working display.
>  > hw.acpi.reset_video=1
>  > # Needed so mouse will work on resume
>  > hint.psm.0.flags="0x3000"
>  >
>  > # Possibly needed for successful resume
>  > hint.apic.0.disabled=1
>
> That might be one to try either way, with other combinations.
>
>  > # Needed for sound
>  > snd_ich_load="YES"
>  >
>  > # Needed for wireless (iwi)
>  > if_iwi_load="YES"
>  > wlan_load="YES"
>  > firmware_load="YES"
>  > iwi_bss_load="YES"
>  > iwi_ibss_load="YES"
>  > iwi_monitor_load="YES"
>  > legal.intel_iwi.license_ack=1
>  >
>  > # Needed for 3d graphics acceleration
>  > agp_load="YES"
>  >
>  > # Needed for cdrecord to work
>  > atapicam_load="YES"
>  >
>  > # See 'man acpi_ibm'
>  > acpi_ibm_load="YES"
>
> I've found that vesa_load="YES" helps on my T23 especially if suspending
> from a VT rather than in X, referring to your 'console comes up blank.'
> Something to try anyway, and I don't think it ever hurts.
>
>  > > cat /etc/rc.conf
>  > # -- sysinstall generated deltas -- # Sat Jul  4 11:10:49 2009
>  > # Created: Sat Jul  4 11:10:49 2009
>  > # Enable network daemons for user convenience.
>  > # Please make all changes to this file, not to /etc/defaults/rc.conf.
>  > # This file now contains just the overrides from /etc/defaults/rc.conf.
>  >
>  > # Set by sysinstall
>  > hostname="sussman.snikeris.com"
>  > #ifconfig_em0="DHCP"
>  > linux_enable="YES"
>  > moused_enable="YES"
>  >
>  > # Allow X to locate mouse and keyboard automatically using HAL
>  > hald_enable="YES"
>  > dbus_enable="YES"
>  >
>  > keyrate="fast"
>  > keybell="off"
>  >
>  > > cat /etc/sysctl.conf
>  > # $FreeBSD: src/etc/sysctl.conf,v 1.8.32.1 2009/04/15 03:14:26 kensmith 
> Exp $
>  > #
>  > #  This file is read when going to multi-user and its contents piped thru
>  > #  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
>  > #
>  >
>  > # Uncomment this to prevent users from seeing information about processes 
> that
>  > # are being run under another UID.
>  > #security.bsd.see_other_uids=0
>  >
>  > hw.acpi.standby_state=S0
>  > hw.acpi.suspend_state=S3
>  > hw.acpi.sleep_button_state=S3
>  > vfs.usermount=1
>  > hw.acpi.sleep_delay=3
>
> If hw.syscons.sc_no_suspend_vtswitch=1 is no help, I'd try -mobile ..
>
> cheers, Ian
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Suspend/Resume on Thinkpad x40

2009-08-20 Thread Joe Snikeris
Hi all,

First off, I apologize if this is not the right forum for this
question.  I was torn between posting this in mobile, ACPI, X11 and
here.  If I might get a better response in one of those forums, please
let me know and I'll post there instead.

I'm having some trouble getting the kinks worked out of the
suspend/resume functionality on my laptop, an IBM Thinkpad X40.  It is
mostly working now, but I am still experiencing some strange behavior.
 I can suspend and resume from a console just fine (except for the
fact that the console comes up blank and only displays new
characters); however, suspending and resuming in X is problematic.

The first suspend and resume in X works perfectly, but the next time I
hit suspend, the machine locks up while still displaying whatever I
was doing in X.  Note that if I switch to a virtual terminal before
hitting suspend, this problem does not occur.  Does anyone have any
suggestions on what I might do to get this resolved?  The details of
my machine follows; please let me know if any additional information
would be helpful.

> uname -a
FreeBSD sussman.snikeris.com 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0:
Wed Jun 24 00:57:44 UTC 2009
r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

> cat /boot/loader.conf
# Disable boot menu
beastie_disable="YES"
autoboot_delay=-1

# Needed for firefox to display certain HTML5 elements
sem_load="YES"

# Needed so we can resume from suspend w/ a working display.
hw.acpi.reset_video=1
# Needed so mouse will work on resume
hint.psm.0.flags="0x3000"

# Possibly needed for successful resume
hint.apic.0.disabled=1

# Needed for sound
snd_ich_load="YES"

# Needed for wireless (iwi)
if_iwi_load="YES"
wlan_load="YES"
firmware_load="YES"
iwi_bss_load="YES"
iwi_ibss_load="YES"
iwi_monitor_load="YES"
legal.intel_iwi.license_ack=1

# Needed for 3d graphics acceleration
agp_load="YES"

# Needed for cdrecord to work
atapicam_load="YES"

# See 'man acpi_ibm'
acpi_ibm_load="YES"

> cat /etc/rc.conf
# -- sysinstall generated deltas -- # Sat Jul  4 11:10:49 2009
# Created: Sat Jul  4 11:10:49 2009
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.

# Set by sysinstall
hostname="sussman.snikeris.com"
#ifconfig_em0="DHCP"
linux_enable="YES"
moused_enable="YES"

# Allow X to locate mouse and keyboard automatically using HAL
hald_enable="YES"
dbus_enable="YES"

keyrate="fast"
keybell="off"

> cat /etc/sysctl.conf
# $FreeBSD: src/etc/sysctl.conf,v 1.8.32.1 2009/04/15 03:14:26 kensmith Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0

hw.acpi.standby_state=S0
hw.acpi.suspend_state=S3
hw.acpi.sleep_button_state=S3
vfs.usermount=1
hw.acpi.sleep_delay=3
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Clearing ttyv0 after boot

2009-07-18 Thread Joe Snikeris
On Sat, Jul 18, 2009 at 12:56 AM, Mel
Flynn wrote:
> On Friday 17 July 2009 18:11:56 Joe Snikeris wrote:
>
>> As the subject suggests, I'd like to clear ttyv0 immediately after
>> booting so that it looks exactly like the other ttys.  I suspect I
>> might have to add a local rc script, but I'm fairly new to FreeBSD and
>> am not sure if this is the correct way to go.
>>
>> Does anyone have any pointers?
>
> This recently came up on this list:
> <http://www.freebsd.org/cgi/getmsg.cgi?fetch=83142+0+/usr/local/www/db/text/2009/freebsd-questions/20090510.freebsd-questions>

Thanks for the pointer to that thread.

'clear > /etc/issue' did it for me.

>
> To do this during at the end of rc stage take hints from
> /etc/rc.d/syscons, the rc(8) manpage and rcorder(8) about when to launch
> this script. Ideally you want to REQUIRE what the last script reported
> by rcorder PROVIDEs and possibly delay execution a bit (see
> /etc/rc.d/bgfsck for an example of that), since you can't really hook
> into the "login prompt is now displayed" event.
>
> Also, if you want the console to stay the same, you will need to
> configure /etc/syslog.conf and change the line that sends to /dev/console
> to send it to /var/log/console.log. newsyslog.conf(5) is already
> configured to rotate that log.
> --
> Mel
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Clearing ttyv0 after boot

2009-07-17 Thread Joe Snikeris
Hi all,

As the subject suggests, I'd like to clear ttyv0 immediately after
booting so that it looks exactly like the other ttys.  I suspect I
might have to add a local rc script, but I'm fairly new to FreeBSD and
am not sure if this is the correct way to go.

Does anyone have any pointers?

Thanks in advance,
Joe
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"