motivewave and linux performance improvements

alexjp

Member
Joined
Apr 7, 2021
Posts
5
Likes
8
Hi,

Just registered to say this about motivewave running in linux:

I am testing motivewave ( on trial for about a week ), both in linux and windows. I noticed that on windows it ran much better, especially with the Volume Imprint study in "ladder" style.

After much reading on the web and testing, now I have a much better performance on motivewave on linux, with what was before a very "jerky and slow" movement, into as smooth as in windows. As a bonus, the "mouse wheel" problem in linux is fixed ( i can use mouse wheel to increase and decrease bar width size, before it would not decrease ) !

What is needed is editing the run.sh file and adding these parameters:

-Djdk.gtk.version=2 -Dprism.forceGPU=true -Dsun.java2d.opengl=true -Dprism.order=es2,es1,sw,j2d -Dsun.java2d.pmoffscreen=false -Dprism.vsync=false -Dprism.lcdtext=false -Dawt.useSystemAAFontSettings=false


Notes:
* In my case, prism.forceGPU is necessary because with an amd card (rx580 in my case) it switches to sw rendering mode.

* prism.vsync=false and -Dsun.java2d.pmoffscreen=false seems to make things much smoother in general.

* -Djdk.gtk.version=2, -Dprism.lcdtext=false and -Dawt.useSystemAAFontSettings=false really help in making volume imprint "ladder mode" really smooth.
 

Spin

Well-known member
Joined
May 22, 2019
Posts
221
Likes
46
Hi there @alexjp and thank you for joining the MW-forums to tell us about your findings 😄

I have been struggling with that mouse-issue as well, for quite some time now.
I have also looked for a solution, but came up empty after hours of googling & testing stuff.

You are without a doubt more skilled ;)

I tried to implement your solution, but it does not seem to work.

Can you please be a little more specific ?
Where in that run.sh file should we past those lines ?
Which part is responsible for the weird mouse behavior ? (or is this interwoven with the GPU-stuff ?)

(I'm running Debian 10 with gdm3 by the way)


Thank you for your contribution ! (y)
 

alexjp

Member
Joined
Apr 7, 2021
Posts
5
Likes
8
Thanks @Spin !

Sorry, i should have been cleared:

in the script, the last line:
Code:
# Start the JVM.  For convenience java has been renamed to motivewave so that is easier to identify in the System Monitor
$SCRIPTDIR/jre/bin/motivewave $MAX_HEAP -Djdk.gtk.version=2 -Dprism.forceGPU=true -Dsun.java2d.opengl=true -Dprism.order=es2,es1,sw,j2d -Dsun.java2d.pmoffscreen=false -Dprism.vsync=false -Dprism.lcdtext=false -Dawt.useSystemAAFontSettings=false -Dprism.cacheshapes=all -Dprism.occlusion.culling=true -Dprism.scrollcacheopt=true -javaagent:"$SCRIPTDIR/jar/MotiveWave.jar" -Dname="MotiveWave"  -Djava.library.path="$SCRIPTDIR/lib" -DUserHome="$HOME" -Duser.dir="$HOME" -DappDir="$SCRIPTDIR" -DLibraryDirectory="$HOME/Library" -DDocumentsDirectory="$HOME/Documents" -DCachesDirectory="$HOME/Library/Caches" -DDesktopDirectory="$HOME/Desktop" -DDownloadsDirectory="$HOME/Downloads" -DSharedPublicDirectory="$HOME/Public" -Dprism.verbose=true -Dprism.maxvram=2048M -Dglass.gtk.uiScale=$SCALE -Dsun.java2d.uiScale=$SCALE -p "$SCRIPTDIR/javafx" --add-modules=javafx.controls,javafx.base,javafx.graphics,javafx.media,javafx.web,javafx.swing --add-exports javafx.web/com.sun.webkit.network=ALL-UNNAMED -classpath "$CP" $VM_ARGS MotiveWave
The specific parameter that fixes the mouse, is -Djdk.gtk.version=2, if i am not mistaken. ( yep confirmed, just tested it, and without it mouse doesn't work properly again ).

I didn't find on google a reference to the gtk2 mouse fix, but i saw some people having problems with java's gtk3 and wayland ( which i am using ), and some bugs on it, so decided to try with gtk2. it was just luck !
 

Spin

Well-known member
Joined
May 22, 2019
Posts
221
Likes
46
I confirm the mouse issue is resolved by @alexjp 's fix. What a relief !!! And my trading has already improved by 25% ;)

Thanks again @alexjp (y)(y)
 
Top