Coder Social home page Coder Social logo

Comments (3)

phillipberndt avatar phillipberndt commented on May 24, 2024

Thanks for reporting this. As I had written in the earlier report, a quick fix is to add a preswitch file to your profile that adds the new mode. Or you could add the mode to your xorg.conf.

A proper fix for this is at least not trivial. It is simple to detect at the time when a mode is applied that a certain mode is missing, but autorandr would have to store the correct mode line when the configuration is stored: It is e.g. unclear whether gtf or cvt should be used for auto-regenerating a missing mode. I don't know if it is possible to detect whether a mode was added manually or automatically using xrandr output only (probably computable from the edid?), and storing all modes just for this corner case would be a bit of an overkill, IMHO. I'm open for suggestions 😄

from autorandr.

etu avatar etu commented on May 24, 2024

Well, I've created myself a preswitch, it wasn't really documented (just mentioned once in the code) so I think it works in my case now, which helps. But yeah, I know that a "proper solution" could be very messy :)

Thanks for the tip about preswitch though, helped alot. My own solution would be a shellscript to wrap autorandr, but that's not as flexible if stuff runs by udev and such.

from autorandr.

rubensa avatar rubensa commented on May 24, 2024

Here is what I used to "manually" execute before using autorandr for my LG TV connected to VGA port:

#!/bin/sh
# LG Electronics LG Flatron 775FT
xrandr --newmode "1920x1080_59.93" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 -HSync +Vsync
xrandr --addmode VGA-1-1 "1920x1080_59.93"
xrandr --output VGA-1-1 --mode "1920x1080_59.93"

Then I discovered autorandr I thought It would be great to auto discover my config and so no manual run was needed (as I have differente configuration at home and work).

autorandr --save home

This created ~/.config/autorandr/home folder with config and setup files.
As the manually added modeline is not kept by autorandr I had to create preswitch file in ~/.config/autorandr/home folder with following content.

#!/bin/sh
# LG Electronics LG Flatron 775FT
xrandr --newmode "1920x1080_59.93" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 -HSync +Vsync
xrandr --addmode VGA-1-1 "1920x1080_59.93"

Now, everything works as expected.

It should be great if this preswitch was not needed. I think that autorandr, on save, can detect current modelines. Then It could check if the modeline is "manually added" or is "auto detected". If used modeline is "auto detected" current behavior is ok. If modeline is "manually added" then the modeline info should be saved an recreated before mode switch.

I think that "manually added" modelines are shown at the end of xrandr command. In may case this is my full xrandr output:

Screen 0: minimum 8 x 8, current 5760 x 1080, maximum 16384 x 16384
eDP-1-1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.01*+  59.97    59.96    59.93  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
VGA-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00  
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94  
   1920x1080_59.93  59.93* 
HDMI-1-1 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     59.93*+  60.00    50.00    59.94    30.00    24.00    29.97    23.98  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1280x960      75.04  
   1152x864      75.00    59.97  
   1280x720      60.00    60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
DP-1-1 disconnected (normal left inverted right x axis y axis)
  1920x1080_59.93 (0x336) 138.500MHz -HSync +VSync
        h: width  1920 start 1968 end 2000 total 2080 skew    0 clock  66.59KHz
        v: height 1080 start 1083 end 1088 total 1111           clock  59.93Hz

NOTE: autorandr should not use gtf nor cvt as modeline info can be retrieved using xrandr and, for example, in my case, the modeline generated with those utilities doesn't work (I have two identical TVs one connected by HDMI and the other connected by VGA and the VGA modeline was not detected so I manually generated It based on auto-detected HDMI).

from autorandr.

Related Issues (20)

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.