Is there way to disable or bypass the proximity/motion sensor in the Pimax 5k+?

I am using PiTool .121.

1 Like

I cannot use Pitool v. 121. It does not work with X-Plane. Had to revert to Pitool v. 112 to fly X-Plane.

1 Like

Hopefully someone from Pimax will read this thread. Maybe they can incorporate a fix for this in the next issue of Pitool.

1 Like

Don’ smack me if I am wrong here as I am at work can double check for you tonight. I took care that issues if i recall by going to windows settings for the the usb port the HMD uses and disabling allow windows to put it to sleep in power management. My HMD remains on untill i tell the pooddle to sit and turn off.

I cant recall exactly where that reside in windows 10

1 Like

You can effectively disable SteamVR device standby with the standby_timeout_min and enable_screen_saver options in C:/Users/[username]/AppData/Local/Pimax/runtime/profile.json.

Be sure to restart PiServiceLauncher (Start > Run > Enter services.msc > Right click PiServiceLauncher > Restart) after editing the file for the changes to take effect.

{
   "Pimax P2 8K Formal" : {
      ...
   },
   "enable_screen_saver" : 0,
   "standby_timeout_min" : 14400
}
6 Likes

Hi Genesis,

This may be the ticket I have been looking for. :+1::smiley:
I have added those two lines using Notepad++.
I will try this tomorrow. How do I restart the PiService Launcher?
Edit: Found it. Thank you.

Thank you so much for your advice! Really appreciate it.

All the best,

Werner

2 Likes

My 5k+ has never been to sleep in its life. Until I physically stop the power to it, it’s on.
I haven’t tried latest pitool. I’ve stopped using pimax as I can’t get the experience enjoyable at all.

Hi Genesis,

I have tried your suggestion and it works great! My Pmax 5k+ no longer falls asleep! :+1: :+1: :+1:

Thank you so much for for helping me out!!!

All the best,

Werner

1 Like

Hi Genesis,

I did run into a little problem. I have noticed that whenever I restart PiTool, I loose the entry because a new profile.json file is written. I ran PiService Launcher.exe as administrator, but now I am not sure if this really saves the modified file. What am I doing wrong? I am on PiTool v .112.
Any help is greatly appreciated.

Thank you!

Werner

There should be several options to deal with it:

All options that change the profile.json should be disabled when upgrading to a new PiTool version

Hi mojojojo,
I have read what you have written, but I don’t have a clue what this all means. And definitely do not know how to write a batch file. I am just a flight simulator enthusiast and not a programmer or computer geek. Sorry. All I did was try to follow the instructions of Genesis. My suspicion is that I did not save the modified file correctly.

You’ve done everything correctly, it’s just that PiTool will overwrite your changes every time you close it.
If X-Plane comes with Steam launch it from there instead of PiTool, simplest way is to create a desktop shortcut.

PiLauncherService restart is only required if you want to see your changes right now, otherwise they’ll take effect when you next start your computer.

I was thinking of an easy solution to add the paramters via script, dunno if I feel motivated enough and implement it just for science. :sunglasses:

Hi mojojojo,
Thank you for your insights!
Good idea to leave Pitool off. As long as I don’t have to make any changes in the Pitool settings, I can leave it off.
For the moment this seems to work.
Many thanks again and all the best,
Werner

You’re welcome Werner, enjoy your flights. :wink:

I’ve put this script together to add the parameters to the config file and preserving all modifications PiTool made.

Before using make sure you have an old backup file of profile.json for the PiTool version you are on

$configfile = "$env:LOCALAPPDATA\pimax\runtime\profile.json"
$injectObj ='{
	"enable_screen_saver": 0,
	"standby_timeout_min": 14400
}' | ConvertFrom-Json    

$jsonObj = (Get-Content $configfile) `
	-replace '""\s*:','"a":' `
	| ConvertFrom-Json

function Merge-Objects {
    Param ([PSCustomObject]$sourceObj, [PSCustomObject]$targetObj)
    $sourceObj.psobject.Properties | ForEach-Object {
        if ($_.TypeNameOfValue -eq 'System.Management.Automation.PSCustomObject' -and (Get-Member -inputobject $targetObj -name $_.Name -Membertype $_.MemberType)) {
            Merge-Objects -sourceObj ($sourceObj | Select -ExpandProperty $_.Name) -targetObj ($targetObj | Select -ExpandProperty $_.Name)
        } else {
            $targetObj | Add-Member -MemberType $_.MemberType -Name $_.Name -Value $_.Value -Force
        }
    }
}

Merge-Objects -sourceObj $injectObj -targetObj $jsonObj

($jsonObj | ConvertTo-Json) `
	-replace '"a"\s*:','"":' `
	| Set-Content $configfile

#cmd /c pause | out-null

Save it as a .ps1 file and then right click and Run with PowerShell. The changes won’t take effect until the service is restarted.

Note:
Pimax can somehow use “”: as a key and get away with it.
Edit:
Now more generic by merging two jsons

Hello mojojojo,

Thank you very much for your kind efforts to help me!
I will attempt to try this out tomorrow. However this may be beyond my capabilities since I have never done something like this before. We’ll see…:sweat_smile:
All the best,
Werner

1 Like

It saves the time to add the 2 configuration lines, that’s all. There’s no need to use it, just convenience :smile:

All the best to you too.

Hi mojojojo,

Thank you so much for this script! It really seems to work! :+1::sweat_smile::star_struck:

I have been turning Pitool on and off and the profile.json file is holding so far.

Much appreciate your support!

Thanks again and best regards,

Werner

I’m happy you’re getting a smooth X-Plane experience now.

Because I did a poor job at explaining what the script does, it only adds the configuration settings to the profile.json, the script cannot prevent losing the changes though.

Just to be save and needless to say, the headset should always be turned off between gaming sessions(a few minutes don’t matter) with this configuration to prevent degrading the panels.

In case you need to restart the pimax service often, here is a quicker and more convenient way.
https://community.openmr.ai/t/question-for-bat-programmers-start-stop-service-and-tasks/17209/8

Off topic:

My script only needs a little bit more polish and exchanging game specific settings between users would be easier. However there aren’t many settings for which it is useful and although generating a valid json structure isn’t difficult, it would be too much to ask for from the average user.

It would be cool to find a way to have pimax utilize the new settings on the fly without restarting the service, but probably not going to happen.

I never needed that with Pimax, but something learned at my day job, is to also do taskkill /IM PiServerLauncher.exe /F

So “refined” mega script is:

sc stop PiServiceLauncher & timeout 1 & taskkill /IM PiServerLauncher.exe /F & start PiServiceLaunch

Probably needs taskkill statements for all the Pimax services, but you get the idea.

Also I noticed that Pi services are not idle, even when HMD disconnected. Because my gaming requires a lot of tools started/stopped, I just start PiServiceLauncher as part of my game startup script and stop it after I am done.

Cheers :slight_smile:

1 Like

Awesome! Thanks for the improved version.

1 Like