Shell: Pop Shell becomes unresponsive, most often after switching display

Created on 2 Jun 2020  路  14Comments  路  Source: pop-os/shell

Distribution:
NAME="Pop!_OS"
VERSION="20.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
LOGO=distributor-logo-pop-os

Related Application and/or Package Version):
pop-shell:
Installed: 0.1.0~1589925465~20.04~ff5f374
Candidate: 0.1.0~1589925465~20.04~ff5f374
Version table:
* 0.1.0~1589925465~20.04~ff5f374 1001
1001 http://ppa.launchpad.net/system76/pop/ubuntu focal/main amd64 Packages
1001 http://ppa.launchpad.net/system76/pop/ubuntu focal/main i386 Packages
100 /var/lib/dpkg/status

Issue/Bug Description:
After some time, Pop Shell becomes completely unresponsive, I cannot move any windows and no keyboard shortcuts are recognized. It's completely frozen, to the point the date/time at the top of the screen will never update. I can use SSH to access the machine (Thelio) to gracefully reboot by running 'sudo reboot' but eventually the problem returns. Without Pop Shell tiling enabled, the problem never happens.

Although it seems to become unresponsive on its own after a while, it's triggered more often after switching from one computer to another. I have a single display, with HDMI and DisplayPort. My Thelio is connected via DisplayPort. I have a laptop that is connected via HDMI. On my display, I can toggle the input from DisplayPort to HDMI and back again. Often, while coming back to DisplayPort, I cannot control my session anymore.

Steps to reproduce (if you know):
Switch back and forth between two computers, connected to a display via different inputs, over and over until the session hangs.

Expected behavior:
The session should never hang.

Other Notes:

While also switching computers via changing the input on my display, I also utilize a USB 3.0 switcher, which is like a KVM but only for USB and not display. It has a physical button so I can use it to switch my USB devices from Computer A to Computer B. I am not sure if that makes the problem worse or is even related.

bug

All 14 comments

Looks to be a bug inside GNOME Shell

May 22 09:26:44 thelio gnome-shell[3287]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 22 09:26:44 thelio gnome-shell[3287]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 22 09:26:44 thelio gnome-shell[3287]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 22 09:26:44 thelio gnome-shell[3287]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 22 09:26:44 thelio gnome-shell[3287]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 22 09:26:44 thelio gnome-shell[3287]: *** BUG ***
May 22 09:26:44 thelio gnome-shell[3287]: In pixman_region32_init_rect: Invalid rectangle passed
May 22 09:26:44 thelio gnome-shell[3287]: Set a breakpoint on '_pixman_log_error' to debug
May 22 09:26:44 thelio gnome-shell[3287]: *** BUG ***
May 22 09:26:44 thelio gnome-shell[3287]: In pixman_region32_init_rect: Invalid rectangle passed
May 22 09:26:44 thelio gnome-shell[3287]: Set a breakpoint on '_pixman_log_error' to debug
May 22 09:26:44 thelio gnome-shell[3287]: *** BUG ***
May 22 09:26:44 thelio gnome-shell[3287]: In pixman_region32_init_rect: Invalid rectangle passed

I'll see if I can prevent this codepath from triggering

If I'm looking at that right, GNOME Shell freaking out because when I switch to a different input, it technically has no display connected? Without Pop Shell I can't trigger this bug at all but I really miss using the tiling...

We do some calls into GNOME Shell to ask for monitors and their work areas any time the monitor layout changes. Could be the case that we need to put this update on hold until a display is available.

If you could, try out the dev_focal branch to see if this helps.

@mmstick thank you for looking at this. I've just switched to that branch just now, and I'll see what happens. I'll let you know as soon as I can.

So far, I haven't been able to reproduce this problem with the dev_focal branch.

I installed the OS two days ago (I was using LinuxMint with i3wm before). My work pattern is that I login, disable screenlocking and never logout. After installation everything worked fine, but now, after about 48 hours of uptime I experience huge lags related to the GUI operations. Basically, any click in the GUI (including switching windows) has 0.5-2 seconds delay. The suspect is gnome-shell. Despite a fact that my machine is fast, gnome-shell takes ~20% of CPU.

ptrace shows lots of messages like:
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=24, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=28, events=POLLIN}, {fd=31, events=POLLIN}, {fd=36, events=POLLIN}, {fd=39, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=45, events=POLLIN}, {fd=50, events=POLLIN}, {fd=51, events=POLLIN}, {fd=52, events=POLLIN}, {fd=53, events=POLLIN}, {fd=54, events=POLLIN}, {fd=55, events=POLLIN}, {fd=56, events=POLLIN}, {fd=57, events=POLLIN}, {fd=58, events=POLLIN}, {fd=59, events=POLLIN}, {fd=61, events=POLLIN}, {fd=62, events=POLLIN}, {fd=63, events=POLLIN}, {fd=64, events=POLLIN}], 26, 1297) = 1 ([{fd=6, revents=POLLIN}])

And there are many-many-many messages in the systemd logs:
Jun 08 11:06:24 pop-os gnome-shell[1861]: JS ERROR: TypeError: null has no properties _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9

Those messages are triggered when I try to switch windows, for example.

As a user now, I am forced to switch from the GUI to something else (hopefully xterm is still working?!). Will need to spend time on that. And if I cannot, I have to switch to another Linux distribution.

At this moment I am not a happy Pop!OS user.

@WarShoe Sorry that you're having issues, but this is not related to this particular issue. Personally, I haven't experienced the issue that you're describing. I also have not seen that error message anywhere in my logs. What window(s) are causing this, and what extensions do you have installed?

The problem was everywhere, all windows were affected. And not only windows, but also switching between the top menu bar options was lagging. Logout/Login helped. Now I can work again without any problems.

if it happens again, try Alt-F2 and enter
r
as the command. This restarts the shell, it takes a second and is much less intrusive than logout/login. May be it helps, but it's not a fix for the bug, of course (whatever it is)

I had this happen again over the weekend. I did run updates and reboot, but I didn't see pop shell as one of the items, unless I missed it. Was the fix for this issue already implemented in the version of pop shell that's available in the normal repos right now?

First of all thanks for the great work, this project is awesome!

I wanted to confirm that freezes have been happening to me even using a build that in theory contains the fixes above. Specifically I built the extension with this commit 830dd7a9177d9ebebb0024d2fc5312caa485c099 as head.

I am using Ubuntu 20.04, tiling mode enabled and multiple monitors. I have not being able to pin-point the trigger of the issue but it usually happens while doing some window management, moving them across monitors or panels.

Let me know if there is a way I can provide more debugging info our you want me to try to reproduce the issue.

Thanks again!

For me, it happened most recently while switching from one workspace to another.

Was this page helpful?
0 / 5 - 0 ratings