1*4882a593Smuzhiyun=========================== 2*4882a593SmuzhiyunVideo issues with S3 resume 3*4882a593Smuzhiyun=========================== 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun2003-2006, Pavel Machek 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunDuring S3 resume, hardware needs to be reinitialized. For most 8*4882a593Smuzhiyundevices, this is easy, and kernel driver knows how to do 9*4882a593Smuzhiyunit. Unfortunately there's one exception: video card. Those are usually 10*4882a593Smuzhiyuninitialized by BIOS, and kernel does not have enough information to 11*4882a593Smuzhiyunboot video card. (Kernel usually does not even contain video card 12*4882a593Smuzhiyundriver -- vesafb and vgacon are widely used). 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunThis is not problem for swsusp, because during swsusp resume, BIOS is 15*4882a593Smuzhiyunrun normally so video card is normally initialized. It should not be 16*4882a593Smuzhiyunproblem for S1 standby, because hardware should retain its state over 17*4882a593Smuzhiyunthat. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunWe either have to run video BIOS during early resume, or interpret it 20*4882a593Smuzhiyunusing vbetool later, or maybe nothing is necessary on particular 21*4882a593Smuzhiyunsystem because video state is preserved. Unfortunately different 22*4882a593Smuzhiyunmethods work on different systems, and no known method suits all of 23*4882a593Smuzhiyunthem. 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunUserland application called s2ram has been developed; it contains long 26*4882a593Smuzhiyunwhitelist of systems, and automatically selects working method for a 27*4882a593Smuzhiyungiven system. It can be downloaded from CVS at 28*4882a593Smuzhiyunwww.sf.net/projects/suspend . If you get a system that is not in the 29*4882a593Smuzhiyunwhitelist, please try to find a working solution, and submit whitelist 30*4882a593Smuzhiyunentry so that work does not need to be repeated. 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunCurrently, VBE_SAVE method (6 below) works on most 33*4882a593Smuzhiyunsystems. Unfortunately, vbetool only runs after userland is resumed, 34*4882a593Smuzhiyunso it makes debugging of early resume problems 35*4882a593Smuzhiyunhard/impossible. Methods that do not rely on userland are preferable. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunDetails 38*4882a593Smuzhiyun~~~~~~~ 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunThere are a few types of systems where video works after S3 resume: 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun(1) systems where video state is preserved over S3. 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun(2) systems where it is possible to call the video BIOS during S3 45*4882a593Smuzhiyun resume. Unfortunately, it is not correct to call the video BIOS at 46*4882a593Smuzhiyun that point, but it happens to work on some machines. Use 47*4882a593Smuzhiyun acpi_sleep=s3_bios. 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun(3) systems that initialize video card into vga text mode and where 50*4882a593Smuzhiyun the BIOS works well enough to be able to set video mode. Use 51*4882a593Smuzhiyun acpi_sleep=s3_mode on these. 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun(4) on some systems s3_bios kicks video into text mode, and 54*4882a593Smuzhiyun acpi_sleep=s3_bios,s3_mode is needed. 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun(5) radeon systems, where X can soft-boot your video card. You'll need 57*4882a593Smuzhiyun a new enough X, and a plain text console (no vesafb or radeonfb). See 58*4882a593Smuzhiyun http://www.doesi.gmxhome.de/linux/tm800s3/s3.html for more information. 59*4882a593Smuzhiyun Alternatively, you should use vbetool (6) instead. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun(6) other radeon systems, where vbetool is enough to bring system back 62*4882a593Smuzhiyun to life. It needs text console to be working. Do vbetool vbestate 63*4882a593Smuzhiyun save > /tmp/delme; echo 3 > /proc/acpi/sleep; vbetool post; vbetool 64*4882a593Smuzhiyun vbestate restore < /tmp/delme; setfont <whatever>, and your video 65*4882a593Smuzhiyun should work. 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun(7) on some systems, it is possible to boot most of kernel, and then 68*4882a593Smuzhiyun POSTing bios works. Ole Rohne has patch to do just that at 69*4882a593Smuzhiyun http://dev.gentoo.org/~marineam/patch-radeonfb-2.6.11-rc2-mm2. 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun(8) on some systems, you can use the video_post utility and or 72*4882a593Smuzhiyun do echo 3 > /sys/power/state && /usr/sbin/video_post - which will 73*4882a593Smuzhiyun initialize the display in console mode. If you are in X, you can switch 74*4882a593Smuzhiyun to a virtual terminal and back to X using CTRL+ALT+F1 - CTRL+ALT+F7 to get 75*4882a593Smuzhiyun the display working in graphical mode again. 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunNow, if you pass acpi_sleep=something, and it does not work with your 78*4882a593Smuzhiyunbios, you'll get a hard crash during resume. Be careful. Also it is 79*4882a593Smuzhiyunsafest to do your experiments with plain old VGA console. The vesafb 80*4882a593Smuzhiyunand radeonfb (etc) drivers have a tendency to crash the machine during 81*4882a593Smuzhiyunresume. 82*4882a593Smuzhiyun 83*4882a593SmuzhiyunYou may have a system where none of above works. At that point you 84*4882a593Smuzhiyuneither invent another ugly hack that works, or write proper driver for 85*4882a593Smuzhiyunyour video card (good luck getting docs :-(). Maybe suspending from X 86*4882a593Smuzhiyun(proper X, knowing your hardware, not XF68_FBcon) might have better 87*4882a593Smuzhiyunchance of working. 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunTable of known working notebooks: 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun 92*4882a593Smuzhiyun=============================== =============================================== 93*4882a593SmuzhiyunModel hack (or "how to do it") 94*4882a593Smuzhiyun=============================== =============================================== 95*4882a593SmuzhiyunAcer Aspire 1406LC ole's late BIOS init (7), turn off DRI 96*4882a593SmuzhiyunAcer TM 230 s3_bios (2) 97*4882a593SmuzhiyunAcer TM 242FX vbetool (6) 98*4882a593SmuzhiyunAcer TM C110 video_post (8) 99*4882a593SmuzhiyunAcer TM C300 vga=normal (only suspend on console, not in X), 100*4882a593Smuzhiyun vbetool (6) or video_post (8) 101*4882a593SmuzhiyunAcer TM 4052LCi s3_bios (2) 102*4882a593SmuzhiyunAcer TM 636Lci s3_bios,s3_mode (4) 103*4882a593SmuzhiyunAcer TM 650 (Radeon M7) vga=normal plus boot-radeon (5) gets text 104*4882a593Smuzhiyun console back 105*4882a593SmuzhiyunAcer TM 660 ??? [#f1]_ 106*4882a593SmuzhiyunAcer TM 800 vga=normal, X patches, see webpage (5) 107*4882a593Smuzhiyun or vbetool (6) 108*4882a593SmuzhiyunAcer TM 803 vga=normal, X patches, see webpage (5) 109*4882a593Smuzhiyun or vbetool (6) 110*4882a593SmuzhiyunAcer TM 803LCi vga=normal, vbetool (6) 111*4882a593SmuzhiyunArima W730a vbetool needed (6) 112*4882a593SmuzhiyunAsus L2400D s3_mode (3) [#f2]_ (S1 also works OK) 113*4882a593SmuzhiyunAsus L3350M (SiS 740) (6) 114*4882a593SmuzhiyunAsus L3800C (Radeon M7) s3_bios (2) (S1 also works OK) 115*4882a593SmuzhiyunAsus M6887Ne vga=normal, s3_bios (2), use radeon driver 116*4882a593Smuzhiyun instead of fglrx in x.org 117*4882a593SmuzhiyunAthlon64 desktop prototype s3_bios (2) 118*4882a593SmuzhiyunCompal CL-50 ??? [#f1]_ 119*4882a593SmuzhiyunCompaq Armada E500 - P3-700 none (1) (S1 also works OK) 120*4882a593SmuzhiyunCompaq Evo N620c vga=normal, s3_bios (2) 121*4882a593SmuzhiyunDell 600m, ATI R250 Lf none (1), but needs xorg-x11-6.8.1.902-1 122*4882a593SmuzhiyunDell D600, ATI RV250 vga=normal and X, or try vbestate (6) 123*4882a593SmuzhiyunDell D610 vga=normal and X (possibly vbestate (6) too, 124*4882a593Smuzhiyun but not tested) 125*4882a593SmuzhiyunDell Inspiron 4000 ??? [#f1]_ 126*4882a593SmuzhiyunDell Inspiron 500m ??? [#f1]_ 127*4882a593SmuzhiyunDell Inspiron 510m ??? 128*4882a593SmuzhiyunDell Inspiron 5150 vbetool needed (6) 129*4882a593SmuzhiyunDell Inspiron 600m ??? [#f1]_ 130*4882a593SmuzhiyunDell Inspiron 8200 ??? [#f1]_ 131*4882a593SmuzhiyunDell Inspiron 8500 ??? [#f1]_ 132*4882a593SmuzhiyunDell Inspiron 8600 ??? [#f1]_ 133*4882a593SmuzhiyuneMachines athlon64 machines vbetool needed (6) (someone please get 134*4882a593Smuzhiyun me model #s) 135*4882a593SmuzhiyunHP NC6000 s3_bios, may not use radeonfb (2); 136*4882a593Smuzhiyun or vbetool (6) 137*4882a593SmuzhiyunHP NX7000 ??? [#f1]_ 138*4882a593SmuzhiyunHP Pavilion ZD7000 vbetool post needed, need open-source nv 139*4882a593Smuzhiyun driver for X 140*4882a593SmuzhiyunHP Omnibook XE3 athlon version none (1) 141*4882a593SmuzhiyunHP Omnibook XE3GC none (1), video is S3 Savage/IX-MV 142*4882a593SmuzhiyunHP Omnibook XE3L-GF vbetool (6) 143*4882a593SmuzhiyunHP Omnibook 5150 none (1), (S1 also works OK) 144*4882a593SmuzhiyunIBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 145*4882a593Smuzhiyun Savage/IX-MV, vesafb gets "interesting" 146*4882a593Smuzhiyun but X work. 147*4882a593SmuzhiyunIBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with 148*4882a593Smuzhiyun BIOS 1.04 2002-08-23, but not at all with 149*4882a593Smuzhiyun BIOS 1.11 2004-11-05 :-(] 150*4882a593SmuzhiyunIBM TP R32 / Type 2658-MMG none (1) 151*4882a593SmuzhiyunIBM TP R40 2722B3G ??? [#f1]_ 152*4882a593SmuzhiyunIBM TP R50p / Type 1832-22U s3_bios (2) 153*4882a593SmuzhiyunIBM TP R51 none (1) 154*4882a593SmuzhiyunIBM TP T30 236681A ??? [#f1]_ 155*4882a593SmuzhiyunIBM TP T40 / Type 2373-MU4 none (1) 156*4882a593SmuzhiyunIBM TP T40p none (1) 157*4882a593SmuzhiyunIBM TP R40p s3_bios (2) 158*4882a593SmuzhiyunIBM TP T41p s3_bios (2), switch to X after resume 159*4882a593SmuzhiyunIBM TP T42 s3_bios (2) 160*4882a593SmuzhiyunIBM ThinkPad T42p (2373-GTG) s3_bios (2) 161*4882a593SmuzhiyunIBM TP X20 ??? [#f1]_ 162*4882a593SmuzhiyunIBM TP X30 s3_bios, s3_mode (4) 163*4882a593SmuzhiyunIBM TP X31 / Type 2672-XXH none (1), use radeontool 164*4882a593Smuzhiyun (http://fdd.com/software/radeon/) to 165*4882a593Smuzhiyun turn off backlight. 166*4882a593SmuzhiyunIBM TP X32 none (1), but backlight is on and video is 167*4882a593Smuzhiyun trashed after long suspend. s3_bios, 168*4882a593Smuzhiyun s3_mode (4) works too. Perhaps that gets 169*4882a593Smuzhiyun better results? 170*4882a593SmuzhiyunIBM Thinkpad X40 Type 2371-7JG s3_bios,s3_mode (4) 171*4882a593SmuzhiyunIBM TP 600e none(1), but a switch to console and 172*4882a593Smuzhiyun back to X is needed 173*4882a593SmuzhiyunMedion MD4220 ??? [#f1]_ 174*4882a593SmuzhiyunSamsung P35 vbetool needed (6) 175*4882a593SmuzhiyunSharp PC-AR10 (ATI rage) none (1), backlight does not switch off 176*4882a593SmuzhiyunSony Vaio PCG-C1VRX/K s3_bios (2) 177*4882a593SmuzhiyunSony Vaio PCG-F403 ??? [#f1]_ 178*4882a593SmuzhiyunSony Vaio PCG-GRT995MP none (1), works with 'nv' X driver 179*4882a593SmuzhiyunSony Vaio PCG-GR7/K none (1), but needs radeonfb, use 180*4882a593Smuzhiyun radeontool (http://fdd.com/software/radeon/) 181*4882a593Smuzhiyun to turn off backlight. 182*4882a593SmuzhiyunSony Vaio PCG-N505SN ??? [#f1]_ 183*4882a593SmuzhiyunSony Vaio vgn-s260 X or boot-radeon can init it (5) 184*4882a593SmuzhiyunSony Vaio vgn-S580BH vga=normal, but suspend from X. Console will 185*4882a593Smuzhiyun be blank unless you return to X. 186*4882a593SmuzhiyunSony Vaio vgn-FS115B s3_bios (2),s3_mode (4) 187*4882a593SmuzhiyunToshiba Libretto L5 none (1) 188*4882a593SmuzhiyunToshiba Libretto 100CT/110CT vbetool (6) 189*4882a593SmuzhiyunToshiba Portege 3020CT s3_mode (3) 190*4882a593SmuzhiyunToshiba Satellite 4030CDT s3_mode (3) (S1 also works OK) 191*4882a593SmuzhiyunToshiba Satellite 4080XCDT s3_mode (3) (S1 also works OK) 192*4882a593SmuzhiyunToshiba Satellite 4090XCDT ??? [#f1]_ 193*4882a593SmuzhiyunToshiba Satellite P10-554 s3_bios,s3_mode (4)[#f3]_ 194*4882a593SmuzhiyunToshiba M30 (2) xor X with nvidia driver using internal AGP 195*4882a593SmuzhiyunUniwill 244IIO ??? [#f1]_ 196*4882a593Smuzhiyun=============================== =============================================== 197*4882a593Smuzhiyun 198*4882a593SmuzhiyunKnown working desktop systems 199*4882a593Smuzhiyun~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun=================== ============================= ======================== 202*4882a593SmuzhiyunMainboard Graphics card hack (or "how to do it") 203*4882a593Smuzhiyun=================== ============================= ======================== 204*4882a593SmuzhiyunAsus A7V8X nVidia RIVA TNT2 model 64 s3_bios,s3_mode (4) 205*4882a593Smuzhiyun=================== ============================= ======================== 206*4882a593Smuzhiyun 207*4882a593Smuzhiyun 208*4882a593Smuzhiyun.. [#f1] from https://wiki.ubuntu.com/HoaryPMResults, not sure 209*4882a593Smuzhiyun which options to use. If you know, please tell me. 210*4882a593Smuzhiyun 211*4882a593Smuzhiyun.. [#f2] To be tested with a newer kernel. 212*4882a593Smuzhiyun 213*4882a593Smuzhiyun.. [#f3] Not with SMP kernel, UP only. 214