Suspend/Resume on Lenovo IdeaPad S400 with FreeBSD 10?

Kevin Oberman rkoberman at gmail.com
Wed Apr 9 06:14:49 UTC 2014


On Tue, Apr 8, 2014 at 5:25 PM, Ivan Rokotov <ivan.rokotov.bsd at gmail.com>wrote:

> 2014-04-09 1:19 GMT+04:00 John Baldwin <jhb at freebsd.org>:
> > Try using vt(4) instead of syscons(4) and kldload'ing i915kms from
> > text mode.  See if you can resume on the console.  That has worked for
> > several ThinkPads, though resume always worked fine for me in X even
> > with syscons(4) when using i915kms.
>
> Hi John,
>
> I tried this system:
> FreeBSD ... 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r263927: Sun Mar 30
> 08:08:04 UTC 2014     root at grind.freebsd.org:/usr/obj/usr/src/sys/VT
> amd64
>
> and the results are as follows:
>
> With
> * hw.vga.textmode=1
> * acpi_video.ko loaded
> * hw.acpi.reset_video=1
> suspend/resume works from console.
>
> With
> * hw.vga.textmode=0
> * acpi_video loaded
> * hw.acpi.reset_video=1
> after resume just backlight turns on. I had to press some key to get
> the picture back. Anyway, it works.
>
> With
> * hw.vga.textmode=0
> * i915kms.ko loaded from console (no X installed at all)
> * acpi_video loaded
> * hw.acpi.reset_video=1
> suspend/resume works, with these log messages:
> info: [drm] Enabling RC6 states: RC6 off, RC6p off, RC6pp off
> error: [drm:pid1361:intel_lvds_enable] *ERROR* timed out waiting for
> panel to power off
> but this is harmless (I hope so).
>
> This is, of course, very promising. However, I wouldn't like to run
> 11-CURRENT on my everyday notebook. So, before I proceed to testing a
> real X environment on 11-CURRENT, may I ask you: will vt(4) compile on
> 10.0-RELEASE? If not, may we expect to see vt(4) in e.g. 10.1, or it
> is an exclusively 11-only feature?
>
>
vt has been MFCed to 10-STABLE, but it is not in 10.0-RELEASE. I believe
that you can pull vt out of the STABLE repo and build in on RELEASE, but
I'd suggest just moving to STABLE. I've been using it on my T320 with no
issues for a couple of months.

If you want to stay with syscon, try removing VESA from your kernel by
adding "nodevice VESA" to your kernel. I also add the following to
/boot/loader.conf:
# ACPI video interface
acpi_video_load="YES"
but I don't know if it is still required. It's been there since v8.1. I
also add:
# Out : speaker + headphones
hint.hdac.0.cad0.nid25.config="as=1 seq=15"
# In : mic + external mic
hint.hdac.0.cad0.nid35.config="as=2"
hint.hdac.0.cad0.nid27.config="as=2 seq=15"
# Minimize the number of interrupts from the sound card
hint.pcm.0.buffersize=65536
hint.pcm.1.buffersize=65536
hw.snd.feeder_buffersize=65536
hw.snd.latency=7
# Reset the pointer (mouse) after a resume
hint.psm.0.flags="0x6000"

I don't touch any sysctls for resume.

These may or may not be of use on the T400. The mouse reset is also quite
old (v7.?) and may no longer be needed.

My system resumes quite reliably, though it always is switched to vty0 on
resume. <ALT>+F9 switches back to X cleanly. Sound also works very well.

Good luck!
-- 
R. Kevin Oberman, Network Engineer, Retired
E-mail: rkoberman at gmail.com


More information about the freebsd-mobile mailing list