Re: Black Display after suspend/resume on Thinkpad X201 with 8.1/amd64

2010-08-20 Thread David DEMELIER
2010/8/16 Jung-uk Kim :
> On Monday 16 August 2010 06:34 am, David DEMELIER wrote:
>> I enabled device dpms, and vesa stuff in the -CURRENT GENERIC
>> kernel config but for the moment it resumes well (even the screen!)
>> but take a look at the graphic output :
>>
>> http://files.malikania.fr/Photo0176.jpg
>>
>> This is X after resuming. Maybe the graphic card `cache|buffer'
>> should be cleaned.
>>
>> Suspend and resuming works on my laptop now !
>
> I am glad to hear it helped. :-)
>
> X.org framebuffer corruption is a totally different issue.  For
> example, xf86-video-ati saves/restores everything when VT is
> switching (not only 2D frame buffer but also 3D texture buffer and
> some critical GPU registers, etc), which is the behaviour we are
> heavily relying on.  In other words, if X.org driver "owns" the video
> card, we force switching to the first VT (just as we pressed
> CTRL-ALT-F1) so that X.org driver "releases" the video card before we
> suspend console, assuming the current video card state is completely
> saved by X.org driver.  That way, we can just save the console state
> and we don't need to worry about X.org or whatever.  Conversely, when
> we resume, we just restore the console state and switch VT (just as
> we pressed ALT-F9) assuming X.org driver will restore the previous
> state.  If any X.org video drivers don't do it properly, we lose.  I
> guess you may be experiencing this problem.  We may save/restore
> "some" video memory contents but it is not a good idea because we can
> easily clobber X.org driver's idea of current state.
>
> Unfortunately, it is even possible some video drivers may not do it
> any more as Linux people started moving this type of stuff out of
> X.org drivers into Linux kernel and "old school" stuff (e.g., VT
> switching from user land) is no longer maintained well or not
> supported. :-(
>
> Jung-uk Kim
>

By the way, we can suspend with drm now, but resume make Xorg so slow... Sad.

-- 
Demelier David
___
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: Black Display after suspend/resume on Thinkpad X201 with 8.1/amd64

2010-08-16 Thread Jung-uk Kim
On Monday 16 August 2010 06:34 am, David DEMELIER wrote:
> I enabled device dpms, and vesa stuff in the -CURRENT GENERIC
> kernel config but for the moment it resumes well (even the screen!)
> but take a look at the graphic output :
>
> http://files.malikania.fr/Photo0176.jpg
>
> This is X after resuming. Maybe the graphic card `cache|buffer'
> should be cleaned.
>
> Suspend and resuming works on my laptop now !

I am glad to hear it helped. :-)

X.org framebuffer corruption is a totally different issue.  For 
example, xf86-video-ati saves/restores everything when VT is 
switching (not only 2D frame buffer but also 3D texture buffer and 
some critical GPU registers, etc), which is the behaviour we are 
heavily relying on.  In other words, if X.org driver "owns" the video 
card, we force switching to the first VT (just as we pressed 
CTRL-ALT-F1) so that X.org driver "releases" the video card before we 
suspend console, assuming the current video card state is completely 
saved by X.org driver.  That way, we can just save the console state 
and we don't need to worry about X.org or whatever.  Conversely, when 
we resume, we just restore the console state and switch VT (just as 
we pressed ALT-F9) assuming X.org driver will restore the previous 
state.  If any X.org video drivers don't do it properly, we lose.  I 
guess you may be experiencing this problem.  We may save/restore 
"some" video memory contents but it is not a good idea because we can 
easily clobber X.org driver's idea of current state.

Unfortunately, it is even possible some video drivers may not do it 
any more as Linux people started moving this type of stuff out of 
X.org drivers into Linux kernel and "old school" stuff (e.g., VT 
switching from user land) is no longer maintained well or not 
supported. :-(

Jung-uk Kim
___
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: Black Display after suspend/resume on Thinkpad X201 with 8.1/amd64

2010-08-16 Thread David DEMELIER
2010/8/16 David DEMELIER :
> 2010/8/8 Bruce Cran :
>> On Sat, 07 Aug 2010 02:30:13 -0700 (PDT)
>> "geoffrey.ferrari"  wrote:
>>
>>> The current situation is that the machine will suspend using
>>> acpiconf -s 3 and it will also resume. The problem is that the LCD
>>> display does not resume correctly after suspend - instead it just
>>> stays black. I've been randomly tweaking various things, and get
>>> slightly different results. Sometimes the display stays black in the
>>> sense the display is still completely switched off. Othertimes, I
>>> think the display switches on, but nothing is displayed, so that the
>>> display is on but showing nothing except a black background. However,
>>> I can still type blind and e.g. shutdown/restart the machine.
>>
>> I'm having the same problem with a Dell XPS M1530 and 9-CURRENT - the
>> display refuses to switch on after resuming. I've tried
>> hw.acpi.reset_video, switching consoles using vidcontrol and using the
>> acpi_video module: setting the reset_video sysctl causes the machine to
>> reboot during resume, and toggling hw.acpi.video.crt1.active just
>> produces a beep with no change in the LCD status (it works before
>> suspend).
>>
>> http://blog.higherthings.org/borghardt/article/3077.html suggests that
>> on a different XPS machine with Linux the VESA BIOS Extensions shouldn't
>> be saved/restored - is there a way to try disabling that on FreeBSD?
>>
>> --
>> Bruce Cran
>> ___
>> 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"
>>
>
> Hey,
>
> It seems that -CURRENT make my laptop suspend/resume correctly. Before
> when I was resuming, I canno't do anything even shutdown didn't work
> (probably panic) here it seems that the screen still stays black but I
> can shutdown, probably it will works soon :-)
>
> --
> Demelier David
>

I enabled device dpms, and vesa stuff in the -CURRENT GENERIC kernel
config but for the moment it resumes well (even the screen!) but take
a look at the graphic output :

http://files.malikania.fr/Photo0176.jpg

This is X after resuming. Maybe the graphic card `cache|buffer' should
be cleaned.

Suspend and resuming works on my laptop now !

-- 
Demelier David
___
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: Black Display after suspend/resume on Thinkpad X201 with 8.1/amd64

2010-08-16 Thread David DEMELIER
2010/8/8 Bruce Cran :
> On Sat, 07 Aug 2010 02:30:13 -0700 (PDT)
> "geoffrey.ferrari"  wrote:
>
>> The current situation is that the machine will suspend using
>> acpiconf -s 3 and it will also resume. The problem is that the LCD
>> display does not resume correctly after suspend - instead it just
>> stays black. I've been randomly tweaking various things, and get
>> slightly different results. Sometimes the display stays black in the
>> sense the display is still completely switched off. Othertimes, I
>> think the display switches on, but nothing is displayed, so that the
>> display is on but showing nothing except a black background. However,
>> I can still type blind and e.g. shutdown/restart the machine.
>
> I'm having the same problem with a Dell XPS M1530 and 9-CURRENT - the
> display refuses to switch on after resuming. I've tried
> hw.acpi.reset_video, switching consoles using vidcontrol and using the
> acpi_video module: setting the reset_video sysctl causes the machine to
> reboot during resume, and toggling hw.acpi.video.crt1.active just
> produces a beep with no change in the LCD status (it works before
> suspend).
>
> http://blog.higherthings.org/borghardt/article/3077.html suggests that
> on a different XPS machine with Linux the VESA BIOS Extensions shouldn't
> be saved/restored - is there a way to try disabling that on FreeBSD?
>
> --
> Bruce Cran
> ___
> 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"
>

Hey,

It seems that -CURRENT make my laptop suspend/resume correctly. Before
when I was resuming, I canno't do anything even shutdown didn't work
(probably panic) here it seems that the screen still stays black but I
can shutdown, probably it will works soon :-)

-- 
Demelier David
___
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: Black Display after suspend/resume on Thinkpad X201 with 8.1/amd64

2010-08-08 Thread Bruce Cran
On Sat, 07 Aug 2010 02:30:13 -0700 (PDT)
"geoffrey.ferrari"  wrote:

> The current situation is that the machine will suspend using
> acpiconf -s 3 and it will also resume. The problem is that the LCD
> display does not resume correctly after suspend - instead it just
> stays black. I've been randomly tweaking various things, and get
> slightly different results. Sometimes the display stays black in the
> sense the display is still completely switched off. Othertimes, I
> think the display switches on, but nothing is displayed, so that the
> display is on but showing nothing except a black background. However,
> I can still type blind and e.g. shutdown/restart the machine.

I'm having the same problem with a Dell XPS M1530 and 9-CURRENT - the
display refuses to switch on after resuming. I've tried
hw.acpi.reset_video, switching consoles using vidcontrol and using the 
acpi_video module: setting the reset_video sysctl causes the machine to
reboot during resume, and toggling hw.acpi.video.crt1.active just
produces a beep with no change in the LCD status (it works before
suspend).

http://blog.higherthings.org/borghardt/article/3077.html suggests that
on a different XPS machine with Linux the VESA BIOS Extensions shouldn't
be saved/restored - is there a way to try disabling that on FreeBSD?

-- 
Bruce Cran
___
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: Black Display after suspend/resume on Thinkpad X201 with 8.1/amd64

2010-08-07 Thread Brandon Gooch
On Sat, Aug 7, 2010 at 4:30 AM, geoffrey.ferrari
 wrote:
> Dear all,
>
> I'm running FreeBSD 8.1/amd64 on a Thinkpad X201 (Intel Core i5 CPU with
> Intel integrated graphics). Everything works great except that there is a
> problem with the display when resuming after suspend. I was wondering if
> someone could offer some advice on whether it would be possible to get this
> working, and if I could help by providing any relevant information. The
> hardware on this machine is pretty new, but it would be great to get it
> working :-) I started discussing this a while back on the freebsd-mobile
> mailing list, but couldn't find a workable solution. The original discussion
> is here
> http://lists.freebsd.org/pipermail/freebsd-mobile/2010-May/011990.html .
>
> The current situation is that the machine will suspend using acpiconf -s 3
> and it will also resume. The problem is that the LCD display does not resume
> correctly after suspend - instead it just stays black. I've been randomly
> tweaking various things, and get slightly different results. Sometimes the
> display stays black in the sense the display is still completely switched
> off. Othertimes, I think the display switches on, but nothing is displayed,
> so that the display is on but showing nothing except a black background.
> However, I can still type blind and e.g. shutdown/restart the machine.
>
> It may help to know that suspend/resume works perfectly under the latest
> Ubuntu 10.04, without any special configuration. I've also updated this
> machine to the latest BIOS from Lenovo. I've made available a file
> containing the output or contents of /boot/loader.conf, /etc/rc.conf, dmesg,
> devinfo -vr, acpidump -td, and sysctl -a. This file can be downloaded from
> https://files.me.com/geoffrey.ferrari/oqv857 . I hope somebody will be able
> to help! At this stage, I'd be very grateful for any suggestions either on
> how to fix the problem myself, or on how to provide the right information to
> this list to help others to fix it. Right now, it's only suspend/resume
> that's keeping me from using FreeBSD as my work OS on a daily basis.
>
> Incidentally, does anyone know if 9-CURRENT would support my Thinkpad better
> than 8.1?

I recently updated to 9-CURRENT from 8-STABLE on my Lenovo X300.
Suspend/resume was hit-and-miss for a while, but jkim@ has been
working hard on this area, and my notebook, running 9-CURRENT, has
been working very well. The only issues that remain seem to be with
resuming the uhci(4) driver, but I've been able to work around the
issue by building the USB system as modules and kldunloading/loading
the uhci(4) driver.

With the work that jkim@ is doing, and your need for having this
functionality, I think it may be worth a shot to try 9-CURRENT -- you
may be able to provide valuable feedback to the developers in this
regard.

-Brandon
___
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"