xfce forgetting monitor arrangement

Running xfce on Manjaro on an iMac 12,1 (2011 21"), using a Thunderbolt 1.0 to HDMI adapter to a 21" monitor (so, two 21.5" monitors, one internal on the right, the external monitor to the left).

I've always had a problem with the second monitor not waking up in time after waking from sleep, or even just monitor sleep. It's a hardware/firmware issue with the adapter not waking up on time.

The problem I'm having with Manjaro+XFCE is that often the monitor setup will get reset to mirroring, and I have to manually change the monitor arrangement. The nifty pop-up window that appears in XFCE whenever the monitor setup changes has an option to expand to the right, but not to expand to the left (the iMac has ports along the right side, so it has to stay to the right of the secondary monitor.

My question is this: is there a way to read and write the monitor setup from the command line, so that I can reset it quickly? Something like xrandr --dump >file and xrandr --read <file?

xrandr output:

$ xrandr --listmonitors
Monitors: 2
 0: +*eDP 1920/475x1080/267+1920+0  eDP
 1: +DisplayPort-0 1920/475x1080/267+0+0  DisplayPort-0
$ xrandr -q
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 475mm x 267mm
   1920x1080     59.93*+
   1680x1050     60.00  
   1400x1050     60.00  
   1280x1024     59.95  
   1440x900      59.99  
   1280x960      59.99  
   1280x854      59.95  
   1280x800      59.96  
   1280x720      59.97  
   1152x768      59.95  
   1024x768      59.95  
   960x540       59.82  
   800x600       59.96  
   848x480       59.94  
   720x480       59.94  
   640x480       59.94  
DisplayPort-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 475mm x 267mm
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1280x800      59.91  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1440x576      50.00  
   1024x768      75.03    70.07    60.00  
   1440x480      60.00    59.94  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    66.67    60.00    59.94  
   720x400       70.08  
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
VGA-1 disconnected (normal left inverted right x axis y axis)
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

inxi output:

$ inxi -Fxxxza --no-host 
System:    Kernel: 5.6.19-2-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.6-x86_64 root=UUID=c3b1cff2-ed37-4ee0-af3b-d404097c96ef rw quiet 
           root=/dev/mapper/luks-eb7684b1-691d-476a-81d7-9f553231a205 apparmor=1 security=apparmor 
           resume=/dev/mapper/luks-1aa70ee5-d740-4f20-a0ae-699cefa5a54f udev.log_priority=3 
           Desktop: Xfce 4.14.2 tk: Gtk 3.24.20 info: xfce4-panel, plank wm: xfwm4 dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:   Type: Desktop System: Apple product: iMac12,1 v: 1.0 serial: <filter> Chassis: type: 13 v: Mac-942B5BF58194151B 
           serial: <filter> 
           Mobo: Apple model: Mac-942B5BF58194151B serial: <filter> UEFI: Apple v: date: 04/16/2019 
CPU:       Topology: Quad Core model: Intel Core i5-2400S bits: 64 type: MCP arch: Sandy Bridge family: 6 model-id: 2A (42) 
           stepping: 7 microcode: 2F L2 cache: 6144 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 20009 
           Speed: 1600 MHz min/max: 1600/3300 MHz Core speeds (MHz): 1: 1600 2: 1600 3: 1600 4: 1600 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds mitigation: Clear CPU buffers; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0102 
           Device-2: Advanced Micro Devices [AMD/ATI] Whistler [Radeon HD 6630M/6650M/6750M/7670M/7690M] vendor: Apple 
           driver: radeon v: kernel bus ID: 01:00.0 chip ID: 1002:6741 
           Display: x11 server: X.Org 1.20.8 driver: ati,intel,radeon unloaded: modesetting alternate: fbdev,vesa 
           resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: AMD TURKS (DRM 2.50.0 / 5.6.19-2-MANJARO LLVM 10.0.0) v: 3.3 Mesa 20.1.3 compat-v: 3.1 
           direct render: Yes 
Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           chip ID: 8086:1c20 
           Device-2: AMD Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series] vendor: Apple driver: snd_hda_intel v: kernel 
           bus ID: 01:00.1 chip ID: 1002:aa90 
           Sound Server: ALSA v: k5.6.19-2-MANJARO 
Network:   Device-1: Broadcom and subsidiaries NetXtreme BCM57765 Gigabit Ethernet PCIe driver: tg3 v: 3.137 port: 2000 
           bus ID: 02:00.0 chip ID: 14e4:16b4 
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Qualcomm Atheros AR93xx Wireless Network Adapter vendor: Apple AirPort Extreme driver: ath9k v: kernel 
           port: 2000 bus ID: 03:00.0 chip ID: 168c:0030 
           IF: wlp3s0 state: down mac: <filter> 
           IF-ID-1: eth0 state: down mac: <filter> 
Drives:    Local Storage: total: 8.64 TiB used: 5.90 TiB (68.3%) 
           ID-1: /dev/sda vendor: Western Digital model: WD5000AAKS-402AA0 size: 465.76 GiB block size: physical: 512 B 
           logical: 512 B speed: 3.0 Gb/s rotation: 7200 rpm serial: <filter> rev: 1D02 scheme: GPT 
           ID-2: /dev/sdb model: Mercury Electra 6G SSD size: 931.51 GiB block size: physical: 512 B logical: 512 B 
           speed: 6.0 Gb/s serial: <filter> rev: 7B0 scheme: GPT 
           ID-3: /dev/sdd type: USB vendor: Western Digital model: WD Elements 25A3 size: 7.28 TiB block size: 
           physical: 4096 B logical: 512 B serial: <filter> rev: 1021 scheme: GPT 
Partition: ID-1: / raw size: 918.37 GiB size: 902.95 GiB (98.32%) used: 348.87 GiB (38.6%) fs: ext4 dev: /dev/dm-0 
           ID-2: swap-1 size: 12.85 GiB used: 822.0 MiB (6.2%) fs: swap swappiness: 60 (default) cache pressure: 100 (default) 
           dev: /dev/dm-1 
Sensors:   System Temperatures: cpu: 56.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 1199 
Info:      Processes: 277 Uptime: 10d 2h 03m Memory: 11.68 GiB used: 4.69 GiB (40.1%) Init: systemd v: 245 Compilers: 
           gcc: 10.1.0 Shell: bash v: 5.0.18 running in: xfce4-terminal inxi: 3.0.37

Ok, guys, I think I solved my own problem. I discovered xlayoutdisplay in the AUR.

xlayoutdisplay -n gave me the names of the monitor, then
xlayoutdisplay -p eDp -o DisplayPort-0 eDp let me set the internal display as primary, and let me set the order from left to right.

Perfect! :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by