KeyofBlueS/xfce4-display-profile-chooser

Error in perl execution

frankrehfeld opened this issue · 8 comments

Running the script results in several errors of the form

syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.

which seem to be the result of the execution of perl code in the script. It looks to me, like there is some problem with the quotation marks in the perl commands.

Hi, as I can't reproduce this, could You give more info please? e.g. steps to reproduce, options used...
The complete output with verbose (option -v) could be helpful. Also, are you using the last version of this script?

The relevant part of the output is

xrand command to set this profile:
xrandr --output DP-2 --mode 1920x1200 --rate 59,950171 --pos 0x348 --rotate normal --reflect normal --scale x --output eDP-1 --mode 1920x1080 --rate 60,049471 --pos 3120x419 --rotate normal --reflect normal --scale x --output HDMI-1 --mode 1920x1200 --rate 59,950171 --pos 1920x0 --rotate right --reflect normal --scale x
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.

So it looks like the scale part could be a problem. Will try the new released version now and report if the problem still occurs.

Error message has changed now. New version results in an awk error.

id: 85eaaf6a6f090932bdff25c6d9ec080a880d76d9, name: Homeoffice Neu

Output=DP-2
Name=Dell 24"
EDID=2717627545030278da05151b4c8550942f560c09
Active=true
Position_X=0
Position_Y=348
Primary=false
Reflection=0
RefreshRate=59,950171
Resolution=1920x1200
Rotation=0
Scale_X=
Scale_Y=

Output=eDP-1
Name=Laptop
EDID=8a4307553e1aa7fb31cca1fb11fc6b27027b91a5
Active=true
Position_X=3120
Position_Y=419
Primary=false
Reflection=0
RefreshRate=60,049471
Resolution=1920x1080
Rotation=0
Scale_X=
Scale_Y=

Output=HDMI-1
Name=Dell 24"
EDID=504b55ffd7f83166c9df7c8f8e795c2f8cb9f8c2
Active=true
Position_X=1920
Position_Y=0
Primary=false
Reflection=0
RefreshRate=59,950171
Resolution=1920x1200
Rotation=270
Scale_X=
Scale_Y=

xrand command to set this profile:
xrandr --output DP-2 --mode 1920x1200 --rate 59,950171 --pos 0x348 --rotate normal --reflect normal --scale x --output eDP-1 --mode 1920x1080 --rate 60,049471 --pos 3120x419 --rotate normal --reflect normal --scale x --output HDMI-1 --mode 1920x1200 --rate 59,950171 --pos 1920x0 --rotate right --reflect normal --scale x
awk: line 1: syntax error at or near }
awk: line 1: syntax error at or near }
awk: line 1: syntax error at or near }
awk: line 1: syntax error at or near }
awk: line 1: syntax error at or near }
awk: line 1: syntax error at or near }

The new version is not intended to fix this issue, just to reduce the dependencies.

As I suspected and as you can see in your verbose output, the problem here is the scale x and y values are missing for some reason.
Could you please post the output of xfce4-display-settings -v and xfconf-query -vlc displays?

A fix would be to force that values if they are empty (you can try this fix from the dev branch), but first I would like to understand why they are not there. Maybe they were introduced in some later version of xfce4-display-settings(?) than what you have.

Thanks.

Here are the outputs.

❯ xfconf-query -vlc displays                
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180                     Office
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2                Dell 24"
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/Active         true
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/EDID           56e1de6ef1b1bd973e129e334b02b6636be8f761
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/Position/X     1920
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/Position/Y     18
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/Primary        false
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/Reflection     0
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/RefreshRate    59,950171
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/Resolution     1920x1200
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/DP-2/Rotation       0
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1               Laptop
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/Active        true
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/EDID          8a4307553e1aa7fb31cca1fb11fc6b27027b91a5
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/Position/X    0
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/Position/Y    120
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/Primary       false
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/Reflection    0
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/RefreshRate   60,049471
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/Resolution    1920x1080
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/eDP-1/Rotation      0
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1              Dell 24"
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/Active       true
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/EDID         fa872d856cad8d1ec31bdf589d4b560a141b18bb
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/Position/X   3840
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/Position/Y   0
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/Primary      true
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/Reflection   0
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/RefreshRate  59,950171
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/Resolution   1920x1200
/6c3a72eaf6235dfa967f2bba4dfc3e431c3e1180/HDMI-1/Rotation     0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9                     Homeoffice Neu
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2                Dell 24"
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/Active         true
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/EDID           2717627545030278da05151b4c8550942f560c09
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/Position/X     0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/Position/Y     348
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/Primary        false
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/Reflection     0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/RefreshRate    59,950171
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/Resolution     1920x1200
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/DP-2/Rotation       0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1               Laptop
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/Active        true
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/EDID          8a4307553e1aa7fb31cca1fb11fc6b27027b91a5
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/Position/X    3120
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/Position/Y    419
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/Primary       false
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/Reflection    0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/RefreshRate   60,049471
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/Resolution    1920x1080
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/eDP-1/Rotation      0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1              Dell 24"
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/Active       true
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/EDID         504b55ffd7f83166c9df7c8f8e795c2f8cb9f8c2
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/Position/X   1920
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/Position/Y   0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/Primary      false
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/Reflection   0
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/RefreshRate  59,950171
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/Resolution   1920x1200
/85eaaf6a6f090932bdff25c6d9ec080a880d76d9/HDMI-1/Rotation     270
/ActiveProfile                                                Default
/Default/DP-2                                                 Dell 24"
/Default/DP-2/Active                                          true
/Default/DP-2/EDID                                            2717627545030278da05151b4c8550942f560c09
/Default/DP-2/Position/X                                      0
/Default/DP-2/Position/Y                                      348
/Default/DP-2/Primary                                         false
/Default/DP-2/Reflection                                      0
/Default/DP-2/RefreshRate                                     59,950171
/Default/DP-2/Resolution                                      1920x1200
/Default/DP-2/Rotation                                        0
/Default/eDP-1                                                Laptop
/Default/eDP-1/Active                                         true
/Default/eDP-1/EDID                                           8a4307553e1aa7fb31cca1fb11fc6b27027b91a5
/Default/eDP-1/Position/X                                     3120
/Default/eDP-1/Position/Y                                     419
/Default/eDP-1/Primary                                        false
/Default/eDP-1/Reflection                                     0
/Default/eDP-1/RefreshRate                                    60,049471
/Default/eDP-1/Resolution                                     1920x1080
/Default/eDP-1/Rotation                                       0
/Default/HDMI-1                                               Dell 24"
/Default/HDMI-1/Active                                        true
/Default/HDMI-1/EDID                                          504b55ffd7f83166c9df7c8f8e795c2f8cb9f8c2
/Default/HDMI-1/Position/X                                    1920
/Default/HDMI-1/Position/Y                                    0
/Default/HDMI-1/Primary                                       false
/Default/HDMI-1/Reflection                                    0
/Default/HDMI-1/RefreshRate                                   59,950171
/Default/HDMI-1/Resolution                                    1920x1200
/Default/HDMI-1/Rotation                                      270
/Fallback/DP-2                                                Dell 24"
/Fallback/DP-2/Active                                         true
/Fallback/DP-2/EDID                                           2717627545030278da05151b4c8550942f560c09
/Fallback/DP-2/Position/X                                     0
/Fallback/DP-2/Position/Y                                     348
/Fallback/DP-2/Primary                                        false
/Fallback/DP-2/Reflection                                     0
/Fallback/DP-2/RefreshRate                                    59,950171
/Fallback/DP-2/Resolution                                     1920x1200
/Fallback/DP-2/Rotation                                       0
/Fallback/eDP-1                                               Laptop
/Fallback/eDP-1/Active                                        true
/Fallback/eDP-1/EDID                                          8a4307553e1aa7fb31cca1fb11fc6b27027b91a5
/Fallback/eDP-1/Position/X                                    3120
/Fallback/eDP-1/Position/Y                                    419
/Fallback/eDP-1/Primary                                       false
/Fallback/eDP-1/Reflection                                    0
/Fallback/eDP-1/RefreshRate                                   60,049471
/Fallback/eDP-1/Resolution                                    1920x1080
/Fallback/eDP-1/Rotation                                      0
/Fallback/HDMI-1                                              Dell 24"
/Fallback/HDMI-1/Active                                       true
/Fallback/HDMI-1/EDID                                         504b55ffd7f83166c9df7c8f8e795c2f8cb9f8c2
/Fallback/HDMI-1/Position/X                                   1920
/Fallback/HDMI-1/Position/Y                                   0
/Fallback/HDMI-1/Primary                                      false
/Fallback/HDMI-1/Reflection                                   0
/Fallback/HDMI-1/RefreshRate                                  59,950171
/Fallback/HDMI-1/Resolution                                   1920x1200
/Fallback/HDMI-1/Rotation                                     270

and

❯ xfce4-display-settings -v        
xfce4-display-settings 4.14.3 (Xfce 4.14)

Copyright (c) 2004-2019
	The Xfce development team. All rights reserved.

Please report bugs to <https://bugzilla.xfce.org/>.

Maybe the problem could be the usage of rotated screen.

No, rotation is not the issue.
You are using xfce 4.14 while fractional scaling was introduced in 4.16.
While I could do a version check and skip check on scaling if xfce4-display-settings is <4.16, I prefer to force the default value for scale x and y (1,000000) if they are missing, that isn't harmful at all.
Could you test the fix from the dev branch please?

Error does not occur, when using the fix from dev branch.

Ok, thanks for your contribution 👍