Difference between revisions of "Drivers"

Line 127: Line 127:
  
 
Reboot after installation. Then you should be able to configure your screens.
 
Reboot after installation. Then you should be able to configure your screens.
 +
 +
 +
=Script to automatically switch between screens=
 +
 +
You can use the following script to automatically change screens:
 +
 +
<syntaxhighlight lang="bash">
 +
#/bin/sh
 +
########################
 +
# Script to automatically configure screens on DELL Latitude E6430
 +
# Version 1.1, May 2014
 +
# Author: Guillaume Diaz
 +
########################
 +
 +
LAPTOP_OUTPUT="LVDS-0"
 +
VGA_OUTPUT="VGA-0"
 +
DVI_OUTPUT_1="DP-0"
 +
DVI_OUTPUT_2="DP-1"
 +
DVI_RESOLUTION="1920x1080"
 +
 +
 +
echo " "
 +
echo "Screen configuration"
 +
echo " "
 +
 +
####################################
 +
# DVI outputs
 +
####################################
 +
# Check for DVI 1
 +
xrandr | grep $DVI_OUTPUT_1 | grep " connected "
 +
if [ $? -eq 0 ]; then
 +
xrandr --output $VGA_OUTPUT --off
 +
echo " ... DVI 0 detected"
 +
 +
# Check for DVI 2. If enable, then the laptop screen will be off
 +
xrandr | grep $DVI_OUTPUT_2 | grep " connected "
 +
if [ $? -eq 0 ]; then
 +
# both DVI 1 and DVI 2
 +
echo "  ... DVI 1 detected. Using DVI0 + DVI1"
 +
xrandr --output $LAPTOP_OUTPUT --off
 +
xrandr --output $DVI_OUTPUT_1 --auto
 +
xrandr --output $DVI_OUTPUT_1 --mode $DVI_RESOLUTION
 +
xrandr --output $DVI_OUTPUT_2 --mode $DVI_RESOLUTION --right-of $DVI_OUTPUT_1
 +
else
 +
# DVI 1 + laptop
 +
echo "  ... Using DVI0 + laptop"
 +
xrandr --output $LAPTOP_OUTPUT --auto
 +
xrandr --output $DVI_OUTPUT_1 --mode $DVI_RESOLUTION --right-of $LAPTOP_OUTPUT
 +
xrandr --output $DVI_OUTPUT_2 --off
 +
fi
 +
 +
echo " "
 +
echo "DVI configuration is complete."
 +
echo " "
 +
exit
 +
else
 +
# No DVI
 +
echo " ... No DVI output"
 +
xrandr --output $DVI_OUTPUT_1 --off
 +
xrandr --output $DVI_OUTPUT_2 --off
 +
fi
 +
 +
####################################
 +
# VGA
 +
####################################
 +
xrandr |grep $VGA_OUTPUT | grep " connected "
 +
if [ $? -eq 0 ]; then
 +
# VGA + laptop
 +
echo " ... VGA detected. Using VGA + laptop"
 +
xrandr --output $LAPTOP_OUTPUT --auto
 +
xrandr --output $VGA_OUTPUT --right-of $LAPTOP_OUTPUT
 +
 +
echo " "
 +
echo "VGA configuration is complete."
 +
echo " "
 +
exit
 +
else
 +
# No VGA
 +
echo " ... No VGA output"
 +
xrandr --output $VGA_OUTPUT --off
 +
fi
 +
 +
 +
####################################
 +
# Laptop only
 +
####################################
 +
xrandr --output $LAPTOP_OUTPUT --auto
 +
echo " "
 +
echo "Laptop configuration is complete."
 +
echo " "
 +
exit
 +
</syntaxhighlight>
 +
 +
 +
 +
Do set the variables, you can check the " xrandr -q " output.

Revision as of 11:03, 7 May 2014

Depending on your computer, you might have to install some specific vendor drivers and/or dedicated programs.

Audio

Audio ALSO mixer

apt-get install alsamixergui pavucontrol


Bluetooth headset manager

Drivers setup

Pulse-audio + bluetooth requirements:

apt-get install paprefs paman padevchooser
apt-get install pulseaudio-module-bluetooth*

Low quality sound driver:

apt-get install bluez-btsco

High quality sound driver:

apt-get install bluez-alsa

Restart your computer.


Pairing

Pair your audio device using the User Interface (blueman). Xubuntu > System settings > Bluetooth manager

... Then note its bluetooth HW address.


Declare audio device

Create a bluetooth configuration file.

vim ~/.asoundrc

Insert

pcm.btheadset {
        type bluetooth
        device 00:02:5B:02:56:E0
        profile “auto”
}

Replace "00:02:5B:02:56:E0" by your real hardware address

Restart your computer.


Auto-connect

Edit your bluetooth settings:

sudo vim /etc/bluetooth/audio.conf

Under [general] add and un-comment:

[General]
Disable=Socket
AutoConnect=true


Edit your Pulse-audio settings:

sudo vim /etc/pulse/default.pa

Line 42, add:

load-module module-switch-on-connect

Restart your computer.


Usage

You should see your device from the bluetooth manager.

Xubuntu > System settings > Bluetooth manager


Your bluetooth device should appear in PulseAudio Volume control.

  • Go to the configuration tab
  • In the bluetooth headset section, select profile High Fidelity Playback A2DP
  • Go to playback tab
  • Set your headset as default output
  • Play your music / video

Troubleshouting

If your device does NOT appear in pulseaudio, try to:

  1. Pair the bluetooth device
  2. Reset pulseaudio service:
    pulseaudio -k

Then the headset should appear!


Sources

Ubuntu official help:

Other thread:



Nvidia graphical driver

This is required to manage many screen on Nvidia chipsets.

!! As of now (November 2013) Ubuntu cannot work with Nvidia Optimus technology !! You have to disable it from your bios (under video > Optimus).

Nvidia driver:

apt-get install nvidia-current-updates

Reboot after installation. Then you should be able to configure your screens.


Script to automatically switch between screens

You can use the following script to automatically change screens:

#/bin/sh
######################## 
# Script to automatically configure screens on DELL Latitude E6430
# Version 1.1, May 2014
# Author: Guillaume Diaz
########################

LAPTOP_OUTPUT="LVDS-0"
VGA_OUTPUT="VGA-0"
DVI_OUTPUT_1="DP-0"
DVI_OUTPUT_2="DP-1"
DVI_RESOLUTION="1920x1080"


echo " "
echo "Screen configuration"
echo " "

####################################
# DVI outputs
####################################
# Check for DVI 1
xrandr | grep $DVI_OUTPUT_1 | grep " connected "
if [ $? -eq 0 ]; then
	xrandr --output $VGA_OUTPUT --off
	echo " ... DVI 0 detected"

	# Check for DVI 2. If enable, then the laptop screen will be off
	xrandr | grep $DVI_OUTPUT_2 | grep " connected "
	if [ $? -eq 0 ]; then
		# both DVI 1 and DVI 2
		echo "  ... DVI 1 detected. Using DVI0 + DVI1"
		xrandr --output $LAPTOP_OUTPUT --off 
		xrandr --output $DVI_OUTPUT_1 --auto
		xrandr --output $DVI_OUTPUT_1 --mode $DVI_RESOLUTION
		xrandr --output $DVI_OUTPUT_2 --mode $DVI_RESOLUTION --right-of $DVI_OUTPUT_1
	else 
		# DVI 1 + laptop
		echo "  ... Using DVI0 + laptop"
		xrandr --output $LAPTOP_OUTPUT --auto
		xrandr --output $DVI_OUTPUT_1 --mode $DVI_RESOLUTION --right-of $LAPTOP_OUTPUT
		xrandr --output $DVI_OUTPUT_2 --off
	fi

	echo " "
	echo "DVI configuration is complete."
	echo " "
	exit
else
	# No DVI
	echo " ... No DVI output"
	xrandr --output $DVI_OUTPUT_1 --off
	xrandr --output $DVI_OUTPUT_2 --off
fi

####################################
# VGA
####################################
xrandr |grep $VGA_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then	
	# VGA + laptop
	echo " ... VGA detected. Using VGA + laptop"
	xrandr --output $LAPTOP_OUTPUT --auto 
	xrandr --output $VGA_OUTPUT --right-of $LAPTOP_OUTPUT
	
	echo " "
	echo "VGA configuration is complete."
	echo " "
	exit
else
	# No VGA
	echo " ... No VGA output"
	xrandr --output $VGA_OUTPUT --off
fi


####################################
# Laptop only
####################################
xrandr --output $LAPTOP_OUTPUT --auto 
echo " "
echo "Laptop configuration is complete."
echo " "
exit


Do set the variables, you can check the " xrandr -q " output.