Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop freezes when disabling tiling mode via shortcut #1733

Closed
stdstijn opened this issue Sep 24, 2024 · 11 comments · Fixed by #1756
Closed

Desktop freezes when disabling tiling mode via shortcut #1733

stdstijn opened this issue Sep 24, 2024 · 11 comments · Fixed by #1756

Comments

@stdstijn
Copy link

stdstijn commented Sep 24, 2024

(1) Issue/Bug Description:

Entire desktop freezes (except for cursor) after disabling tiling mode via shortcut (Super + Y). The shortcut works normally when enabling tiling mode (after disabling it via the menu).

(2) Steps to reproduce (if you know):

  1. Clean install of EndeavourOS.
  2. Build Pop Shell from source or install gnome-shell-extension-pop-shell-git from AUR.
  3. Press Super + Y (other Pop Shell shortcuts work)
  4. Entire desktop freezes (except cursor)

(3) Expected behavior:

Tiling shortcut should not cause the desktop to freeze and should disable tiling mode the same way as from the menu.

(4) Distribution (run cat /etc/os-release):

NAME="EndeavourOS"
PRETTY_NAME="EndeavourOS"
ID="endeavouros"
ID_LIKE="arch"
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://endeavouros.com"
DOCUMENTATION_URL="https://discovery.endeavouros.com"
SUPPORT_URL="https://forum.endeavouros.com"
BUG_REPORT_URL="https://forum.endeavouros.com/c/general-system/endeavouros-installation"
PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2"
LOGO="endeavouros"

(5) Gnome Shell version:

47

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

Local build commit: ced5442
AUR package: gnome-shell-extension-pop-shell-git 1.2.0.r305.gcfa0c55-1

(7) Where was Pop Shell installed from:

Manual install from source or gnome-shell-extension-pop-shell-git from AUR.

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

3440 x 1440 horizontal primary, 1440 x 2560 vertical secondary

(9) Other Installed/Enabled Extensions:

None

(10) Other Notes:

Toggling tiling mode via the menu works as expected.

While the desktop seems to freeze completely, the cursor is still able to move around. CTRL + ALT + F3 does not switch terminal.

The only way to recover from the freeze is via force shutdown (power button hold).

Remarkable is that the CPU fans will ramp up when the freeze happens and do not slow down.

Hardware: AMD Ryzen 7 5800X and Radeon RX 6800

@stdstijn stdstijn changed the title Desktop freezes when toggling tiling mode via shortcut Desktop freezes when disabling tiling mode via shortcut Sep 24, 2024
@hoshengwei
Copy link

same issue

@zephrax
Copy link

zephrax commented Oct 1, 2024

Same issue here. All up-to-date.

Name : gnome-shell
Version : 1:47.0-1
Description : Next generation desktop shell
Architecture : x86_64

@condairteam
Copy link

same here

@ARazaMaths
Copy link

I also have this issue. Running arch in a VM.

@CodeAndGin
Copy link
Contributor

I also have this issue.

@SJFCS
Copy link

SJFCS commented Oct 22, 2024

same in archlinux

@manavchaudhary1
Copy link

same in fedora 41 after again reinstalling it yesterday , but before that it was working fine .
maybe it's recent commit which cause freeze ?

@amwnag
Copy link

amwnag commented Nov 8, 2024

Same issue after updating to GNOME 47

@Ado-do
Copy link

Ado-do commented Nov 13, 2024

same in fedora 41 dnf package :C

@epetousis
Copy link
Contributor

If you run into this and have SSH access, you can killall -9 gnome-shell to get your system back without having to do a full reboot.

@epetousis
Copy link
Contributor

epetousis commented Dec 7, 2024

Took a look at this, it seems like the freeze is actually an infinite recursion bug, and probably the reason why CPU usage skyrockets.

When the toggle-tiling shortcut is pressed, the toggle_tiling method is called:

shell/src/extension.ts

Lines 2200 to 2206 in e25621e

toggle_tiling() {
if (this.settings.tile_by_default()) {
this.auto_tile_off();
} else {
this.auto_tile_on();
}
}

The issue is that in auto_tile_off, the state of the "Tile Window" toggle in the menu bar is changed via setToggleState:

if (indicator) indicator.toggle_tiled.setToggleState(false);

However, because the toggle's state is changing to the new value for the first time, the toggled signal is called. The callback bound to that signal then proceeds to call none other than toggle_tiling:

let t = toggle(_('Tile Windows'), null != ext.auto_tiler, () => ext.toggle_tiling());

I suspect that in previous versions of Gnome, calling setToggleState on a PopupSwitchMenuItem didn't trigger the toggled signal, but that changed in Gnome 47. I opened #1756 to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.