pop-os / shell

Pop!_OS Shell
GNU General Public License v3.0
4.88k stars 266 forks source link

Switching inputs on monitor moves workspaces around #377

Open avanisubbiah opened 4 years ago

avanisubbiah commented 4 years ago

Distribution (run cat /etc/os-release): NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://www.archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://bugs.archlinux.org/" LOGO=archlinux

Related Application and/or Package Version (run apt policy pop-shell or provide the latest commit if building locally): Latest Commit: fix: Update tiling toggle switch when toggled with keyboard shortcut: ff5f37434f078fa120537d9e154a538b523f1cea

Issue/Bug Description: When switching inputs on my monitor windows in the top workspace goes to the bottom and windows in workspaces previously below it move up one workspace. This only affects windows that are tiled, floating windows remain in place.

Steps to reproduce (if you know): Plug in two GPU's into the same monitor (I use pcie passthrough for a gaming VM but I think plugging in two different PC's should have the same effect) with windows tiled on more than one workspace and switch to a different input on the monitor and switch back to the original input.

Expected behavior: Tiled windows should remain in the same place like the floating windows and not move around when switching inputs on a monitor.

Other Notes:

tartley commented 1 year ago

I have the same issue. I use my Pop!_OS laptop display and two external monitors. We switch the central monitor back and forth between my laptop and a gaming PC several times a day, and every time I switch back to my laptop, all the windows have been moved around to other workspaces (even if workspaces were disabled - they get enabled and an extra workspace may be added - I currently have five, none added by me) and to different monitors than they were originally on. It is driving me bonkers! I literally don't think I can keep using the desktop like this.

Any workaround ideas gratefully received.

This issue sounds (to me) very similar to https://github.com/pop-os/pop/issues/2617, which was suggested should be in 'shell', not 'pop', so I'm going to suggest closing that one as a dupe of this.

$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

(5) Gnome Shell version:

$ gnome-shell --version
GNOME Shell 42.5

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

$ apt policy pop-shell
pop-shell:
  Installed: 1.1.0~1681999439~22.04~0e09473
  Candidate: 1.1.0~1681999439~22.04~0e09473
  Version table:
 *** 1.1.0~1681999439~22.04~0e09473 1001
       1001 http://apt.pop-os.org/release jammy/main amd64 Packages
       1001 http://apt.pop-os.org/release jammy/main i386 Packages
        100 /var/lib/dpkg/status

(7) Where was Pop Shell installed from:

Downloaded 22.04 LTS (NVIDIA) from https://pop.system76.com/ (to install on a new bigger faster SSD I bought for an existing Pop!_OS System76 Gazelle laptop)

(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):

[ 1 ][ 2 ][ 3 ]

  1. Laptop display, 1080p.
  2. External monitor, 1080p, miniDisplayPort.
  3. External monitor, 1080p, HDMI.

(9) Other Installed/Enabled Extensions:

gsettings get org.gnome.shell enabled-extensions | tr -d '[]' |  tr ' ' "\n" | sort
'cosmic-dock@system76.com',
'cosmic-workspaces@system76.com',
'ding@rastersoft.com',
'pop-cosmic@system76.com',
'pop-shell@system76.com',
'popx11gestures@system76.com'
'system76-power@system76.com',
'ubuntu-appindicators@ubuntu.com',

(No other extensions are installed, system-wide or per-user.)

tartley commented 1 year ago

This is one of a bunch of issues that sound like dupes to me. I think perhaps this issue should be closed as a dupe of the best populated one, #917 .

If you care about this issue, please go and upvote (thumbs up) that one too, so we can at consolidate our votes to show that a whole bunch of people care about this family of issues.

elliottthomlison commented 5 months ago

I'm not sure if my response is applicable, but I recently resolved this issue myself by creating a script that runs as a start up application which sets my two external monitors to their correct positions. I asked ChatGPT about this, but in case you're not interested in that I've included the steps below that I took. Your monitor names, and the related commands would need to be adjusted.

  1. Open a terminal and create a new script file, e.g., monitor_setup.sh:
    nano ~/monitor_setup.sh
  2. Add xrandr Commands:
    #!/bin/bash
    xrandr --output eDP-1 --primary --mode 1920x1080 --pos 1920x0 --rotate normal
    xrandr --output DVI-I-3-2 --mode 1920x1080 --pos 0x0 --rotate normal
    xrandr --output DVI-I-2-1 --mode 1920x1080 --pos 3840x0 --rotate normal
  3. Make script executable:
    chmod +x ~/monitor_setup.sh
  4. Add it to your start up applications
    [Desktop Entry]
    Type=Application
    Exec=~/monitor_setup.sh
    Hidden=false
    NoDisplay=false
    X-GNOME-Autostart-enabled=true
    Name=Monitor Setup
    Comment=Script to setup monitors at startup
  5. Verify it is in the start up applications
    ls ~/.config/autostart