I believe I have a temporary fix but it is definitely not the best one for the wakeup problem. The boot resolution problem sounds like maybe an issue with GRUB - I'll do a bit more research and edit my answer if I find anything.
My wakeup 'fix':
Find out what output your monitor is on, by running xrandr
. My very old laptop outputs:
Screen 0: minimum 8 x 8, current 1280 x 800, maximum 32767 x 32767 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 303mm x 190mm 1280x800 60.00*+ 1024x768 60.00 800x600 60.32 56.25 640x480 59.94 DVI1 disconnected (normal left inverted right x axis y axis) TV1 disconnected (normal left inverted right x axis y axis) VGA1 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Yours is more likely to be something like 'VGA1' or 'DVI1', but the names vary with graphics chipset. My Desktop's first monitor has an nvidia card and it's on an input labeled DVI-I-0
. In any case, find which monitor is yours. In my case, it's LVDS1
.
Find your monitor's resolution in the list of modes (mine's 1280x800). Try setting your monitor to that mode; if your monitor doesn't say 'unsupported mode' or go to a crappy looking picture, you're good to continue. Here's the command for setting the mode (again, replace these parts with your monitor's):
xrandr --output LVDS1 --mode 1280x800
Next if it worked, make a file called /usr/lib/pm-utils/sleep.d/95vidmodewakeup
and add something like this to set the output video mode for your monitor.
#! /bin/sh case "$1" in resume) xrandr --output LVDS1 --mode 1280x800 esac
Save it (you'll need to be root), and then make it executable:
chmod +x /usr/lib/pm-utils/sleep.d/95vidmodewakeup
If I am correct, this should set your monitor to the correct video mode when you wake up from sleep.
Also, you may want to check your monitor cables if you haven't. It's possible there's a break or other problem causing the monitor to fail to report it's EDID (basically its capabilities and supported resolutions) to your computer. I've had KVM switches that weren't wired properly that did this, too. I am not certain if DVI cables (or displayport/HDMI) operate this way, but back in the day of VGA I sometimes ran into issues with this. I still use VGA (and a 20 year old Sony Trinitron CRT) on one of my computers, but it's not had this problem yet. I suspect DVI and other digital connectors communicate EDID similarly.