video.rst 8.8 KB

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