Bug 347195 - Panel disappears after an external monitor is unplugged
Summary: Panel disappears after an external monitor is unplugged
Status: RESOLVED DUPLICATE of bug 356727
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.3.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-04 22:41 UTC by Dima Ryazanov
Modified: 2021-10-06 19:05 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output of "kscreen-console bug" (6.43 KB, text/plain)
2015-05-04 23:01 UTC, Dima Ryazanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2015-05-04 22:41:14 UTC
My external monitor is set up as the primary. When I unplug it, a lot of the time, the panel disappears.

It's possible that it's somewhere offscreen. My screen resolution is 1366x768; the output of "xwininfo -tree -root" shows a few suspicious windows:
     0x540002d "Plasma": ("plasmashell" "plasmashell")  422x1+926+768  +926+768
     0x540014b "Plasma": ("plasmashell" "plasmashell")  476x620+1366+790  +1366+790
     0x5400148 "Plasma": ("plasmashell" "plasmashell")  1x1+1366+0  +1366+0
     0x5400142 "Plasma": ("plasmashell" "plasmashell")  422x1+3486+1410  +3486+1410
     [...]
     0x5400042 "Plasma": ("plasmashell" "plasmashell")  324x72+0+1338  +0+1338
All of those locations seem to be outside of my screen.


Reproducible: Sometimes
Comment 1 David Edmundson 2015-05-04 22:47:05 UTC
which monitor is set to be the "primary" display? 

if you have a panel on a non primary monitor and then remove that monitor the intended behaviour is for the panel to disappear.
Comment 2 Dima Ryazanov 2015-05-04 22:50:36 UTC
The external monitor is set as the primary, and that's also where the panel was.

I have a single panel (the one with the K menu, taskbar, etc.). I didn't explicitly move it anywhere: it got moved to the external monitor when I set the external monitor as primary.
Comment 3 David Edmundson 2015-05-04 22:56:56 UTC
It's possible that it's somewhere offscreen. My screen resolution is 1366x768; 

     0x540014b "Plasma": ("plasmashell" "plasmashell")  476x620+1366+790  +1366+790

heh it is off-screen.

which means plasma doesn't know your screen is missing.

possibly X doesn't know either.

Can I have the output of kscreen-console
Comment 4 Dima Ryazanov 2015-05-04 23:01:24 UTC
Created attachment 92425 [details]
Output of "kscreen-console bug"

Attached.

That's interesting... It knows that all outputs are disconnected - however, it displays the current size as QSize(3926, 1440).
Comment 5 David Edmundson 2015-05-04 23:02:38 UTC
That does sound broken. 

Thanks
Comment 6 Martin Kostolný 2015-07-28 18:26:24 UTC
I just wanted to add similar bug report... I can confirm this behaviour but I'm having more issues then just a missing panel. Here is list of steps with situation description:

1)
Connect external monitor (ideally with the same resolution as your standard one)

2)
In Display Configuration settings set up the external monitor to be above the standard one and make it primary.

3)
Apply
- now standard monitor's screen lacks background (is black)
- from now on this will happen every time external monitor gets connected
+ right-clicking the black screen is not working

4)
Disconnect external monitor
-> standard monitor's screen is still black (always) + panel is gone (always) + some windows can be inaccessible (often)
-> restarting plasmashell helps but it will not repair everything:
    - specifically disappeared windows - like konsole (but also other like kwrite) - window can disappear and never appear again (I mean: it is also missing from task manager and alt+tab), can only be killed as a process
    - this complicate the possibility of plasma restarting (because krunner gets sometimes inaccessible on Alt+F2, too)
    
5)
You can now connect external monitor, move some windows on it / from it; disconnect monitor and see which windows left visible but overall plasmashell state is broken at this point.

Note that nothing crashes during the process (plasmashell, kwrite and disappeared windows - their processes - still run).

This test was also performed with entirely new user (empty home -> stock settings) and with compositing disabled. Rootless Xorg (without display manager).
Plasma 5.3.2
KDE Applications 15.04.3
KF 5.12.0
intel video
Comment 7 Mykola Krachkovsky 2015-10-02 07:24:04 UTC
I have similar problem. My usual steps are these, cause I'm usually use my laptop at two places, with external monitor and without it.

1. Attach external monitor.
2. Switch laptop on and login.
3. Set external monitor as primary screen.
4. Set panel to primary screen (i.e. external) and only to it.
5. Shutdown system.
6. Unplug monitor.
7. Switch on and login.
8. **Got no panel** at primary (now it only main laptop screen so it's primary).
9. Add standard panel.
10. Shutdown system.
11. Plug in extrnal monitor.
12. Switch on and login.
13. **Got TWO panel** on each screen.

That's really annoying.
Comment 8 Marco Leise 2015-10-15 05:06:44 UTC
I have a similar problem. Found a nice way to hide unlimited panels in the nirvana between left and right screen:

1. Have two screens on.
2. Move a panel from the left screen over to the right.
3. Panel vanishes.

Left screen laptop panel, 1366x768.
Right screen HDMI-2, 1280x1024 (primary), right-of laptop panel, aligned at top.

To make the panels visible:

1. Deactivate and reactivate right-screen in control center.
2. All missing panels appear on the left border of the right screen.
Comment 9 Unknown 2015-10-16 07:53:29 UTC
In the last couple of weeks, I've been affected from a similar problem.

Hardware: Dell Latitude E6430s (14" screen)
                   Dell docking station
                   Dell 21" screen
Distro: OpenSUSE TW with the latest plasma and Qt5.5.0

The laptop screen is always set as primary.

What happens:
* attach the computer to the docking station while suspended
* open the lid and log in
* sometimes the external monitor is recognized straight away, sometimes only after going to "System Settings -> Display and Monitor": the last couple of times it worked only in the latter mode
* the panel appears on the external monitor despite the fact that the laptop one is the primary
* If I click on any of the items in the system tray or the application launcher, the corresponding popup windows appear more or less in the middle of the screen, as if it thinks that the screen is a 14" anchored on the upper left corner of the external monitor
* full screen windows on the external monitor go behind the panel, as if the panel where not there. I've the the panel to be always visible
* all the notifications appear on the laptop monitor as if there panel where still there
* when suspend the laptop and disconnect from the docking station one of these two options happen:
   * the utterly annoying one: the screen freezes (this is due to this bug https://bugreports.qt.io/browse/QTBUG-42985 not yet solved also with Qt5.5.0)
   * the better one: the screen comes back to life and I can unlock the session. But the panel has disappeared. I add a new panel, my old one magically reappears in the correct position.

Expected behaviour:

* The panel stays on the primary desktop as it used to do before.

On the same computer I also have a Kubuntu 15.10 installation and there I don't see the problem. They still have Qt5.4.x

So I guess is some bad interaction between Qt5.5 and plasma
Comment 10 Jeroen Tietema 2015-10-28 02:51:06 UTC
I am having the same issue on a ThinkPad T410s running Fedora 22.

A workaround for me is quiting plasmashell and restarting it:

kquitapp plasmashell & plasmashell &
Comment 11 Pragalathan 2015-11-06 09:52:58 UTC
I faced similar problem with Kubuntu 15.04 & 15.10.

Steps:
1. connect 22"/24" (DELL) monitor to running Kubuntu laptop (Del Lattitude E5450)
2. Turn off laptop display and make external monitor as primary (using System-settings)
3. Now unplug external monitor. Laptop display never turns on

However in Kubuntu 14.10 and before Laptop display turns on automatically

4. When you connect external monitor back, laptop display should go off and external monitor display should turn on automatically. But both the screens are off.

However in Kubuntu 14.10 and before Laptop display turns off and external monitor turns on automatically

Workaround: sudo service sddm restart (via CTRL+ALT+F1)

This restarts the entire session and I loose all my work

Due to this, im still with Kubutu 14.10 and living with unsupported packages.
Appreciate any help.
Comment 12 David Edmundson 2015-11-08 20:25:52 UTC

*** This bug has been marked as a duplicate of bug 353426 ***
Comment 13 Pragalathan 2015-11-13 07:34:26 UTC
This is more than the disappearance of plasma task bar ( which is 353426). The entire screen goes off and never comes until sddm or OS is restarted. 

Hence im unable to connect with any external monitor AT ALL.

Appreciate it the priority of the bug is increased.
Comment 14 Andrew Chen 2015-11-30 02:04:04 UTC
(In reply to Pragalathan from comment #11)

I cannot reproduce the problem you are describing with plasma 5.4.3. If you can, please test with the newest version and file a separate bug if the problem persists.
Comment 15 CM 2016-06-17 18:18:37 UTC
I'm getting the following behaviour: 
Laptop with either µHDMI->VGA or µHDMI->HDMI external monitor configuration.
Kubuntu 16.04 with Plasma 5.6.4 from backports.
Panel pop-ups on wrong monitor or not showing at all, sometimes panel moving to the secondary monitor. krunner runs on the secondary display.
This happens only  if I change anything in the kscreen virtual display arrangement. I also had the problem of my primary screen being black with the mouse stuck at the top edge when I didn't have the µHDMI dongle attached. 
Things go back to normal if I delete everything in ~/.local/share/kscreen and restart sddm. 
Here's an example of a file in ~/.local/share/kscreen named 0a4880943d4a3dca33a04c4f97f64b64, there are usually a couple of them.

[
    {
        "enabled": true,
        "id": "e4c60c052c579303ac024f21f1683d98",
        "metadata": {
            "fullname": "xrandr-unknown",
            "name": "eDP1"
        },
        "mode": {
            "refresh": 60.00103759765625,
            "size": {
                "height": 1080,
                "width": 1920
            }
        },
        "pos": {
            "x": 0,
            "y": 1080
        },
        "primary": true,
        "rotation": 1
    },
    {
        "enabled": true,
        "id": "9f7021b9c1848e2544d27a4f656cf07d",
        "metadata": {
            "fullname": "xrandr-D09VR33E1KVL",
            "name": "HDMI1"
        },
        "mode": {
            "refresh": 60,
            "size": {
                "height": 1080,
                "width": 1920
            }
        },
        "pos": {
            "x": 0,
            "y": 0
        },
        "primary": false,
        "rotation": 1
    }
]
Comment 16 ichramm 2016-07-22 17:56:50 UTC
It's been happening to me since last year!

1- Panel lost when second monitor is unplugged (goes back when plugging again)

2- Same happens when having two external monitors and disabling laptop screen: I have two external monitors at work (one of them connected to a lenovo dock), both same brand and model, 1920x1080 resolution, one of them is configured as primary output (the one connected to the dock).
I get black screen when docking the laptop. restaring plasmashell usually solves the problem.
Panel dissapears when when undocking the laptop.

3- Random black screen when plugging / unplugging a single secondary monitor
Comment 17 Nate Graham 2021-10-06 18:56:50 UTC

*** This bug has been marked as a duplicate of bug 356225 ***
Comment 18 Nate Graham 2021-10-06 19:05:07 UTC

*** This bug has been marked as a duplicate of bug 356727 ***