* [uml-devel] A shared memory framebuffer for UML
@ 2008-11-23 17:28 Ron Yorston
2008-11-23 23:59 ` root
2008-11-24 10:32 ` Ron Yorston
0 siblings, 2 replies; 4+ messages in thread
From: Ron Yorston @ 2008-11-23 17:28 UTC (permalink / raw)
To: user-mode-linux-devel
I've done some work on a patch to implement a shared memory framebuffer
for UML. (Patch to follow in a separate message, or pick it up from
my website: http://intgat.tigress.co.uk/rmy/shmfb/index.html)
Apply the patch and build the kernel in the usual way:
tar xfj linux-2.6.27.7.tar.bz2
cd linux-2.6.27.7
patch -p1 <linux-2.6.27.7-shm-fb.patch
make defconfig ARCH=um
make menuconfig ARCH=um
make linux ARCH=um
During the menuconfig phase you should enable framebuffer devices
(UML-specific options/Graphics support/Support for frame buffer
devices). Then, in the UML-specific options/Graphics support/Console
display driver support menu disable VGA text console, enable Framebuffer
Console support, enable Select compiled-in fonts and select a suitable
font, for example, VGA 8x16 font. Back in the UML-specific options menu
enable Shared Memory Framebuffer driver.
To enable the shared memory framebuffer device add the option
shmfb=widthxheightxdepth to the kernel command line. For example,
shmfb=800x600x4. The width and height can have any reasonable values. The
depth can currently only be 2 or 4 bytes per pixel.
When the kernel boots it will use the framebuffer device as its console,
but you won't be able to see anything! To make the framebuffer console
visible you need a separate client application to run on the host. Two
clients are provided, a simple Xt-based window and a VNC server:
http://intgat.tigress.co.uk/rmy/shmfb/uml_fb-0.1.0.tar.gz
To build the VNC server client you'll need libvncserver. If this isn't
in your distro's package repository you can get it from the project's
Sourceforge page: http://libvncserver.sourceforge.net/.
Once you've built the clients you can run them as:
uml_xtfb --umid <name>
or
uml_vncfb --umid <name>
where <name> is the name of your UML instance. If you've run the VNC
client you still won't be able to see anything! You now need to run a
VNC viewer:
vncviewer localhost:0
As an alternative to starting the client programs by hand you can also use
a kernel command line option of the form shmfb_client=<path_to_client>,
where <path_to_client> is, as you might expect, the path to the client
you'd like to use.
There are a few problems with the client programs:
* the cursor in the virtual console doesn't track the mouse very well;
* the X server in the UML instance tends to get confused and sends
the mouse to the top left hand corner of the display, where it sits
and sulks.
* the mouse wheel doesn't work;
* the VNC client is hardcoded for a US keyboard. (Probably. I've
got a UK keyboard, so some of the less used characters may not be
quite right);
* if any keys are pressed when the client loses focus it never sees
the key release, so thinks that, for example, the control key is
always pressed.
(Adjusting the mouse acceleration in the console mouse server (gpmd)
or X server (set m, or your desktop manager's GUI equivalent) helps with
some of the mouse issues.)
The kernel patch is based on the X11 framebuffer driver by Gerd
Knorr. Without Gerd's work I wouldn't have been able to achieve
anything. Thanks!
Any problems with the patch are my fault. In particular, I'd very much
appreciate some hint as to what should be done about fb_pgprotect in fb.h.
Ron
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] A shared memory framebuffer for UML
2008-11-23 17:28 [uml-devel] A shared memory framebuffer for UML Ron Yorston
@ 2008-11-23 23:59 ` root
2008-11-24 9:22 ` Ron Yorston
2008-11-24 10:32 ` Ron Yorston
1 sibling, 1 reply; 4+ messages in thread
From: root @ 2008-11-23 23:59 UTC (permalink / raw)
To: Ron Yorston; +Cc: user-mode-linux-devel
Hello Ron Yorston,
I would like to have both audio and video on the host during a
sip communication with linphone, ekiga or another open source
between 2 UML machines in a virtual network.
I already have the sound but the sip softwares show ugly screens
and need /dev/video... to get a display.
At http://clownix.net a virtual network with sound is availlable,
pulseaudio transfers the audio to and from the host through the
virtual network.
Now my question: would this framebuffer help in the video part
of the sip communication? Could the sip application transmit
images to the host's display? Could the sip application receive
from a real webcam?
My questions may not concern your work at all, as I do not know
much about webcams and displays yet.
Regards
Vincent Perrier
Le dimanche 23 novembre 2008 à 17:28 +0000, Ron Yorston a écrit :
> I've done some work on a patch to implement a shared memory framebuffer
> for UML. (Patch to follow in a separate message, or pick it up from
> my website: http://intgat.tigress.co.uk/rmy/shmfb/index.html)
>
> Apply the patch and build the kernel in the usual way:
>
> tar xfj linux-2.6.27.7.tar.bz2
> cd linux-2.6.27.7
> patch -p1 <linux-2.6.27.7-shm-fb.patch
> make defconfig ARCH=um
> make menuconfig ARCH=um
> make linux ARCH=um
>
> During the menuconfig phase you should enable framebuffer devices
> (UML-specific options/Graphics support/Support for frame buffer
> devices). Then, in the UML-specific options/Graphics support/Console
> display driver support menu disable VGA text console, enable Framebuffer
> Console support, enable Select compiled-in fonts and select a suitable
> font, for example, VGA 8x16 font. Back in the UML-specific options menu
> enable Shared Memory Framebuffer driver.
>
> To enable the shared memory framebuffer device add the option
> shmfb=widthxheightxdepth to the kernel command line. For example,
> shmfb=800x600x4. The width and height can have any reasonable values. The
> depth can currently only be 2 or 4 bytes per pixel.
>
> When the kernel boots it will use the framebuffer device as its console,
> but you won't be able to see anything! To make the framebuffer console
> visible you need a separate client application to run on the host. Two
> clients are provided, a simple Xt-based window and a VNC server:
>
> http://intgat.tigress.co.uk/rmy/shmfb/uml_fb-0.1.0.tar.gz
>
> To build the VNC server client you'll need libvncserver. If this isn't
> in your distro's package repository you can get it from the project's
> Sourceforge page: http://libvncserver.sourceforge.net/.
>
> Once you've built the clients you can run them as:
>
> uml_xtfb --umid <name>
>
> or
>
> uml_vncfb --umid <name>
>
> where <name> is the name of your UML instance. If you've run the VNC
> client you still won't be able to see anything! You now need to run a
> VNC viewer:
>
> vncviewer localhost:0
>
> As an alternative to starting the client programs by hand you can also use
> a kernel command line option of the form shmfb_client=<path_to_client>,
> where <path_to_client> is, as you might expect, the path to the client
> you'd like to use.
>
> There are a few problems with the client programs:
>
> * the cursor in the virtual console doesn't track the mouse very well;
> * the X server in the UML instance tends to get confused and sends
> the mouse to the top left hand corner of the display, where it sits
> and sulks.
> * the mouse wheel doesn't work;
> * the VNC client is hardcoded for a US keyboard. (Probably. I've
> got a UK keyboard, so some of the less used characters may not be
> quite right);
> * if any keys are pressed when the client loses focus it never sees
> the key release, so thinks that, for example, the control key is
> always pressed.
>
> (Adjusting the mouse acceleration in the console mouse server (gpmd)
> or X server (set m, or your desktop manager's GUI equivalent) helps with
> some of the mouse issues.)
>
> The kernel patch is based on the X11 framebuffer driver by Gerd
> Knorr. Without Gerd's work I wouldn't have been able to achieve
> anything. Thanks!
>
> Any problems with the patch are my fault. In particular, I'd very much
> appreciate some hint as to what should be done about fb_pgprotect in fb.h.
>
> Ron
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> User-mode-linux-devel mailing list
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
> �
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] A shared memory framebuffer for UML
2008-11-23 23:59 ` root
@ 2008-11-24 9:22 ` Ron Yorston
0 siblings, 0 replies; 4+ messages in thread
From: Ron Yorston @ 2008-11-24 9:22 UTC (permalink / raw)
To: vincent-perrier, rmy; +Cc: user-mode-linux-devel
root <vincent-perrier@club-internet.fr> wrote:
>Now my question: would this framebuffer help in the video part
>of the sip communication? Could the sip application transmit
>images to the host's display? Could the sip application receive
>from a real webcam?
I don't think so, at least not as I understand what you're trying to
do.
The framebuffer is like giving UML a graphics card: the guest can
display a console on it or run an X server on it. It will let you see
X applications on the guest, but there are already ways to do that.
(Run an Xvnc server on the guest, or ssh into it and export an
application's display back to your local X server.) And it won't help
at all with importing webcam images into the guest, that's an entirely
different problem.
Ron
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] A shared memory framebuffer for UML
2008-11-23 17:28 [uml-devel] A shared memory framebuffer for UML Ron Yorston
2008-11-23 23:59 ` root
@ 2008-11-24 10:32 ` Ron Yorston
1 sibling, 0 replies; 4+ messages in thread
From: Ron Yorston @ 2008-11-24 10:32 UTC (permalink / raw)
To: user-mode-linux-devel, rmy
I was in too much of a hurry yesterday and didn't include some useful
information about shmfb clients.
To make use of the framebuffer the client needs to know its details.
It also needs to be able to send keyboard and mouse events to the guest
and to receive information about updates to the guest's display.
When a UML kernel uses a shared memory framebuffer it creates the file
~/<name>/shmid. This contains the id of the shared memory segment and
the dimensions of the display (width, height and depth).
It also sets up a socket to enable communication between host and
guest. This is based on the way mconsole works, but with a much
simplified protocol that's tailored to the needs of the framebuffer.
The host sends information about keyboard and mouse events to the
guest. It can also request information from the guest as to which
areas of the framebuffer have been updated.
This latter point is something of a limitation: the client has to poll
for updates. Furthermore, there's nothing to prevent more than one
client from connecting to the same guest. The guest doesn't keep track
of its clients separately, so the clients won't be informed about all
updates. A workaround for that would be to have the clients just
update the whole display, whether or not anything has changed. But
that's inefficient. A proper fix for these issues is to have the
kernel track client connections and send updates without prompting.
The rate at which the clients update their displays can be controlled
with the --fps option, which sets the number of frames per second. The
default is 10fps.
The X client requires the MIT-SHM extension in the host X server. The
format of the framebuffer memory must match that of a shared memory
image in the host X server. So if you have a 16-bit display you need
to specify a framebuffer depth of 2 bytes per pixel to use the X
client.
Ron
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-24 10:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-23 17:28 [uml-devel] A shared memory framebuffer for UML Ron Yorston
2008-11-23 23:59 ` root
2008-11-24 9:22 ` Ron Yorston
2008-11-24 10:32 ` Ron Yorston
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.