External Display Scaling Issue - Gnome 42 and Wayland Used

Hello Everyone,

I have a Dell XPS 9350 laptop that I use a USB-C adapter to connect to an external display (Dell U2717D) with my setup. The monitor is detected and everything works correctly, my issue is as follows:

Problem:
When connecting the USB-C cable to my external Dell monitor, the resolution on my laptop’s screen changes. Everything becomes super small in terms of fonts and resolution and I am no longer able to use the laptop screen as a secondary display. I have the scaling set to 200% on my laptop’s internal display, and 100% set on the External Dell Monitor.

When I unplug the USB-C, everything resets correctly on my laptop screen and I am able to use it without any issues.

I am attaching my system information below:

sudo inxi --admin --verbosity=7 --filter --no-host --width                                                                   ✔ 
System:
  Kernel: 5.18.5-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.18-x86_64
    root=UUID=501de8bc-72f3-4eb8-8dd8-eb0381f16ebc ro
    resume=UUID=2314cba6-fa6e-443b-8fc2-de4d6ad99ffe apparmor=1
    security=apparmor udev.log_priority=3
  Console: pty pts/0 wm: gnome-shell DM: GDM v: 42.0 Distro: Manjaro Linux
    base: Arch Linux
Machine:
  Type: Laptop System: Dell product: XPS 13 9350 v: N/A serial: <filter>
    Chassis: type: 9 serial: <filter>
  Mobo: Dell model: 076F9T v: A00 serial: <filter> UEFI: Dell v: 1.13.0
    date: 02/10/2020
Battery:
  ID-1: BAT0 charge: 53.2 Wh (100.0%) condition: 53.2/57.5 Wh (92.5%)
    volts: 8.7 min: 7.6 model: SMP DELL JHXPY53 type: Li-poly serial: <filter>
    status: full
  Device-1: hid-dc:2c:26:27:0b:49-battery model: Keychron K3 serial: N/A
    charge: N/A status: discharging
Memory:
  RAM: total: 7.63 GiB used: 4.07 GiB (53.3%)
  Array-1: capacity: 16 GiB slots: 2 EC: None max-module-size: 8 GiB
    note: est.
  Device-1: System Board Memory type: LPDDR3 detail: synchronous size: 4 GiB
    speed: 1867 MT/s volts: curr: 1.2 width (bits): data: 64 total: 64
    manufacturer: SK Hynix part-no: H9CCNNNBJTMLAR-NUD serial: <filter>
  Device-2: System Board Memory type: LPDDR3 detail: synchronous size: 4 GiB
    speed: 1867 MT/s volts: curr: 1.2 width (bits): data: 64 total: 64
    manufacturer: SK Hynix part-no: H9CCNNNBJTMLAR-NUD serial: <filter>
CPU:
  Info: model: Intel Core i5-6200U socket: U3E1 bits: 64 type: MT MCP
    arch: Skylake gen: core 6 built: 2015 process: Intel 14nm family: 6
    model-id: 0x4E (78) stepping: 3 microcode: 0xF0
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 2761 high: 2787 min/max: 400/2800 base/boost: 2300/2300
    scaling: driver: intel_pstate governor: powersave volts: 0.9 V
    ext-clock: 100 MHz cores: 1: 2772 2: 2736 3: 2787 4: 2749 bogomips: 19204
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt
    cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts
    epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr
    ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr
    nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln
    pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep smap
    smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow
    tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave
    xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Dell driver: i915
    v: kernel arch: Gen9 process: Intel 14n built: 2015-16 ports:
    active: DP-1,eDP-1 empty: DP-2,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:1916 class-ID: 0300
  Device-2: Microdia Integrated Webcam HD type: USB driver: uvcvideo
    bus-ID: 1-5:3 chip-ID: 0c45:670c class-ID: 0e02
  Device-3: Logitech C922 Pro Stream Webcam type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 3-1.4:5 chip-ID: 046d:085c
    class-ID: 0102 serial: <filter>
  Display: server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.2
    compositor: gnome-shell driver: X: loaded: intel unloaded: modesetting
    alternate: fbdev,vesa gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5760x1800 s-size: <missing: xdpyinfo>
  Monitor-1: DP-1 mapped: XWAYLAND0 pos: primary,left model: Dell U2717D
    serial: <filter> built: 2017 res: 3200x1800 hz: 60 dpi: 280 gamma: 1.2
    size: 290x170mm (11.42x6.69") diag: 685mm (27") ratio: 16:9 modes:
    max: 2560x1440 min: 720x400
  Monitor-2: eDP-1 mapped: XWAYLAND3 pos: primary,right model: Sharp 0x144a
    built: 2015 res: 2560x1440 hz: 60 dpi: 108 gamma: 1.2
    size: 600x340mm (23.62x13.39") diag: 337mm (13.3") ratio: 16:9
    modes: 3200x1800
  Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel
    bus-ID: 3-1.4:5 v: kernel chip-ID: 046d:085c alternate: snd_soc_skl
    class-ID: 0102 bus-ID: 00:1f.3 chip-ID: 8086:9d70 serial: <filter>
    class-ID: 0403
  Device-2: Logitech C922 Pro Stream Webcam type: USB
    driver: snd-usb-audio,uvcvideo
  Sound Server-1: ALSA v: k5.18.5-1-MANJARO running: yes
  Sound Server-2: PulseAudio v: 16.0 running: no
  Sound Server-3: PipeWire v: 0.3.52 running: yes
Network:
  Device-1: Intel Wireless 8260 driver: iwlwifi v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 3a:00.0 chip-ID: 8086:24f3 class-ID: 0280
  IF: wlp58s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 1-3:2 chip-ID: 8087:0a2b class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 238.47 GiB used: 34.99 GiB (14.7%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: PM951 NVMe 256GB
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: BXV77D0Q temp: 39.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 72 GiB size: 70.32 GiB (97.67%) used: 23.34 GiB (33.2%)
    fs: ext4 block-size: 4096 B dev: /dev/nvme0n1p6 maj-min: 259:6 label: N/A
    uuid: 501de8bc-72f3-4eb8-8dd8-eb0381f16ebc
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 26.6 MiB (27.7%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p2
    maj-min: 259:2 label: N/A uuid: 7294-110C
  ID-3: /home raw-size: 80 GiB size: 78.19 GiB (97.74%)
    used: 11.14 GiB (14.3%) fs: ext4 block-size: 4096 B dev: /dev/nvme0n1p5
    maj-min: 259:5 label: N/A uuid: 82acc9d6-e635-41ea-86f7-b8d09946a03e
Swap:
  Kernel: swappiness: 10 (default 60) cache-pressure: 75 (default 100)
  ID-1: swap-1 type: partition size: 10.84 GiB used: 489.1 MiB (4.4%)
    priority: -2 dev: /dev/nvme0n1p7 maj-min: 259:7 label: N/A
    uuid: 2314cba6-fa6e-443b-8fc2-de4d6ad99ffe
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:1 size: 499 MiB fs: ntfs label: N/A
    uuid: 4CB29579B295686A
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 16 MiB fs: N/A label: N/A
    uuid: N/A
  ID-3: /dev/nvme0n1p4 maj-min: 259:4 size: 75.04 GiB fs: ntfs label: DRIVE
    uuid: 022401A424019C33
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:2 info: Intel Bluetooth wireless interface type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 8087:0a2b class-ID: e001
  Device-2: 1-5:3 info: Microdia Integrated Webcam HD type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 0c45:670c class-ID: 0e02
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 3-1:2 info: VIA Labs USB2.0 Hub ports: 5 rev: 2.1 speed: 480 Mb/s
    chip-ID: 2109:2817 class-ID: 0900
  Device-1: 3-1.1:3 info: VIA Labs USB 2.0 BILLBOARD type: Billboard
    driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s chip-ID: 2109:0103
    class-ID: 1100 serial: <filter>
  Device-2: 3-1.2:4
    info: SHARKOON GmbH 2.4GHz Wireless rechargeable vertical mouse [More&Better]
    type: Mouse driver: hid-generic,usbhid interfaces: 1 rev: 1.1
    speed: 12 Mb/s power: 100mA chip-ID: 1ea7:0064 class-ID: 0301
  Device-3: 3-1.4:5 info: Logitech C922 Pro Stream Webcam type: Video,Audio
    driver: snd-usb-audio,uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s
    power: 500mA chip-ID: 046d:085c class-ID: 0102 serial: <filter>
  Device-4: 3-1.5:6 info: VIA Labs USB Billboard Device type: Billboard
    driver: N/A interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 100mA
    chip-ID: 2109:8817 class-ID: 1100 serial: <filter>
  Hub-5: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-6: 4-1:2 info: VIA Labs USB3.0 Hub ports: 4 rev: 3.1 speed: 5 Gb/s
    chip-ID: 2109:0817 class-ID: 0900
  Device-1: 4-1.3:3 info: Alcor Micro Mass Storage Device type: Mass Storage
    driver: usb-storage interfaces: 1 rev: 3.0 speed: 5 Gb/s power: 800mA
    chip-ID: 058f:8468 class-ID: 0806 serial: <filter>
Sensors:
  System Temperatures: cpu: 42.0 C pch: 37.5 C mobo: 39.0 C sodimm: SODIMM C
  Fan Speeds (RPM): cpu: 0
Info:
  Processes: 278 Uptime: 7h 25m wakeups: 70 Init: systemd v: 251
  default: graphical tool: systemctl Compilers: gcc: 12.1.0 clang: 13.0.1
  Packages: pacman: 1539 lib: 459 flatpak: 0 Shell: Zsh (sudo) v: 5.9
  default: Bash v: 5.1.16 running-in: gnome-terminal inxi: 3.3.19

If anyone could offer any assistance on how to manage an external display + internal laptop display correctly, it would be greatly appreciated.

Thanks,
Asif

Hi, it depends what display server you are using. In case of Wayland this should work without tweaking by just setting the desired resolution and scaling factor on a multi-monitor setup in the settings.
Xorg on the other hand can neither do per monitor scaling, nor fractional scaling.

For Xorg on Gnome take a look here and here.

I am using Wayland and Gnome 42, as you can see in my system information above if you looked closely. However, I believe I have identified the issue.

The scaling is currently set to the following on my machine:
Laptop Screen (internal display) = 200%
External Screen = 100%

The scaling only applies to my primary screen (external monitor) when launching applications and not my secondary display (laptop screen). Scaling is ‘reset’ and only applied at the 100% level across BOTH screens, and not the 200% level on my internal display (laptop screen) to be clear.

For example, if I launch chrome with the following command:

/usr/bin/google-chrome-beta --force-device-scale-factor=2

The scaling works correctly and everything looks ‘normal’ on my laptop screen, but of course it looks a bit too large on my external display (which makes sense).

Question:
Is there a way applications can ‘auto-scale’ by the location of which monitor it’s dragged on, rather than me manually launching them with scale parameters or modifying the .desktop file?

Thank you in advance to everyone for your time and help. Any help anyone could provide would be greatly appreciated.