Code Monkey home page Code Monkey logo

cycle-gpu's Introduction

Description

Notebook with dual GPU(Graphic Processing Unit) often experience poor battery life. This is generally caused by the use of dedicated GPU to run applications when in battery mode. Using dedicated monitor can be another important factor. Notebook without MUX switch had its GPU hardwired into external display port, forcing all aplication run in external monitor using the dedicated GPU.

This script aims to improve battery life on laptops with dual graphics cards by resetting the dedicated GPU. By resetting (disable and re-enable) the graphics card, all applications are forced to use the internal GPU.

[!WARNING] This script has only been tested for resetting graphics while running office applications such as browsers, messengers, and document processing. If a graphics reset is performed while using applications that require dedicated graphics, such as gaming or rendering, errors may occur.

Usage Instruction

  1. Enable GPU Activity Icon in Nvidia Control Panel

Enable GPU Activity Icon to monitor which app is using the GPU

image

  1. Detect your internal monitor name

Run this script on powershell to get internal monitor InstanceId

Get-PnpDevice -Status OK | Where-Object  {$_.class -like "Monitor"}

image

  1. Download script

Download this script and open cylce-gpu.ps1, edit this variable $internalDisplayName = "DISPLAY\LEN4*" using internal monitor InstanceId found in previous step

  1. Running the script

Righ click on cycle-gpu.bat and run as administrator

image

The script will reset your GPU when no external monitor is connected and running in battery. If you leave the script open it will run indefinitely

image

After external GPU is reset , the GPU Activity Icon will be grey out meaning no application run on external GPU

Disclaimer and License

This script is provided "as is", without warranty of any kind, express or implied. Use it at your own risk.

This project is licensed under the terms of the MIT license. The full text of the license can be found in the LICENSE file. By using this script, you agree to the terms and conditions of this license.

The author(s) of this script are not responsible for any damage, data loss, or any other issues that may occur as a result of using this script. Always make sure to backup your data and test the script in a controlled environment before using it in a production setting.

cycle-gpu's People

Contributors

todiadiyatmo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.