~ubuntu-branches/ubuntu/precise/pm-utils/precise-updates

« back to all changes in this revision

Viewing changes to pm/sleep.d/98smart-kernel-video

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-11-25 15:36:42 UTC
  • mfrom: (1.1.7 upstream) (2.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20091125153642-2ks4aeo101eyo6uq
Tags: 1.2.6.1-2
* Add 01-modprobe-blacklist.patch: Respect module blacklists when calling
  modprobe on resume. (fd.o #25254)
* Add 02-logging-append.patch: Do not clear the log file on each operation,
  but instead append to it. This makes debugging of several suspends much
  easier. Thanks to James Westby for the patch! (fd.o #25255, LP #410352)
* Add debian/pm-utils.logrotate: Rotate above log file.
* Prevent hibernation after a kernel update:
  - Add debian/kernel-postinst-hibernate-stamp: /etc/kernel/postinst.d/ hook
    to create /var/run/do-not-hibernate stamp.
  - Add debian/no-hibernate-on-kernel-update: sleep.d hook to make
    hibernation fail early if above stamp exists.
  - debian/rules: Install above scripts.
  - Closes: #457515, LP: #350491
* debian/rules: When building on Ubuntu, revert the effect of
  10-debian-defaults.patch; uswsusp is not supported in Ubuntu. Add
  lsb-release build dependency for this.
* debian/control: Add myself to Uploaders: with Michael's consent.
* Add 03-on_ac_power-devkit-power.patch: Try to contact DeviceKit-Power in
  on_ac_power, and if it succeeds, use that. Otherwise fall back to hal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
{
33
33
    # if we are running with a KMS-enabled video driver, we should not
34
34
    # attempt to run any quirks
35
 
    [ -d /sys/class/drm/card0/device/graphics/fb0 ] || return 1
 
35
    grep -q -E '(noveau|drm)fb' /proc/fb || return 1
36
36
    remove_all_video_quirks
37
 
    add_parameter --quirk-no-chvt
 
37
    add_parameters --quirk-no-chvt
38
38
}
39
39
 
40
40
have_nvidia()
44
44
    # suspend/resume in a quirk-free manner.
45
45
    [ -d /sys/module/nvidia ] || return 1
46
46
    remove_all_video_quirks
 
47
    add_parameters --quirk-no-chvt
47
48
}
48
49
 
49
50
have_fglrx()
62
63
    local kernel_rev="$(uname -r |awk -F '[_-]' '{print $1}')"
63
64
    [ "$kernel_rev" \> "2.6.26" -o "$kernel_rev" = "2.6.26" ] || return 1
64
65
    remove_parameters --quirk-dpms-on \
65
 
        --quirk-dpms-suspend \
 
66
        --quirk-dpms-suspend \
66
67
        --quirk-vbe-post \
67
68
        --quirk-vbe-post \
68
69
        --quirk-vga-mode3 \