LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Ubuntu 18.04 and laptop closed lid issues (https://www.linuxquestions.org/questions/linux-networking-3/ubuntu-18-04-and-laptop-closed-lid-issues-4175642906/)

susja 11-23-2018 05:37 AM

Ubuntu 18.04 and laptop closed lid issues
 
Hello.
I'm using 'Cloud' solution for 4 machines using RealVNC.
2 of it are MacBook and 1 is Linux. Before I had Ubuntu 16 and did not have any issue to access my laptop via VNC. Yesterday I upgraded Ubuntu.
I have an issue with Linux i.e. Ubuntu 18.04. Linux 4.15.0
It's working fine but when I close the lid of laptop running Ubuntu I've got an issue to connect and error message:
"VNC Server is not currently listening for Cloud connections"
I've changed file /etc/systemd/logind.conf and uncomment the line
HandleLidSwitch=ignore
But still ... when the lid is open I have no problem to connect and with closed lid I failed and got the error message.
How could I fix it?
Thanks
Eliya Voldman

ondoho 11-24-2018 03:46 AM

Quote:

Originally Posted by susja (Post 5929084)
I've changed file /etc/systemd/logind.conf and uncomment the line
HandleLidSwitch=ignore
But still ... when the lid is open I have no problem to connect and with closed lid I failed and got the error message.

so, you want the laptop to stay awake when you close the lid?
you should go into ubuntu's powermanager settings (i do not use this myself, so i cannot direct you exactly) and tell it what you want it to do when the lid is closed.

if that doesn't help, let's start gathering more information:
Code:

systemd-inhibit

susja 11-24-2018 08:12 AM

I installed “Power Manager” and setup ‘do nothing ‘ when the lid is closed BUT I still have the same issue I.e. VNC services are not listening

susja 11-24-2018 11:03 AM

Well I realized that my issue is not exactly with VNC server but rather with loosing internet connection when the lid is closed.
I noticed that machine does n9t even respond to ping when the lid is closed.
Hence first I need to fix this issue.
It looks that settings in ‘Power manager’ and in logind.conf file does not have effect.

Could someone please advice how to keep wi-fi connection when the lid is closed?
Note:I did not have the issue with 16.04
Thanks

ondoho 11-25-2018 03:14 AM

Quote:

Originally Posted by susja (Post 5929440)
I installed “Power Manager”

i don't think it was a good idea to install something.
power management is part of (almost) every desktop environment, you should have looked harder.

susja 11-25-2018 06:36 AM

Ok
That’s not a problem to uninstall it.
I simply don’t know what to try more ...
Thanks

ondoho 11-26-2018 01:01 AM

Quote:

Originally Posted by susja (Post 5929761)
I simply don’t know what to try more ...

you could go back to post #2 and answer ALL question, and provide ALL the output requested.

susja 11-26-2018 02:24 PM

1 Attachment(s)
Quote:

Originally Posted by ondoho (Post 5929380)
so, you want the laptop to stay awake when you close the lid?
you should go into ubuntu's powermanager settings (i do not use this myself, so i cannot direct you exactly) and tell it what you want it to do when the lid is closed.

if that doesn't help, let's start gathering more information:
Code:

systemd-inhibit

Hello
I uploaded the file with the output from systems-inhibit
Thanks

ondoho 11-27-2018 01:14 AM

so you still haven't found your desktop's power management? :scratch:

btw, it would have been better to post that text inline, it isn't much:
Code:

    Who: ModemManager (UID 0/root, PID 634/ModemManager)
    What: sleep
    Why: ModemManager needs to reset devices
    Mode: delay

    Who: NetworkManager (UID 0/root, PID 661/NetworkManager)
    What: sleep
    Why: NetworkManager needs to turn off networks
    Mode: delay

    Who: eliya (UID 1000/eliya, PID 1579/gsd-media-keys)
    What: sleep
    Why: GNOME handling keypresses
    Mode: delay

    Who: UPower (UID 0/root, PID 1320/upowerd)
    What: sleep
    Why: Pause device polling
    Mode: delay

    Who: eliya (UID 1000/eliya, PID 1579/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
    Why: GNOME handling keypresses
    Mode: block

    Who: eliya (UID 1000/eliya, PID 1527/gsd-power)
    What: sleep
    Why: GNOME needs to lock the screen
    Mode: delay

    Who: GNOME Shell (UID 1000/eliya, PID 1282/gnome-shell)
    What: sleep
    Why: GNOME needs to lock the screen
    Mode: delay

7 inhibitors listed.

as you see, you got quite a few inhibitors listed there.
that is, applications that take control of actions.
most of them are about "sleep".

i suggest you try once more to find power management and disable "sleep".
you should make sure that the screen still goes OFF when you close the lid, but the system shouldn't actually go to sleep.

edit:
maybe this isn't so easy after all with gnome on bionic.
you can still do it manually with dconf settings, or install (as you did, sorry) gnome-power-manager.
or move away from gnome, it really isn't suitable for this sort of server setup. NO desktop would be my recommendation, or XFCE.

susja 11-28-2018 08:59 AM

hey ondoho.
I'd like to play with dconf because nothing else is working for me.
I followed your link and found the example for config ... but I don't know how to implement it. I mean what command should I run to put this changes?
Like dconf .... ?
Could you please elaborate on it?
Last option: as you suggested ... move away from Gnome. Could you explain here either how to move away?

Thanks

evansste 07-16-2021 03:23 PM

I have to agree that migrating from Ubuntu 18.04, may be the solution.

Technically, I'm not using Ubuntu 18.04. I'm using Lubuntu 18.04, and have been trying to solve this laptop lid issue for the past two days. Make no mistake, there are lots of "solutions" out there, to try. None of them have worked for me.

For now, I'm just making sure that I don't close the lid to my laptop. If I close the lid, and then open it, the screen is dark. The only thing I can do, from that point, is reboot the computer.

Before installing Lubuntu 18.04, I was running Lubuntu 16.04. With that version, the screen would go dark, but if I hit ctrl-alt-f1, I'd get a command line prompt, and then ctrl-alt-f7 would restore the screen.

Just wanted to post my experience, since it's now 2021, and none of the solutions have worked for me. If anyone is reading this, and if you have the same issue with a Dell Latitude D430, my suggestion is to use something other than Lubuntu 18.04. Save yourself two days of grief, with nothing to show for it.

ondoho 07-23-2021 03:09 AM

Quote:

Originally Posted by evansste (Post 6267102)
I have to agree that migrating from Ubuntu 18.04, may be the solution.

Technically, I'm not using Ubuntu 18.04. I'm using Lubuntu 18.04, and have been trying to solve this laptop lid issue for the past two days. Make no mistake, there are lots of "solutions" out there, to try. None of them have worked for me.

For now, I'm just making sure that I don't close the lid to my laptop. If I close the lid, and then open it, the screen is dark. The only thing I can do, from that point, is reboot the computer.

Before installing Lubuntu 18.04, I was running Lubuntu 16.04. With that version, the screen would go dark, but if I hit ctrl-alt-f1, I'd get a command line prompt, and then ctrl-alt-f7 would restore the screen.

Just wanted to post my experience, since it's now 2021, and none of the solutions have worked for me. If anyone is reading this, and if you have the same issue with a Dell Latitude D430, my suggestion is to use something other than Lubuntu 18.04. Save yourself two days of grief, with nothing to show for it.

This problem is very much solvable, OP just hasn't put in the effort to do it, and you at least didn't put in the effort to show us everything you tried (and failed) in detail.

This is really a mentality problem more than a technical problem: it's something that only people experience that need to have a GUI for everything, but it isn't solvable with GUI tools only. Or maybe it is, but I'd only know how to solve it with CLI tools. However, showing you step-by-step instructions on how to do that would require me to work all the steps out on a physical Ubuntu boot and I'm just not going to do that, sorry.

Extensive hints were given; follow up on them, give us something to work with.
If you do, do it in a dedicated new thread, not here.

lamelylounges 10-04-2021 03:51 PM

got it to work !
 
I have a lot of sympathy because this was killing me too.
Dell e6330 running Ubuntu Desktop 18.04.
I was just reaching the conclusion that I should use "ubuntu server" if I want to be able to close lid and keep my machine pingable and reachable. But I decided to try a couple more settings.

Edit your /etc/systemd/logind.conf and uncomment (remove #) these lines:

HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore

This worked for me!
Good luck.

evansste 10-09-2021 01:56 PM

Thanks for the response, lamelylounges.

The funny thing is that, right when I was considering switching to Debian, this problem went away. At first, I started to tap the power button, and that seemed to bring it back. Now, it doesn't have a problem anymore. I can close the lid, and open it, without it remaining dark.

After your response, I looked at the file that you've mentioned. I didn't make any changes to it, but it's great to know that altering that file has worked for you. If it starts to act up again, I'll definitely make the changes that you have shown.

Thanks for sharing your solution!


All times are GMT -5. The time now is 08:49 AM.