Posts: 2,510
Joined: Dec 2012
Reputation:
216
2015-05-29, 21:05
(This post was last modified: 2015-05-29, 21:19 by brazen1.)
This is one isn't working. Flashes CMD, panel flashes, but doesn't switch. Tried repeatedly. Fwiw, searched QRes in regedit and found no instances. So, restore did take them out.
Posts: 2,510
Joined: Dec 2012
Reputation:
216
2015-05-29, 22:07
(This post was last modified: 2015-05-29, 22:57 by brazen1.)
Not working at all. No CMD, no panel flash, nothing. Will anything write to registry using this?
Maybe this?
shell.Run(fs.GetAbsolutePathName(fs.BuildPath(fs.GetParentFolderName(WScript.ScriptFullName), 'QRes.exe')) + ' /r:' + (refreshRate == 60 ? 24 : 60), 0, true);
vs.
shell.Run(fs.GetAbsolutePathName(fs.BuildPath(fs.GetParentFolderName(WScript.ScriptFullName), 'QRes.exe')) + ' /d /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);
Ok. I did edit that line and it's working. Rebooted twice to make sure and desktop always goes to 60Hz as it should. Also confirmed that Kodi 'Match Refresh Rate' still auto switches and is unaffected. Also confirmed that mirrors to other HDMI inputs are unaffected and operable using this. 2 minor things that are so minor, I don't even want to bother you with them. I have to double click it 2 times, 4 in total to work. The 1st double click, the panel flashes to black but remains at 60Hz and I suspect it's querying current state. The 2nd double click, panel flashes to black and switches. It does write to registry a handful of times so, it remembers last state and boots to that last state.
Thanks for that upload. You're awesome.
Posts: 423
Joined: Sep 2010
Reputation:
12
a11599
Team-Kodi Member
Posts: 423
Okay, it turns out your system does not support the /d switch of QRes.exe.
Try this one, hopefully it will get rid of the need for having to start twice:
shell.Run(fs.GetAbsolutePathName(fs.BuildPath(fs.GetParentFolderName(WScript.ScriptFullName), 'QRes.exe')) + ' /r:' + (refreshRate >= 59 ? 24 : 60), 0, true);
Windows 8 has a habit to set 59 Hz if you request 60 Hz.
Posts: 2,510
Joined: Dec 2012
Reputation:
216
2015-05-30, 14:52
(This post was last modified: 2015-05-30, 15:34 by brazen1.)
You are exactly correct. There have been times in the past I noticed windows had set to 59Hz but I noticed no difference in the render. I don't know what prompted it to do this? Never knew it was even at this setting until by chance looked in properties. It's been some time since it's done it though. I'm on 8.1 not 8 if that makes a difference? I was using dual monitors at different resolutions back then though. I think that's what confused Windows?
Replacing the "60" with a "59" and replacing the "=" with a ">" and removing the "/d" in that line made no difference.
Could it be because we are omitting /x 1920 /y 1080 ?
Once again, you've already extended yourself to at least one person in this community above and beyond. I don't want to use you up but know your efforts are greatly appreciated and you've already earned the 'Genius' title in my eyes. Thank you for your dedication.
Went ahead and added this line.
shell.Run(fs.GetAbsolutePathName(fs.BuildPath(fs.GetParentFolderName(WScript.ScriptFullName), 'QRes.exe')) + ' /x 1920 /y 1080 /r:' + (refreshRate >= 59 ? 24 : 60), 0,
All is perfect I think? I'll post back if I find any adverse affects. So far I used it, rebooted and it went to 60Hz as it should. Used again a few times and it's quick. I took it one step further. I added a quick launch tool bar to W8.1 and linked the .js. One click for the switch now. One click to switch back. I don't think it can get any more perfect using this script. I notice the batch file has the /d and no 1920 1080 reference. If those were edited in your .bat, perhaps it wouldn't write to registry and clean up this whole hack? Meaning the part of remembering the last used state. I'll give you an example why this is important. In Kodi you have match refresh rate enabled. You're watching a 24FPS title and your panel is @24Hz because Kodi switched it as it should. You turn off your PC without stopping the playback, let alone quit Kodi. I do this often. Next reboot, the registry is going to remember that last 24Hz state and that's what you're going to boot to. Feel like editing your .bat knowing what we know from the above .js?