Giter VIP home page Giter VIP logo

Comments (13)

LechnerMartin avatar LechnerMartin commented on May 25, 2024 1

Just to confirm - works also for me.
Switched back and forth between laptop and 3head setup and had no problem so far.

Thanks a lot for the quick help and fix!

from autorandr.

phillipberndt avatar phillipberndt commented on May 25, 2024

Could you post

  • The verbose xrandr output of the configuration you've created using arandr
  • The stored profile (The config file)
  • The verbose xrandr output after switching to laptop config

please?

It looks as if you'll need to execute the commands in a different order. It would be a great help if you could try to change back to your configuration on your own by playing around with the

xrandr --output DP-3 --gamma 1.0:1.0:1.0 --mode 1920x1080 --panning 0x0 --pos 0x0 --rate 60.00 --reflect normal --rotate normal --output DP-4 --gamma 1.0:1.0:1.0 --mode 2560x1440 --panning 0x0 --pos 1920x0 --primary --rate 59.95 --reflect normal --rotate normal
xrandr --output DP-1 --gamma 1.0:1.0:1.0 --mode 1920x1080 --panning 0x0 --pos 4480x0 --rate 60.00 --reflect normal --rotate normal

lines: Try executing them in a different order, or one by one per --output, or all in one command, and find out what exactly is the minimal change required to make things work. If we can find what exactly must be changed, I can change autorandr accordingly, or at least provide some means for you to include the necessary changes without having to maintain your private fork.

from autorandr.

LechnerMartin avatar LechnerMartin commented on May 25, 2024

Thanks for the quick response.

I did some checks to reproduce the situation:

  • Booting the Laptop -> monitor order wrong - overlapping screens (arandr shows it different)
  • executing arandr 3head script -> order ok
  • executing xrandr -s 1920x1080+0+0 (Laptop display only)
  • executing arandr 3head script -> order ok1
  • executing ./autorandr.py -l laptop
  • executing arandr 3head script -> order ok2
  • executing ./autorandr.py -l laptop
  • executing ./autorandr.py -l work -> no order - clones?
  • executing arandr 3head script -> failing: no order - but clones with panning
  • executing ./autorandr.py -l laptop
  • executing arandr 3head script -> failing2: no order - but clones? with panning
  • tried a few more times: swich to laptop + execute script

Findings:

  • all laptop configs are identical
  • after autorandr.py -l work there are panning settings present
  • all script executions after the fail are different (see logs) and I can not get back to normal behavour (also arandr can not change the layout)
    • DP-3 connected 1920x1080+1567+0 (0x2ed) normal (normal left inverted right x axis y axis) 344mm x 194mm panning 5760x1080+0+0 tracking 6400x1440+0+0 border 0/0/0/0
    • DP-3 connected 1920x1080+621+0 (0x2ed) normal (normal left inverted right x axis y axis) 344mm x 194mm panning 5760x1080+0+0 tracking 6400x1440+0+0 border 0/0/0/0
    • DP-3 connected 1920x1080+1909+0 (0x2ed) normal (normal left inverted right x axis y axis) 344mm x 194mm panning 5760x1080+0+0 tracking 6400x1440+0+0 border 0/0/0/0

Also to execute the commands individually had no positive effect - will try this again as it takes time (have to reboot each time to isolate the cause)

Here the config:

output VGA-0
off
output DP-0
off
output DP-2
off
output DP-5
off
output DP-6
off
output DP-3
mode 1920x1080
pos 0x0
rate 60.00
output DP-4
mode 2560x1440
pos 1920x0
primary
rate 59.95
output DP-1
mode 1920x1080
pos 4480x0
rate 60.00

See the logfiles attached (I removed the timestamps for easier diffing):

mode-after-script-ok.txt
mode-after-script-ok2.txt
mode-after-script-failing4.txt
mode-after-script-failing3.txt
mode-after-script-failing2.txt
mode-after-boot.txt
mode-after-autorandr-work.txt
mode-after-autorandr-laptop.txt

from autorandr.

phillipberndt avatar phillipberndt commented on May 25, 2024

Is mode-after-autorandr-laptop.txt the output directly before you made the failing ./autorandr.py -l work, or from the first call? It'd be interesting to have the former, and the output of ./autorandr.py --debug -l work at that point, that is, before everything broke, to see when and how exactly the panning comes into play.

What happens if you try to run autorandr --debug -l horizontal at the point where loading the work profile does not work anymore? Are you able to manually change individual settings afterwards? (E.g., remove the panning from one of the external screens.)

from autorandr.

LechnerMartin avatar LechnerMartin commented on May 25, 2024

Yes: mode-afte-autorandr-laptop.txt is before the fail.
In fact - also after the fail the laptop setting was always the same (see below)

The debug log and the vertical settings will I send tomorrow when I can try it again at the office:
Just to make sure that it is what you need - I intend to execute the following steps:

  • fresh boot + autorandr -l laptop
  • autorandr.py --debug -l work -> provide logfile
  • autorandr --debug -l horizontal -> provide logfile
  • try changing the settings

Here you can see the duplicate logs which I have removed:
fdupes -d .
Set 1 of 3, preserve files [1 - 2, all]: 1
[+] ./mode-after-script-ok2.txt
[-] ./mode-after-script-ok3.txt

Set 2 of 3, preserve files [1 - 4, all]: 2
[-] ./mode-after-xrandr-laptop-after-fail1.txt
[+] ./mode-after-autorandr-laptop.txt
[-] ./mode-after-autorandr-laptop-after-fail.txt
[-] ./mode-after-xrandr-laptop.txt

Set 3 of 3, preserve files [1 - 2, all]: 2
[-] ./mode-after-script-failing.txt
[+] ./mode-after-autorandr-work.txt

from autorandr.

LechnerMartin avatar LechnerMartin commented on May 25, 2024

Tried the steps above:

  • resh boot + autorandr -l laptop
  • autorandr.py --debug -l work -> provide logfile
    • same as before
  • autorandr --debug -l horizontal -> provide logfile
    • no change
  • try changing the settings (with arandr)
    • tried multiple times did no work -> all monitors at same place with panning

See logfiles:
autorand-debug-horizontal.txt
autorand-debug-work.txt

Xorg logs (stripped timestamp):
x1-after-boot.txt
x2-after-laptop.txt
x3-after-work.txt
x4-after-horizontal.txt
x5-after-arandr.txt
x6-after-arandr.txt
x7-after-arandr.txt

Same output:
./x3-after-work.txt
./x4-after-horizontal.txt
./x5-after-arandr.txt

from autorandr.

kris004 avatar kris004 commented on May 25, 2024

Same problem with two monitors.

Only way to fix I found was to restart X, set position with nvidia-settings, or specifiy frame buffer, position and panning manually with xrandr (see edit at bottom):

xrandr --fb 6400x2160 --output DP-1 --primary --mode 3840x2160 --pos +2560x+0 --panning 3840x2160+2560+0/3840x2160+2560+0/0/0/0/0 --primary --output DVI-I-1 --pos 0x0 --panning 2560x1440+0+0/2560x1440+0+0/0/0/0/0

More details:
Using two monitors, 3840x2160 and one to the left 2560x1440, startx and set position with xrandr:

xrandr --output DP-1 --right-of DVI-I-1

save profile:

❯ autorandr -s left2
Saved current configuration as profile 'left2'

Disconnect DP-1 and disable with xrandr before saving new profile:

❯ xrandr --output DP-1 --off
❯ autorandr -s left1
Saved current configuration as profile 'left1'

Then when I plug DP-1 one of two things happen, either X exits, or:

❯ xrandr
Screen 0: minimum 8 x 8, current 6400 x 2160, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm panning 5120x1440+0+0 tracking 6400x2160+0+0 border 0/0/0/0
   2560x1440     59.95*+
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm panning 6400x2160+0+0
   3840x2160     60.00*+  30.00  
   2560x1440     59.95  
   1920x1080     60.00    59.94  
   1600x900      60.00  
   1280x1024     60.02  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1152x864      59.96  
   1024x768      60.00  
   800x600       60.32  
   720x480       59.94  
   640x480       59.94    59.93 

When I unplug DP-1, DP-1 is set to --off as expected, or X exits.

Saved profiles:
autorandr.zip

Same results when loaded manually:

❯ autorandr --debug -l left2
Loading profile 'left2'
| Differences between the two profiles:
| [Output DVI-I-1] Option --pos (= `0x0') is `3840x0' in the new configuration
| [Output DVI-I-1] Option --primary is not present in the new configuration
| [Output DP-1] The output is disabled currently, but active in the new configuration
\-
Going to run:
xrandr --output DP-1 --gamma 1.0:1.0:1.0 --mode 3840x2160 --panning 0x0 --pos 0x0 --primary --rate 60.00 --reflect normal --rotate normal --output DVI-I-1 --gamma 1.0:1.0:1.0 --mode 2560x1440 --panning 0x0 --pos 3840x0 --rate 59.95 --reflect normal --rotate normal
The configuration change did not go as expected:
| Differences between the two profiles:
| [Output DVI-I-1] Option --panning (= `5120x1440+0+0/6400x2160+0+0/0/0/0/0') is not present in the new configuration
| [Output DVI-I-1] Option --pos (= `0x0') is `3840x0' in the new configuration
| [Output DP-1] Option --panning (= `6400x2160+0+0') is not present in the new configuration
\-

Edit:
I think the minimal change to fix is to add frame buffer, and position to --panning for monitors not at --pos 0x0, ie:

xrandr --fb 6400x2160 --output DP-1 --gamma 1.0:1.0:1.0 --mode 3840x2160 --panning 0x0+2560+0 --pos 2560x0 --primary --rate 60.00 --reflect normal --rotate normal --output DVI-I-1 --gamma 1.0:1.0:1.0 --mode 2560x1440 --panning 0x0 --pos 0x0 --rate 59.95 --reflect normal --rotate normal

Let me know if I can do anything to help.

from autorandr.

phillipberndt avatar phillipberndt commented on May 25, 2024

Is the --fb parameter really required? The man-page states that xrandr autocalculates the screen size if the parameter is omitted, and xrandr's source code (Function set_positions) looks as if it'd actually do that, too. (Then again, it also states that --panning 0x0 disables panning. And X11 shouldn't crash anyway. So there is obviously something wrong with the graphics driver.)

I still wonder how panning is introduced in the first place. Apparently autorandr's --panning 0x0 enables panning for you?! What happens if you run autorandr using --skip-options panning? Does this help?

from autorandr.

kris004 avatar kris004 commented on May 25, 2024

Good news, --skip-options panning seems to solve my problems, should have saw that. I'm using the nvidia closed source driver, so probably all nvidias fault. After giving an xrandr command with --panning, --fb is required for things to bet set right for me, otherwise panning and position stays messed up. Mentions in the xrandr man page that --fb is expected with the panning option, so maybe that has something to do with it.

Also X is no longer randomly crashing on profile switch, so luckily seems to have to do with the driver mishandling of the panning option.

Overrided the supplied systemd file and everything is working nice for me now, cool!

from autorandr.

phillipberndt avatar phillipberndt commented on May 25, 2024

Great! Does xrandr set the panning on its own, or is this a consequence of the --panning 0x0 option? Have a look at the skip-panning branch I've just pushed, it skips the --panning 0x0 option if the current and new configurations both do not have panning configured. (See also #37; similar problem in another RandR 1.3 option, also an nvidia card.)

from autorandr.

kris004 avatar kris004 commented on May 25, 2024

As far as I can tell its a consequence of the --panning 0x0 option:

❯ xrandr --verbose > 1.txt && xrandr | grep -e DP-1 -e DVI-I-1
DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
DP-1 connected 3840x2160+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm

❯ xrandr --output DP-1 --panning 0x0 && xrandr --verbose > 2.txt && xrandr | grep -e DP-1 -e DVI-I-1
DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm panning 5120x1440+0+0 tracking 6400x2160+0+0 border 0/0/0/0
DP-1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm panning 6400x2160+0+0

❯ xrandr --fb 6400x2160 --output DP-1 --panning 0x0 && xrandr --verbose > 3.txt && xrandr | grep -e DP-1 -e DVI-I-1
DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm panning 6400x1440+0+0 tracking 6400x2160+0+0 border 0/0/0/0
DP-1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 600mm x 340mm panning 5120x2160+0+0 tracking 6400x2160+0+0 border 0/0/0/0

❯ xrandr --fb 6400x2160 --output DP-1 --panning 0x0+2560+0 && xrandr --verbose > 4.txt && xrandr | grep -e DP-1 -e DVI-I-1
xrandr --verbose > 4.txt  9.20s user 0.00s system 2087% cpu 0.441 total
DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm panning 6400x1440+0+0 tracking 6400x2160+0+0 border 0/0/0/0
DP-1 connected 3840x2160+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm

❯ xrandr --fb 6400x2160 --output DP-1 --panning 0x0+2560+0 --output DVI-I-1 --panning 0x0 && xrandr --verbose > 5.txt && xrandr | grep -e DP-1 -e DVI-I-1
xrandr --verbose > 5.txt  25.07s user 0.01s system 9117% cpu 0.275 total
DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm panning 6400x1440+0+0 tracking 6400x2160+0+0 border 0/0/0/0
DP-1 connected 3840x2160+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm

❯ xrandr --fb 6400x2160 --output DP-1 --panning 0x0+2560+0 --output DVI-I-1 --panning 0x0+0+0 && xrandr --verbose > 6.txt && xrandr | grep -e DP-1 -e DVI-I-1
DVI-I-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
DP-1 connected 3840x2160+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm

1.txt
2.txt
3.txt
4.txt
5.txt
6.txt

.. strange right?

The skip-panning branch works great!

from autorandr.

phillipberndt avatar phillipberndt commented on May 25, 2024

The skip-panning branch works great!

Great. I'll merge it then, it shouldn't harm anyone else as it simply skips an unnecessary option.

from autorandr.

kris004 avatar kris004 commented on May 25, 2024

Just to confirm, switched to nouveau and --panning works as expected:

❯ xrandr --output DP-1 --panning 0x0 && xrandr | grep -e DP-1 -e DVI-I-1
DVI-I-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
DP-1 connected 3840x2160+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm

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.