Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2022 10:23:26 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Stefan Blachmann <sblachmann@gmail.com>
Cc:        Joseph Mingrone <jrm@freebsd.org>, =?UTF-8?B?w5Z6a2FuIEtJUklL?= <ozkan.kirik@gmail.com>,  Michael Schuster <michaelsprivate@gmail.com>, Kyle Evans <kevans@freebsd.org>,  Karel Gardas <gardask@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Call for Foundation-supported Project Ideas
Message-ID:  <CANCZdfpb=Oq1hgLRYk59duCRgVjVtu5bd4VAKR8wbgJdoi9vDg@mail.gmail.com>
In-Reply-To: <CACc-My1WHdgxidCiYDW2RrWxM4sKao7o_Tw-pZuuE_Y0WXC4JQ@mail.gmail.com>
References:  <861r36xzpe.fsf@phe.ftfl.ca> <61100a28-40ae-4458-d7d5-3bc9b13ba219@gmail.com> <CADqw_gKkii%2BBHk7_jPE0DV5ZdF86ydEq956WDtZOP1N9GBjAPw@mail.gmail.com> <CACNAnaH4GH_n8GVYN44op-VO7VZ5_GLP8SBj0SfoC5KoBSFDQw@mail.gmail.com> <CADqw_gJuU6_Wt-GEJduz_Tm0oQg4dDv-5XDz1bsgWqtCmp1R2w@mail.gmail.com> <CAAcX-AHCom%2B5Zf2ENf%2BcFxPDrCWY=e_EaXfRamd%2BwnynBn1-VQ@mail.gmail.com> <864k6qj6x6.fsf@phe.ftfl.ca> <86zgoihs64.fsf@phe.ftfl.ca> <CACc-My26b1GZ7_s93Jx-DgeA=8%2BdS_2MYSoCv_D6uzRihyNHNQ@mail.gmail.com> <CANCZdfq7s2ODPbrZRztXQ7q1aMeDtK-bsoEoW%2BZKDkiyktKUSQ@mail.gmail.com> <CACc-My1WHdgxidCiYDW2RrWxM4sKao7o_Tw-pZuuE_Y0WXC4JQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000cdb91c05d4c4e5c2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 4, 2022 at 12:14 AM Stefan Blachmann <sblachmann@gmail.com>
wrote:

> On 1/4/22, Warner Losh <imp@bsdimp.com> wrote:
> > Not without loading the xorg graphics stuff... graphics chips from the
> last
> > 15 or 20 years have lots of chip specific state that only the graphics
> > stuff knows about... IIRC, it only knows about it because it put the
> > graphics into a known state... it's the main reason laptops stopped
> > suspending in the early 2000s... it looks to be a lot of work for a
> > relatively rare use case...
>
> UEFI GOP seems to have the necessary functionalities
> (https://wiki.osdev.org/GOP#Get_the_Current_Mode) so I guess the work
> required would be limited (restore mode and redraw screen from
> buffer).
>

UEFI GOP isn't available after we start the kernel, so this is a
non-starter.
It works great in the boot loader, but not so good after we boot. It could
work
for S3 sleep to disk where we actually reboot to restore the machine state,
but we don't have sleep to disk today :(


> With non-UEFI or old UGA UEFI implementations possibly one could use
> the dual BIOS=C2=B4 CSM part. Just call the CSM BIOS init to set up GPU a=
nd
> the int 10h interface, and then set previously used mode+redraw.
> BTW, doing that also could both enable vt(4) to change
> modes/resolutions and using sc on UEFI computers.
>

Ah, if only things were really that simple...  I tried variations on that
hack years ago when suspending broke due to video. And it
works for some machines, but not others, was the quick assessment
I made. And the INT xx interface is unavailable on amd64 after we
enter long mode (I tried this out on my then-current FreeBSD laptop
which was 32 bit only, so 15 years ago?).

Warner


> But I think you are right, there are probably not too many users who
> would make use of that.
>
>
> On 1/4/22, Warner Losh <imp@bsdimp.com> wrote:
> > On Mon, Jan 3, 2022, 11:03 PM Stefan Blachmann <sblachmann@gmail.com>
> > wrote:
> >
> >> Implementing S3 suspend/resume was a sponsored project itself.
> >> However, it still does only work when at xorg graphics mode, which
> >> already was topic in this thread.
> >> When using it from console, no matter sc or vt, it still hangs with
> >> dark screen and unresponsive keyboard.
> >> Could finishing the suspend/resume work be sponsored, so that it also
> >> works on console-only computers?
> >>
> >
> > Not without loading the xorg graphics stuff... graphics chips from the
> last
> > 15 or 20 years have lots of chip specific state that only the graphics
> > stuff knows about... IIRC, it only knows about it because it put the
> > graphics into a known state... it's the main reason laptops stopped
> > suspending in the early 2000s... it looks to be a lot of work for a
> > relatively rare use case...
> >
> > Warner
> >
> >
> >> On 12/30/21, Joseph Mingrone <jrm@freebsd.org> wrote:
> >> > On Thu, 2021-12-30 at 14:15, Joseph Mingrone <jrm@FreeBSD.org> wrote=
:
> >> >
> >> >> On Thu, 2021-12-30 at 08:05, =C3=96zkan KIRIK <ozkan.kirik@gmail.co=
m>
> >> >> wrote:
> >> >>> I've ideas about enhancing the routing architecture. Is it possibl=
e
> >> >>> to
> >> >>> add to wiki?
> >> >
> >> >> Certainly.  Please do.
> >> >
> >> > The link again is https://wiki.freebsd.org/2021FoundationCFI
> >> >
> >>
> >>
> >
>

--000000000000cdb91c05d4c4e5c2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jan 4, 2022 at 12:14 AM Stefa=
n Blachmann &lt;<a href=3D"mailto:sblachmann@gmail.com">sblachmann@gmail.co=
m</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
>On 1/4/22, Warner Losh &lt;<a href=3D"mailto:imp@bsdimp.com" target=3D"_bl=
ank">imp@bsdimp.com</a>&gt; wrote:<br>
&gt; Not without loading the xorg graphics stuff... graphics chips from the=
 last<br>
&gt; 15 or 20 years have lots of chip specific state that only the graphics=
<br>
&gt; stuff knows about... IIRC, it only knows about it because it put the<b=
r>
&gt; graphics into a known state... it&#39;s the main reason laptops stoppe=
d<br>
&gt; suspending in the early 2000s... it looks to be a lot of work for a<br=
>
&gt; relatively rare use case...<br>
<br>
UEFI GOP seems to have the necessary functionalities<br>
(<a href=3D"https://wiki.osdev.org/GOP#Get_the_Current_Mode" rel=3D"norefer=
rer" target=3D"_blank">https://wiki.osdev.org/GOP#Get_the_Current_Mode</a>)=
 so I guess the work<br>
required would be limited (restore mode and redraw screen from<br>
buffer).<br></blockquote><div><br></div><div>UEFI GOP isn&#39;t available a=
fter we start the kernel, so this is a non-starter.<br></div><div>It works =
great in the boot loader, but not so good after we boot. It could work</div=
><div>for S3 sleep to disk where we actually reboot to restore the machine =
state,</div><div>but we don&#39;t have sleep to disk today :(</div><div>=C2=
=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e=
x;border-left:1px solid rgb(204,204,204);padding-left:1ex">
With non-UEFI or old UGA UEFI implementations possibly one could use<br>
the dual BIOS=C2=B4 CSM part. Just call the CSM BIOS init to set up GPU and=
<br>
the int 10h interface, and then set previously used mode+redraw.<br>
BTW, doing that also could both enable vt(4) to change<br>
modes/resolutions and using sc on UEFI computers.<br></blockquote><div><br>=
</div><div>Ah, if only things were really that simple...=C2=A0 I tried vari=
ations on that</div><div>hack years ago when suspending broke due to video.=
 And it</div><div>works for some machines, but not others, was the quick as=
sessment</div><div>I made. And the INT xx interface is unavailable on amd64=
 after we</div><div>enter long mode (I tried this out on my then-current Fr=
eeBSD laptop</div><div>which was 32 bit only, so 15 years ago?).</div><div>=
<br></div><div>Warner</div><div>=C2=A0</div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex">
But I think you are right, there are probably not too many users who<br>
would make use of that.<br>
<br>
<br>
On 1/4/22, Warner Losh &lt;<a href=3D"mailto:imp@bsdimp.com" target=3D"_bla=
nk">imp@bsdimp.com</a>&gt; wrote:<br>
&gt; On Mon, Jan 3, 2022, 11:03 PM Stefan Blachmann &lt;<a href=3D"mailto:s=
blachmann@gmail.com" target=3D"_blank">sblachmann@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;&gt; Implementing S3 suspend/resume was a sponsored project itself.<br>
&gt;&gt; However, it still does only work when at xorg graphics mode, which=
<br>
&gt;&gt; already was topic in this thread.<br>
&gt;&gt; When using it from console, no matter sc or vt, it still hangs wit=
h<br>
&gt;&gt; dark screen and unresponsive keyboard.<br>
&gt;&gt; Could finishing the suspend/resume work be sponsored, so that it a=
lso<br>
&gt;&gt; works on console-only computers?<br>
&gt;&gt;<br>
&gt;<br>
&gt; Not without loading the xorg graphics stuff... graphics chips from the=
 last<br>
&gt; 15 or 20 years have lots of chip specific state that only the graphics=
<br>
&gt; stuff knows about... IIRC, it only knows about it because it put the<b=
r>
&gt; graphics into a known state... it&#39;s the main reason laptops stoppe=
d<br>
&gt; suspending in the early 2000s... it looks to be a lot of work for a<br=
>
&gt; relatively rare use case...<br>
&gt;<br>
&gt; Warner<br>
&gt;<br>
&gt;<br>
&gt;&gt; On 12/30/21, Joseph Mingrone &lt;<a href=3D"mailto:jrm@freebsd.org=
" target=3D"_blank">jrm@freebsd.org</a>&gt; wrote:<br>
&gt;&gt; &gt; On Thu, 2021-12-30 at 14:15, Joseph Mingrone &lt;jrm@FreeBSD.=
org&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; On Thu, 2021-12-30 at 08:05, =C3=96zkan KIRIK &lt;<a href=
=3D"mailto:ozkan.kirik@gmail.com" target=3D"_blank">ozkan.kirik@gmail.com</=
a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; I&#39;ve ideas about enhancing the routing architectu=
re. Is it possible<br>
&gt;&gt; &gt;&gt;&gt; to<br>
&gt;&gt; &gt;&gt;&gt; add to wiki?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Certainly.=C2=A0 Please do.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The link again is <a href=3D"https://wiki.freebsd.org/2021Fou=
ndationCFI" rel=3D"noreferrer" target=3D"_blank">https://wiki.freebsd.org/2=
021FoundationCFI</a><br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
</blockquote></div></div>

--000000000000cdb91c05d4c4e5c2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpb=Oq1hgLRYk59duCRgVjVtu5bd4VAKR8wbgJdoi9vDg>