Skip to content

Set refresh rate? #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jonaz opened this issue Dec 2, 2020 · 3 comments · May be fixed by #30
Open

Set refresh rate? #29

jonaz opened this issue Dec 2, 2020 · 3 comments · May be fixed by #30

Comments

@jonaz
Copy link

jonaz commented Dec 2, 2020

Now i had to use this hack:

  - name: Dockhome
    outputs_connected: 
      - eDP-1
      - DP-2-1
      - DP-2-8-LEN-25065*
    configure_row:
        - eDP-1
        - DP-2-1@1920x1080 #hack since we cannot set hz in grobi
        - DP-2-8
    atomic: true
    execute_after:
      - "xrandr --output DP-2-1 --mode 2560x1440 --rate 60 --right-of eDP-1 --output DP-2-8 --right-of DP-2-1" #hack to set refreshrate

I have 2 suggestions.

1
Implement DP-2-1@1920x1080@60 and then we just change the SplitN to be 3 and take the last one as --rate.

2
Implement environment variables that is sent to execute_after. Then we can add for example GROBI_ROW_1=eDP-1 , GROBI_ROW_1=DP-2-1 , GROBI_ROW_3=DP-2-8

The execute_after could then look like this:

      - "xrandr --output $GROBI_ROW_2 --mode 2560x1440 --rate 60 --right-of $GROBI_ROW_1 --output $GROBI_ROW_3 --right-of $GROBI_ROW_2"

Then we can always customize our xrandr in the execute_after. Which means stuff like i saw discussed in #8 like --pos can also be solved like this.

I can implement ether solution and make a PR!

@jonaz
Copy link
Author

jonaz commented Dec 2, 2020

Solution 2 does not work well. xrander events from that command triggers endless loop in some situations.

@jonaz
Copy link
Author

jonaz commented Dec 3, 2020

Implemented solution 1 and fixed some other issues as well. Expect PR :)

jonaz pushed a commit to jonaz/grobi that referenced this issue Dec 3, 2020
Also fixed a few other things:
- bugs in active mode detection with my display (144hz and 60hz)
- Turn off changed displays in a smarter way. Im using usb-c daisychain
and had trouble with the current approach. it disabled my screen as soon
as the screen went into hibernate because xrandr stopped detecting the
display.
- some autoformatting of comments and code according to efficient go
guidelines
- if xrand (ApplyRule) fails, try 3 times with a little more sleep each
time. This also solved issues with my daisychained displays.

Fixes fd0#29
jonaz pushed a commit to jonaz/grobi that referenced this issue Dec 3, 2020
Also fixed a few other things:
- bugs in active mode detection with my display (144hz and 60hz)
- Turn off changed displays in a smarter way. Im using usb-c daisychain
and had trouble with the current approach. it disabled my screen as soon
as the screen went into hibernate because xrandr stopped detecting the
display.
- some autoformatting of comments and code according to efficient go
guidelines
- if xrand (ApplyRule) fails, try 3 times with a little more sleep each
time. This also solved issues with my daisychained displays.

Fixes fd0#29
@jonaz jonaz linked a pull request Dec 3, 2020 that will close this issue
jonaz pushed a commit to jonaz/grobi that referenced this issue Dec 3, 2020
Also fixed a few other things:
- bugs in active mode detection with my display (144hz and 60hz)
- Turn off changed displays in a smarter way. Im using usb-c daisychain
and had trouble with the current approach. it disabled my screen as soon
as the screen went into hibernate because xrandr stopped detecting the
display.
- some autoformatting of comments and code according to efficient go
guidelines
- if xrand (ApplyRule) fails, try 3 times with a little more sleep each
time. This also solved issues with my daisychained displays.

Fixes fd0#29
fd0 pushed a commit that referenced this issue Feb 27, 2021
Also fixed a few other things:
- bugs in active mode detection with my display (144hz and 60hz)
- Turn off changed displays in a smarter way. Im using usb-c daisychain
and had trouble with the current approach. it disabled my screen as soon
as the screen went into hibernate because xrandr stopped detecting the
display.
- some autoformatting of comments and code according to efficient go
guidelines
- if xrand (ApplyRule) fails, try 3 times with a little more sleep each
time. This also solved issues with my daisychained displays.

Fixes #29
jonaz pushed a commit to jonaz/grobi that referenced this issue Mar 9, 2021
Also fixed a few other things:
- bugs in active mode detection with my display (144hz and 60hz)
- Turn off changed displays in a smarter way. Im using usb-c daisychain
and had trouble with the current approach. it disabled my screen as soon
as the screen went into hibernate because xrandr stopped detecting the
display.
- some autoformatting of comments and code according to efficient go
guidelines
- if xrand (ApplyRule) fails, try 3 times with a little more sleep each
time. This also solved issues with my daisychained displays.

Fixes fd0#29
@bgulowaty
Copy link

Could this be added to docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants