Skip to main content

Set resolution and refresh rate

Project description

ResSetter

Simple utility to force a display resolution and refresh rate on Windows.

Originally created because my 120 Hz TV is stupid and would reset back to 60 Hz every time you turned it off. You can run this script and it'll do what it says on the tin: set the resolution and refresh rate to what you want.

You can use command line arguments to set a custom resolution or refresh rate:

  • --width and --height for resolution
  • --refresh for refresh rate

A cooler way to use it if you're suffering from a problem like mine is to use the --background argument, which will leave the script running and monitor for input (key presses or mouse movement). After a period of inactivity, when it detects input, it triggers the resolution and refresh rate change.

I couldn't get anything to reliably detect when the TV turned on or off, so instead I came up with this idea of resetting the resolution as soon as you (presumably) sit back down at the computer and wake it up. I've been using it for months and it's been rock solid.

You can also use arguments to specify the waiting period:

  • --timeout sets the length of inactivity before new input will trigger a reset (in seconds)
  • --set-delay will set the number of seconds after activity is detected before the reset will trigger

It will retry if it's unable to set the resolution at first:

  • --retry-delay will set how long to wait before another retry (in seconds)
  • --max-retries will set the max number of retries before it gives up

Running the Script

pip install ressetter  # to install
ressetter  # to immediately set the resolution
ressetter --background  # to run the script in background mode

Compiling the Script

If you want to turn the script into an EXE to run it more easily (e.g. on startup), you can do that with pyinstaller and the included spec file:

pyinstaller --noconfirm --clean --distpath=dist --workpath=build ressetter.spec

Then just take the compiled EXE, stick it somewhere accessible, and create a shortcut to it in your Start menu's Startup folder.

Pro tip: You can also set a shortcut key for it to something like Ctrl+Alt+Shift+R in Properties so you can invoke it without having to find and open it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ressetter-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ressetter-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file ressetter-0.1.1.tar.gz.

File metadata

  • Download URL: ressetter-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ressetter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3d6b5978401acdb23e41f7f819bf10256d2b5a17c579105063643e4e89e28160
MD5 4fbe751c64cbdd9fe9c228ce973a93c8
BLAKE2b-256 d0a9d63c3423858e638c70c6e791ace4229e94081e067a355793ad9a9d2aebab

See more details on using hashes here.

File details

Details for the file ressetter-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ressetter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ressetter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8ee14c80d05c87dd51ff9b02c8c7877953fdc2e061d256ae2ead6b3f4971a76
MD5 a485b1aa729f02788233ea10396f5656
BLAKE2b-256 058a5f40a29846a3931d221a0b91538b2a26e9722354166de8f318bce54f5d58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page