Giter Site home page Giter Site logo

xorg-resolution-fixer's Introduction

Xorg resolution fixer

Linux Python


What is Xorg resolution fixer?

It is a python module that uses xrandr and cvt to force a specific resolution whenever a supported resolution doesn't appear in your monitor settings. For instance, it determines the VESA CVT modelines with the command cvt {width} {height} {refresh_rate} and passes it to xrandr by calling xrandr --newmode {modeline_str} and xrandr --addmode {display} {name}


What is the advantage?

It automates the above procedure simply by calling

xrf --set --height 1080 --width 1920 --refresh-rate 120

plus, with the --install parameter it can configure a systemd service that call the command at every boot.


How to use it

To install xrf in your system, issue the following commands:

git clone https://github.com/jasoc/xorg-resolution-fixer.git

cd xorg-resolution-fixer

sudo python setup.py install

Then you will have the xrf command globally available in your system. To fix a resolution, this is the magic line:

xrf --set --height 1080 --width 1920 --refresh-rate 120 --display HDMI-1

Be aware that the --display parameter requires any available display that you can list with

xrf --list-displays

To install it as a systemd service, use

xrf --install --height 1080 --width 1920 --refresh-rate 120 --user boblazar
systemctl --user enable --now xorg-resolution-fixer

The --user parameter should be the user that runs the X server at the boot. Most of the time is your standard user, so if you don't specify, that will be used. Just be aware of that if you have any kind of special configuration of Xorg.

Anyway, a detailed list of command is available with

xrf --help

Why

Well, for some misterious reasons, with some monitor (expecially TVs) some resolutions doesn't appear under Xorg, even if supported. But, for the same misterious reasons, you can force it! What a deal! This module helps you doing so. If you wonder, it all began when I decided to switch from Gnome under Wayland to Gnome under Xorg, since Wayland isn't supported pretty much by anything, and seeing my old-fashion TV I am using as a monitor in a totally broken resolution made me nuts.


License


Contributing

You are free to reuse and contribute to the project, I'll eventually accept the pull requests if the proposed features fits the initial aim of the project.

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.