Using the "taskset" method only allows you to use 1 processor. This script will boot you PS CC 2019 with all CPUs working.
What does it do: The script will read and identity the CC 2019 boot process. If failure lines are found, kills the .exe and relaunch it. Another state doesn't return any errors, just a standy of the boot process. In this case the script start a countdown of 3 seconds to monitor if the process continues to boot. If not, kills the .exe and start it again.
Photoshop will 100% boot using the script. Your PS CC path (line 21) must be adapted to your configuration. The script can also be adapted to Photoshop CS 6. Enjoy it, and feel free to update it or make it better.
Code: Select all
#!/usr/bin/env python3 import subprocess, re, sys, signal error_keywords = re.compile('^.*(Assertion|0x65372a0).*$') success_keywords = re.compile('^.*(list_manager_QueryInterface).*$') exited = False process = None successful_launch = False timeout = 3 def kill_photoshop(signalnum, frame): if not successful_launch: print("No successful launch withing %d seconds, killing photoshop ..."%timeout, file=sys.stderr) process.kill() signal.signal(signal.SIGALRM, kill_photoshop) while not exited: process = subprocess.Popen(["wine64", "/home/artik/.wine/drive_c/Program Files/Adobe/Adobe Photoshop CC 2019/Photoshop.exe"], stderr=subprocess.PIPE) successful_launch = False signal.alarm(timeout) while True: if process.poll(): break line = process.stderr.readline() # print("got line %d and process %s"%(len(line),process.poll())) if len(line) == 0 and process.poll() is not None: if process.poll() == 0: exited = True break if line: print(line.strip()) if success_keywords.match(str(line)): print("Successful photoshop launch detected", file=sys.stderr) successful_launch = True if error_keywords.match(str(line)): print("Error keyword match, killing process", file=sys.stderr) process.kill() break print("Process return code %d"%process.wait())