| | 28 | |
|---|
| | 29 | X configuration |
|---|
| | 30 | =============== |
|---|
| | 31 | |
|---|
| | 32 | The next step is to setup the X configuration to enable the X display. |
|---|
| | 33 | For Xorg the configuration file is /etc/X11/xorg.conf, for Xfree86 |
|---|
| | 34 | the configuration file is /etc/X11/XF86Config. |
|---|
| | 35 | |
|---|
| | 36 | The default resolution of the framebuffer is 640x400 for NTSC and |
|---|
| | 37 | 640x480 for PAL and SECAM. So the configuration differs between |
|---|
| | 38 | the two. |
|---|
| | 39 | |
|---|
| | 40 | For NTSC you should add the following to your X config file: |
|---|
| | 41 | |
|---|
| | 42 | ------------------------- cut here ------------------------- |
|---|
| | 43 | Section "Monitor" |
|---|
| | 44 | Identifier "NTSC Monitor" |
|---|
| | 45 | HorizSync 10-68 |
|---|
| | 46 | VertRefresh 25-120 |
|---|
| | 47 | |
|---|
| | 48 | Mode "640x400" |
|---|
| | 49 | DotClock 23.832 |
|---|
| | 50 | HTimings 640 735 759 800 |
|---|
| | 51 | VTimings 400 454 456 497 |
|---|
| | 52 | Flags "-HSync" "-VSync" |
|---|
| | 53 | EndMode |
|---|
| | 54 | EndSection |
|---|
| | 55 | |
|---|
| | 56 | Section "Device" |
|---|
| | 57 | Identifier "Hauppauge PVR-350 Framebuffer" |
|---|
| | 58 | Driver "ivtv" |
|---|
| | 59 | Option "fbdev" "/dev/fb0" # <-- modify if using another device |
|---|
| | 60 | BusID "0:10:0" # <-- obtain from lspci (see later) |
|---|
| | 61 | EndSection |
|---|
| | 62 | |
|---|
| | 63 | Section "Screen" |
|---|
| | 64 | Identifier "TV Screen" |
|---|
| | 65 | Device "Hauppauge PVR-350 Framebuffer" |
|---|
| | 66 | Monitor "NTSC Monitor" |
|---|
| | 67 | DefaultDepth 24 |
|---|
| | 68 | DefaultFbBpp 32 |
|---|
| | 69 | SubSection "Display" |
|---|
| | 70 | Depth 24 |
|---|
| | 71 | FbBpp 32 |
|---|
| | 72 | Modes "640x400" |
|---|
| | 73 | EndSubSection |
|---|
| | 74 | EndSection |
|---|
| | 75 | ------------------------- cut here ------------------------- |
|---|
| | 76 | |
|---|
| | 77 | For PAL/SECAM you should add the following to your X config file: |
|---|
| | 78 | |
|---|
| | 79 | ------------------------- cut here ------------------------- |
|---|
| | 80 | Section "Monitor" |
|---|
| | 81 | Identifier "PAL Monitor" |
|---|
| | 82 | HorizSync 10-68 |
|---|
| | 83 | VertRefresh 25-120 |
|---|
| | 84 | |
|---|
| | 85 | Mode "640x480" |
|---|
| | 86 | DotClock 23.721 |
|---|
| | 87 | HTimings 640 735 759 800 |
|---|
| | 88 | VTimings 480 542 544 593 |
|---|
| | 89 | Flags "-HSync" "-VSync" |
|---|
| | 90 | EndMode |
|---|
| | 91 | EndSection |
|---|
| | 92 | |
|---|
| | 93 | Section "Device" |
|---|
| | 94 | Identifier "Hauppauge PVR-350 Framebuffer" |
|---|
| | 95 | Driver "ivtv" |
|---|
| | 96 | Option "fbdev" "/dev/fb0" # <-- modify if using another device |
|---|
| | 97 | BusID "0:10:0" # <-- obtain from lspci (see later) |
|---|
| | 98 | EndSection |
|---|
| | 99 | |
|---|
| | 100 | Section "Screen" |
|---|
| | 101 | Identifier "TV Screen" |
|---|
| | 102 | Device "Hauppauge PVR-350 Framebuffer" |
|---|
| | 103 | Monitor "PAL Monitor" |
|---|
| | 104 | DefaultDepth 24 |
|---|
| | 105 | DefaultFbBpp 32 |
|---|
| | 106 | SubSection "Display" |
|---|
| | 107 | Depth 24 |
|---|
| | 108 | FbBpp 32 |
|---|
| | 109 | Modes "640x480" |
|---|
| | 110 | EndSubSection |
|---|
| | 111 | EndSection |
|---|
| | 112 | ------------------------- cut here ------------------------- |
|---|
| | 113 | |
|---|
| | 114 | In the "Device" section you will have to modify the Option field to select |
|---|
| | 115 | the correct framebuffer device (usually /dev/fb0 or /dev/fb1). You also have |
|---|
| | 116 | to obtain the correct BusID of the framebuffer device. To do that run: |
|---|
| | 117 | |
|---|
| | 118 | lspci | grep iTVC15 |
|---|
| | 119 | |
|---|
| | 120 | You should get a line like this: |
|---|
| | 121 | |
|---|
| | 122 | 06:02.0 Multimedia video controller: Internext Compression Inc iTVC15 MPEG-2 Encoder (rev 01) |
|---|
| | 123 | |
|---|
| | 124 | The numbers at the beginning form the BusID: 06:02.0 becomes "6:2:0" in the |
|---|
| | 125 | X config file. Note that lspci reports the numbers as hexadecimal where the |
|---|
| | 126 | BusID option expects them as decimal. So if lspci reports "01:0e.0", then |
|---|
| | 127 | BusID should be "1:14:0". |
|---|
| | 128 | |
|---|
| | 129 | The final step is to add the TV Screen to you server layout: |
|---|
| | 130 | |
|---|
| | 131 | Section "ServerLayout" |
|---|
| | 132 | ... |
|---|
| | 133 | Screen 0 "Screen 1" # << (your computer monitor) |
|---|
| | 134 | |
|---|
| | 135 | # (add the following line) |
|---|
| | 136 | Screen 1 "TV Screen" RightOf "Screen 1" # << (TV screen) |
|---|
| | 137 | ... |
|---|
| | 138 | EndSection |
|---|
| | 139 | |
|---|
| | 140 | If you want to use the TV Screen as the main display, then you can just use: |
|---|
| | 141 | |
|---|
| | 142 | Screen 0 "TV Screen" |
|---|
| | 143 | |
|---|
| | 144 | After restarting X you should see the X screen on your TV. |
|---|
| | 145 | |
|---|
| | 146 | |
|---|
| | 147 | Custom resolutions |
|---|
| | 148 | ================== |
|---|
| | 149 | |
|---|
| | 150 | If you want to use a custom resolution then you should first load the ivtvfb |
|---|
| | 151 | module with the resolutions you want. To do that add a line to |
|---|
| | 152 | /etc/modprobe.conf, e.g.: |
|---|
| | 153 | |
|---|
| | 154 | options ivtvfb osd_xres=720 osd_yres=576 |
|---|
| | 155 | |
|---|
| | 156 | (Run 'modinfo ivtvfb' to see all module options.) |
|---|
| | 157 | |
|---|
| | 158 | Now load ivtvfb ('modprobe ivtvfb') and the new height and width will be used. |
|---|
| | 159 | |
|---|
| | 160 | Note that you should make sure that either X isn't started at all, or that |
|---|
| | 161 | X isn't using the PVR-350 framebuffer. You can get problems if the |
|---|
| | 162 | X configuration and the framebuffer have a mismatch regarding the resolution |
|---|
| | 163 | or timings. |
|---|
| | 164 | |
|---|
| | 165 | Next run 'fbset -x /dev/fbX' (replace /dev/fbX with the correct framebuffer |
|---|
| | 166 | device). That gives you a new Mode description, e.g.: |
|---|
| | 167 | |
|---|
| | 168 | Mode "720x576" |
|---|
| | 169 | # D: 23.720 MHz, H: 29.650 kHz, V: 50.001 Hz |
|---|
| | 170 | DotClock 23.721 |
|---|
| | 171 | HTimings 720 775 799 800 |
|---|
| | 172 | VTimings 576 590 592 593 |
|---|
| | 173 | Flags "-HSync" "-VSync" |
|---|
| | 174 | EndMode |
|---|
| | 175 | |
|---|
| | 176 | Replace the "Mode" subsection in the "Monitor" section and update the |
|---|
| | 177 | Modes resolution in the "Screen" section. |
|---|
| | 178 | |
|---|
| | 179 | Start X and the new resolution should be used. |
|---|
| | 180 | |
|---|
| | 181 | You can also have multiple "Mode" subsections in "Monitor" and use xrandr to |
|---|
| | 182 | switch dynamically. |
|---|
| | 183 | |
|---|
| | 184 | |
|---|
| | 185 | How to prevent the console from using the framebuffer |
|---|
| | 186 | ===================================================== |
|---|
| | 187 | |
|---|
| | 188 | By default when you load ivtvfb the framebuffer is used for the console |
|---|
| | 189 | output. Unfortunately, this is usually very annoying since this makes it |
|---|
| | 190 | hard to unload ivtvfb. |
|---|
| | 191 | |
|---|
| | 192 | You can prevent this by adding a magic incantation to the kernel options |
|---|
| | 193 | in your grub or lilo configuration. |
|---|
| | 194 | |
|---|
| | 195 | If your monitor console is using the framebuffer of you graphics cards, |
|---|
| | 196 | then you should use kernel option 'fbcon=vc:0-0'. This ensures that only |
|---|
| | 197 | the first framebuffer device (that of your graphics card) is used. |
|---|
| | 198 | |
|---|
| | 199 | If you don't use a framebuffer at all for your console, then use the option |
|---|
| | 200 | 'fbcon=vc:64-63', this will prevent any framebuffer device from being used |
|---|
| | 201 | for the console. |
|---|