On this Inspiron 4000 (with --quirk-radeon-off and no other quirks),
the console font set by console-setup is forgotten on resume and
replaced with the default VGA font. The following script fixes the
problem for me. The conditioning on HIBERNATE_RESUME_POST_VIDEO is
copied from /usr/lib/pm-utils/99video; it doesn’t make much sense to
me in the pm-suspend-hybrid case, but that’s a different issue.
In any case, I am curious: does this problem show up in other setups
as well? Is this an appropriate approach, or should something more
comprehensive be done with respect to saving and restoring the VGA
state?
Regards,
Jonathan Nieder
--- %< ---
#!/bin/sh
#
# There is one quirk /usr/lib/pm-utils/sleep.d/99video fails to
# handle on this Dell Inspiron 4000: the console font set by
# console-setup is forgotten and replaced with the default VGA
# font. Here is a workaround.
#
# Usage: place in /etc/pm/sleep.d/97setfont and chmod +x.
. "${PM_FUNCTIONS}"
if command_exists setfont; then
font() { setfont "$@"; }
else
font() { echo "setfont not found" 1>&2; return 1; }
fi
font_savestate() { font -O /dev/stdout |savestate consolefont; }
font_restorestate() { restorestate consolefont |font /dev/stdin; }
case "$1" in
suspend) font_savestate ;;
hibernate)
if [ "$HIBERNATE_RESUME_POST_VIDEO" = "yes" ]; then
font_savestate
fi
;;
resume) font_restorestate ;;
thaw)
if [ "$HIBERNATE_RESUME_POST_VIDEO" = "yes" ]; then
font_restorestate
fi
;;
esac
Hi, I reported a few days ago that the console font was being forgotten on suspend, with a script to work around the problem. Since then, I've learned two exciting things: The console font is not forgotten with a simple "s2ram -f --radeontool". The console font is not forgotten with "pm-suspend --quirk-radeon-off --quirk-no-chvt". The no-chvt seems to be the key. Armed with this knowledge, I can replace my sleep.d script with a single line in /etc/hal/fdi/information/99local-pm-utils-quirks.fdi. So I am left with two questions: 1) what problems does the chvt quirk work around? and 2) is it necessary to chvt into an unused VT as we do? It would be best to avoid having to chvt at all, but barring that, going to VT1 as s2ram does should avoid this bug. Alternatively, if that is a no-go then adding /dev/tty63 to ACTIVE_CONSOLES in /etc/default/console-setup could be a possible fix. Hope that helps, Jonathan
Hi, Just some additional data (I can't believe I forgot to check this before): The console font is forgotten with a simple "pm-suspend". The console font is not forgotten with "pm-suspend --quirk-radeon-off", even without --quirk-no-chvt. So the no-chvt was a red herring - sorry about that. It seems that for computers that are not otherwise listed, hal turns on quirks including --quirk-vbe-post. All the video state, including the console font was being forgotten. Thus for this computer, it would be enough to add an entry to /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-dell.fdi to fix this. (I've filed bug #531374 for that.) Until that happens, I've added lines disabling quirk.vbe_post, dpms_on, vbestate_restore, vbemode_restore, dpms_suspend, and vga_mode_3 to my /etc/fdi/information/99local-pm-utils-quirks.fdi, and with that change plain "pm-suspend" works for me. For models that do need to reset video hardware on resume, a hook like the one I sent would be helpful. For models not yet listed in /usr/share/hal, the way the default settings get enabled seems problematic to me. It is nice that the defaults in 10freedesktop/99-video-quirk-default.fdi get applied only if no quirks have been explicitly set before then, but it makes it hard for the system administrator or other packages to set quirks later with a file in /etc or /usr/share/hal/fdi/information/20thirdparty. It would be nicer, and easier to understand, if the defaults kicked in only if no settings were applied later, too. One way to achieve this would be to take the logic out of 99-video-quirk-default.fdi and put it into the pm-utils scripts themselves. If this idea sounds reasonable to you, let me know and I'll write a patch. Thanks, and sorry to fill up your inbox, Jonathan
Hi Tim, Have you had a chance to look at this? To summarize my (admittedly long) previous messages: For laptops not listed in hal-info (and some so listed, whose video cards need to be reset on wakeup), the console font is forgotten on wakeup. Fixing this has two components: 1. make it easier to configure laptops not listed in hal-info (do not require explicitly disabling the quirks one by one, so it's harder to accidentally trigger this) 2. if the video card really needs to be reset, save the console font first and restore it afterwards. Given a list of which quirks can cause the console font to be forgotten, I would be happy to provide a patch for #2. Thanks, Jonathan
Dear submitter, as the package pm-utils has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/1058701 The version of this package that was in Debian prior to this removal can still be found using https://snapshot.debian.org/. Please note that the changes have been done on the master archive and will not propagate to any mirrors until the next dinstall run at the earliest. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org. Debian distribution maintenance software pp. Thorsten Alteholz (the ftpmaster behind the curtain)