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

« back to all changes in this revision

Viewing changes to pm/sleep.d/98video-quirk-db-handler

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl, Michael Biebl, Martin Pitt
  • Date: 2010-07-13 16:24:27 UTC
  • mfrom: (40.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20100713162427-vpmf1kkj79e715j0
[ Michael Biebl ]
* New upstream release. (Closes: #588587)
  The main improvement is that this ships some generally useful power
  management hooks by default. Note that this conflicts with similar
  packages such as laptop-mode-tools or pm-utils-powersave-policy, so you
  should not enable them and pm-utils at the same time.
  Current hooks when switching to battery:
  - [disable_wol] Disable Wake-on-LAN on ethernet cards
  - [hal-cd-polling] Disable HAL's polling of CD drives for automounting
    them. Note that this HAL functionality is already obsolete in Debian's
    current GNOME, but still being used in current KDE and XFCE desktops.
  - [harddrive] More aggressive harddrive spindown times
  - [intel-audio-powersave] Put ac97 and hda cards to sleep when inactive.
  - [journal-commit, xfs_buffer] Delay ext[34]/ext journal/metadata
    writeback
  - [laptop-mode] Delay hard disk writeback times of dirty caches, to avoid
    spin ups
  - [pcie_aspm] PCI express cards power saving
  - [readahead] More speculative readahead, at the expense of using more
    memory
  - [sata_alpm] Enable SATA link power management
  - [sched-powersave] Try to use fewer cores on multi-core machines
  - [wireless] Reduce RX/TX power when idle on some known-working drivers
    (various Intel chips for now)
* video-quirks/*
  - Update quirks to latest upstream release pm-quirks-20100619.
* Drop patches applied upstream
  - debian/patches/05-inspiron-8600-ati-quirk.patch
  - debian/patches/08-fix-lock-file-handling.patch
  - debian/patches/12-man-page-fixes.patch
* Refresh and update all patches so they apply cleanly.
* debian/control
  - Demote radeontool to Suggests. The standard Debian/Ubuntu kernels use
    KMS for radeon which makes this tool obsolete. (Closes: #588768)

[ Martin Pitt ]
* debian/control: Add hdparm Recommends and ethtool/wireless-tools Suggests,
  for the newly added power saving hooks.
* debian/control: Conflicts/Replaces: pm-utils-powersave-policy, superseded
  by the now integrated power.d hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
354
354
            # Use them without the usual filtering. This may cause the system 
355
355
            # to blow up, but they explicitly asked for it. 
356
356
            remove_parameters --quirk-test
 
357
            echo "Quirk testing mode enabled." 
357
358
        elif using_kms; then
358
359
            # Using kernel modesetting?  No quirks, and do not change vts.
359
360
            remove_parameters $possible_video_quirks
360
361
            add_parameters --quirk-no-chvt
 
362
            echo "Kernel modesetting video driver detected, not using quirks."
361
363
        elif using_nvidia; then
362
364
            # Ditto for nVidia binary drivers
363
365
            remove_parameters $possible_video_quirks
 
366
            echo "nVidia binary video drive detected, not using quirks."
364
367
        elif using_fglrx; then
365
368
            # fglrx may or may not have to change vts, reports one
366
369
            # way or the other welcome.
367
370
            remove_parameters $possible_video_quirks
368
371
            add_parameters --quirk-none
 
372
            echo "ATI Catalyst driver detected, not using quirks."
369
373
        elif have_nvidia_g80; then
370
374
            # nVidia G80 GPUs require special handling when not using nvidia
371
375
            # binary drivers.  I do not know if noveau requires help or not.
372
376
            remove_parameters $possible_video_quirks
373
377
            add_parameters --quirk-vbe-post
 
378
            echo "nVidia g80 series card detected."
374
379
        else
375
380
            # Go ahead and get our quirks.
376
381
            if has_video_parameters; then
377
382
                # Parameters from the command line take precedence
378
383
                # over the database, so do not query it.
379
 
                :
 
384
                echo "Using quirks passed as parameters."
380
385
            elif [[ $PM_QUIRKS ]]; then
381
386
                # If we have $PM_QUIRKS. use it instead of the quirk database
382
387
                add_parameters $PM_QUIRKS
 
388
                echo "Using PM_QUIRKS environment variable for quirks."
383
389
                # If we were not passed any quirks on the command line,
384
390
                # get them from the database.
385
391
            elif QUIRKS=$(find_native "$PM_LKW_QUIRKS"); then
386
392
                # Known working quirks from our last run are still valid.
387
393
                # Use them.
388
394
                add_parameters $QUIRKS
 
395
                echo "Using last known working set of quirks."
389
396
            else
390
397
                # Our known working quirks from the last run are either
391
398
                # nonexistent or invalid.  Either way, start over.
395
402
                    QUIRKS=$(find_native "$f") && break
396
403
                done
397
404
                # some default quirks if we did not get any.
398
 
                [[ -z $QUIRKS ]] && QUIRKS="--quirk-vbe-post 
399
 
                                        --quirk-dpms-on --quirk-dpms-suspend 
400
 
                                        --quirk-vbestate-restore
401
 
                                        --quirk-vbemode-restore 
402
 
                                        --quirk-vga-mode-3"
 
405
                if [[ -z $QUIRKS ]]; then 
 
406
                    QUIRKS="--quirk-vbe-post --quirk-dpms-on 
 
407
                            --quirk-dpms-suspend --quirk-vbestate-restore
 
408
                            --quirk-vbemode-restore --quirk-vga-mode-3"
 
409
                    echo "No quirk database entry for this system, using default."
 
410
                else
 
411
                    echo "Using quirks for this system from quirk database."
 
412
                fi
403
413
                add_parameters $QUIRKS
404
414
                savestate video_quirks "$QUIRKS"
405
415
            fi
418
428
                    --quirk-radeon-off \
419
429
                    --quirk-no-fb \
420
430
                    --quirk-save-pci
 
431
                echo "Cleaning up quirks not needed by Intel video cards."
421
432
            fi
422
433
        fi
423
434
        ;;
425
436
        if state_exists video_quirks; then
426
437
            QUIRKS=$(restorestate video_quirks);
427
438
            write_last_known_working
 
439
            echo "Saving last known working quirks: $QUIRKS"
428
440
        elif has_parameter --store-quirks-as-lkw; then
429
441
            for x in $(get_parameters); do
430
442
                for y in $possible_video_quirks; do
432
444
                done
433
445
            done
434
446
            write_last_known_working
 
447
            echo "Saving last known working quirks: $QUIRKS"
435
448
        fi
436
449
        ;;
437
450
esac