default to use accelerated opengl?

Bug #287717 reported by Chris Bainbridge
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
josm (Ubuntu)
Fix Released
Undecided
Stéphane Brunner

Bug Description

Binary package hint: josm

According to http://wiki.openstreetmap.org/index.php/JOSM#Which_editor_to_use the command line to enable 2d acceleration is : java -Dsun.java2d.opengl=True -jar /usr/share/josm/josm.jar

with josm-0.0.0.20080330-1 /usr/bin/josm just does: $JAVACMD -jar /usr/share/josm/josm.jar "$@"

Maybe acceleration should be enabled by default?

Revision history for this message
Stéphane Brunner (stephane-brunner) wrote :

Hello !

I just try it but running « java -Dsun.java2d.opengl=True -Xmx512M -jar /usr/share/josm/josm.jar » but I don't found any changes !
Is it faster on your configuration ?

PS: the good URL is http://wiki.openstreetmap.org/index.php/JOSM#Start_JOSM

Changed in josm (Ubuntu):
assignee: nobody → Stéphane Brunner (stephane-brunner)
status: New → Incomplete
Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

Using acceleration should be faster. I can't actually compare (possibly due to bug #250931 )

When I start JOSM with "java -Dsun.java2d.opengl=True -jar ~/osm/josm-latest.jar"
I get the error: "Could not enable OpenGL pipeline for default config on screen 0".

I can confirm that the video in JOSM does get very slow at times - with a whole city downloaded it can take 5 seconds to register each mouse click which is unusable.

Revision history for this message
Stéphane Brunner (stephane-brunner) wrote :

Especial if you have some problem to run with it I wont activate it by default but I can add something like this:

...

JAVA_ARGS=""
if [ -f /etc/default/josm ] ; then
 . /etc/default/josm
fi

...

exec $JAVACMD $JAVA_ARGS -jar /usr/share/josm/josm.jar "$@"

Than it's possible to add it and it don't rollback on update.

CU
Stéph

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

It doesn't cause a problem for me - it just doesn't enable acceleration (possibly because I use a laptop video chipset with dual screen). But for the average user it should work fine. AFAIK -Dsun.java2d.opengl=true is the recommended setting upstream. I can't see any reason why you would default to not using OpenGL acceleration? My problem is not with OpenGL acceleration, it is with the opposite - software rendering is very slow!

btw, I have also had problems with the JRE crashing editing large maps, I now use -Xmx1024M which has fixed the problem.

Revision history for this message
Stéphane Brunner (stephane-brunner) wrote :

It because I see somewhere that I can do some problem, but I don't remember where !

For the speed I test it with the booth option on an nvidia chipset and I don't see a difference, but it's possible that there is a problem with my config.

Finally I think that it should have en easy way to enable or disable it. It for that I purpose to add a /etc/default/josm file.

As soon as the next tested release is out I will add this.

CU
Stéphane

Changed in josm (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Bas Couwenberg (sebastic) wrote :

The josm package in Debian has been updated to fix this issue, see:

 https://anonscm.debian.org/cgit/pkg-grass/josm.git/commit/?id=d9f76e0ec7ef6899c7b545555166166eb62a20c1

The -Dsun.java2d.opengl=True and -Xmx1024m options are now included in /etc/default/josm, but disabled by default.

The changes have also been forwarded upstream for use in the JOSM PPA:

 https://josm.openstreetmap.de/ticket/13002

Changed in josm (Ubuntu):
status: In Progress → Fix Committed
Changed in josm (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.