Linux Mint is rebooting while screen is locked, how do I go about debugging/fixing it?

5

It's difficult to search for this issue as there are so many questions about rebooting, screen locking, etc. but I've had a look and couldn't find anything, so here goes.

I'm running Mint 14 (MATE) with a relatively standard set up. I'm not sure what other information I should be providing, but I'll be happy to add any details that will help to the question. I use xscreensaver and as long as I only lock the screen for a few minutes, this works fine. If I'm away from my computer with the screen locked for 10+ minutes however, it's almost guaranteed that the computer will have rebooted, losing everything I had open. This is extremely frustrating and I really need to fix it somehow, but there seems to be very little to go on regarding tracking down this problem. I've tried running xscreensaver with verbose logging, but there's nothing obviously wrong there (here's the last 10 minutes or so before a crash):

xscreensaver: 14:27:07: 1: spawning "flipscreen3d -root" in pid 11972.
glslideshow: unable to load font "-*-helvetica-medium-r-normal-*-180-*", using "fixed"
xscreensaver: 14:30:07: 0: killing pid 11971 (glslideshow)
xscreensaver: 14:30:07: 1: killing pid 11972 (flipscreen3d)
xscreensaver: 14:30:07: 0: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 14:30:07: 0: saver window is 0x1a00243.
xscreensaver: 14:30:07: 1: child pid 11972 (flipscreen3d) terminated with signal 15.
xscreensaver: 14:30:07: 0: destroyed old saver window 0x1a0023d.
xscreensaver: 14:30:07: 0: spawning "photopile -root -scale 0.6046 -count 9 -duration 3" in pid 15435.
xscreensaver: 14:30:07: 0: child pid 11971 (glslideshow) terminated with signal 15.
xscreensaver: 14:30:07: 1: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 14:30:07: 1: saver window is 0x1a00245.
xscreensaver: 14:30:07: 1: destroyed old saver window 0x1a0023f.
xscreensaver: 14:30:07: 1: spawning "flipscreen3d -root" in pid 15436.
photopile: font -*-helvetica-bold-r-normal-*-240-* does not exist, using -*-helvetica-bold-r-normal-*-180-*
photopile: font -*-helvetica-bold-r-normal-*-180-* does not exist, using fixed
photopile: unable to load font "-*-helvetica-bold-r-normal-*-240-*", using "-*-helvetica-medium-r-normal-*-240-*"
photopile: unable to load font "-*-helvetica-medium-r-normal-*-240-*", using "-*-helvetica-medium-r-normal-*-180-*"
photopile: unable to load font "-*-helvetica-medium-r-normal-*-180-*", using "fixed"
xscreensaver: 14:33:07: 0: killing pid 15435 (photopile)
xscreensaver: 14:33:07: 1: killing pid 15436 (flipscreen3d)
xscreensaver: 14:33:07: 0: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 14:33:07: 0: child pid 15435 (photopile) terminated with signal 15.
xscreensaver: 14:33:07: 0: saver window is 0x1a00249.
xscreensaver: 14:33:07: 0: destroyed old saver window 0x1a00243.
xscreensaver: 14:33:07: 0: spawning "photopile -root -scale 0.6046 -count 9 -duration 3" in pid 18945.
xscreensaver: 14:33:07: 1: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 14:33:07: 1: saver window is 0x1a0024b.
xscreensaver: 14:33:07: 1: child pid 15436 (flipscreen3d) terminated with signal 15.
xscreensaver: 14:33:07: 1: destroyed old saver window 0x1a00245.
xscreensaver: 14:33:07: 1: spawning "photopile -root -scale 0.6046 -count 9 -duration 3" in pid 18946.
photopile: font -*-helvetica-bold-r-normal-*-240-* does not exist, using -*-helvetica-bold-r-normal-*-180-*
photopile: font -*-helvetica-bold-r-normal-*-180-* does not exist, using fixed
photopile: font -*-helvetica-bold-r-normal-*-240-* does not exist, using -*-helvetica-bold-r-normal-*-180-*
photopile: font -*-helvetica-bold-r-normal-*-180-* does not exist, using fixed
photopile: unable to load font "-*-helvetica-bold-r-normal-*-240-*", using "-*-helvetica-medium-r-normal-*-240-*"
photopile: unable to load font "-*-helvetica-bold-r-normal-*-240-*", using "-*-helvetica-medium-r-normal-*-240-*"
photopile: unable to load font "-*-helvetica-medium-r-normal-*-240-*", using "-*-helvetica-medium-r-normal-*-180-*"
photopile: unable to load font "-*-helvetica-medium-r-normal-*-240-*", using "-*-helvetica-medium-r-normal-*-180-*"
photopile: unable to load font "-*-helvetica-medium-r-normal-*-180-*", using "fixed"
photopile: unable to load font "-*-helvetica-medium-r-normal-*-180-*", using "fixed"
xscreensaver: 14:36:07: 0: killing pid 18945 (photopile)
xscreensaver: 14:36:07: 1: killing pid 18946 (photopile)
xscreensaver: 14:36:07: 0: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 14:36:07: 0: saver window is 0x1a0024f.
xscreensaver: 14:36:07: 0: destroyed old saver window 0x1a00249.
xscreensaver: 14:36:07: 0: spawning "glslideshow -root" in pid 22514.
xscreensaver: 14:36:07: 1: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 14:36:07: 1: saver window is 0x1a00251.
xscreensaver: 14:36:07: 0: child pid 18945 (photopile) terminated with signal 15.
xscreensaver: 14:36:07: 1: child pid 18946 (photopile) terminated with signal 15.
xscreensaver: 14:36:07: 1: destroyed old saver window 0x1a0024b.
xscreensaver: 14:36:07: 1: spawning "intermomentary -root -num-discs 252" in pid 22515.
glslideshow: unable to load font "-*-helvetica-medium-r-normal-*-180-*", using "fixed"

I don't really expect someone to know exactly what's wrong based on just this, but some pointers regarding how I should try to track down the cause would be much appreciated.

Thor84no

Posted 2012-12-20T14:11:37.533

Reputation: 105

It would be useful if you provide the output of the dmesg command just after a reboot. – Atropo – 2012-12-20T14:39:08.870

I'll keep that in mind for next time it reboots, thanks. – Thor84no – 2012-12-20T14:48:29.487

@Atropo Well, I have the output, but it's 55KB, I doubt I can add that much to my post. Is there any particular part of it that would be useful? – Thor84no – 2012-12-21T13:43:33.520

I am running Linux Mint Debian Edition with MATE. By default it uses Gnome Screensaver and never, ever had troubles with it. I even didn't know I had xscreensaver installed. What happens if you change your screensaver to the Gnome one? – grs – 2013-01-04T18:16:20.597

@Thor84no Try putting it on pastebin then linking. (Or maybe blockquotes will work, who knows? – WindowsEscapist – 2013-01-06T04:05:08.847

@WindowsEscapist I'll give it a try when I'm back on that machine (tomorrow). – Thor84no – 2013-01-06T13:40:53.780

Uploaded to pastebin.

– Thor84no – 2013-01-07T13:03:34.057

Another thing worth checking out would be /var/log/pm-suspend.log – terdon – 2013-01-08T17:36:23.190

Answers

2

what is so special about the 10 minutes? Maybe DPMS kicks in? Is there any timeout in your settings that expires after 10 minutes?

suggestion: you could try to temporarily replace your xscreensaver by a debug program. Just to give you some rough estimate what I would do (untested):

  • determine location of xscreensaver by typing 'which xscreensaver'
  • back it up and replace it by the script below. this will just sleep and not call xscreensaver
  • make your debug script executable by chmod 755 ...
  • restart your session and wait for 10 min to expire
  • regularly watch the machine (does it already hang?) and the log file written by the script (what arguments is it called with?)

\

#!/bin/sh

exec >> $0.log 2>&1
echo $0 $@
# just wait - don't call screensaver (what does happen?)
sleep 1200
# eventually reenable this after some experimenting:
#<name of backed up xscreensaver> $@

sparkie

Posted 2012-12-20T14:11:37.533

Reputation: 2 110

I'm not aware of any timeout that expires after 10 minutes. All power management I've found anywhere is completely disabled, it shouldn't even be powering down hard drives. Other than that, I'm not sure. I'll give that script a go, but since it's a work computer sitting there watching it for 10 minutes is likely to be frowned upon. I'll do my best though. Also I'm not sure it's exactly 10 minutes, it's just a rough estimate as I'm often away for a few minutes (getting tea, helping someone) with no problems, but longer breaks kill it. – Thor84no – 2013-01-08T10:47:18.293

I just left it for 20 minutes with xscreensaver disabled (screen not locked), and it was fine. Could be coincidence though so I'll do a few more tries as and when I can. – Thor84no – 2013-01-08T11:38:46.813

Looks like the computer is pretty consistently rebooting when xscreensaver is allowed to run, while it doesn't at all when replacing the xscreensaver-command executable with your script. Nothing unusual in the log though, it's only executed once per lock with the argument --lock. – Thor84no – 2013-01-09T12:29:10.873

I think a special program started from within xscreensaver causes your Xserver to crash. This is known to sometimes fry a complete machine. You could manually run all xscreensaver programs one after the other to see when/if it crashes. – sparkie – 2013-01-09T16:33:22.373

That's a good call, going to give it a try now. – Thor84no – 2013-01-10T11:30:58.830

oh - thanks! you awarded me the full bounty even the problem isn't completely fixed? – sparkie – 2013-01-10T12:13:14.043

Yeah, I never expected this to be easy to fix, which is why I asked for ways to debug it. Since you provided the most useful answer in terms of debugging it and the bounty was about to run out (only a few minutes left), I figured I'd award it now and continue trying to debug it. I tried running xscreensaver-command manually, looping a bash script to call -next every 5 seconds and it didn't crash in 20+ minutes. Not sure what that tells me, but it almost seems like switching through them faster stops it crashing. O_O – Thor84no – 2013-01-10T12:27:06.843

can't you just limit the scope of programs selected when xscreensaver is running in normal mode? Probably only one special program is critical. Maybe the Xserver does not free memory for the effects used by the program. Causing it to crash after running long enough. – sparkie – 2013-01-10T12:38:15.253

I can run just an individual one, but it'll take me a while to go through them all that way. I was hoping it crashed fairly quickly on loading one, but that doesn't seem to be the case. – Thor84no – 2013-01-10T12:57:27.090

Looks like I've been able to fix it. After leaving an xscreensaver -watch command logging to a file continuously I got an error message that led me to an issue with the graphics driver. Looks like the community drivers crashes X when running out of memory (and it wasn't a proper reboot, just X restarting). I've left it over night twice now and at least it's not crashing X (unfortunately today the screensaver had crashed to desktop without locking the screen, but I suppose that's a different problem). – Thor84no – 2013-01-15T08:57:11.090

Come to think of it, it's odd that running xscreensaver with verbose logging didn't show this error while xscreensaver -watch did. – Thor84no – 2013-01-15T09:00:32.970

1

Did you try to disable the power saving options in the screen saver configuration? Maybe the screensaver is trying to put your computer into sleep, but a misconfiguration makes it reboot.

Atropo

Posted 2012-12-20T14:11:37.533

Reputation: 1 513

Good though, but according to the "Power Management Preferences" dialogue the computer is never to be put to sleep, it doesn't even turn off the monitors. Is this the only place to check for this? – Thor84no – 2012-12-20T14:48:10.673

Check the xscreensaver configuration – Atropo – 2012-12-20T14:51:40.493

Power management is completely disabled in xscreensaver as well. – Thor84no – 2012-12-20T15:25:58.807

Maybe when it goes into power save it tries to load config to RAM and there is a bad stick of RAM in the computer? – djangofan – 2013-01-09T21:24:36.620

1

You could try to block laptop-mode in pm-utils with this command:

echo HOOK_BLACKLIST=\"laptop-mode\" > /etc/pm/config.d/block_laptop

Here you can read more about pm-utils. This link is for Arch Linux but also applies to Mint.

RTOSkit

Posted 2012-12-20T14:11:37.533

Reputation: 560

I really thought it had helped as I left the computer locked a few times during the day yesterday and nothing went wrong. Unfortunately I've already had the issue again this morning (only away from the computer for 10 minutes or so), so I guess it wasn't this after all. :( – Thor84no – 2013-01-08T08:14:05.843

Please try reinstalling pm-utils, # apt-get install --reinstall pm-utils then after that ensure that in the file /usr/lib/pm-utils/defaults there is no such assignment: HIBERNATE_MODE="shutdown" – RTOSkit – 2013-01-08T08:47:07.913

additional controls that should be added is to disable any power management software and screensaver, to rule out any unknown bug in some software incompatibility not installed by default in Mint. – RTOSkit – 2013-01-08T08:55:56.210