You are not logged in.

#1 2023-12-05 13:44:17

fishnet37222
Member
Registered: 2020-09-09
Posts: 10

KDE Plasma hides taskbar and desktop when laptop lid is closed.

I'm running KDE Plasma 5 in an X session.  I have KDE configured to do nothing when the laptop lid is closed and external power is attached.  This used to enable me to connect to the existing desktop session using NoMachine on my Windows 10 desktop when the laptop lid is closed.

However, recently I've noticed that when I connect while the laptop lid is closed, I don't get any errors, but the display is completely blank.  When I open the lid again, the taskbar and desktop reappear.

Is there any way to prevent KDE Plasma from hiding the taskbar and desktop when the lid is closed?

Offline

#2 2023-12-08 12:03:22

Xeauron
Member
Registered: 2023-07-10
Posts: 17

Re: KDE Plasma hides taskbar and desktop when laptop lid is closed.

HI, it sounds like the laptop is disconnecting the display completely once the lid is closed or shortly thereafter in order to save battery, rather than keeping the display alive and just turning off the backlight.
A bit like pulling a HDMI cable out of the laptop, it's probably built into the design regardless of whether a power lead is plugged in.

Xserver won't have anything to display on, and I don't think nomachine creates a virtual display to show anything.

You could try running (if you can still connect via ssh when the lid is closed)

$ xrandr

and see what the output is.
I'm pretty sure it'll show all displays as Disconnected hence why the remote screen is blank.

You could however try inserting one of these to give X something to keep the display server alive with.
https://www.amazon.co.uk/HDMI-Dummy-Plu … B07FB8GJ1Z

There may be a program that can emulate a virtual display, I've not looked into it myself.

Another option would be Xforwarding via ssh, though that option might not survive the jump to Wayland in future.

EDIT:
Apologies if I've misread your post, and you can see a mouse cursor then try pressing Alt+Space then type:

plasmashell --replace &

then hit enter and see if the desktop reappears.
if it does then you could script something up to run upon connection to the laptop which executes that command automatically.

Last edited by Xeauron (2023-12-08 12:11:31)

Offline

#3 2023-12-08 12:10:46

fishnet37222
Member
Registered: 2020-09-09
Posts: 10

Re: KDE Plasma hides taskbar and desktop when laptop lid is closed.

I don't think that's what's happening because when I use another desktop environment such as Cinnamon, I don't get the same behavior.  This only happens when using KDE Plasma.

Offline

#4 2023-12-08 12:13:00

Xeauron
Member
Registered: 2023-07-10
Posts: 17

Re: KDE Plasma hides taskbar and desktop when laptop lid is closed.

Can you see a mouse cursor and are you able to press Alt+Space to get KDE runner to show up?

Offline

#5 2023-12-09 01:50:51

fishnet37222
Member
Registered: 2020-09-09
Posts: 10

Re: KDE Plasma hides taskbar and desktop when laptop lid is closed.

Yes.  I see the mouse pointer, and Alt+Space opens a small window where I can enter a command to run.

Offline

#6 2023-12-09 10:47:23

Xeauron
Member
Registered: 2023-07-10
Posts: 17

Re: KDE Plasma hides taskbar and desktop when laptop lid is closed.

Try typing:

plasmashell --replace &

then hit enter.

Does the desktop appear afterwards?

Offline

#7 2023-12-09 14:53:46

fishnet37222
Member
Registered: 2020-09-09
Posts: 10

Re: KDE Plasma hides taskbar and desktop when laptop lid is closed.

Running that command does nothing.

Offline

#8 2023-12-09 17:45:10

Xeauron
Member
Registered: 2023-07-10
Posts: 17

Re: KDE Plasma hides taskbar and desktop when laptop lid is closed.

I'm at a loss then, sorry.
Maybe try a post over on the KDE forums if you don't get any other answers from here.

Offline

Board footer

Powered by FluxBB