Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jun 2014 00:16:12 +0200
From:      Ivan Rokotov <ivan.rokotov.bsd@gmail.com>
To:        =?UTF-8?Q?Jan_Kokem=C3=BCller?= <jan.kokemueller@gmail.com>
Cc:        "freebsd-mobile@freebsd.org" <freebsd-mobile@freebsd.org>
Subject:   Re: Suspend/Resume on Lenovo IdeaPad S400 with FreeBSD 10?
Message-ID:  <CAOTTJKGji61vjYmO0ULGEJq%2BWOrV8geFcK1jat844_9i%2B1LUdg@mail.gmail.com>
In-Reply-To: <53A5FBED.6090106@gmail.com>
References:  <CAOTTJKFPTTbg9GZv1Vvwc%2BRYRQXXYA2pk5Lr%2BZid64gp3b4-9w@mail.gmail.com> <53A54C05.7060403@gmail.com> <CAOTTJKG5fnbEWXdLcFFMi3Qvwo9WjNQJ61vj=_NLYo%2BxKdr_9w@mail.gmail.com> <53A5FBED.6090106@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2014-06-21 23:41 GMT+02:00 Jan Kokem=C3=BCller <jan.kokemueller@gmail.com>:
> I'm putting it before the calls to /usr/bin/logger.
>
> rc.suspend:
> vidcontrol -s 1 < /dev/console
> pkill -STOP X
>
> rc.resume:
> pkill -CONT X
> vidcontrol -s 9 < /dev/console
>
> I'm not sure if the vidcontrol call is needed anymore, but for me it work=
ed
> more reliably than the kern.vt.suspendswitch sysctl last time I checked.

Unfortunately, that doesn't work for me. I tried two combinations
(with unpatched driver of course):

(1) just pkill commands before /usr/bin/logger:
the laptop doesn't suspend at all after closing the lid; after opening
the lid, I got just frozen screen, non-responsive machine and not a
single line in Xorg log;

(2) pkill commands with vidcontrol, kern.vt.suspendswitch set to 0:
the laptop doesn't suspend after closing the lid; after opening, the
screen is switched to console 1; after pressing Alt+F9, I the machine
gets frozen. I found this in the log:

[  2678.788] (II) AIGLX: Suspending AIGLX clients for VT switch
[  2678.788] (WW) intel(0): drmDropMaster failed: Unknown error: -22

Anyway, your original patch works perfectly. After two months and
hundreds of suspends/resumes (sometimes 10-20 without powering down),
it works without a single issue. Thanks for making my life easier. :)

Ivan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOTTJKGji61vjYmO0ULGEJq%2BWOrV8geFcK1jat844_9i%2B1LUdg>