# \[SOLVED\] P2D/P3D sketches won't start on fresh Ubuntu 18.04 installation

**URL:** <https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568>\
**Category:** Processing\
**Created:** [September 16, 2018, 8:57am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568 "2018-09-16T08:57:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 8:57am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/1 "2018-09-16T08:57:58Z")

</div>

**EDIT:** Solution that worked for me is rolling back to from 3.4 to 3.3.6. Here’s the link to this version:

> **[processing/processing](https://github.com/processing/processing/releases/tag/processing-0263-3.3.6)**
>
> Source code for the Processing Core and Development Environment (PDE) - processing/processing

I don’t have any prior experience with anything Linux, but I have been using Processing on Windows machines for multiple months now. I managed to start Processing on Ubuntu Desktop 18.04. Sketches in default (JAVA2D) mode work fine, but when I try to switch it to P2D or P3D, I get this error:

```auto
java.lang.RuntimeException: Profile GL4bc is not available on X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x7fd4ac01ee10, owner true, ResourceToolkitLock[obj 0x247bc369, isOwner true, <2044433e, 6546c952>[count 1, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>]]], but: [GLProfile[GLES1/GLES1.hw], GLProfile[GLES2/GLES3.hw], GLProfile[GL2ES1/GLES1.hw], GLProfile[GL4ES3/GL4.hw], GLProfile[GL2ES2/GL4.hw], GLProfile[GL4/GL4.hw], GLProfile[GLES3/GLES3.hw], GLProfile[GL4/GL4.hw], GLProfile[GL3/GL4.hw], GLProfile[GL2GL3/GL4.hw]]
	at processing.opengl.PSurfaceJOGL$2.run(PSurfaceJOGL.java:410)
	at java.lang.Thread.run(Thread.java:748)

```

My GPU is AMD Radeon R5 M330

Any attempts on googling any part of the error result in me finding questions about same(or similar) errors in other applications, which have their own solutions, which I’m not sure can be applied to Processing.

What should I do to get P2D/P3D sketches working?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 16, 2018, 9:34am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/2 "2018-09-16T09:34:07Z")

</div>

More than 5 years I don’t use Linux. 🐧  
But when I did, I had a closed source version driver for my nVidia video. 🏎  
And Processing worked well w/ it. 👌

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 9:39am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/3 "2018-09-16T09:39:27Z")

</div>

I guess I should try installing or updating graphics drivers for my AMD GPU too. However, none seem to support my R5 M330. AMD’s site, when trying to look up drivers for that GPU, simply offers only Windows drivers, and any open source AMD drivers that I found don’t support it(at least in the supported GPUs list - and I don’t want to take risks with this).

The funny part is that 3D games seem to run faster on this fresh Ubuntu installation than they did on this same hardware on Windows 10 with appropriate drivers!

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 10:14am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/4 "2018-09-16T10:14:46Z")

</div>

> [@GoToLoop](#):
>
> had a closed source version driver for my nVidia video.

There’s no such thing as a closed source AMD graphics driver on Linux (any more). A good reason to choose AMD over nVidia!

So, is this card using the Radeon or AMDGPU driver? I have no problems with the AMDGPU driver on Ubuntu 18.04. Are you using latest Processing?

There should be no need to install a driver not included in Ubuntu. That will likely screw things up further.

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 10:17am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/5 "2018-09-16T10:17:21Z")

</div>

I don’t think I use either of those - I didn’t install any graphics drivers, because of reasons mentioned above - and also because I’ve heard that Ubuntu already comes with built-in AMD drivers, so I didn’t bother.

Yes, I’m using latest Processing - downloaded it from the site about 3 hours ago.

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 10:29am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/6 "2018-09-16T10:29:17Z")

</div>

> [@Architector\_4](#):
>
> because I’ve heard that Ubuntu already comes with built-in AMD drivers, so I didn’t bother.

Yes, the two mentioned! It should be using one of them. It will have been installed automatically. There are a few issues in the Processing queue related to this (or similar) exception too.

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 10:30am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/7 "2018-09-16T10:30:22Z")

</div>

Allright, good to know.  
But I don’t know how to check which one my GPU is using. How do I do that?

edit: Just tried to check using

```auto
lspci -k | grep -EA3 'VGA|3D|Display' 

```

And it says that both AMDGPU and Radeon are available, but it uses Radeon.

Could this be a problem? How do I switch to AMDGPU?

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 10:50am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/8 "2018-09-16T10:50:33Z")

</div>

_If_ your card is supported by both, you could look at eg. [https://askubuntu.com/questions/927601/i-think-im-using-radeon-instead-of-amdgpu-how-do-i-change](https://askubuntu.com/questions/927601/i-think-im-using-radeon-instead-of-amdgpu-how-do-i-change)

**Do not** try this unless you’re confident you know how to revert without a graphical interface (just command line) if it fails.

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 10:52am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/9 "2018-09-16T10:52:29Z")

</div>

Well, I’m not confident that I know how to revert if it fails - and I suspect it will - so I’d want to avoid that by now.

Is there any other way to make P2D/P3D sketches work?

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 10:57am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/10 "2018-09-16T10:57:02Z")

</div>

Actually, if you know how to get into grub on boot you can try adding the blacklist command with the edit option. That will revert on reboot so safer!

Not sure there is another option. I think it’s related to various JOGL bugs. Processing already ships with a patched version of this. @gohai might have an idea why this is still failing here?

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 11:36am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/11 "2018-09-16T11:36:37Z")

</div>

Just changed it to AMDGPU. That command above now says that I’m using that.  
However, the error that Processing gives is still exactly the same, that didn’t help.

(P.S. Is it just me, or text fonts seem to be a tiny bit different now?)

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [September 16, 2018, 11:46am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/12 "2018-09-16T11:46:01Z")

</div>

Except generally Nvidia has best opengl support.

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [September 16, 2018, 11:53am UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/13 "2018-09-16T11:53:25Z")

</div>

I think glxinfo should be instructive

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 12:04pm UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/14 "2018-09-16T12:04:07Z")

</div>

> [@monkstone](#):
>
> Except generally Nvidia has best opengl support.

Historically maybe, but times are changing, and I’ve had far more issues with closed source drivers screwing up systems in the past.

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 12:08pm UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/15 "2018-09-16T12:08:21Z")

</div>

What is glxinfo?  
I tried typing that into the terminal, it spewed out a large amount of display and OpenGL related information, in which I don’t see anything particularly interesting.

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 12:23pm UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/16 "2018-09-16T12:23:10Z")

</div>

Dang! So it’s not just interaction between Processing and the driver then. Something about your system / GPU too.

You could have a try at setting PJOGL.profile values from 1 to 4 - see [https://github.com/processing/processing/wiki/Advanced-OpenGL](https://github.com/processing/processing/wiki/Advanced-OpenGL)

You haven’t installed anything that would have installed libjogl from Ubuntu packages have you?

It’s possible different drivers trigger slightly different font rendering.

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 12:31pm UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/17 "2018-09-16T12:31:11Z")

</div>

Tried setting PJOGL.profile to different values and running the sketch - 0,1,2,3,4,5,9999… Nothing changed at all, same error message each time.

(to clarify, test sketch I’m using is nothing more than size(500,500,P2D); and rect(mouseX,mouseY,50,50); )

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 12:34pm UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/18 "2018-09-16T12:34:42Z")

</div>

> [@Architector\_4](#):
>
> Tried setting PJOGL.profile

In settings() not setup()? If so, I’m fresh out of other ideas. I recommend posting an issue on GitHub.

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [September 16, 2018, 12:45pm UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/19 "2018-09-16T12:45:07Z")

</div>

Oh, I tried it in setup(). However, I just retried it in settings() too, but still no effect.  
Although, setting it to 1 gives a different error:

```auto

com.jogamp.opengl.GLException: Not a GL2ES2 implementation
	at jogamp.opengl.es1.GLES1Impl.getGL2ES2(GLES1Impl.java:4959)
	at processing.opengl.PJOGL.getGL(PJOGL.java:260)
	at processing.opengl.PSurfaceJOGL$DrawListener.init(PSurfaceJOGL.java:888)
	at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
	at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
	at jogamp.opengl.GLAutoDrawableBase$1.run(GLAutoDrawableBase.java:431)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
	at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
	at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
	at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

```

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [September 16, 2018, 1:18pm UTC](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568/20 "2018-09-16T13:18:50Z")

</div>

Maybe this is relevant too actually? [https://github.com/processing/processing/issues/5476](https://github.com/processing/processing/issues/5476)

You could try 3.3.6.

[Next page](https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568.md?page=2)
