Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 21-02-2018, 01:53   #1
Registered User

Join Date: Mar 2016
Posts: 19
General Question about Raspberry OpenCPN and OpenGL

Hello,
since OpenGL is available and more or less supported by the Raspberry OS I tried to use it.

Well after startup OpenCPN usually works very well with OpenGL and due optimisation it got faster and faster.

Not matter if the kms or fkms driver is used in /boot/config.txt it seems that OpenGL gets a bit shaky if the PI plotter is running for hours/days without a reboot.

Ususally I notice that the "start" menue is flickering black (if fullscreen mode is exited and something is done on the desktop). Sometimes this flickering starts in the menues of OpenCPN itself.

I poked around a lot with settings of memory split, memory and CPU count OpenCPN uses, but this did not help much.

It kinda seems that this may not be an issue of OpenCPN directly (?), because if OpenGL is enabled, the desktop-background image is not shown. At least with the 7" DSI display.

Does anyone noticed similar issues or can provide some settings/ideas to fix that?

My Set-Up:
RPI3, Raspbian Jessie, OpenCPN 4.8.2, HW OpenGL, memory split 128MB, FKMS enabled, no memory/CPU-count adjustements in OpenCPN, 7" DSI display, Kernel 4.14
kutt is offline   Reply With Quote
Old 21-02-2018, 08:01   #2
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,112
Re: General Question to Raspberry OpenCPN and OpenGL

kutt..
I've RPi 2b and the 7" screen as well. I use to build from source and it's working fine also with OpenGL checked.
The only system change I've made is to:
in /boot/config.txt
framebuffer_depth=32
framebuffer_ignore_alpha=1
I also have the:
framebuffer_width=800
framebuffer_height=400

And since my screen is upside down I use:
#display_rotate=2
lcd_rotate=2
Hakan is offline   Reply With Quote
Old 21-02-2018, 08:33   #3
Registered User

Join Date: Mar 2016
Posts: 19
Re: General Question to Raspberry OpenCPN and OpenGL

Hey,

I use the same settings except:
framebuffer_width=800
framebuffer_height=400

So you don't have the flickering?

I can make a short video to show what I mean...
kutt is offline   Reply With Quote
Old 21-02-2018, 08:59   #4
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,112
Re: General Question to Raspberry OpenCPN and OpenGL

Kutt..
No flickering
Håkan
Hakan is offline   Reply With Quote
Old 21-02-2018, 09:37   #5
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,101
Re: General Question to Raspberry OpenCPN and OpenGL

Quote:
Originally Posted by Hakan View Post
Kutt..
No flickering
Håkan
Here also no flickering. Had this flickering also before. Upgraded to the latest kernel version and now it works very well.

And screen works without problems is moving very fast.

But get an error messages about openjdk-8-jre files message. Running OpenPlotter 0.17 and Linux Stretch.

Regards,

Bram
verkerkbr is offline   Reply With Quote
Old 21-02-2018, 10:38   #6
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,101
Re: General Question to Raspberry OpenCPN and OpenGL

Quote:
Originally Posted by verkerkbr View Post
Here also no flickering. Had this flickering also before. Upgraded to the latest kernel version and now it works very well.

And screen works without problems is moving very fast.

But get an error messages about openjdk-8-jre files message. Running OpenPlotter 0.17 and Linux Stretch.

Regards,

Bram
Did another trial:

I'am used to have two windows open with OpenCPN. One for the details of the charts and one with an overview. Both using the same charts.

But if I'am opening a second version the flickering starts and the system stalls.

VC4 driver to on and also in OpenCPN OpenGL to on.

The longer I use it, more errors appear.
verkerkbr is offline   Reply With Quote
Old 21-02-2018, 11:17   #7
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,101
Re: General Question to Raspberry OpenCPN and OpenGL

Raising the video memory helps to avoid the problems. The main processor load is still rather low with the VC4 driver on. Therefore raising the video memory seems to help.
verkerkbr is offline   Reply With Quote
Old 21-02-2018, 13:03   #8
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: General Question about Raspberry OpenCPN and OpenGL

Get a better power supply. That’s the #1 reason RPi 3 starts acting weird.

Also, I have issues with graphics if I build wxWidgets from sources but no issues if i use the libs provided via standard apt-get.
transmitterdan is offline   Reply With Quote
Old 21-02-2018, 13:58   #9
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,101
Re: General Question to Raspberry OpenCPN and OpenGL

Dear T,

powersupply is the original Raspberry Power supply.

This is not a standard Raspberry setup, but with VC4 driver on and also OpenCPN working in de OpenGL mode. This is a great improvement with fast screen movements.

This works now with Linux Stretch and latest kernel update to 4.14.20-V7+.

Video memory at 160.

However no two windows open.

Regards,


Bram
verkerkbr is offline   Reply With Quote
Old 21-02-2018, 16:14   #10
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,414
Re: General Question to Raspberry OpenCPN and OpenGL

I tried a few months ago, and found the vc4 driver to be unstable. Maybe it's better now but doesn't sound good.


Furthermore, software opengl uses a lot of cpu but it's mostly usable. It works better than without opengl enabled. I think this is because the standard x11 drivers for raspberry pi are also very poor. Unfortunately software gl via llvm pipe randomly crashes, but mostly it's not too bad.

I think the solution is to use a different processor that has a decent opengles driver, like mali.
seandepagnier is offline   Reply With Quote
Old 21-02-2018, 23:22   #11
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: General Question to Raspberry OpenCPN and OpenGL

Quote:
Originally Posted by boat_alexandra View Post
...
I think the solution is to use a different processor that has a decent opengles driver, like mali.
e.g. Rock64 (with RK3328 Quad-Core ARM Cortex A53 64-Bit Processor)
up to 4GB 1866MHz LPDDR3 memory (I've found 4 GB to be overkill)
with the (low-end) ARM Mali-450MP2 Dual-core GPU (OpenGL ES 1.1)

http://wiki.pine64.org/index.php/ROCK64_Main_Page
sailorF54 is offline   Reply With Quote
Old 21-02-2018, 23:41   #12
Registered User

Join Date: Mar 2016
Posts: 19
Re: General Question to Raspberry OpenCPN and OpenGL

I think the power supply is not the issue. My PI gets it's power not via micro USB. It gets it directly via the GPIO pins. Also the Display has it's own powerline. The regulator is set to 5.3V to compensate for any loses on the cables.

I checked the stability via my oscilloscope and the voltage is stable.

@boat_alexandra yes - thats exactly what I had. So I didn't use OpenGL. Now with the new version of OpenCPN I try again to get to the bottom of this.
However I think this is no issue of OpenCPN directly, because the desktop starts to flicker...

To anyone who does not have this issue: In my initial post I wrote what settings and drivers I use. Can you please provide "your" settings/kernel version etc.?
kutt is offline   Reply With Quote
Old 22-02-2018, 00:35   #13
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,101
Re: General Question to Raspberry OpenCPN and OpenGL

Quote:
Originally Posted by boat_alexandra View Post
I tried a few months ago, and found the vc4 driver to be unstable. Maybe it's better now but doesn't sound good.


Furthermore, software opengl uses a lot of cpu but it's mostly usable. It works better than without opengl enabled. I think this is because the standard x11 drivers for raspberry pi are also very poor. Unfortunately software gl via llvm pipe randomly crashes, but mostly it's not too bad.

I think the solution is to use a different processor that has a decent opengles driver, like mali.
Dear BA,

i have tried OpenGL also several times in past and also found it unstable.

But with the still the same VC4 driver in use, things have improved. At first with VC4 driver on and OpenGL in OpenCPN to off. Worked allready much better.

Now with the latest kernel 4.14.20 things are improved again and it now works very fast with also OpenGL to on in the OpenCPN settings.

Now the flickering has gone. I have raised the video memory setting to 160.

Tried OpenCPN versie for Xenial and for Trusty. I have the impression that the Trusty version gives somewhat smoother movement of the screen.

And you can clearly see that the main processor is only used for around 27% maximum.

Working on Linux Stretch and OpenPlotter.

The only thing I'am missing is the ability to open two windows. One for the details and one for the overview. This works very nice in Linux with the same chartset and it is a simple to switch from one screen to the other.

I have to do longer trials with this Opengl setup to see if it stays reliable.

Regards,

Bram
verkerkbr is offline   Reply With Quote
Old 22-02-2018, 00:45   #14
Registered User

Join Date: Mar 2016
Posts: 19
Re: General Question to Raspberry OpenCPN and OpenGL

Do you use the kms or the fkms driver? (in config.txt)

With the kms the screen just stays black? With fkms it looks quite nice...

An other Issue in OpenCPN: CM93 or BSP it looks fine with OpenGL. But when s63 is used the charts stay gray sometimes. But only with OpenGL enabled, software is fine.
kutt is offline   Reply With Quote
Old 22-02-2018, 02:37   #15
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 1,101
Re: General Question to Raspberry OpenCPN and OpenGL

Quote:
Originally Posted by kutt View Post
Do you use the kms or the fkms driver? (in config.txt)

With the kms the screen just stays black? With fkms it looks quite nice...

An other Issue in OpenCPN: CM93 or BSP it looks fine with OpenGL. But when s63 is used the charts stay gray sometimes. But only with OpenGL enabled, software is fine.
Dear K,

KMS works better then FKMS. This gives lock-ups.

CM93 charts works fine. But it is important to load only one type of chartsets.

Video memory reduced to 128. Because of the AIS objects.

See attached video of CM93 chart.

S-63 plugin not tested. Are the userpermit and install permit stil valid ? And is the S-63 plugin switched on ?

Regards,

Bram
Attached Files
verkerkbr is offline   Reply With Quote
Reply

Tags
opencpn, enc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 3.3.2028 VMH Charts Working but a new OpenGL problem Rasbats OpenCPN 6 06-09-2014 13:49
Comproblem on Raspberry Pi and OpenCPN vagspel OpenCPN 4 26-12-2012 05:01
Raspberry Pi and OpenCPN 3.1.915 spillemw OpenCPN 20 24-09-2012 02:30
OpenGL for OpenCPN bdbcat OpenCPN 72 15-11-2011 00:17
Wanted For Free: OpenCPN + WIN CE/OpenGL-ES CaptGreg Classifieds Archive 1 06-09-2010 19:46

Advertise Here


All times are GMT -7. The time now is 23:34.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.