def gpu_switch(config, switch_mode):

    print("Switching to mode : %s" % switch_mode)
    _send_command(switch_mode)

    if config["optimus"]["auto_logout"] == "yes":
        sessions.logout_current_desktop_session()
예제 #2
0
def gpu_switch(config, switch_mode):

    print("Switching to mode : %s" % switch_mode)
    command = {"type": "switch", "args": {"mode": switch_mode}}
    _send_command(command)

    if config["optimus"]["auto_logout"] == "yes":
        sessions.logout_current_desktop_session()