linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.5k stars 732 forks source link

Panel not accessible after second monitor is disconnected #4731

Open igordovgaluk opened 8 years ago

igordovgaluk commented 8 years ago

The panel is placed on second monitor. After disconnecting of the monitor the panel is left on the space of that monitor and is not displayed on the connected one. As a user I expect the panel should be displayed on the connected monitor. Cinnamon v.2.8.0

dalcde commented 8 years ago

Was your second monitor set as the primary monitor?

Consider the case where you have panels on both monitors. When you unplug the second monitor, where should the panel on the second monitor go? Overlap with the one on the first monitor?

The current behaviour is that the panels follow the "monitor number". So if you put your panel on "monitor 2" and "monitor 2" disappears, the panel goes with it. On the other hand, if you make your second monitor "monitor 1" (ie. set it as your primary monitor) and then unplug it, your first monitor is now "monitor 1" and the panel is on that monitor.

mcswizzle commented 8 years ago

I've had this same issue with Fedora 22 (cinnamon-desktop-2.6.5-5.fc22.x86_64), particularly with a docked laptop. The workaround currently is to move the panel from the top of the top monitor to the top of the bottom monitor (top/bottom display configuration, not side by side). The only reason that I don't leave the panel on the top of the bottom monitor is that windows cannot pass through the panel to be completely on the top monitor, despite other attempts. In all instances, my primary monitor never leaves, as it is the laptop. Thanks for looking into this!

igordovgaluk commented 8 years ago

2 dalcde:

Consider the case where you have panels on both monitors.

it's not the case of the reported issue.

When you unplug the second monitor, where should the panel on the second monitor go? Overlap with the one on the first monitor?

the answer is simple as 2+2 - the single panel should at least show all open apps (now the apps are moved to the only monitor left anyway)

Vahan86 commented 7 years ago

@igordovgaluk, is this still an issue for you in Cinnamon 3.2?

igordovgaluk commented 7 years ago

@Vahan86 the issue exists on v3.2.7

Vahan86 commented 7 years ago

@JosephMcc, can we mark this issue as a bug?

igordovgaluk commented 7 years ago

this issue cause other one https://github.com/linuxmint/Cinnamon/issues/6429

dandv commented 3 years ago

I'm still experiencing this in Mint 20 Ulyana.

Consider the case where you have panels on both monitors. When you unplug the second monitor, where should the panel on the second monitor go? Overlap with the one on the first monitor?

When the external monitor is connected, I have the panel (taskbar) on the external monitor. I only have one panel. When I disconnect the external monitor, I expect the panel to appear on the laptop's internal monitor, but it's invisible. Never had this problem in 5 years of using Ubuntu, but I can reproduce it reliably in Cinnamon.

This seems like a serious usability issue for laptop users with external displays.

Until/if this is fixed, is there a workaround? Pressing Super doesn't work, and using the laptop is severely crippled without the Start menu and the panel. cinnamon --replace & didn't display the panel either:

$ cinnamon --replace &
[1] 61118
:~/Desktop$ Cinnamon warning: Log level 128: unsetenv() is not thread-safe and should not be used after threads are created
Clutter-Message: 06:23:28.582: Sync method: PRESENTATION TIME
Cjs-Message: 06:23:28.832: JS LOG: About to start Cinnamon
Cjs-Message: 06:23:28.861: JS LOG: [LookingGlass/info] Cinnamon.AppSystem.get_default() started in 28 ms
Cjs-Message: 06:23:28.864: JS LOG: [LookingGlass/info] loading user theme: /usr/share/themes/Mint-Y-Dark/cinnamon/cinnamon.css
Cjs-Message: 06:23:28.876: JS LOG: [LookingGlass/info] added icon directory: /usr/share/themes/Mint-Y-Dark/cinnamon

(cinnamon:61118): Cjs-WARNING **: 06:23:28.876: Some code accessed the property 'BackgroundManager' on the module 'backgroundManager'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Cjs-Message: 06:23:28.885: JS LOG: [LookingGlass/info] Monitor 1 not found. Not creating panel
Cinnamon warning: Log level 128: posix_spawn avoided (fd close requested) 

(cinnamon:61118): Cjs-WARNING **: 06:23:28.960: Some code accessed the property 'EdgeFlipper' on the module 'edgeFlip'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Cjs-Message: 06:23:28.961: JS LOG: [LookingGlass/info] loaded at Wed Dec 23 2020 06:23:28 GMT-1000 (HST)
Cjs-Message: 06:23:28.961: JS LOG: Cinnamon started at Wed Dec 23 2020 06:23:28 GMT-1000 (HST)
Cjs-Message: 06:23:28.968: JS LOG: [LookingGlass/info] ExtensionSystem started in 0 ms
Cjs-Message: 06:23:28.969: JS LOG: [LookingGlass/info] DeskletManager started in 0 ms
Cjs-Message: 06:23:28.969: JS LOG: [LookingGlass/info] SearchProviderManager started in 0 ms
openGL version 4.6 detected (GL3 Cogl Driver)
MetaSyncRing disabled: couldn't find required GL extensions, or the minimum safe openGL version was not met
Cjs-Message: 06:23:29.173: JS LOG: [LookingGlass/info] Loaded applet removable-drives@cinnamon.org in 14 ms
Cjs-Message: 06:23:29.174: JS LOG: [LookingGlass/info] Loaded applet systray@cinnamon.org in 0 ms
Cjs-Message: 06:23:29.175: JS LOG: [LookingGlass/info] Loaded applet show-desktop@cinnamon.org in 0 ms
Cjs-Message: 06:23:29.175: JS LOG: [LookingGlass/info] Loaded applet calendar@cinnamon.org in 0 ms
Cjs-Message: 06:23:29.175: JS LOG: [LookingGlass/info] Loaded applet keyboard@cinnamon.org in 0 ms
Cjs-Message: 06:23:29.182: JS LOG: [LookingGlass/info] Loaded applet printers@cinnamon.org in 8 ms
Cjs-Message: 06:23:29.183: JS LOG: [LookingGlass/info] Loaded applet notifications@cinnamon.org in 0 ms
Cjs-Message: 06:23:29.183: JS LOG: [LookingGlass/info] Loaded applet xapp-status@cinnamon.org in 0 ms
Cjs-Message: 06:23:29.205: JS LOG: [LookingGlass/info] Loaded applet power@cinnamon.org in 22 ms
Cjs-Message: 06:23:29.205: JS LOG: [LookingGlass/info] Loaded applet grouped-window-list@cinnamon.org in 0 ms
Cjs-Message: 06:23:29.231: JS LOG: [LookingGlass/info] Loaded applet sound@cinnamon.org in 26 ms
Cjs-Message: 06:23:29.245: JS LOG: [LookingGlass/info] Loaded applet network@cinnamon.org in 14 ms
Cjs-Message: 06:23:29.257: JS LOG: [LookingGlass/info] Loaded applet menu@cinnamon.org in 12 ms
Cjs-Message: 06:23:29.257: JS LOG: [LookingGlass/info] AppletManager started in 294 ms
Cjs-Message: 06:23:29.261: JS LOG: [LookingGlass/info] Cinnamon took 428 ms to start
dandv commented 3 years ago

Still experiencing this issue with the latest update to Cinnamon and Mint 20.1. After I disconnect my laptop from the primary display, the panel is gone. Logging out and back in doesn't fix it.

This is a severe issue.

BillFleming commented 2 years ago

I have recently ran into this on arch, but only after changing the setting for the panel to be on a specific monitor. (then disconnected another monitor, not the one that panel was set to) Cinnamon does see this condition but just stops trying to load the panel. Then the super key remains non-functional since there is no panel.

cinnamon --replace &
Cjs-Message: 23:00:46.047: JS LOG: About to start Cinnamon
Cjs-Message: 23:00:46.183: JS LOG: [LookingGlass/info] Monitor 2 not found. Not creating panel

If you were to disable the monitor specific setting the problem might go away. From searching the following command can bring the panel back. gsettings set org.cinnamon panels-enabled "['1:0:bottom']" From that source there is also provided a script to solve the problem, but setting this up automatically on monitor disconnect might be cumbersome or introduce some other issues... https://unix.stackexchange.com/questions/239075/cinnamon-dual-monitor-panel-missing-when-monitor-is-disconnected

I had thought there was a settings menu for the panel placement, but it seems just moving the panel to a specific monitor will trigger the issue. (using the panel edit mode->move option)

BillFleming commented 2 years ago

You can find the error message easily in cinnamon/js/ui/panel.js line 842 in the current master branch.

It looks like you could just change the index to 0 instead of returning and it would dump the panel on the first monitor.

        if (monitorIndex < 0 || monitorIndex >= global.screen.get_n_monitors()) {
            global.log("Monitor " + monitorIndex + " not found. Not creating panel");
            return null;
        }

to

        if (monitorIndex < 0 || monitorIndex >= global.screen.get_n_monitors()) {
            global.log("Monitor " + monitorIndex + " not found. Creating panel on first monitor.");
            monitorIndex = 0;
        }

You could test this possibly by just modifying the file directly on your PC then reboot your PC and test unplugging monitors. On my arch system the file is located here: /usr/share/cinnamon/js/ui/panel.js and the relevant logic is at line 763. There is already error handling/checking logic in the panel script to detect if you have the max number of panels on a given monitor and other condition checks, etc. So a simple change like I proposed should be safe. At the very least, if someone had more than 4 panels spread across different monitors and they lost one, they would still have a working taskbar and 4 other working panels.

udanieli commented 1 year ago

I am experiencing this issue too, I had to revert things back with gsettings set org.cinnamon panels-enabled "['1:0:bottom']".

PhillipMwaniki commented 3 months ago

I am experiencing this issue too, I had to revert things back with gsettings set org.cinnamon panels-enabled "['1:0:bottom']".

Thanks @udanieli . This worked perfectly for me. I still don't understand how the bug came about.