Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-01-2016, 21:46   #166
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: North Carolina
Boat: bristol 27
Posts: 2,720
Re: OpenCPN on Raspberry Pi2

There are two libGLESv1_CM.so files, one is software the other is broadcom hardware accelerated. If you ran run RPIGears then you must have the broadcom one installed. Make sure it is in LD_LIBRARY_PATH and with my branch you should get pretty good performance.
__________________

__________________
boat_alexandra is online now   Reply With Quote
Old 09-01-2016, 00:50   #167
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 872
Re: OpenCPN on Raspberry Pi2

Hi,
I found an issue with the mainline which caused OCPN to crash, particularly when loading up plugins. I have created a new version of OCPN and the OD plugin which does not crash. Not all the functionality of OD seems to be working, but most of it does. You will find the installable files here:
OCPN
https://www.dropbox.com/s/pgtkema3ly...armhf.deb?dl=0
OCPN_DRAW_PI
https://www.dropbox.com/s/hk85gurpi8...armhf.deb?dl=0

Jon
__________________

__________________
jongough is offline   Reply With Quote
Old 09-01-2016, 08:26   #168
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,765
Re: OpenCPN on Raspberry Pi2

jon...

What's the nature of the crash? Do you have a patch?

Thanks
Dave
__________________
bdbcat is online now   Reply With Quote
Old 09-01-2016, 11:40   #169
Registered User

Join Date: May 2013
Location: NSW, Australia
Boat: Richter 42
Posts: 872
Re: OpenCPN on Raspberry Pi2

Dave,
You have already applied it. The issue was in styles.cpp with the crash occurring at line 121 (double alphaF = (double) ( *afront++ ) / 256.0 where 'afront' was not set. I am not sure why, but... The patch added a check to line 108 to include 'afront', 'aback' and 'aresult'.

I consistently got the crash on the PI, so I put one of my virtual linux machines back to wxWidgets 2.8 and tried it there. The crash only occurred occasionally, but always at the same point.

Regards
Jon
__________________
jongough is offline   Reply With Quote
Old 09-01-2016, 12:51   #170
Registered User

Join Date: Jun 2015
Posts: 153
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by NahanniV View Post
Code:
aruntu@aruntu:~$ dpkg --get-selections |grep -i mesa
libegl1-mesa:armhf                install
libegl1-mesa-drivers:armhf            install
libgl1-mesa-dev                    install
libgl1-mesa-dri:armhf                install
libgl1-mesa-glx:armhf                install
libglapi-mesa:armhf                install
libgles2-mesa:armhf                install
libglu1-mesa:armhf                install
libglu1-mesa-dev                install
libopenvg1-mesa:armhf                install
libwayland-egl1-mesa:armhf            install
mesa-common-dev                    install
mesa-utils-extra                install
aruntu@aruntu:~$
JM.
Everything seem to be there.
Anyone who compiled 2.8 on Pi2 has a clue?
Can you post your config.log?
__________________
did-g is offline   Reply With Quote
Old 10-01-2016, 08:20   #171
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 46
Re: OpenCPN on Raspberry Pi2

Hi,

how I can get grafik acceleration on my pi.

I use the last raspian Image (Jessie), updated an upgraded, so like the firmware.

First I made: apt-get install mesa-utils build-essential git cmake libx11-dev

Then:
$ cmake .
$ make GL
$ sudo cp glshim/lib/libGL.so.1 /usr/lib
$ sudo cp -r glshim/include/GLES/ /usr/include/

but when I tried this: LD_LIBRARY_PATH=lib glxgears

no gears.

Ok, so I tried the steps of post #40
When I made make I got an error due to the file XShm.h that doesnīt exist on my pi and I donīt find the right package to install.

When I try this: git clone http://github.com/seandepagnier/OpenCPN -b rpi_hwopengl and the following steps I get bad Errors.

So what are the steps to get the hardwareaccaleration on the pi?
What packages and other things/programs are necessary?
In the moment I run OpenCPN 4.0 on the pi. I use MEMCacheLimit=400 and NCacheLimit=4 in the config file. I use selfscanned rastercharts. The size of theese Charts is between 8 (for the harbourplans) up to 50,60 MB (the midscaled Charts).
Moving and zooming is not very comfortable.
By the way: Is it better to "cut" the big (lots of MBs) Charts in two smaller Charts? Will this perhaps Speed up the System?

Thanks

Andreas
__________________
Andreas29 is offline   Reply With Quote
Old 10-01-2016, 09:40   #172
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: North Carolina
Boat: bristol 27
Posts: 2,720
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by Andreas29 View Post
Hi,

how I can get grafik acceleration on my pi.

I use the last raspian Image (Jessie), updated an upgraded, so like the firmware.

First I made: apt-get install mesa-utils build-essential git cmake libx11-dev

Then:
$ cmake .
$ make GL
$ sudo cp glshim/lib/libGL.so.1 /usr/lib
$ sudo cp -r glshim/include/GLES/ /usr/include/

but when I tried this: LD_LIBRARY_PATH=lib glxgears

no gears.
Maybe you don't have the broadcom drivers?

Quote:

Ok, so I tried the steps of post #40
When I made make I got an error due to the file XShm.h that doesnīt exist on my pi and I donīt find the right package to install.

When I try this: git clone http://github.com/seandepagnier/OpenCPN -b rpi_hwopengl and the following steps I get bad Errors.
Bad errors?

Maybe you need to install some developer packages>

Quote:

So what are the steps to get the hardwareaccaleration on the pi?
Do you have RPIGears working?
Quote:
What packages and other things/programs are necessary?
In the moment I run OpenCPN 4.0 on the pi. I use MEMCacheLimit=400 and NCacheLimit=4 in the config file. I use selfscanned rastercharts. The size of theese Charts is between 8 (for the harbourplans) up to 50,60 MB (the midscaled Charts).
Moving and zooming is not very comfortable.
By the way: Is it better to "cut" the big (lots of MBs) Charts in two smaller Charts? Will this perhaps Speed up the System?
It might speed up without opengl but with opengl shouldn't make any difference.

Sean
__________________
boat_alexandra is online now   Reply With Quote
Old 10-01-2016, 10:10   #173
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 46
Re: OpenCPN on Raspberry Pi2

Hi Sean,

thanks for taking the time to take a raspi newbie on your hand

Quote:
Originally Posted by boat_alexandra View Post
Maybe you don't have the broadcom drivers?
You tell about the same like in post #166 ? If so I must take a look but I donīt really know



Quote:
Originally Posted by boat_alexandra View Post
Bad errors?

Maybe you need to install some developer packages>
I said "bad Errors" but you are right. I agree that perhaps some packages are missing but I hope that somebody can tell me witch ones

Quote:
Originally Posted by boat_alexandra View Post
Do you have RPIGears working?
Still first time that I hear about this. Runs it on the still out of the box pi? What are the steps to get this run?-> took a small look in the web. Ok, I try to get RPIgears running.

Ok, not easy stuff for me but Iīll learn it.

Does the hardware acceleration works with remote desktop control or only with a monitor directly connected to the pi?

Thanks

Andreas
__________________
Andreas29 is offline   Reply With Quote
Old 10-01-2016, 17:55   #174
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,275
Re: OpenCPN on Raspberry Pi2

This may be a little premature, but
Install page for Arm or raspberry pi?
OpenCPN RC 4.1.1301 Release
__________________
rgleason is online now   Reply With Quote
Old 10-01-2016, 20:26   #175
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: North Carolina
Boat: bristol 27
Posts: 2,720
Re: OpenCPN on Raspberry Pi2

Andreas,

I can't tell you anything more about your "bad errors" unless you can post them.

Acceleration should help with remote desktop as well especially in certain cases. It won't be able to use the local hardware to accelerate though at least not efficiently for modern drivrers. Anyone tried to run opencpn through x forwarding with opengl?
__________________
boat_alexandra is online now   Reply With Quote
Old 11-01-2016, 12:20   #176
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,068
Re: OpenCPN on Raspberry Pi2

Quote:
Originally Posted by did-g View Post
Everything seem to be there.
Anyone who compiled 2.8 on Pi2 has a clue?
Can you post your config.log?
@did-g
Yes, 3.0.2 compiled OK. I did not apply the OpenGL switch the first time I did it, but it worked and OpenCPN did not complain. so perhaps it is default now.
(I did retry 3.0.2 with OpenGL switch and there was no difference).

@boat_alexandra
Any Ideas about building wx2.8 on this system?
What is the starting point for your CubieTruck system ? Can I download that somewhere ?

Cheers,
JM.
__________________
NahanniV is offline   Reply With Quote
Old 11-01-2016, 12:31   #177
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 46
Re: OpenCPN on Raspberry Pi2

Hi Sean,

made some experiments last hours.

First to say is glxgears works now (look image glxgears below).

My Setup is:
Raspberry PI 2, Debian Jessie Image downloaded from Raspberry Site
In the Moment I run opencpn 4.0 installed via the "add/remove" function in the main menue, the packages are from the ppa: opencpn/opencpn.
From there I got also the plugins. All is fine and it works.
I use xrdp for getting remote control from my Windows Computer. I do this because when the pi is used on board opencpn and plugins are running on the pi and over a wifi connection with a tablet I get remote control and video Output. I doīnīt have the elektric power to install a big display. The low power consumption of a pi is one of the Advantages. The display of the tablet will be temporarily switched on. Normally I use the paper Charts.

In the remote Desktop window I can get glxgears running.
I install all the packages listed for compiling linux (Debian) in the developers guide. Then I added this: apt-get install mesa-utils build-essential git cmake libx11-dev
After that I did first the ..glshim then the ...glxhack - steps from your Posts #36 and #40.
I had to copy some files for fixing wrong links. During compilation I got the message you can see on Image "warning1".

In the Moment I run the opencpn compilation. I got messages like the one you can see in Picture "warning2". Donīt know if itīs normal.

Is it necessary to make a new compilation of opencpn for using the grafik acceleration or is it possible to use the opencpn verion witch I get over the ppa: opencpn/opencpn
If so how is the Setup for Setting the path to the right library?

Thanks

Andreas
Attached Thumbnails
Click image for larger version

Name:	glxgears.JPG
Views:	101
Size:	57.8 KB
ID:	116548   Click image for larger version

Name:	warning1.JPG
Views:	95
Size:	79.5 KB
ID:	116551  

Click image for larger version

Name:	warning2.JPG
Views:	98
Size:	81.0 KB
ID:	116557  
__________________
Andreas29 is offline   Reply With Quote
Old 13-01-2016, 10:03   #178
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 46
Re: OpenCPN on Raspberry Pi2

Hi @all pi-users,

I need some help to understand whatīs going wrong here.

What Iīve done?

Raspi 2 with Raspian Jessie (Linux 4.1.15-v7+)

Using Opencpn with self scanned and convertet to *.kap rastercharts

Step 1:
$ sudo apt-get install build-essential cmake gettext git-core gpsd gpsd-clients libgps-dev wx-common libwxgtk3.0-dev libglu1-mesa-dev libgtk2.0-dev wx3.0-headers libbz2-dev libtinyxml-dev libportaudio2 portaudio19-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev mesa-utils
Step 2: copy the eglext_brcm.h-file to the right Folder
Step 3: git clone http://github.com/seandepagnier/glshim -b glxhack
cd glshim
cmake .
make
LD_LIBRARY_PATH=lib glxgears

Step 4: Add the o4.1.1301 package from the ppa

I can run glxgears (img glxgears1) with 150 fps (in small window)
glxinfo giveīs the output shown in img. glxinfo 1 to 3 (Iīm not able to insert a window here )

When I run opencpn with the LD_LIBRARY.... it works without setting OpenGL acceleration.
But in the console window I can get the informations shown in img owopgl. The performance is very much better then using opencpn 4.0

Switching OpenGL on the sreen turns into white (only the red chart frames are shown) When zooming out enough the green world chart is shown.
Switching the options (texture Caching etc.), rebuild cache, rebuild data in the Charts menue havo no visible effects.
In the console window I can see the errors listed in img owithopgl.

When I install the opencpn package without first try to install the glshim then naturally the OpenGL-Option does not work but the performance without this Option will be the same as when using opencpn with the shim.

Iīm sure that thereīs a problem with a library or with a driver, but I donīt know where to start or search.

Can somebody teaches me a little bit

Thanks

Andreas
Attached Thumbnails
Click image for larger version

Name:	glxgears1.JPG
Views:	83
Size:	61.6 KB
ID:	116644   Click image for larger version

Name:	glxinfo1.JPG
Views:	83
Size:	100.5 KB
ID:	116645  

Click image for larger version

Name:	glxinfo2.JPG
Views:	83
Size:	107.3 KB
ID:	116646   Click image for larger version

Name:	glxinfo3.JPG
Views:	93
Size:	98.0 KB
ID:	116647  

Click image for larger version

Name:	owopgl.JPG
Views:	85
Size:	123.0 KB
ID:	116648   Click image for larger version

Name:	owithopgl.JPG
Views:	85
Size:	55.4 KB
ID:	116649  

__________________
Andreas29 is offline   Reply With Quote
Old 13-01-2016, 21:03   #179
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: North Carolina
Boat: bristol 27
Posts: 2,720
Re: OpenCPN on Raspberry Pi2

Andreas,

You must have the wrong glshim. glshim is built into opencpn now, so normally you don't need to know anything about glshim.... despite the fact you have the right glshim working with glxgears, it is using this wrong built in version with opencpn. I know because it should not print glXGetProcAddress X not found anymore.

You must checkout the rpi_fixes branch of opencpn, try "git branch" to verify this.
__________________
boat_alexandra is online now   Reply With Quote
Old 13-01-2016, 23:47   #180
Registered User

Join Date: Dec 2015
Location: Germany, sailing: Northsea
Boat: Friendship 28
Posts: 46
Re: OpenCPN on Raspberry Pi2

Hi Sean,

Quote:
Originally Posted by boat_alexandra View Post
Andreas,

You must have the wrong glshim. glshim is built into opencpn now, so normally you don't need to know anything about glshim.... despite the fact you have the right glshim working with glxgears, it is using this wrong built in version with opencpn. I know because it should not print glXGetProcAddress X not found anymore.
Ok, this explains why I have no difference using o with or without the shim.

Quote:
Originally Posted by boat_alexandra View Post
You must checkout the rpi_fixes branch of opencpn, try "git branch" to verify this.
Does this mean that itīs better to compile o from source?
What is the right and complete link for this branch?
Sorry, donīt understand exactly what you mean but remember, Iīm new in the Linux (and raspberry) world (since X-mas).

Thanks

Andreas
__________________

__________________
Andreas29 is offline   Reply With Quote
Reply

Tags
enc, opencpn

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN on Raspberry PI2 starnakel OpenCPN 284 16-03-2017 13:58
Has anyone gotten any Plugins working on Raspberry Pi2 Uncle Augie OpenCPN 5 27-06-2015 06:19
Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work? Gunnar1 OpenCPN 53 16-06-2015 02:10
Raspberry Pi2 ratsea OpenCPN 5 26-02-2015 08:41
The Perfect Platform for OpenCPN ? Raspberry Pi night0wl OpenCPN 10 08-09-2011 19:09


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 19:40.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.