LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-16-2017, 08:01 AM   #1
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Rep: Reputation: Disabled
how might i resolve a broken laptop's LVDS preventing pm-hibernate and rtcwake functions ?


Hello

I have a small laptop acting as a 'file server' etc that sits chugging away with the lid closed. The laptop's screen is broken and its wiring loom is removed to the main board. When rarely I need a monitor, I plug one in on the vga port.

A cron job is set to put the laptop to sleep overnight using 'rtcwake' and wake it up in the morning.

Previously on 14.1 there were seemingly no issues and everything worked fine; the machine went to sleep and woke up as instructed.

Fresh install of 14.2 completed, cron job back in place and this is no longer the case - the laptop will not hibernate.


Summary:

pm-hibernate and rtcwake will not put the laptop to sleep unless a vga monitor is connected, or the vncserver is not running.

I think it has something to do with X11 (or the kernel ?) expecting a physical display being available if the vncserver is running at the point the rtcwake or pm-hibernate is run. Might it be this or something else ?

Of course I could shutdown the vncserver and all should work, but i never required this previously.

How might I permanently disable the LVDS, or ensure that the LVDS is not required at hibernate time please ?



------------------------------------------------------
What I tried to get to the above summary 'conclusion':

The machine seems to attempt to hibernate and then a few seconds later, wakes back up again.

I've removed the cron 'rtcwake -m disk -s nnnnn' entry.
Then I manually tested rtcwake from the command line with the same cron entry. It appeared to try to hibernate and then immediately came back to life.

Instead of using rtcwake, I tried simply issuing a pm-hibernate command. Same result as with rtcwake. Nothing I tried seemed to work, so I left it to come back to.

I decided at some point to connect a monitor to the vga port and then tried again... all worked fine! No other changes made in between, just the connection of the monitor.

Removed the monitor and the problem returned.

On the laptop was running a vncserver session, so I shut it down and pm-hibernate and rtcwake worked as expected (without the VGA monitor connected).

Restarted the vncserver (no vga monitor connected) and the problem returned.

Connected the vga monitor (and with the vncserver running) everything fine.

Last edited by badbetty; 02-16-2017 at 08:02 AM.
 
Old 02-18-2017, 12:19 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Hi Betty,


Hmmm... curioser and curioser, eh?
Fortunately, we can probably just catch dbus.

Quote:
#!/bin/sh

# dbus_suspend.sh
# This software aint got no warranty.
# in fact, just reading this will prolly give you brain cancer
# and eye herpes
# God only knows what's gonna happen if you try to run it.
# OK, you have been warned, I aint gonna hear no whinin' about it later.

dbus-send --system --print-reply
--dest="org.freedesktop.UPower" \
/org/freedesktop/UPower \
org.freedesktop.UPower.Suspend
If you want to hibernate instead of suspend, just change the last word in the script.
If you want to suppress the delightful debugging output that prints across the screen when you come out of suspend, redirect stdout to /dev/null.
Quote:
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend 1> /dev/null
You seem to need the "--print-reply " to block the script from exiting before DBUS can put the laptop in suspend.

BTW, I just stole that from some guy over on the arch wiki, truth be told, but it works without issue on 14.2 with XServer running and not running (on my laptop).
Hope that works as well for you

Last edited by dijetlo; 02-18-2017 at 01:41 PM. Reason: Honesty is worth the time.
 
Old 02-18-2017, 04:13 PM   #3
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Original Poster
Rep: Reputation: Disabled
@dijetlo - many thanks for the reply.

That is interesting but it leaves me asking...what is going on with DBus etc in relation to this issue...and why do I need to use it (I did not previously - before going to 14.2).

In my mind I should be able to do as before and issue pm-hibernate (or rtcwake in cron) and it do just that. It tries but immediately wakes up (or never makes a full hibernate in the first place). Is that down to this flaming DBus thing ?

If it is DBus, then why if I attach a physical monitor does it work - what is it that DBUS is causing the machine to not be able to hibernate ? There must be a setting or something other than using the UPOwer work around ?

Any ideas.... any one ?


Thank you again for the contributions.
 
Old 02-18-2017, 06:55 PM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
There are differences between Slackware 14.1 and 14.2 in the generation of ACPI lid events. What you describe seems to be the opposite of the issue discussed here, perhaps due to the removed wiring. Why it would be different with a monitor connected is a mystery though.
 
Old 02-18-2017, 07:08 PM   #5
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
what is going on with DBus etc in relation to this issue
Mmm.. dbus is a cross application bus, it provides a way for applications to pass data to each other and the underlying OS. It doesn't have a thing to do with getting your machine into suspend, it's more like a system message queue. Upower is the portion of the script that is handling the suspend functionality, your just using dbus to signal it.

As for the rest, try to remember, you have a very non-standard use case. Your laptop was never intended to be used in a headless state (that's why they crazy glued a monitor in the lid). In addition, I imagine it's pretty old and to be honest, half-broken. I think it's fortunate we can get it to work at all.
Sometime, the amazing thing about the dancing bear is not how fast he dances, but that he dances at all.

Last edited by dijetlo; 02-18-2017 at 07:36 PM. Reason: Patience is soil from which understanding blossums
 
Old 02-19-2017, 04:26 AM   #6
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Original Poster
Rep: Reputation: Disabled
@dijetlo - true, it is old and knackered...but it worked fine [in its current physical state] with 14.1. I'll keep trying until I get tired :-)

@allend - thanks for the link, I'll have a read..it may get me thinking to try other things. It is rather strange...plug in in the VGA and all is well! Its as if when X is running (as a result of the vncserver) the hibernate process gets interrupted as a result of a lack of a physical screen being found. Maybe I need to permanently disable a monitor - though not sure how to do that for the best yet (kernel boot parameter or X config setting etc).

Thank you both for contributing.
 
Old 02-19-2017, 07:48 AM   #7
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Original Poster
Rep: Reputation: Disabled
Im going to mark this as solved (sort of).

@allend's contribution re: the link supplied to another thread, had me looking at 'issues' relating to laptop lids.

So I left the lid open and tested pm-hibernate and rtcwake and both worked without requiring a physical screen attached.

Anyway, it the led me to checking out /proc/acpi/wakeup and noticing entries in there that are enabled/disabled in relation to devices capable of waking up the machine as I understood it.

There was one (four letter code in first column) in there that was enabled and disabling it appeared to help resolve the problem. Apparently the codes differ from machine to machine and are affected by the hardware and so forth that is present.

In addition I have run the xfce power manager settings (even though I dont use xfce) and set the lid to disable the screen on close - dont know what this will do when not running xfce, but it may have changed something when I ran it.

On that basis, at least for me, it has resolved it. Phew.
 
  


Reply



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: How The DMCA And The CFAA Are Preventing People From Saving Their Soon-To-Be-Broken Pebble Watches LXer Syndicated Linux News 0 12-20-2016 11:28 PM
NetworkManager functions differently under 14.1 vs 14.0, which is broken? bamunds Slackware 5 05-10-2014 08:35 PM
suspend / hibernate functions in console mode htamayo Debian 1 12-06-2010 06:55 AM
Broken suspend and hibernate on Lenovo 3000 N100 running Ubuntu rune.evjen Linux - Laptop and Netbook 6 02-23-2007 06:31 PM
Hibernate Laptop lennysokol Linux - Laptop and Netbook 4 05-02-2005 08:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:09 AM.

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