Naiw
Posts: 5
Joined: Sun Mar 08, 2015 12:44 am

Re: Dispmanx VNC Server

Tue Mar 31, 2015 10:13 pm

AndyD wrote:
Naiw wrote:Yes, I assumed it would work on the old RPis now, I'm rewriting some stuff to use assembly however and that's what worries me could cause compatibility issues with the old RPi- I really want to change the detection/Blitting to use Neon but that would really be a no go on the old RPi, so currently I'm experimenting with regular ARM assembly and attempt using the barrel shifter in an efficient way.
You could always load different code based on the model. Obviously it is up to you if you want to maintain compatibility or not.
Naiw wrote:Speaking of which it's too bad valgrind/callgrind doesn't work any good on the RPi due to some god damned reason they decided to use bigendian in libconfi_rpi, I haven't decided if time is best spent attempting to rewrite that or keep on using gprof.
That is interesting to know. I haven't tried valgrind on the Raspberry Pi (not seriously at least). I didn't know hat was the problem.
Actually I just decided to start looking into it, it didn't require any significant work... just disable the libconfi_rpi in /etc/ld.so.preload

Chips
Posts: 194
Joined: Sat Aug 18, 2012 8:21 pm

Re: Dispmanx VNC Server

Sun Apr 12, 2015 9:31 pm

I wanted to try it for quite some time... now I just tried it and it works quite well.
My 2 cents:
- 30 frames per seconds is too much under X on my setup, it was heavily lagging, I lowered it to 10 and it's better. Automatic frame rate would be better though...
- Keyboard is qwerty... whereas I do have azerty on both my host and client. This problem is common with ultra & tight client. Never had this issue with others server... I have no idea how it is handled anyway, I could have miss something
- Since Rpi can do hardware jpeg compression, it could be an added optimization... but I prefer lossless compression :)

I used it to take screen-shoot of some emulators :P :
viewtopic.php?p=738464#p738464
Since I play a little bit with emulators using dispmanx it helps me since others vnc don't forward dispmanx layers but this one does...

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Dispmanx VNC Server

Mon Apr 13, 2015 3:56 am

Chips wrote:...- Since Rpi can do hardware jpeg compression, it could be an added optimization...
Yes, I wonder how hard it would be to write a drop in replacement for libjpeg that uses the GPU?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5148
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Dispmanx VNC Server

Mon Apr 13, 2015 2:46 pm

AndyD wrote: Yes, I wonder how hard it would be to write a drop in replacement for libjpeg that uses the GPU?
libjpeg is not very amenable to hardware accelerating. It has an api that allows requesting the decoded jpg a line of pixels at a time.

Probably if you go up one level into vnc, there will be something more convenient. Ideally something like:
int jpg_encode(unsigned char *pixels, int width, int height, int pitch, unsigned char **output_jpg, int *size);

That sort of API could be accelerated straightforwardly.

User avatar
postpunkpl
Posts: 13
Joined: Sat Jun 06, 2015 12:14 pm
Location: Poland

Re: Dispmanx VNC Server

Tue Jun 16, 2015 10:00 pm

Hello,

Is it possible to change a resolution? I have only 640x480 px.

greetings,

Peter
Greetings,

Peter

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Dispmanx VNC Server

Wed Jun 17, 2015 2:38 pm

postpunkpl wrote:Is it possible to change a resolution? I have only 640x480 px.
Yes it is possible. The DIspmanX VNC Server copies the Raspberry Pi display. If you are using your Raspberry Pi without a connection to a display, then to change the resolution that DispmanX VNC Server uses you would need to configure the Raspberry Pi to make it believe it has a display attached with the resolution that you require.

I hope that makes sense.

User avatar
postpunkpl
Posts: 13
Joined: Sat Jun 06, 2015 12:14 pm
Location: Poland

Re: Dispmanx VNC Server

Wed Jun 17, 2015 9:09 pm

yes, it make sense but how to configure that resolution?
Greetings,

Peter

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Dispmanx VNC Server

Wed Jun 17, 2015 9:38 pm

To always have a certain resolution set, you can use hdmi_force_hotplug=1 and set the specific resolution you want using hdmi_group and hdmi_mode. The modes are listed in the config.txt documentation. For example 1280x1024 @60Hz

Code: Select all

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=35
If you require a mode that is not listed there you can specify a custom mode. Here is my config that I use to have the same native resolution (480x320) as my add-on TFT display.

Code: Select all

hdmi_force_hotplug=1
hdmi_cvt=480 320 60
hdmi_group=2
hdmi_mode=87
NOOBs sets the hdmi_force_hotplug=1 by default. I think you already have this set as 640x480 is the resolution you get by default with hdmi_force_hotplug=1.

User avatar
postpunkpl
Posts: 13
Joined: Sat Jun 06, 2015 12:14 pm
Location: Poland

Re: Dispmanx VNC Server

Wed Jun 17, 2015 9:57 pm

thank you so much :) it is very useful
Greetings,

Peter

JGR79
Posts: 6
Joined: Tue Jun 10, 2014 6:27 pm

Re: Dispmanx VNC Server

Mon Aug 03, 2015 5:33 pm

Hello, i need something that looks like simple , but i cant make it work.

I need to reproduce the content of the RPI2 Screen remotely via web browser.

Without X11, i found dispmanx server that works like a charm, its perfect. At this point, :D .

Now i need to record that session , i use vncrec, in the same host, the same RPI2 that runs the server. But it didn't work.

Error: Can't open display:

if i can record that vnc session , the next step is ffmpeg and crtmpserver and ........ the video on the web.

Any help?

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Dispmanx VNC Server

Tue Aug 04, 2015 1:08 am

JGR79 wrote:Error: Can't open display:
I think the problem is that vncrec is an X11 application.

JGR79
Posts: 6
Joined: Tue Jun 10, 2014 6:27 pm

Re: Dispmanx VNC Server

Tue Aug 04, 2015 7:04 am

any alternative?

gatalon
Posts: 3
Joined: Wed Feb 19, 2014 1:34 am

Re: Dispmanx VNC Server

Thu Dec 24, 2015 10:09 am

Hi, this VNC Server is very good.
But i face some problems when use vnc client on my laptop, the numberpad not work in Windows system, The Right Shift Button and the Right Ctrl Button upside down in ubuntu system whatever vncclient software i use,I have checked the source code on your github found this
Is there something wrong here carried my problem?
sorry for my poor english.
Attachments
捕获.JPG
picture
捕获.JPG (59.36 KiB) Viewed 4084 times

gatalon
Posts: 3
Joined: Wed Feb 19, 2014 1:34 am

Re: Dispmanx VNC Server

Fri Dec 25, 2015 3:38 am

I have fixed shift, alt, ctrl bugs my self, but i still can't use numberpad of my keyboard. because i'm not good at C++.
else if (code>=0xFFE1 && code<=0xFFEE) {
static const uint16_t map[] =
{ 0, KEY_LEFTSHIFT,
KEY_RIGHTSHIFT, KEY_LEFTCTRL,
KEY_RIGHTCTRL, KEY_CAPSLOCK,
0, 0,
0, KEY_LEFTALT,
KEY_RIGHTALT, 0, 0, 0 };
scancode = map[code & 0xF];

RpiName
Posts: 671
Joined: Sat Jul 06, 2013 3:14 am

Re: Dispmanx VNC Server

Sat Nov 12, 2016 4:36 pm

More efficient and flexible alternative:

https://www.youtube.com/watch?v=wthS8TP ... e=youtu.be

for more info:
http://linux-projects.org

Ickam
Posts: 8
Joined: Sat May 13, 2017 10:16 am

Re: Dispmanx VNC Server

Tue May 16, 2017 3:45 pm

This question will probably sound very silly, but: how do I use this to control kodi on raspberry 3? I've tried running it from both another instance of vnc, and ssh and in both cases i get something along the lines of

Code: Select all

[email protected]:~/dispmanx_vnc $ sudo ./dispmanx_vncserver
Read config file: ./dispmanx_vncserver.conf
Running vnc server with the following settings
  frame-rate = 15
  downscale = false
  fullscreen = false
  localhost = true
  multi-threaded = true
  password =
  port = 9003
  relative = false
  screen = 0
  unsafe = false
  vnc-params =
Open display[0]...
info: 720, 480, 0, 0
Display is 720 x 480
Server bpp:16
Server bigEndian:0
Server redShift:0
Server blueShift:10
Server greeShift:5
16/05/2017 16:40:42 ListenOnTCPPort: Address already in use
open /dev/uinput returned 5.
First write returned 1116.
ioctl UI_DEV_CREATE returned 0.
open /dev/uinput returned 6.
First write returned 1116.
ioctl UI_DEV_CREATE returned 0.
I'd love to make this work, but I don't know where to start

amilino
Posts: 39
Joined: Fri Feb 05, 2016 6:01 pm

Re: Dispmanx VNC Server

Wed Mar 21, 2018 1:22 pm

Ickam wrote:
Tue May 16, 2017 3:45 pm
This question will probably sound very silly, but: how do I use this to control kodi on raspberry 3? I've tried running it from both another instance of vnc, and ssh and in both cases i get something along the lines of

Code: Select all

[email protected]:~/dispmanx_vnc $ sudo ./dispmanx_vncserver
Read config file: ./dispmanx_vncserver.conf
Running vnc server with the following settings
  frame-rate = 15
  downscale = false
  fullscreen = false
  localhost = true
  multi-threaded = true
  password =
  port = 9003
  relative = false
  screen = 0
  unsafe = false
  vnc-params =
Open display[0]...
info: 720, 480, 0, 0
Display is 720 x 480
Server bpp:16
Server bigEndian:0
Server redShift:0
Server blueShift:10
Server greeShift:5
16/05/2017 16:40:42 ListenOnTCPPort: Address already in use
open /dev/uinput returned 5.
First write returned 1116.
ioctl UI_DEV_CREATE returned 0.
open /dev/uinput returned 6.
First write returned 1116.
ioctl UI_DEV_CREATE returned 0.
I'd love to make this work, but I don't know where to start
Don't understand what is the problem. I have the same output and everything is working fine.

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 3 guests