Re: suspend/resume on Lenovo X1 (regression from reports on wiki)

2013-09-05 Thread Ganael LAPLANCHE
On Fri, 30 Aug 2013 11:53:22 -0400, John Baldwin wrote

 I just removed VESA from my kernel on an X220 and it now suspends and
 resumes great in X.  I don't notice any slowdown, but I'm using a very
 simple tiling window manager (i3wm).

Great, I can confirm that suspend/resume also works on my X220 with this
trick !

I had once opened a PR for that problem and I had managed to track the
change that, at that time, broke suspend/resume :

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/174504

I don't know how it relates to VESA (the change does not seem to be
related to VESA), but it might help ?

Best regards,

--
Ganael LAPLANCHE ganael.laplan...@martymac.org
http://www.martymac.org | http://contribs.martymac.org
FreeBSD: martymac marty...@freebsd.org, http://www.FreeBSD.org
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: kern/174504: [ACPI] Suspend/resume broken on Lenovo x220

2013-09-05 Thread Ganael LAPLANCHE
The following reply was made to PR kern/174504; it has been noted by GNATS.

From: Ganael LAPLANCHE marty...@freebsd.org
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/174504: [ACPI] Suspend/resume broken on Lenovo x220
Date: Thu,  5 Sep 2013 06:35:39 + (UTC)

 Hi,
 
 Following this message :
 
 http://lists.freebsd.org/pipermail/freebsd-acpi/2013-August/008335.html
 
 I can confirm that removing the VESA option from the kernel enables
 suspend/resume again. I don't know how the change introduced by rev.
 231797 is related to VESA, but it might give a hint.
 
 As removing VESA is only a workaround, I'll leave this PR opened for the
 moment. Feel free to close it if you think it can be.
 
 Best regards,
 
 --
 Ganael LAPLANCHE ganael.laplan...@martymac.org
 http://www.martymac.org | http://contribs.martymac.org
 FreeBSD: martymac marty...@freebsd.org, http://www.FreeBSD.org
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: suspend/resume on Lenovo X1 (regression from reports on wiki)

2013-09-05 Thread Bengt Ahlgren
Ganael LAPLANCHE ganael.laplan...@martymac.org writes:

 On Fri, 30 Aug 2013 11:53:22 -0400, John Baldwin wrote

 I just removed VESA from my kernel on an X220 and it now suspends and
 resumes great in X.  I don't notice any slowdown, but I'm using a very
 simple tiling window manager (i3wm).

 Great, I can confirm that suspend/resume also works on my X220 with this
 trick !

 I had once opened a PR for that problem and I had managed to track the
 change that, at that time, broke suspend/resume :

 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/174504

 I don't know how it relates to VESA (the change does not seem to be
 related to VESA), but it might help ?

I believe this (the PR) is a completely different issue, since you write
resume make the computer hang.  The nooptions VESA fixed wedging of
Intel/KMS graphics _after_ resume.  There have been many other changes
since r231797 (15 feb 2012).

But nice that it works for you too!

Bengt
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: suspend/resume on Lenovo X1 (regression from reports on wiki)

2013-09-05 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2013-09-05 16:04:56 -0400, Bengt Ahlgren wrote:
 Jung-uk Kim j...@freebsd.org writes:
 
 On 2013-09-04 18:47:47 -0400, Jung-uk Kim wrote:
 On 2013-09-04 18:39:07 -0400, Bengt Ahlgren wrote:
 The value of hw.acpi.video.lcd0.brightness changes when the 
 screen brightness keys (Fn+Home/End) are pressed, but
 nothing happens with the screen.  Same goes for changing the
 value with sysctl.  After a fresh boot it works with one
 issue.  The screen brightness level seems to lag behind one
 keypress.  Without acpi_video, screen brightness changes
 without the lag.
 
 hw.acpi.video.lcd0.active is always stuck at 0 - can't
 change with sysctl (regardless if the screen is on after a
 fresh boot, or black after a text console suspend/resume):
 
 [root@bit ~]# sysctl hw.acpi.video.lcd0.active=1 
 hw.acpi.video.lcd0.active: 0 - 0
 
 Again, for my old X40 with non-KMS Xorg intel driver has 
 (curiously, the screen blinks when issuing this sysctl
 command):
 
 [bengta@P142 ~]$ sysctl hw.acpi.video
 hw.acpi.video.lcd0.active: 1 hw.acpi.video.crt0.active: 0
 
 Then, KMS probably breaks acpi_video(4), too. :-(
 
 kib let me know that there is a way to make it work but it was
 not well-integrated to i915kms.ko.  If you are interested in
 fixing it, dev/drm2/i915/intel_opregion.c is the source and you
 can download the specification from here:
 
 https://01.org/linuxgraphics/sites/default/files/documentation/acpi_igd_opregion_spec.pdf

 
 Hmm, scanning that spec, I wonder whether the opregion
 functionality is better placed together with acpi_video, and then
 i915kms makes calls to that instead?

Traditionally, platform-specific code goes to dev/acpi_support.  So,
dev/acpi_support/acpi_intel.c may be created to cater its needs, if it
is absolutely necessary.

 Hmm, again, perhaps the intel platform needs opregion support to
 work properly also without the kms driver.  Could be anexplanation
 for the backlight issues.

Yes and yes, I think.

However, many developers are tired of dealing with syscons ugliness
and now the Foundation is sponsoring ray@ to replace syscons with
newcons+KMS if my understanding is correct.  I am not sure how it will
be layered at the end, though.

 (Just speculation so far...  I have no idea if/how this relates to
 or interacts with options VESA)

Apparently, they interact badly. :-(

Jung-uk Kim
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.21 (FreeBSD)

iQEcBAEBAgAGBQJSKOpXAAoJECXpabHZMqHOSnIIANS/Kt043RI7fFLNYVeWvpH0
zQ8C3wTi66aIW9B5bvYcXcJXcE1yazfegbtAHT6i0Hf4/BrvoMkN3umHIRYMbMv9
ei7WoFDLRIuyGzqgMy7CP3t9byYZolRBuyIt+zELsNU/5zCkgSP3di40TK+oLJ+3
NXhALsLZA37B1S3TYaiLy+U4BylfC3iNhFDlDRrikuYvAym/s5o/Ro0Ea8dyUw4i
CtWDEomCIwjzOuythAl1wlXYeMtZZp+6Fj2Pemhh9COzFXgHiTfhfVySRVt0tBAs
6FKmQnc30ra2clU1o5JJuzwlOsgGH+aztvrdjc4VGr/wGpdmKW6FrNlpcku1VkQ=
=i0JD
-END PGP SIGNATURE-
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: suspend/resume on Lenovo X1 (regression from reports on wiki)

2013-09-05 Thread Bengt Ahlgren
Jung-uk Kim j...@freebsd.org writes:

 On 2013-09-04 18:47:47 -0400, Jung-uk Kim wrote:
 On 2013-09-04 18:39:07 -0400, Bengt Ahlgren wrote:
 The value of hw.acpi.video.lcd0.brightness changes when the
 screen brightness keys (Fn+Home/End) are pressed, but nothing
 happens with the screen.  Same goes for changing the value with
 sysctl.  After a fresh boot it works with one issue.  The screen
 brightness level seems to lag behind one keypress.  Without
 acpi_video, screen brightness changes without the lag.
 
 hw.acpi.video.lcd0.active is always stuck at 0 - can't change
 with sysctl (regardless if the screen is on after a fresh boot,
 or black after a text console suspend/resume):
 
 [root@bit ~]# sysctl hw.acpi.video.lcd0.active=1 
 hw.acpi.video.lcd0.active: 0 - 0
 
 Again, for my old X40 with non-KMS Xorg intel driver has 
 (curiously, the screen blinks when issuing this sysctl command):
 
 [bengta@P142 ~]$ sysctl hw.acpi.video hw.acpi.video.lcd0.active:
 1 hw.acpi.video.crt0.active: 0
 
 Then, KMS probably breaks acpi_video(4), too. :-(

 kib let me know that there is a way to make it work but it was not
 well-integrated to i915kms.ko.  If you are interested in fixing it,
 dev/drm2/i915/intel_opregion.c is the source and you can download the
 specification from here:

 https://01.org/linuxgraphics/sites/default/files/documentation/acpi_igd_opregion_spec.pdf

Hmm, scanning that spec, I wonder whether the opregion functionality is
better placed together with acpi_video, and then i915kms makes calls to
that instead?  Hmm, again, perhaps the intel platform needs opregion
support to work properly also without the kms driver.  Could be an
explanation for the backlight issues.  (Just speculation so far...  I
have no idea if/how this relates to or interacts with options VESA)

Bengt
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: suspend/resume on Lenovo X1 (regression from reports on wiki)

2013-09-05 Thread Jung-uk Kim
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2013-09-05 04:24:58 -0400, Bengt Ahlgren wrote:
 Ganael LAPLANCHE ganael.laplan...@martymac.org writes:
 
 On Fri, 30 Aug 2013 11:53:22 -0400, John Baldwin wrote
 
 I just removed VESA from my kernel on an X220 and it now
 suspends and resumes great in X.  I don't notice any slowdown,
 but I'm using a very simple tiling window manager (i3wm).
 
 Great, I can confirm that suspend/resume also works on my X220
 with this trick !
 
 I had once opened a PR for that problem and I had managed to
 track the change that, at that time, broke suspend/resume :
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/174504
 
 I don't know how it relates to VESA (the change does not seem to
 be related to VESA), but it might help ?
 
 I believe this (the PR) is a completely different issue, since you
 write resume make the computer hang.  The nooptions VESA fixed
 wedging of Intel/KMS graphics _after_ resume.  There have been many
 other changes since r231797 (15 feb 2012).

Correct.  r231797 had an issue but it was quickly fixed, I think, and
it was completely unrelated to VESA.

 But nice that it works for you too!

Unfortunately, many people think that no video == hang because they
cannot see anything on their screen/panel.  Moreover, I realized that
more users are now complaining about suspend/resume problems with
DRM/KMS, which is not directly related to ACPI.

- From lots of responses I gathered from users and developers yesterday,
I can definitely say that i915kms.ko does not cooperatively work with
syscons(4) and acpi_video(4).  Basically, it was not a priority at the
time of porting according to the author.  I am quite sure radeonkms.ko
has similar problems.

FYI...

Jung-uk Kim

* PS: https://wiki.freebsd.org/SuspendResume needs more love, I guess.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.21 (FreeBSD)

iQEcBAEBAgAGBQJSKMadAAoJECXpabHZMqHOvpMH/0RVq4KZCTDZqsxOibrIY9/9
INNEZXsVWP+Y8+BQacXP3x45eUOGVKa2IGiDo/O7Oediqh/DIhWa8pqonzJ474qY
UadV+SQTjQE1EDUcjWmKnAY4OT0dHiN6eAIUv5o+dnFOxb6HupQ2hTGziReQoupS
QE9YgwUVU5yOlGZXFbhq2RHvqT2Bi52dHC1qP2waVOlghNY7PIbYMTwQ4X6S4fGC
Fjgjvx4tUU4EhjWuaK8mH0t/gCsUjpRico7YmYVVb2N5hu9SrojGPsIgGLaD1Aqi
4Nkmd59Asu+NBR0A22c7UAcoRpP2aJ65q/MU8CdRp/FOTE+W2LLlsXy2JIiKCBk=
=Pf+z
-END PGP SIGNATURE-
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org