Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-08-06 21:42:07

hys
Member
Registered: 2023-05-06
Posts: 9

Fix the visual position of second panel

Hi,

Is there any way to fix the position of my second panel? Every time I connect an external monitor, the position of my second panel moves around a bit. My guess is that this is because X11 recognizes the monitors as a big one screen; so the absolute position of the panel needs to be changed when I connect an additional monitor.

I was wondering if there is a way to fix this behavior without writing a workaround in bash.


https://ibb.co/RYSCLGg

https://ibb.co/3vMgGpb

Offline

#2 2023-08-06 23:57:36

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Fix the visual position of second panel

What version of Xfce are you running?

There should be an option in the panel properties where you can specify which monitor to use for the panel.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-08-07 01:26:11

hys
Member
Registered: 2023-05-06
Posts: 9

Re: Fix the visual position of second panel

I am currently using xfce 4.18 on Arch Linux with 6.4.8-arch1-1 Kernel.

I already selected the output option as primary, but it doesn't fix the problem.

Last edited by hys (2023-08-07 01:26:50)

Offline

#4 2023-08-08 11:07:41

peter.48
Member
From: France, sud-ouest
Registered: 2017-01-31
Posts: 151

Re: Fix the visual position of second panel

In the first tab of panel properties you have a checkbox "lock panel", do you have it checked?

Offline

#5 2023-08-08 13:13:15

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Fix the visual position of second panel

hys wrote:

I already selected the output option as primary, but it doesn't fix the problem.

Also, do you have a primary display defined in Settings Manager > Display? Or alternatively, select a specific monitor instead of Primary.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2023-08-08 19:28:17

hys
Member
Registered: 2023-05-06
Posts: 9

Re: Fix the visual position of second panel

The 'lock panel' option is already checked, and my built-in laptop display is already marked as the primary display, but the problem still persists.

Could this be a specific issue with the Nvidia graphics card?

https://ibb.co/2y4G7dR

https://ibb.co/Lg7tM7K

Offline

#7 2023-08-08 23:08:02

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Fix the visual position of second panel

That is odd.

If you re-position the laptop screen so it aligns with the bottom of the Samsung display, does the problem still exist?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2023-08-09 02:36:36

hys
Member
Registered: 2023-05-06
Posts: 9

Re: Fix the visual position of second panel

ToZ wrote:

That is odd.

If you re-position the laptop screen so it aligns with the bottom of the Samsung display, does the problem still exist?

It seems to be that is the case.

I also have installed KDE plasma (wayland) desktop environment on my laptop. Is there any chance that this might be causing this issue?

https://ibb.co/PNXbrK1

https://ibb.co/cbBY83J

Offline

#9 2023-08-09 10:00:59

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Fix the visual position of second panel

I mean to try it flush to the bottom:

+------------------------------------------+
|                                                    |
|                                                    |
|                                                    |+-----------------+
|                                                    ||                      |
|                                                    ||                      |
|                                                    ||                      |
+------------------------------------------++----------------+

Do you have scaling enabled on the larger monitor?

What do the following commands return (with both monitors enabled):

xfconf-query -c displays -lv
xrandr -q

I also have installed KDE plasma (wayland) desktop environment on my laptop. Is there any chance that this might be causing this issue?

I'm not sure. When Xfce is running, do you have any KDE services running as well?

Edit:
Can you also try running xfce4-panel in debug mode. Start with the external monitor disconnected, then:

xfce4-panel -q
PANEL_DEBUG=1 xfce4-panel

...then connect the second monitor. Post back all the debug output.

Last edited by ToZ (2023-08-09 10:07:34)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2023-08-09 19:43:17

hys
Member
Registered: 2023-05-06
Posts: 9

Re: Fix the visual position of second panel

ToZ wrote:

I mean to try it flush to the bottom:

+------------------------------------------+
|                                                    |
|                                                    |
|                                                    |+-----------------+
|                                                    ||                      |
|                                                    ||                      |
|                                                    ||                      |
+------------------------------------------++----------------+

I tried that display configuration and could not see any difference. The panel still moves around.

ToZ wrote:

Do you have scaling enabled on the larger monitor?

No I didn't enable scaling on the larger monitor.

ToZ wrote:

What do the following commands return (with both monitors enabled):

xfconf-query -c displays -lv 
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a                      work2
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1               Samsung Electric Company 27"
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Active        true
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/EDID          53640e254228a3ffd78b0b0c288f6bf2a51232ba
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Position/X    0
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Position/Y    0
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Primary       false
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Reflection    0
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/RefreshRate   59.996625
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Resolution    3840x2160
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Rotation      0
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Scale/X       1.000000
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/DP-1-1/Scale/Y       1.000000
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1              Laptop
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Active       true
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/EDID         c32ca5934ddf6e0e468a42435cb61bb149eee8d8
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Position/X   3840
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Position/Y   0
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Primary      true
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Reflection   0
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/RefreshRate  144.002227
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Resolution   1920x1080
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Rotation     0
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Scale/X      1.000000
/3cd1dc45286bd28985c1b6379ec776b94bbebd6a/eDP-1-1/Scale/Y      1.000000
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652                      home1
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1               LG Electronics 27"
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Active        true
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/EDID          37d3aebd6fe8bbbc148814c209e6aab869224a2e
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Position/X    0
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Position/Y    0
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Primary       false
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Reflection    0
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/RefreshRate   59.996625
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Resolution    3840x2160
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Rotation      0
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Scale/X       1.000000
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/DP-1-1/Scale/Y       1.000000
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1              Laptop
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Active       true
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/EDID         c32ca5934ddf6e0e468a42435cb61bb149eee8d8
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Position/X   3840
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Position/Y   224
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Primary      true
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Reflection   0
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/RefreshRate  144.002227
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Resolution   1920x1080
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Rotation     0
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Scale/X      1.000000
/4773b0b9cebd8dd5cfe2812dd78d704b089e6652/eDP-1-1/Scale/Y      1.000000
/ActiveProfile                                                 Fallback
/AutoEnableProfiles                                            true
/Default/DP-1-1                                                Samsung Electric Company 27"
/Default/DP-1-1/Active                                         true
/Default/DP-1-1/EDID                                           53640e254228a3ffd78b0b0c288f6bf2a51232ba
/Default/DP-1-1/Position/X                                     0
/Default/DP-1-1/Position/Y                                     0
/Default/DP-1-1/Primary                                        false
/Default/DP-1-1/Reflection                                     0
/Default/DP-1-1/RefreshRate                                    59.996625
/Default/DP-1-1/Resolution                                     3840x2160
/Default/DP-1-1/Rotation                                       0
/Default/DP-1-1/Scale/X                                        1.000000
/Default/DP-1-1/Scale/Y                                        1.000000
/Default/eDP-1                                                 Laptop
/Default/eDP-1-1                                               Laptop
/Default/eDP-1-1/Active                                        true
/Default/eDP-1-1/EDID                                          c32ca5934ddf6e0e468a42435cb61bb149eee8d8
/Default/eDP-1-1/Position/X                                    3840
/Default/eDP-1-1/Position/Y                                    0
/Default/eDP-1-1/Primary                                       true
/Default/eDP-1-1/Reflection                                    0
/Default/eDP-1-1/RefreshRate                                   144.002227
/Default/eDP-1-1/Resolution                                    1920x1080
/Default/eDP-1-1/Rotation                                      0
/Default/eDP-1-1/Scale/X                                       1.000000
/Default/eDP-1-1/Scale/Y                                       1.000000
/Default/eDP-1/Active                                          true
/Default/eDP-1/EDID                                            c32ca5934ddf6e0e468a42435cb61bb149eee8d8
/Default/eDP-1/Position/X                                      0
/Default/eDP-1/Position/Y                                      0
/Default/eDP-1/Primary                                         false
/Default/eDP-1/Reflection                                      0
/Default/eDP-1/RefreshRate                                     144.002227
/Default/eDP-1/Resolution                                      1920x1080
/Default/eDP-1/Rotation                                        0
/Default/eDP-1/Scale/X                                         1.000000
/Default/eDP-1/Scale/Y                                         1.000000
/Default/HDMI-0                                                Samsung Electric Company 27"
/Default/HDMI-0/Active                                         true
/Default/HDMI-0/EDID                                           5f5615a70a0e34e5d50460791f6cb8f5d02c675f
/Default/HDMI-0/Position/X                                     0
/Default/HDMI-0/Position/Y                                     0
/Default/HDMI-0/Primary                                        false
/Default/HDMI-0/Reflection                                     0
/Default/HDMI-0/RefreshRate                                    60.000000
/Default/HDMI-0/Resolution                                     3840x2160
/Default/HDMI-0/Rotation                                       0
/Default/HDMI-0/Scale/X                                        1.000000
/Default/HDMI-0/Scale/Y                                        1.000000
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0                      work
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1              Laptop
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Active       true
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/EDID         c32ca5934ddf6e0e468a42435cb61bb149eee8d8
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Position/X   3840
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Position/Y   0
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Primary      true
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Reflection   0
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/RefreshRate  144.002227
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Resolution   1920x1080
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Rotation     0
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Scale/X      1.000000
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/eDP-1-1/Scale/Y      1.000000
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0               Samsung Electric Company 27"
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Active        true
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/EDID          5f5615a70a0e34e5d50460791f6cb8f5d02c675f
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Position/X    0
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Position/Y    0
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Primary       false
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Reflection    0
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/RefreshRate   60.000000
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Resolution    3840x2160
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Rotation      0
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Scale/X       1.000000
/e274eeff768c6396088ec6eb091f4bf4d47ab1e0/HDMI-0/Scale/Y       1.000000
/Fallback/DP-1-1                                               Samsung Electric Company 27"
/Fallback/DP-1-1/Active                                        true
/Fallback/DP-1-1/EDID                                          53640e254228a3ffd78b0b0c288f6bf2a51232ba
/Fallback/DP-1-1/Position/X                                    0
/Fallback/DP-1-1/Position/Y                                    0
/Fallback/DP-1-1/Primary                                       false
/Fallback/DP-1-1/Reflection                                    0
/Fallback/DP-1-1/RefreshRate                                   59.996625
/Fallback/DP-1-1/Resolution                                    3840x2160
/Fallback/DP-1-1/Rotation                                      0
/Fallback/DP-1-1/Scale/X                                       1.000000
/Fallback/DP-1-1/Scale/Y                                       1.000000
/Fallback/eDP-1                                                Laptop
/Fallback/eDP-1-1                                              Laptop
/Fallback/eDP-1-1/Active                                       true
/Fallback/eDP-1-1/EDID                                         c32ca5934ddf6e0e468a42435cb61bb149eee8d8
/Fallback/eDP-1-1/Position/X                                   3840
/Fallback/eDP-1-1/Position/Y                                   0
/Fallback/eDP-1-1/Primary                                      true
/Fallback/eDP-1-1/Reflection                                   0
/Fallback/eDP-1-1/RefreshRate                                  144.002227
/Fallback/eDP-1-1/Resolution                                   1920x1080
/Fallback/eDP-1-1/Rotation                                     0
/Fallback/eDP-1-1/Scale/X                                      1.000000
/Fallback/eDP-1-1/Scale/Y                                      1.000000
/Fallback/eDP-1/Active                                         true
/Fallback/eDP-1/EDID                                           c32ca5934ddf6e0e468a42435cb61bb149eee8d8
/Fallback/eDP-1/Position/X                                     0
/Fallback/eDP-1/Position/Y                                     0
/Fallback/eDP-1/Primary                                        false
/Fallback/eDP-1/Reflection                                     0
/Fallback/eDP-1/RefreshRate                                    144.002227
/Fallback/eDP-1/Resolution                                     1920x1080
/Fallback/eDP-1/Rotation                                       0
/Fallback/eDP-1/Scale/X                                        1.000000
/Fallback/eDP-1/Scale/Y                                        1.000000
/Fallback/HDMI-0                                               Samsung Electric Company 27"
/Fallback/HDMI-0/Active                                        true
/Fallback/HDMI-0/EDID                                          5f5615a70a0e34e5d50460791f6cb8f5d02c675f
/Fallback/HDMI-0/Position/X                                    0
/Fallback/HDMI-0/Position/Y                                    0
/Fallback/HDMI-0/Primary                                       false
/Fallback/HDMI-0/Reflection                                    0
/Fallback/HDMI-0/RefreshRate                                   60.000000
/Fallback/HDMI-0/Resolution                                    3840x2160
/Fallback/HDMI-0/Rotation                                      0
/Fallback/HDMI-0/Scale/X                                       1.000000
/Fallback/HDMI-0/Scale/Y                                       1.000000
/IdentityPopups                                                true
/Notify                                                        1
ToZ wrote:
xrandr -q
Screen 0: minimum 8 x 8, current 5760 x 2160, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 1920x1080+3840+0 (normal left inverted right x axis y axis) 382mm x 215mm
   1920x1080    144.00*+  60.01    59.97    59.96    60.00    59.93  
   1680x1050     59.95    59.88  
   1400x1050     74.76    59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     85.02    75.02    60.02  
   1400x900      59.96    59.88  
   1280x960      85.00    60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      75.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      85.00    75.05    60.04    85.00    75.03    70.07    60.00  
   1024x768i     86.96  
   960x720       85.00    75.00    60.00  
   928x696       75.00    60.05  
   896x672       75.05    60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   832x624       74.55  
   960x540       59.96    59.99    59.63    59.82  
   800x600       85.00    75.00    70.00    65.00    60.00    85.14    72.19    75.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       74.76    59.98  
   800x450       59.95    59.82  
   640x512       85.02    75.02    60.02  
   700x450       59.96    59.88  
   640x480       85.09    60.00    85.01    72.81    75.00    59.94  
   720x405       59.51    58.99  
   720x400       85.04  
   684x384       59.88    59.85  
   640x400       59.88    59.98    85.08  
   576x432       75.00  
   640x360       59.86    59.83    59.84    59.32  
   640x350       85.08  
   512x384       85.00    75.03    70.07    60.00  
   512x384i      87.06  
   512x288       60.00    59.92  
   416x312       74.66  
   480x270       59.63    59.82  
   400x300       85.27    72.19    75.12    60.32    56.34  
   432x243       59.92    59.57  
   320x240       85.18    72.81    75.00    60.05  
   360x202       59.51    59.13  
   360x200       85.04  
   320x200       85.27  
   320x180       59.84    59.32  
   320x175       85.27  
DP-1-1 connected 3840x2160+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   3840x2160     60.00*+  30.00    29.97  
   2560x1440     59.95  
   1920x1080     60.00    50.00    59.94  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x800      59.81  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)
DP-1-4 disconnected (normal left inverted right x axis y axis)
ToZ wrote:

Edit:
Can you also try running xfce4-panel in debug mode. Start with the external monitor disconnected, then:

xfce4-panel -q
PANEL_DEBUG=1 xfce4-panel

...then connect the second monitor. Post back all the debug output.

$ PANEL_DEBUG=1 xfce4-panel

xfce4-panel(main): version 4.18.4 on gtk+ 3.24.38 (3.24.38), glib 2.76.4 (2.76.2)
xfce4-panel(module-factory): reading /usr/share/xfce4/panel/plugins

(xfce4-panel:3067): xfce4-panel-CRITICAL **: 15:44:26.812: Plugin simple-terminal: Desktop file "/usr/share/xfce4/panel/plugins/simple-terminal.desktop" has no "Xfce Panel" group
xfce4-panel(application): found window manager after 1 tries
xfce4-panel(base-window): 0x5633927326e0: rgba visual=0x5633925d40a0, compositing=true
xfce4-panel(base-window): 0x5633927326e0: rgba visual=0x5633925d40a0, compositing=true
xfce4-panel(display-layout): 0x5633927326e0: display=:0.0{comp=true}, screen-0[0x5633925cc030]=[1920,1080] (eDP-1-1=[0,0;1920,1080])
xfce4-panel(positioning): 0x5633927326e0: screen=0x5633925cc030, monitors=1, output-name=Primary, span-monitors=false, base=0,0
xfce4-panel(positioning): 0x5633927326e0: working-area: screen=0x5633925cc030, x=0, y=0, w=1920, h=1080
xfce4-panel(struts): 0x5633927326e0: top=27, start_x=0, end_x=1919
xfce4-panel(module): new item (type=object-type, name=separator, id=24)
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/14
xfce4-panel(module): new item (type=external-wrapper, name=whiskermenu, id=14)
xfce4-panel(external): whiskermenu-14: child spawned; pid=3072, argc=7
xfce4-panel(module): new item (type=object-type, name=separator, id=22)
xfce4-panel(module): new item (type=object-type, name=pager, id=4)
xfce4-panel(module): new item (type=object-type, name=tasklist, id=2)
xfce4-panel(module): new item (type=object-type, name=separator, id=3)
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/6
xfce4-panel(module): new item (type=external-wrapper, name=systray, id=6)
xfce4-panel(external): systray-6: child spawned; pid=3076, argc=7
xfce4-panel(module): new item (type=object-type, name=separator, id=5)
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/8
xfce4-panel(module): new item (type=external-wrapper, name=pulseaudio, id=8)
xfce4-panel(external): pulseaudio-8: child spawned; pid=3077, argc=7
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/9
xfce4-panel(module): new item (type=external-wrapper, name=power-manager-plugin, id=9)
xfce4-panel(external): power-manager-plugin-9: child spawned; pid=3081, argc=7
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/10
xfce4-panel(module): new item (type=external-wrapper, name=notification-plugin, id=10)
xfce4-panel(external): notification-plugin-10: child spawned; pid=3082, argc=7
xfce4-panel(module): new item (type=object-type, name=separator, id=11)
xfce4-panel(clock): trying to instantiate logind sleep monitor
xfce4-panel(module): new item (type=object-type, name=clock, id=12)
xfce4-panel(module): new item (type=object-type, name=separator, id=13)
xfce4-panel(base-window): 0x5633928f62e0: rgba visual=0x5633925d40a0, compositing=true
xfce4-panel(base-window): 0x5633928f62e0: rgba visual=0x5633925d40a0, compositing=true

** (wrapper-2.0:3081): WARNING **: 15:44:27.293: could not get output property
xfce4-panel(external): power-manager-plugin-9: child is embedded; 8 properties in queue
xfce4-panel(external): notification-plugin-10: child is embedded; 8 properties in queue
xfce4-panel(external): systray-6: child is embedded; 8 properties in queue
xfce4-panel(external): whiskermenu-14: child is embedded; 8 properties in queue
xfce4-panel(external): pulseaudio-8: child is embedded; 8 properties in queue
xfce4-panel(systray): rgba visual is 0x56037428b220
xfce4-panel(systray): registered manager on screen 0
xfce4-panel(external): xfce4-notes-plugin-29: child is embedded; 9 properties in queue
xfce4-panel(display-layout): 0x5633927326e0: display=:0.0{comp=true}, screen-0[0x5633925cc030]=[5760,2160] (eDP-1-1=[3840,0;1920,1080], DP-1-1=[0,0;3840,2160])
xfce4-panel(positioning): 0x5633927326e0: screen=0x5633925cc030, monitors=2, output-name=Primary, span-monitors=false, base=0,0
xfce4-panel(positioning): 0x5633927326e0: working-area: screen=0x5633925cc030, x=3840, y=0, w=1920, h=1080
xfce4-panel(display-layout): 0x5633928f62e0: display=:0.0{comp=true}, screen-0[0x5633925cc030]=[5760,2160] (eDP-1-1=[3840,0;1920,1080], DP-1-1=[0,0;3840,2160])
xfce4-panel(positioning): 0x5633928f62e0: screen=0x5633925cc030, monitors=2, output-name=Primary, span-monitors=false, base=4795,1020
xfce4-panel(positioning): 0x5633928f62e0: working-area: screen=0x5633925cc030, x=3840, y=0, w=1920, h=1080
xfce4-panel(display-layout): 0x5633927326e0: display=:0.0{comp=true}, screen-0[0x5633925cc030]=[5760,2160] (eDP-1-1=[3840,0;1920,1080], DP-1-1=[0,0;3840,2160])
xfce4-panel(positioning): 0x5633927326e0: screen=0x5633925cc030, monitors=2, output-name=Primary, span-monitors=false, base=0,0
xfce4-panel(positioning): 0x5633927326e0: working-area: screen=0x5633925cc030, x=3840, y=0, w=1920, h=1080
xfce4-panel(display-layout): 0x5633928f62e0: display=:0.0{comp=true}, screen-0[0x5633925cc030]=[5760,2160] (eDP-1-1=[3840,0;1920,1080], DP-1-1=[0,0;3840,2160])
xfce4-panel(positioning): 0x5633928f62e0: screen=0x5633925cc030, monitors=2, output-name=Primary, span-monitors=false, base=4795,1020
xfce4-panel(positioning): 0x5633928f62e0: working-area: screen=0x5633925cc030, x=3840, y=0, w=1920, h=1080
xfce4-panel(struts): 0x5633927326e0: top=27, start_x=3840, end_x=5759

Mod note: added code tags for easier readability

Last edited by ToZ (2023-08-10 12:52:20)

Offline

#11 2023-08-10 12:36:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Fix the visual position of second panel

I've been testing this and can't replicate this problem on my system, however, both my laptop and external monitors are the same size. You're debug output above is different from mine, but I'm not sure if that's related to the difference in monitor sizes.

Could this be a specific issue with the Nvidia graphics card?

I also don't have an nvidia card nor do I have much experience with nvidia cards. Is your nvidia config set up somehow so that it sees both as one monitor (as opposed to one workspace)? Hopefully that makes sense...

Last edited by ToZ (2023-08-10 12:37:29)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#12 2023-08-10 20:25:08

hys
Member
Registered: 2023-05-06
Posts: 9

Re: Fix the visual position of second panel

I think it is entirely possible that this is Nvidia specific issue.

So, I tried to write a workaround in bash, but editing the xfce-4panel.xml file and restarting xfce4-panel doesn't seem to change the position of the panel.

If you don't mind, could you let me know what I can do better in the script?

# detect how many screens are connected (and location of 2nd screen)
numOfConnectedMonitors=$(xrandr | grep " connected" | wc -l)

# based on the screen information, fix the visual position of the panel on the primary screen
if [ $numOfConnectedMonitors -gt 1 ]
then
	xPrimaryRes=$(xrandr | grep "primary" | awk '{print $4}' | grep -o -P '\d{4}x' | sed 's/x//')
	yPrimaryRes=$(xrandr | grep "primary" | awk '{print $4}' | grep -o -P 'x\d{4}' | sed 's/x//')

	xExternalRes=$(xrandr | grep "primary" | awk '{print $4}' | grep -o -P '\+\d{4}' | sed 's/\+//')
	yExternalRes=$(xrandr | grep "primary" | awk '{print $4}' | grep -o -P '\+\d{3}$' | sed 's/\+//')
	gabFromBottom=30

	xPanelPos=$(echo $xPrimaryRes+$xExternalRes-$xPrimaryRes/2 | bc)
	yPanelPos=$(echo $yPrimaryRes+$yExternalRes-$gabFromBottom | bc)

	configFile="$HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"
	# targets the second panel
	lineNumPos=$(grep -n '<property name="position" type="string"' $configFile | tail -n 1 | awk '{print $1}' | sed 's/://')
#	echo $lineNumPos

	# change pos
	PosString=$(echo "\t<property name=\"position\" type=\"string\" value=\"p=0;x=$xPanelPos;y=$yPanelPos\"\/\>")
	sed -i "$lineNumPos s/.*/$PosString/" $configFile

	# restart xfce4-panel
	xfce4-panel -r
fi

Offline

#13 2023-08-10 20:53:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Fix the visual position of second panel

Instead of editing the xml file, how about just issuing xfconf-query commands (the effect would be immediate)? It would target the "/panels/panel-X/position" variable. As an example, my panel 2:

$ xfconf-query -c xfce4-panel -p /panels/panel-2/position 
p=7;x=30;y=144

If I set p to 6, it moves to the top left corner.

The "p" is the position and is defined as:
p=0: free position
p=1: right border
p=2: upper right corner
p=4: bottom right corner
p=5: left border
p=6: upper left corner
p=7: middle-left
p=8: bottom left corner
p=9: top right corner ??
p=10: middle right ??
p=11: upper border
p=12: bottom border

If p is one of 2,4,6,8, it is in one of the corners and the x and y values are ignored.
If p is one of 1,5 (side border), the y value is used.
If p is one of 11,12 (top/bottom border), the x value is used.
Only in a situation where p=0 (free-standing) are both x and y used.

If you could post back the results of:

xfconf-query -c xfce4-panel -lv | grep position

...with the panel in the correct position for both single monitor and dual monitor, I can help you figure out the values if you need assistance.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#14 2023-08-11 15:49:29

hys
Member
Registered: 2023-05-06
Posts: 9

Re: Fix the visual position of second panel

ToZ wrote:

Instead of editing the xml file, how about just issuing xfconf-query commands (the effect would be immediate)? It would target the "/panels/panel-X/position" variable. As an example, my panel 2:

$ xfconf-query -c xfce4-panel -p /panels/panel-2/position 
p=7;x=30;y=144

If I set p to 6, it moves to the top left corner.

The "p" is the position and is defined as:
p=0: free position
p=1: right border
p=2: upper right corner
p=4: bottom right corner
p=5: left border
p=6: upper left corner
p=7: middle-left
p=8: bottom left corner
p=9: top right corner ??
p=10: middle right ??
p=11: upper border
p=12: bottom border

If p is one of 2,4,6,8, it is in one of the corners and the x and y values are ignored.
If p is one of 1,5 (side border), the y value is used.
If p is one of 11,12 (top/bottom border), the x value is used.
Only in a situation where p=0 (free-standing) are both x and y used.

If you could post back the results of:

xfconf-query -c xfce4-panel -lv | grep position

...with the panel in the correct position for both single monitor and dual monitor, I can help you figure out the values if you need assistance.

Thank you,

It turns out that the only thing I needed to do was to set p=10 on the coordinate.

Now, regardless of whether the second monitor is connected or not, the second panel stays at the bottom center of the primary screen.

Offline

#15 2023-08-11 16:25:42

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Fix the visual position of second panel

hys wrote:

It turns out that the only thing I needed to do was to set p=10 on the coordinate.

Now, regardless of whether the second monitor is connected or not, the second panel stays at the bottom center of the primary screen.

Interesting. Too bad we didn't get the previous value - maybe it wasn't set to the border edge and that why it was moving (value would have been 0).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#16 2023-08-11 17:59:45

hys
Member
Registered: 2023-05-06
Posts: 9

Re: Fix the visual position of second panel

ToZ wrote:
hys wrote:

It turns out that the only thing I needed to do was to set p=10 on the coordinate.

Now, regardless of whether the second monitor is connected or not, the second panel stays at the bottom center of the primary screen.

Interesting. Too bad we didn't get the previous value - maybe it wasn't set to the border edge and that why it was moving (value would have been 0).

Actually, I still have the previous value. It was p=0;x=4828;y=1250.

And yes, the p value was zero just like you have already mentioned.

I want to thank you for the support once more.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 8 queries executed - Memory usage: 724.3 KiB (Peak: 773.59 KiB) ]