1

I have an HP-compaq-15s-103tx laptop with duel booted Ubuntu 14.04 LTS and Windows 8.1 in UEFI Mode.

Every time when I try to Start my laptop after doing 'suspend', It does not boot at all.

i.e, the usual grub does not appear, and a blank screen with just an underscore . Its stuck here and nothing else.

I will have to long press the power button and start again. After this I get lots of error messages 'System program problem detected' in the corner of my desktop which I have reported a hundred times.

Thank you.

here is apportcheckresume:

#!/usr/bin/python3

# Copyright (C) 2009 Canonical Ltd.
# Author: Andy Whitcroft <apw@ubuntu.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
# the full text of the license.

import os
import sys
import datetime

from apport import unicode_gettext as _
from apport.hookutils import attach_file_if_exists


def main(argv=None):

    if argv is None:
        argv = sys.argv

    try:
        from apport.packaging_impl import impl as packaging
        if not packaging.enabled():
            return -1

        import apport.report
        pr = apport.report.Report(type='KernelOops')

        libdir = '/var/lib/pm-utils'
        flagfile = libdir + '/status'
        stresslog = libdir + '/stress.log'
        hanglog = libdir + '/resume-hang.log'

        pr.add_os_info()
        pr.add_proc_info()
        pr.add_user_info()
        package = apport.packaging.get_kernel_package()
        try:
            package_version = apport.packaging.get_version(package)
        except ValueError as e:
            if 'does not exist' in e.message:
                package_version = 'unknown'
        pr['Package'] = '%s %s' % (package, package_version)

        # grab the contents of the suspend/resume flag file
        attach_file_if_exists(pr, flagfile, 'Failure')

        # grab the contents of the suspend/hibernate log file
        attach_file_if_exists(pr, '/var/log/pm-suspend.log', 'SleepLog')

        # grab the contents of the suspend/resume stress test log if present.
        attach_file_if_exists(pr, stresslog, 'StressLog')

        # Ensure we are appropriatly tagged.
        if 'Failure' in pr:
            pr['Tags'] = 'resume ' + pr['Failure']

            # Record the failure mode.
            pr['Failure'] += '/resume'

        # If we had a late hang pull in the resume-hang logfile.  Also
        # add an additional tag so we can pick these out.
        if os.path.exists(hanglog):
            attach_file_if_exists(pr, hanglog, 'ResumeHangLog')
            pr['Tags'] += ' resume-late-hang'

        # Generate a sensible report message.
        if pr.get('Failure') == 'suspend/resume':
            pr['Annotation'] = _('This occured during a previous suspend and prevented it from resuming properly.')
        else:
            pr['Annotation'] = _('This occured during a previous hibernate and prevented it from resuming properly.')

        # If we had a late hang make sure the dialog is clear that they may
        # not have noticed.  Also update the bug title so we notice.
        if os.path.exists(hanglog):
            pr['Annotation'] += '  ' + _('The resume processing hung very near the end and will have appeared to have completed normally.')
            pr['Failure'] = 'late resume'

        if pr.check_ignored():
            return 0

        nowtime = datetime.datetime.now()
        pr_filename = '/var/crash/susres.%s.crash' % (str(nowtime).replace(' ', '_'))
        with os.fdopen(os.open(pr_filename, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as report_file:
            pr.write(report_file)
        return 0
    except:
        print('apportcheckresume failed')
        raise

if __name__ == '__main__':
    sys.exit(main())

error report: enter image description here enter image description here

EDIT:

I Tried both the solutions given in Code Central, But both are not working for me.

But I noticed There are 3 other files in sleep.d folder that might be useful. So I have uploaded the Whole pm folder as it is here. please take a look at it.

  • There might be a ton of things going wrong, but the first I would try is: boot without the nVidia (turn off NVidia in the BIOS or remove the card) and try again... Also: you're dual-booting Win8: is fast boot turned off? – Fabby Dec 26 '15 at 14:49
  • +Fabby, Yes , Fast startup is turned off, and There is no option in BIOS about Nvidia and I dont think removing Graphic card from my laptop is a good idea. Thank you –  Dec 26 '15 at 16:35

2 Answers2

2

I had this issue running Ubuntu 15.10 on an HP Envy M7-101DX with an NVidia GT-940M. The resolution is the same as found at the link posted by User Manish Sakpal: Click Here For Original Source

Since Fabby requested pasting the code here for posterity's sake, I will outline the steps:

Open a new terminal window and type:

sudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd

In the resulting window, paste the following code:

#!/bin/sh

TMPLIST_E=/tmp/ehci-dev-list TMPLIST_X=/tmp/xhci-dev-list E_DIR=/sys/bus/pci/drivers/ehci_hcd X_DIR=/sys/bus/pci/drivers/xhci_hcd E_BIND=$E_DIR""/bind E_UNBIND=$E_DIR""/unbind X_BIND=$X_DIR""/bind X_UNBIND=$X_DIR""/unbind

#param1 = temp file, param2 = device dir, param3 = unbind unbindDev (){ #inspired by http://art.ubuntuforums.org/showpost.php?p=9744970& postcount=19
echo -n '' > $1 for i in ls $2 | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'; do echo -n "$i" | tee $3 echo "$i" >> $1 done }

#param1 = tem file, param2 = bind bindDev(){ [ -f $1 ] || return

for i in cat $1; do echo -n "$i" | tee $2

done rm $1 }

case "${1}" in hibernate|suspend) unbindDev $TMPLIST_E $E_DIR $E_UNBIND unbindDev $TMPLIST_X $X_DIR $X_UNBIND ;; resume|thaw) bindDev $TMPLIST_E $E_BIND bindDev $TMPLIST_X $X_BIND ;; esac

Save and close the script.

In the terminal window, type the following:

sudo chmod 755 /etc/pm/sleep.d/20_custom-ehci_hcd

That is all it took for me to rectify the issue. Hopefully it will work for you and others.

Peter
  • 21
  • 3
  • Thanks for your interest peter. I tried what you have given above exactly but that is making no difference. The problem still exists. So I Have uploaded the whole pm folder https://drive.google.com/folderview?id=0B3mN95k6QkkINlNTbWYtaTZzTDg&usp=sharing please take a look at it. Are all the files necessary? Should I modify anythings?? please reply. Thankyou –  Dec 28 '15 at 00:30
  • Hello @VishwaPrakash-H-V . I have checked the folders you uploaded and they are consistent with what I have on my system. In /sleep.d I have essentially the same thing. If you have tried both of the system resume scripts (20_custom-ehci_hci and 20_custom-ehci_hci~) individually and neither has worked for you, I would recommend removing them to get back to the default. My next thought would be something to do with the graphics and drivers. Is your system using the card or the integrated 4400HD graphics? Are you using the default Ubuntu drivers or the proprietary Nvidia ones? All up to date? – Peter Dec 28 '15 at 18:30
  • And finally upvoted! You should have dropped me a note that you did document it! ;-) – Fabby Feb 04 '16 at 00:56
0

I also have hp laptop, today itself i solve the suspend resume problem, but for that you have to follow the instructions as it is given below in the link then reboot to se whether it solve problem link:- http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug/

  • Thanks Manish, But which Step Shall I use? Step 2 or Step 2 Old? –  Dec 26 '15 at 16:57
  • Mostly recommended step 2 and it also worked for me. Use old step if step 2 doesnt work. Make sure u copy the script as it is – Manish Sakpal Dec 26 '15 at 17:09
  • 1
    Tried both. But both are not working for me. :( –  Dec 26 '15 at 17:27
  • 3
    Although your answer is 100% correct, it might also become 100% useless if that link is moved, changed, merged into another one or the main site just disappears... :-( Therefore, please [edit] your answer, and copy the relevant steps from the link into your answer, thereby guaranteeing your answer for 100% of the lifetime of this site! ;-) You can always leave the link in at the bottom of your answer as a source for your material... – Fabby Dec 26 '15 at 19:50
  • 1
    I tried both'Step 2' and 'step 2 old' (not at a time), and tried to suspend, but I get the same problem. Please help me here. –  Dec 26 '15 at 20:31
  • What went wrong? I think you should check your script and make sure it is as it is given in link. – Manish Sakpal Dec 27 '15 at 03:43
  • 1
    @Manish, I tried both the steps exactly as given, but no improvements. I thought it might be useful If I upload the pm folder. Its link is given in the question. Thank you. –  Dec 28 '15 at 00:33
  • I will suggest you to delete the file you created then reboot and then try the same procedure once again. – Manish Sakpal Dec 28 '15 at 15:06