xf86svga336wizard 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. #!/bin/sh
  2. #Barry Kauler 2005 www.puppylinux.com
  3. VIDEOINFO="`cat /proc/pci | grep "VGA" | cut -f 2-4 -d ':'`"
  4. BUTTONS="QUIT:10"
  5. MSGCHANGE="NOTICE: The XF86_SVGA server is currently not installed."
  6. CURRENTX="`readlink /usr/X11R6/bin/X`"
  7. if [ "$CURRENTX" = "XF86_SVGA" ];then
  8. MSGCHANGE="NOTICE: The XF86_SVGA server is currently running. To change to the Xvesa
  9. X server, click \"Change_to_Xvesa\" button.
  10. To run the xf86config setup program for XF86_SVGA, click the
  11. \"Run_xf86config\" button.
  12. Both of these will require X to restart, so please close all other
  13. applications.
  14. There is also a GUI application called \"xvidtune\", for finetuning
  15. the display. Click \"Run_xvidtune\". Use with caution."
  16. BUTTONS="Run_xf86config:11,Run_xvidtune:14,Change_to_Xvesa:12,View_docs:15,QUIT:10"
  17. else
  18. if [ -f /usr/X11R6/bin/XF86_SVGA ];then
  19. MSGCHANGE="NOTICE: The XF86_SVGA server is installed but currently not running.
  20. If you want to change to this server, click the \"Change_to_XF86_SVGA\"
  21. button.
  22. This will require X to restart, so please close all other applications."
  23. BUTTONS="Change_to_XF86_SVGA:13,View_docs:15,QUIT:10"
  24. fi
  25. fi
  26. SVGA336=" NV1, STG2000, RIVA 128, RIVA TNT, RIVA TNT2, RIVA ULTRA TNT2,
  27. RIVA VANTA, RIVA ULTRA VANTA, RIVA INTEGRATED, GeForce 256,
  28. GeForce DDR, Quadro, GeForce2 GTS, GeForce2 GTS (rev1),
  29. GeForce2 Ultra, Quadro 2 Pro, GeForce2 MX, GeForce2 MX DDR,
  30. Quadro 2 MXR, ET4000, ET4000W32, ET4000W32i, ET4000W32i_rev_b,
  31. ET4000W32i_rev_c, ET4000W32p, ET4000W32p_rev_a, ET4000W32p_rev_b,
  32. ET4000W32p_rev_c, ET4000W32p_rev_d, ET6000, ET6100, et3000, pvga1,
  33. wd90c00, wd90c10, wd90c30, wd90c24, wd90c31, wd90c33, gvga, r128, ati,
  34. sis86c201, sis86c202, sis86c205, sis86c215, sis86c225, sis5597,
  35. sis5598, sis6326, sis530, sis620, sis300, sis630, sis540, tvga8200lx,
  36. tvga8800cs, tvga8900b, tvga8900c, tvga8900cl, tvga8900d, tvga9000,
  37. tvga9000i, tvga9100b, tvga9200cxr, tgui9400cxi, tgui9420, tgui9420dgi,
  38. tgui9430dgi, tgui9440agi, cyber9320, tgui9660, tgui9680, tgui9682,
  39. tgui9685, cyber9382, cyber9385, cyber9388, cyber9397, cyber9520,
  40. cyber9525, 3dimage975, 3dimage985, cyber9397dvd, blade3d, cyberblade,
  41. clgd5420, clgd5422, clgd5424, clgd5426, clgd5428, clgd5429, clgd5430,
  42. clgd5434, clgd5436, clgd5446, clgd5480, clgd5462, clgd5464, clgd5465,
  43. clgd6205, clgd6215, clgd6225, clgd6235, clgd7541, clgd7542, clgd7543,
  44. clgd7548, clgd7555, clgd7556, ncr77c22, ncr77c22e, cpq_avga, mga2064w,
  45. mga1064sg, mga2164w, mga2164w AGP, mgag200, mgag100, mgag400, oti067,
  46. oti077, oti087, oti037c, al2101, ali2228, ali2301, ali2302, ali2308,
  47. ali2401, cl6410, cl6412, cl6420, cl6440, video7, ark1000vl, ark1000pv,
  48. ark2000pv, ark2000mt, mx, realtek, s3_savage, s3_virge, AP6422, AT24,
  49. AT3D, s3_svga, NM2070, NM2090, NM2093, NM2097, NM2160, NM2200,
  50. ct65520, ct65525, ct65530, ct65535, ct65540, ct65545, ct65546,
  51. ct65548, ct65550, ct65554, ct65555, ct68554, ct69000, ct64200,
  52. ct64300, mediagx, V1000, V2100, V2200, p9100, spc8110, i740, i740_pci,
  53. Voodoo Banshee, Voodoo3, smi, generic"
  54. echo "$MSGCHANGE
  55. Your PC has this video hardware:
  56. $VIDEOINFO
  57. However, Puppy cannot determine the chip model number. If you can determine
  58. that your video chip is in this list then you will be able to use the
  59. XF86_SVGA X server:
  60. $SVGA336
  61. However, this server may also work on recent video hardware that has
  62. backwards-compatibility. For example, I got a VIA EPIA motherboard to
  63. work, see this Forum thread:
  64. http://www.murga.org/%7Epuppy/viewtopic.php?t=1378
  65. XF86_SVGA is a PupGet package, named \"xf86_svga-3.3.6\", that you can
  66. download using the PupGet package manager, then reboot Puppy.
  67. After rebooting, X may fail to start, dumping you back to the commandline.
  68. In that case, do this:
  69. Run the program \"xf86config\" from the commandline, and it takes you through
  70. step by step, to create a new XF86Config file -- except at the final step it
  71. wants to save to /etc/XF86Config -- just accept this and Puppy will move the
  72. file to /etc/X11/ (where it is supposed to be).
  73. NOTICE: Puppy 1.0.7 will prompt you to run xf86config if dropped back to the
  74. commandline, and gives some advice, similar to what is written here.
  75. When it asks about which video hardware you have, you have the option of
  76. bringing up a list and you choose what you think will work -- in my example
  77. of the VIA EPIA board, the \"Trident CyberBlade (generic)\" works.
  78. When it asks what video modes you want to support for each color-depth, get
  79. rid of the \"640x480\", as the X server will default to that.
  80. One thing that is very confusing is that there is no way to specify the default
  81. color depth -- it is 8 bits, 256 colors. The docs state that an entry
  82. \"DefaultDepth 16\" can be used in XF86Config, however this particular X server
  83. does not recognise that keyword and X will not start.
  84. Solution, /usr/X11R6/bin/xwin, has inserted \"-bpp 16\" into this line:
  85. /usr/X11R6/bin/xinit /root/.xinitrc -- -bpp 16 > /tmp/xerrs.log 2>&1
  86. Change that to \"24\" if you need greater color depth.
  87. WHAT TO DO IF XF86_SVGA WILL NOT WORK!
  88. You can drop back to the Xvesa Kdrive X server by typing this:
  89. # ln -sf Xvesa /usr/X11R6/bin/X
  90. # xwin
  91. Note also that the PupGet package has \"xvidetune\", and docs are in
  92. /usr/share/xf86_svga.txt, xf86config.htm, xvidtune.htm and Xserver.htm." > /tmp/svga336msg.txt
  93. while [ 1 ];do
  94. xmessage -center -title "XF86_SVGA video Wizard" -buttons "$BUTTONS" -file /tmp/svga336msg.txt
  95. RETVAL=$?
  96. if [ $RETVAL -lt 11 ];then
  97. exit
  98. fi
  99. if [ $RETVAL -eq 11 ];then #run xf86config
  100. rxvt -bg yellow -e /usr/X11R6/bin/xf86config
  101. sync
  102. exec restartwm #no w.m. param, defaults to current.
  103. fi
  104. if [ $RETVAL -eq 12 ];then #change to Xvesa
  105. ln -sf Xvesa /usr/X11R6/bin/X
  106. sync
  107. exec restartwm
  108. fi
  109. if [ $RETVAL -eq 13 ];then #change to XF86_SVGA
  110. ln -s XF86_SVGA /usr/X11R6/bin/X
  111. xmessage -center -bg orange "X is now going to die. At the commandline, type \"xf86config\""
  112. sync
  113. exec killall X
  114. fi
  115. if [ $RETVAL -eq 14 ];then #run xvidtune
  116. xvidtune > /tmp/xvidtunedump.txt 2>&1
  117. xmessage -center -bg green -title "Output from xvidtune" -file /tmp/xvidtunedump.txt
  118. exit
  119. fi
  120. if [ $RETVAL -eq 15 ];then #view docs
  121. xmessage -center -bg "#ffc0c0" -title "View XG86_SVGA docs" -buttons "xf86_svga:11,xf86config:12,xvidtune:13,Xserver:14,QUIT:10" "Choose which docs to view..."
  122. case $? in
  123. 11)
  124. defaulthandler file:///usr/share/doc/xf86_svga.txt &
  125. ;;
  126. 12)
  127. defaultbrowser file:///usr/share/doc/xf86config.htm &
  128. ;;
  129. 13)
  130. defaultbrowser file:///usr/share/doc/xvidtune.htm &
  131. ;;
  132. 14)
  133. defaultbrowser file:///usr/share/doc/Xserver.htm &
  134. ;;
  135. *)
  136. echo "continue loop"
  137. ;;
  138. esac
  139. fi
  140. done
  141. ###END###