LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-23-2018, 05:37 AM   #1
susja
Member
 
Registered: May 2011
Posts: 125

Rep: Reputation: 1
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
 
Old 11-24-2018, 03:46 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by susja View Post
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
 
Old 11-24-2018, 08:12 AM   #3
susja
Member
 
Registered: May 2011
Posts: 125

Original Poster
Rep: Reputation: 1
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
 
Old 11-24-2018, 11:03 AM   #4
susja
Member
 
Registered: May 2011
Posts: 125

Original Poster
Rep: Reputation: 1
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
 
Old 11-25-2018, 03:14 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by susja View Post
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.
 
Old 11-25-2018, 06:36 AM   #6
susja
Member
 
Registered: May 2011
Posts: 125

Original Poster
Rep: Reputation: 1
Ok
That’s not a problem to uninstall it.
I simply don’t know what to try more ...
Thanks
 
Old 11-26-2018, 01:01 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by susja View Post
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.
 
Old 11-26-2018, 02:24 PM   #8
susja
Member
 
Registered: May 2011
Posts: 125

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by ondoho View Post
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
Attached Files
File Type: txt systemd.txt (984 Bytes, 30 views)
 
Old 11-27-2018, 01:14 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
so you still haven't found your desktop's power management?

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.

Last edited by ondoho; 11-27-2018 at 01:17 AM.
 
Old 11-28-2018, 08:59 AM   #10
susja
Member
 
Registered: May 2011
Posts: 125

Original Poster
Rep: Reputation: 1
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
 
Old 07-16-2021, 03:23 PM   #11
evansste
LQ Newbie
 
Registered: Dec 2019
Posts: 3

Rep: Reputation: Disabled
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.
 
Old 07-23-2021, 03:09 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by evansste View Post
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.
 
Old 10-04-2021, 03:51 PM   #13
lamelylounges
LQ Newbie
 
Registered: Oct 2021
Posts: 1

Rep: Reputation: Disabled
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.
 
Old 10-09-2021, 01:56 PM   #14
evansste
LQ Newbie
 
Registered: Dec 2019
Posts: 3

Rep: Reputation: Disabled
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!
 
  


Reply

Tags
power management, vncserver



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Fix Laptop Doesn’t Suspend After Lid is Closed on Ubuntu Linux LXer Syndicated Linux News 0 02-17-2018 04:40 AM
KDE 4.5.1 crashes when laptop lid is closed and desktop effects is on yuchankit Slackware 2 10-14-2010 10:46 AM
Ubuntu Server Wakeonlan Not Working When Laptop Lid Closed D11011101 Linux - Laptop and Netbook 1 03-27-2009 02:41 PM
Standby on laptop when lid closed LDJ Linux - Newbie 5 01-16-2007 06:08 PM
laptop lid won't shut off when closed houler Slackware 32 08-27-2005 11:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration