I cannot insert VM Args and cannot set Max Heap/VRAM

samy2006

Member
Joined
Sep 16, 2022
Posts
19
Likes
1
hello everyone,


I cannot insert VM Args and cannot set Max Heap/VRAM.


Unfortunately I have the problem that I cannot enter any VM Args. The patch from user Per did not work for me. Also I cannot set a fixed heap/VRAM, the settings are not applied.
How did you solve this?
 

samy2006

Member
Joined
Sep 16, 2022
Posts
19
Likes
1
No problem, thanks for your help.

The paths are all correct. How exactly did you proceed?maybe I made a mistake? the command

"cp" cannot be used without an additional parameter. i used cp -r for this
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
Let's take a step back here, to make sure we did not miss anything :)

You tried adding the arguments through 'options' > 'advanced settings' in the MW startup menu ?
(between quotes, like @Per suggested, and untick the 'use default' boxes)

hC8iKb.jpg



EDIT: the cp command should work without additional flags BTW :unsure:
 

samy2006

Member
Joined
Sep 16, 2022
Posts
19
Likes
1
Let's take a step back here, to make sure we did not miss anything



You tried adding the arguments through 'options' > 'advanced settings' in the MW startup menu ?

(between quotes, like @Per suggested, and untick the 'use default' boxes)

hC8iKb.jpg



EDIT: the cp command should work without additional flags BTW :unsure:

I have inserted execution characters. "use default" is untick.

Note: even without patching, the values are not applied if I deselect use default



error without -r:
cp: -r was not specified, therefore the directory '/usr/share/motivewave' is omitted
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
I have inserted execution characters. "use default" is untick.

Note: even without patching, the values are not applied if I deselect use default



error without -r:
cp: -r was not specified, therefore the directory '/usr/share/motivewave' is omitted
OK, thank you for your answers. This clarifies the situation a bit for me :)

First of all: the fact that your settings are not applied is consistent with @Per 's reportings. So that makes sense (MW should fix the parsing of arguments, but it makes sense that the startupscript 'as is' does not work on your end)
Secondly: it seems you are trying to copy a complete folder, and not a single file.
The idea is to make a copy of your MW-startup-script to your home folder, patch it there (so leaving the original intact) and then use that new patched file to start MW.

These steps should work:
  • cd into /usr/bin
  • do 'file motivewave' in that directory (it should spit out that it is a symlink to /usr/share/motivewave/run.sh)
  • make a new directory in your home that will hold your patched MW-startupscript: mkdir ~/bin
  • then copy the correct startup-script to your home: cp /usr/bin/motivewave/ ~/bin/motivewave
  • cd into the new bin folder: cd ~/bin
  • get the file you downloaded from @Per's answer to that same folder: cp ~/Downloads/motivewave.txt ~/bin
  • (check that both files now exist in that folder by running ls. You should see both the motivewave symlink and the .txt)
  • run the patch: patch -p0 < motivewave.txt (this will remove the lines 40 to 66 and replace them with the code block at the bottom or the .txt file (below --- 40, 51 ---)
  • at this time running this patched script should work, but it did not do so on my end. I got an error that one of the numbers was empty.
    To fix: go into the startup.ini file, and add/change values there : nano ~/.motivewave/startup.ini
  • run the script (still from within ~/bin): ./motivewave
 
Last edited:

samy2006

Member
Joined
Sep 16, 2022
Posts
19
Likes
1
OK, thank you for your answers. This clarifies the situation a bit for me :)

First of all: the fact that your settings are not applied is consistent with @Per 's reportings. So that makes sense (MW should fix the parsing of arguments, but it makes sense that the startupscript 'as is' does not work on your end)
Secondly: it seems you are trying to copy a complete folder, and not a single file.
The idea is to make a copy of your MW-startup-script to your home folder, patch it there (so leaving the original intact) and then use that new patched file to start MW.

These steps should work:
  • cd into /usr/bin
  • do 'file motivewave' in that directory (it should spit out that it is a symlink to /usr/share/motivewave/run.sh)
  • make a new directory in your home that will hold your patched MW-startupscript: mkdir ~/bin
  • then copy the correct startup-script to your home: cp /usr/bin/motivewave/ ~/bin/motivewave
  • cd into the new bin folder: cd ~/bin
  • get the file you downloaded from @Per's answer to that same folder: cp ~/Downloads/motivewave.txt ~/bin
  • (check that both files now exist in that folder by running ls. You should see both the motivewave symlink and the .txt)
  • run the patch: patch -p0 < motivewave.txt (this will remove the lines 40 to 66 and replace them with the code block at the bottom or the .txt file (below --- 40, 51 ---)
  • at this time running this patched script should work, but it did not do so on my end. I got an error that one of the numbers was empty.
    To fix: go into the startup.ini file, and add/change values there : nano ~/.motivewave/startup.ini
  • run the script (still from within ~/bin): ./motivewave
Thank you for the detailed instructions. Unfortunately, I can't get it to work




Results:
---------------------------------------------------------------------------------------------------
root@pc01:~# cd ~/bin
root@pc01:~/bin# ls
derby.log motivewave motivewave.txt
root@pc01:~/bin# patch -p0 < motivewave.txt
Ignoring potentially dangerous file name /usr/bin/motivewave
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|*** /usr/bin/motivewave 2022-03-02 22:18:05.000000000 +0000
|--- bin/motivewave 2022-03-27 12:43:20.371761873 +0100
--------------------------
File to patch:
------------------------------------END--------------------------------------------------------------





1.when i use bin/motivewave as file to patch:

--------------------------------------------------------------------------------------------------
File to patch: bin/motivewave
bin/motivewave: No such file or directory
Skip this patch? [y]
--------------------------------------END------------------------------------------------------------

2.when i use /usr/bin/motivewave as File to patch:

-------------------------------------------------------------------------------------------------
File to patch: /usr/bin/motivewave
File /usr/bin/motivewave is not a regular file -- refusing to patch
1 out of 1 hunk ignored -- saving rejects to file /usr/bin/motivewave.rej
root@pc01:~/bin#
---------------------------------------END----------------------------------------------------------
 
Last edited:

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
and when you specify the target file as ~/bin/motivewave ?
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
But this tells us the file is indeed there :
root@pc01:~/bin# ls
derby.log motivewave motivewave.txt

Very strange !! :unsure:

Can you try to apply the patch manually ?
Simply remove lines 40 to 66 and paste this there:
# Pull information from the .settings file in the motivewave directory
SETTINGS_FILE=~/.motivewave/startup.ini
!
! if [ -f ${SETTINGS_FILE} ]
! then
! source ${SETTINGS_FILE}
! [[ -n "${MAX_HEAP}" ]] && MAX_HEAP="-Xmx${MAX_HEAP}"
! [[ -n "${OVERRIDE_SCALE}" ]] && SCALE="${OVERRIDE_SCALE}"
fi

if [[ $MAX_VRAM == "" ]]; then MAX_VRAM="2048M"; fi
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
To be clear: you start MW by doing "./motivewave", right ?

Is there no output at all ? No errors ?
 

samy2006

Member
Joined
Sep 16, 2022
Posts
19
Likes
1
But this tells us the file is indeed there :


Very strange !! :unsure:

Can you try to apply the patch manually ?
Simply remove lines 40 to 66 and paste this there:
I had the solution and re-installed my system to repeat all the steps again. Unfortunately, it didn't work.

When I executed ./motivewave in the terminal I got the error message gsettings - command not found. I installed the libglib2.0-bin package and the error message no longer appeared.

What I remember is that I had added the entry SCALE=100% in the startup.ini and it worked.

I did not run the patch from ~/bin but from /bin and then the patch worked. Those were my memories...I'll keep trying, I'm totally mad that I didn't memorize the process correctly.
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
Well, if you keep trying, it will keep spitting out errors, offering clues to where the (next) problem might be. :)

I take it this is on a VPS ?
 

samy2006

Member
Joined
Sep 16, 2022
Posts
19
Likes
1
Well, if you keep trying, it will keep spitting out errors, offering clues to where the (next) problem might be. :)

I take it this is on a VPS ?
So, I have found the solution:

the patching did not work, because only the link of the file "motivewave" was tried to be patched. On my test system the source file is located in /root/bin/motivewave:

File to patch: /root/bin/motivewave

This allowed the patch to work.

However, it didn't work right away because nothing happened when I started it. Only when I entered the value SCALE=100% in the startup.ini could Motivewave be started.

Before applying the patch every time, I would save the patched file and simply copy it into the folder. Under /usr/share/applications I would edit the starter and add the entry (in my case): Exec=/root/bin/motivewave (the path to the patched version). Also save this file and then add it to /usr/share/applications.

Thank you very much for your time and help Spin

Ps: The manual settings of Max Heap and MaxVRAM are not accepted unless they are entered as arg.
 
Last edited:

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
Very well done @samy2006 !! (y)

And thanks for your write-up: others will surely benefit from it in the future ! :)

Glad I could help (a little)
 

flaviuspop

Member
Joined
Sep 25, 2023
Posts
8
Likes
2
Ps: The manual settings of Max Heap and MaxVRAM are not accepted unless they are entered as arg.
What so you mean by this? Is it useless to not use defaults and have own value because it does not apply?

If yes, the solution discussed works on macos, too?

Thanks
 

samy2006

Member
Joined
Sep 16, 2022
Posts
19
Likes
1
What so you mean by this? Is it useless to not use defaults and have own value because it does not apply?

If yes, the solution discussed works on macos, too?

Thanks
The setting in point 1 (see picture), i.e. uncheck the box and set the value manually, did not work. The values had to be entered for Max Heap and Max VRAM under point 2 (see image).

I have no experience with MacOs, sorry...

Settings.png
 
Top