public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* vbetool on pure AMD64 system
@ 2005-11-09 22:42 Frank
       [not found] ` <200511092342.40477.hugelmopf-S0/GAf8tV78@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Frank @ 2005-11-09 22:42 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hey guys,

due to your work in new kernels, my AMD64-laptop now resumes after an ACPI S3 
suspend (I can type commands and they get executed) :-). Thanks a lot.

But the LCD stays black. So I read about the various options to reinitialize 
the VGA, which were:
1. kernel boot options: acpi=s3_sleep, acpi=s3_mode, pci=routeirq. I tried 
each one of them, LCD still stays black.
2. Using the vbetool to save/restore the state of the VGA.

Here is the problem: I didn't find an AMD64 version of vbetool (using Debian 
testing AMD64), so I forced the i386 package and manually met its 32bit 
dependencies. It does run, and the "vgastate off" option does disable the 
LCD. But saving and restoring the state, I get the following error:

# vbetool vbestate save > /tmp/save
Can't get video state buffer size (vm86 failure)
Get video state buffer size failed
Can't save video state (vm86 failure)
Save video state failed

So I guess, there is some reason, that this program does not work on 64bit 
machines. Is there a workaround or any other idea, how I can get my display 
back alive?

Thanks,
Frank


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbetool on pure AMD64 system
       [not found] ` <200511092342.40477.hugelmopf-S0/GAf8tV78@public.gmane.org>
@ 2005-11-10 16:07   ` Matthew Garrett
  2005-11-11 10:33   ` Pavel Machek
  2005-11-12 11:02   ` Erik Slagter
  2 siblings, 0 replies; 8+ messages in thread
From: Matthew Garrett @ 2005-11-10 16:07 UTC (permalink / raw)
  To: Frank; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Wed, Nov 09, 2005 at 11:42:39PM +0100, Frank wrote:

> Here is the problem: I didn't find an AMD64 version of vbetool (using Debian 
> testing AMD64), so I forced the i386 package and manually met its 32bit 
> dependencies. It does run, and the "vgastate off" option does disable the 
> LCD. But saving and restoring the state, I get the following error:

If you're running a 64-bit kernel, you can't make vm86 calls. At the 
moment, vbetool requires that. I'm looking at porting it to use x86emu 
on non-x86 systems, but haven't been able to get it to work properly 
yet.

There's a video_post program that should also be mentioned in the docs. 
It uses x86emu, but I'm not convinced that it's entirely correct. 
Implementing the same functionality in vbetool shows different 
interrupts being called in lrmi mode and x86emu mode.
-- 
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbetool on pure AMD64 system
       [not found] ` <200511092342.40477.hugelmopf-S0/GAf8tV78@public.gmane.org>
  2005-11-10 16:07   ` Matthew Garrett
@ 2005-11-11 10:33   ` Pavel Machek
       [not found]     ` <20051111103315.GB27805-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  2005-11-12 11:02   ` Erik Slagter
  2 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2005-11-11 10:33 UTC (permalink / raw)
  To: Frank; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> due to your work in new kernels, my AMD64-laptop now resumes after an ACPI S3 
> suspend (I can type commands and they get executed) :-). Thanks a lot.
> 
> But the LCD stays black. So I read about the various options to reinitialize 
> the VGA, which were:
> 1. kernel boot options: acpi=s3_sleep, acpi=s3_mode, pci=routeirq. I tried 
> each one of them, LCD still stays black.
> 2. Using the vbetool to save/restore the state of the VGA.
> 
> Here is the problem: I didn't find an AMD64 version of vbetool (using Debian 
> testing AMD64), so I forced the i386 package and manually met its 32bit 
> dependencies. It does run, and the "vgastate off" option does disable the 
> LCD. But saving and restoring the state, I get the following error:
> 
> # vbetool vbestate save > /tmp/save
> Can't get video state buffer size (vm86 failure)
> Get video state buffer size failed
> Can't save video state (vm86 failure)
> Save video state failed

vm86 is unsupported on x86-64. Something like qemu will be required
:-(.
								Pavel
-- 
Thanks, Sharp!


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbetool on pure AMD64 system
       [not found] ` <200511092342.40477.hugelmopf-S0/GAf8tV78@public.gmane.org>
  2005-11-10 16:07   ` Matthew Garrett
  2005-11-11 10:33   ` Pavel Machek
@ 2005-11-12 11:02   ` Erik Slagter
       [not found]     ` <1131793377.5267.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2 siblings, 1 reply; 8+ messages in thread
From: Erik Slagter @ 2005-11-12 11:02 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Frank

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

On Wed, 2005-11-09 at 23:42 +0100, Frank wrote:
> Hey guys,
> But the LCD stays black. So I read about the various options to reinitialize 
> the VGA, which were:

[ .. ]

What kind of video adapter does your laptop feature?

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2115 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbetool on pure AMD64 system
       [not found]     ` <1131793377.5267.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2005-11-12 12:09       ` Frank
  0 siblings, 0 replies; 8+ messages in thread
From: Frank @ 2005-11-12 12:09 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Erik Slagter, Matthew Garrett

Thanks for your replies. So I was right assuming that vbetool can not be used 
with a 64 bit kernel. I hope that you succeed porting it, Matthew. I was told 
that my laptop suspends and wakes fine on x86 (with the most recent Kubuntu). 
I suppose they are using vbetool to get the VGA back.

10. November 2005 17:07, Matthew Garrett:
| There's a video_post program that should also be mentioned in the docs.
| It uses x86emu, but I'm not convinced that it's entirely correct.
| Implementing the same functionality in vbetool shows different
| interrupts being called in lrmi mode and x86emu mode.

I tried that and it does not get my display back active after Suspend. 
Furthermore, if I run it on a normally working display (before Suspend) it 
makes the display go mad (the content scrolls by very rapidly, kind of 
flickering).

12. November 2005 12:02, Erik Slagter:
| What kind of video adapter does your laptop feature?

It is an SiS M760 chipset including VGA. Do you have any suggestions for that?


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbetool on pure AMD64 system
       [not found]     ` <20051111103315.GB27805-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
@ 2005-11-14 17:02       ` Phillip Susi
       [not found]         ` <4378C318.9090105-3tLf1voIkJTQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Phillip Susi @ 2005-11-14 17:02 UTC (permalink / raw)
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

When you say that vm86 is not supported on x86-64, what do you mean 
exactly?  I'm pretty sure that the hardware supports it, and I don't see 
how the vesa frame buffer Xorg driver works without it.  If the hardware 
supports v86 mode, why wouldn't the kernel?

For the OP: you might check if your bios has an option to repost the 
video bios on S3 resume.  I turned that on in my bios and that fixed 
this problem for me.  You also might try switching consoles after the 
resume, for instance, by pressing ctrl-alt-F1, then ctrl-alt-F7 ( or 
whichever tty the X server is on ) to switch back to X.  That sometimes 
will reset the video state.

Pavel Machek wrote:
> Hi!
> 
>> due to your work in new kernels, my AMD64-laptop now resumes after an ACPI S3 
>> suspend (I can type commands and they get executed) :-). Thanks a lot.
>>
>> But the LCD stays black. So I read about the various options to reinitialize 
>> the VGA, which were:
>> 1. kernel boot options: acpi=s3_sleep, acpi=s3_mode, pci=routeirq. I tried 
>> each one of them, LCD still stays black.
>> 2. Using the vbetool to save/restore the state of the VGA.
>>
>> Here is the problem: I didn't find an AMD64 version of vbetool (using Debian 
>> testing AMD64), so I forced the i386 package and manually met its 32bit 
>> dependencies. It does run, and the "vgastate off" option does disable the 
>> LCD. But saving and restoring the state, I get the following error:
>>
>> # vbetool vbestate save > /tmp/save
>> Can't get video state buffer size (vm86 failure)
>> Get video state buffer size failed
>> Can't save video state (vm86 failure)
>> Save video state failed
> 
> vm86 is unsupported on x86-64. Something like qemu will be required
> :-(.
> 								Pavel



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbetool on pure AMD64 system
       [not found]         ` <4378C318.9090105-3tLf1voIkJTQT0dZR+AlfA@public.gmane.org>
@ 2005-11-14 21:48           ` Alan Cox
       [not found]             ` <1132004907.16148.32.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2005-11-14 21:48 UTC (permalink / raw)
  To: Phillip Susi; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Llu, 2005-11-14 at 12:02 -0500, Phillip Susi wrote:
> When you say that vm86 is not supported on x86-64, what do you mean 
> exactly?  I'm pretty sure that the hardware supports it, and I don't see 
> how the vesa frame buffer Xorg driver works without it.  If the hardware 
> supports v86 mode, why wouldn't the kernel?

The hardware supports vm86 mode only if the OS is in 32bit mode. Its
conceptually possible to support this in a 64bit OS but it would be very
very hairy code and very hard to make secure or correct. Feel free to
try it.

Xorg has a software x86 emulator that is very basic but sufficient to
boot most but not all video bioses on all sorts of systems. It uses that
on x86-64.

Alan



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vbetool on pure AMD64 system
       [not found]             ` <1132004907.16148.32.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2005-11-14 22:29               ` Carl-Daniel Hailfinger
  0 siblings, 0 replies; 8+ messages in thread
From: Carl-Daniel Hailfinger @ 2005-11-14 22:29 UTC (permalink / raw)
  To: Alan Cox; +Cc: Phillip Susi, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Alan Cox schrieb:
> Xorg has a software x86 emulator that is very basic but sufficient to
> boot most but not all video bioses on all sorts of systems. It uses that
> on x86-64.

This emulator has also been ported to the kernel, but I doubt that patch 
is ever going to get included.

As an alternative, somebody skilled could implement a two-stage resume 
code where all devices except graphics card get resumed normally, a 
usermode helper (standalone x86 emulator) is called to boot the graphics 
BIOS, after that the graphics card is resumed and resume continues 
normally to unfreeze all of userspace. Once this infrastructure is in 
place, it can also be used to boot video BIOSes on non-x86 platforms.


Regards,
Carl-Daniel
-- 
http://www.hailfinger.org/


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-14 22:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-09 22:42 vbetool on pure AMD64 system Frank
     [not found] ` <200511092342.40477.hugelmopf-S0/GAf8tV78@public.gmane.org>
2005-11-10 16:07   ` Matthew Garrett
2005-11-11 10:33   ` Pavel Machek
     [not found]     ` <20051111103315.GB27805-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-11-14 17:02       ` Phillip Susi
     [not found]         ` <4378C318.9090105-3tLf1voIkJTQT0dZR+AlfA@public.gmane.org>
2005-11-14 21:48           ` Alan Cox
     [not found]             ` <1132004907.16148.32.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-11-14 22:29               ` Carl-Daniel Hailfinger
2005-11-12 11:02   ` Erik Slagter
     [not found]     ` <1131793377.5267.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-11-12 12:09       ` Frank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox