Category: linux
Setting up NVidia TwinView
Well, it was time to discard my old Xinerama xorg.conf in Kubuntu Jaunty. From a few friendly hints I finally managed to establish a simple procedure. I installed the manufacturer driver a while ago.
- Start X with an empty configuration or
sudo nvidia-xconfigand only one monitor - Connect the second monitor
- Start nvidia-settings and add the second monitor. Save the configuration.
- If the Resolution is not sufficent, add Monitor sections for all Monitors and set the metamodes to auto
So, my xorg.conf now looks like this:
# twinview, both monitors set via section and nvidia-auto-select
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "ServerFlags"
Option "Xinerama" "0"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Scott"
Modelname "hr17c"
VertRefresh 60-100
HorizSync 42-80
DisplaySize 325 243
Modeline "1280x1024@75" 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Samsung"
Modelname "226BW"
VertRefresh 56-75
HorizSync 30-80
Option "DPMS"
DisplaySize 474 296
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 7600 GT"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Samsung"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "DFP: nvidia-auto-select +0+0, CRT: nvidia-auto-select +1680+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
2009-12-02. 03:56:20. 217 words, 2529 views. Categories: linux , Leave a comment » • Send a trackback »
Using an USB soundcard as ALSA default with dmix
Ahhh, well. It took me long enough to figure out how to make an USB soundcard my default ALSA device with software mixing (dmix). Finally I got rid of the noisy onboard sound and can listen to my favorite music using headphones without remorse. So, here is how:
First get an USB audio plug or USB Speakers. Plug them in.
Next, you should find out what the card is called. aplay -L will give you a list of names. Card numbers like hw:1 are not really suited since the number can change between boots or plugs.
Then its a simple case of defining a new PCM device with dmix and using said card as slave. I called the new device ''mixedusb'' for obvious reasons. This name can be then used in applications such as amaroK as output device. Since I want to use the USB sound exclusively, I !defaulted it in the config along with the mixer device. So I created a ~/.asoundrc with the following contents:
# define a new PCM using the dmix plugin and the desired sound card as slave
pcm.mixedusb {
type dmix
ipc_key 1024 # must be unique and given here ...
slave {
# Try aplay -L to find the name of your card. Mine is called "default" for clarity :-/
pcm "hw:default"
# A lot of parameters can be changed here. See ALSA Wiki for details. The defaults work for me.
}
}
# define that as default
pcm.!default pcm.mixedusb
# define a mixer device using the desired sound card
ctl.myusb {
type hw
card default
}
# define that as default
ctl.!default ctl.myusb
I had also to change the mixer channel mplayer uses for volume.
To find out what channel name to use, call amixer -c 1. Mine calls itself 'Speaker', thus I edited the ~/.mplayer/config and changed the audio section as follows:
# audio ao=alsa mixer-channel=Speaker # ...
To change the mixer channel for gmplayer, start it, go to the audio tab, and choose configure driver or set it in ~/.mplayer/gui.conf
ao_alsa_mixer_channel = "Speaker"
2009-04-02. 00:34:23. 338 words, 26722 views. Categories: linux , 1 comment » • Send a trackback »
mplayer adjustment
Since the hardware color controls for overlay do not work with mplayer with my NVidia card (as opposed to ATI), I had to search for alternatives. Other video output devices than xv support the brightness and contrast controls (keys 1/2,3/4) but use some serious cpu. Doing it the Linux way, I found the Filter to use by looking at the source code. The Filter to use is eq or eq2, see vf_eq.c . Incidentially, mplayer -vf help gives a list of all filters compiled with your mplayer.
Btw, here is my current ~/.mplayer/config:
# x windows xineramascreen=0 monitoraspect=16:10 # audio #ao=alsa:noblock:device=front=External # usb sound in 2-speaker mode ao=alsa:noblock:device=front=V8237 # onboard sound in 2-speaker mode # video vo=xv vf=eq,screenshot # comma separated filter chain #contrast=8 # subtitles ass-use-margins=yes sub-bg-color=0 subfont-outline=4
2008-07-28. 20:05:05. 137 words, 2887 views. Categories: linux , Leave a comment » • Send a trackback »