[MPlayer-users] vsync not working
Etienne SANDRE
etienne.sandre at polytechnique.org
Fri Nov 7 17:18:54 CET 2003
Since some nvidia card owners were interested by launching a second xserver
for mplayer to watch a movie with vsync and keep a dual-monitor with twinview
enabled, this is my two little scripts and my XF86Config-4
These scripts are located in my homedir, you may need to modify the path or do
something nicer. I had to edit the file /etc/X11/Xwrapper.config, replacing
"console" by "anyone", otherwise you can't run the script from an x session
(only from a tty console)
startx_player
-----cut here------
#!/bin/sh
#the -geometry parameters hide the xterm out of the desktop,
#it's just nicer.
startx -geometry 50x50+2000+2000 -e ~/startmplayer $1 -- :1 -layout "CRT"
------cut here-----
startmplayer
-----cut here------
#!/bin/bash
#In this file you may add a windowmanager like wmaker
# or set the sound volumes, etc...
#all blocking programs must be run in the background(&) except this one:
mplayer $1
-----cut here------
This is my XF86Config-4 file, with two ServerLayout sections. The first one
will be used by default, it is configured with twinview & dual monitors. The
second one, named "CRT" (this name is given as parameter to startx in the
script), uses only one monitor WITHOUT twinview.
/etc/X11/XF86Config-4
-------cut here---------
Section "Files"
FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/usr/lib/X11/fonts/Type1"
FontPath "/usr/lib/X11/fonts/CID"
FontPath "/usr/lib/X11/fonts/Speedo"
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/cyrillic"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
EndSection
Section "Module"
Load "bitmap"
Load "dbe"
Load "ddc"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "record"
Load "speedo"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "fr"
EndSection
Section "InputDevice"
Identifier "Logitech PS/2 WheelMouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/misc/psaux"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "LIRC mouse"
Driver "mouse"
Option "Protocol" "IntelliMouse"
Option "SendCoreEvents"
Option "Device" "/dev/lircm"
Option "SendCoreEvents"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
EndSection
Section "Device"
Identifier "NVidia GeForce4 Ti4200 TwinView CRT+CRT"
Driver "nvidia"
Option "TwinView"
Option "NoLogo" "true"
#Refresh rates for Hercules CRT
Option "SecondMonitorHorizSync" "30-60"
Option "SecondMonitorVertRefresh" "50-75"
Option "MetaModes" "1024x768+1024+0, 1024x768+0+0 ; NULL , 1024x768 ;
1024x768+0+0 , 1024x768 +0+0"
Option "ConnectedMonitor" "CRT,CRT"
EndSection
Section "Device"
Identifier "NVidia GeForce4 Ti4200 CRT"
Driver "nvidia"
Option "NoLogo" "true"
#BusID "PCI:1:0:0"
Option "ConnectedMonitor" "CRT"
#Option "ConnectedMonitor" "TV"
#Option "TVStandard" "PAL-N"
#Option "TVOutFormat" "COMPOSITE"
#Option "TVOverScan" "0.9"
EndSection
Here is the two scripts.
Section "Monitor"
Identifier "Philips 107T"
HorizSync 30-70
VertRefresh 50-160
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Hercules LCD 15inch"
HorizSync 30-60
VertRefresh 50-75
Option "DPMS"
EndSection
Section "Screen"
Identifier "TwinView CRT+CRT"
Device "NVidia GeForce4 Ti4200 TwinView CRT+CRT"
#Monitor "Hercules LCD 15inch"
Monitor "Philips 107T"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection
Section "Screen"
Identifier "CRT"
Device "NVidia GeForce4 Ti4200 CRT"
Monitor "Hercules LCD 15inch"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "TwinView CRT+CRT"
Screen "TwinView CRT+CRT"
InputDevice "Generic Keyboard"
InputDevice "Logitech PS/2 WheelMouse"
InputDevice "LIRC mouse"
EndSection
Section "ServerLayout"
Identifier "CRT"
Screen "CRT"
InputDevice "Generic Keyboard"
InputDevice "Logitech PS/2 WheelMouse"
#InputDevice "LIRC mouse"
EndSection
Section "DRI"
Mode 0666
EndSection
-------cut here---------
-------------------------
Etienne SANDRE
More information about the MPlayer-users
mailing list