Contents
|
Apt update apt -t stretch-backports install linux-image-amd64. 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc.
This page provides information on connecting a Sony PS3 Sixaxis or DualShock 3 Joystick via Bluetooth and configuring Ubuntu to use it in a variety of environments.
Much of the information on this page applies to old versions (3.x) of the Bluetooth userspace stack (bluez) found in 8.04/Hardy and below, not the the current versions (4.x) found in 8.10/Intrepid and above. Approaches that are more current include:
- QTSixA, a dedicated SIXAXIS manager project supporting both USB and Bluetooth (PPA provided)
- Bug 124743, a feature request for SIXAXIS Bluetooth support built into Ubuntu's own bluez
- An Ubuntu user's custom bluez .deb for 12.04 Precise adding support for the SIXAXIS, plus details of what went into it and why
1. Add the qtsixa ppa which contains an updated version of sixad
1a. Update and install the sixad package.
2. Connect your ps3 controller to your computer via usb and run:
3. Unplug your ps3 controller from the usb cable and run:
When prompted, press the PS button on the controller. If it's detected correctly, the controller will vibrate. Then use jstest-gtk to test your controller.
Included on this page is information to pair the Sixaxis with a bluetooth receiver, configure xserver to recognize it as an input device (mouse/keyboard support), integrate controls with MythTV, and integrate it with a number of console emulators.
The pairing process is done with the controller connected via USB.
Requirements
- Must be using kernel version 2.6.21 or later
- Must have the libusb-dev and libusb-0.1-4 package installed.
USB Pairing
- Connect the controller to a USB port.
- Run sixpair
- a) Download sixpair.c (save to a directory such as /home/%user%/sixaxis) b) Compile sixpair using c) Run sixpair
- Disconnect the USB cable
Patch HIDD from bluez-utils
- Download patch-hidd-3.19-pabr3 (save to a directory such as /tmp)
- Create a directory and download bluez-utils source and dependencies there:
- Go into the bluez-utils-x.xx directory and run
- Rebuild the package:
- Install the new package (ignore the others that were created):
- Optional: if you will dist-upgrade your system, the process will overwrite your modified package with newer versions. You can either choose to redo the above steps every time a new version of bluez-utils is packaged, or 'hold' the package. This should work with both apt and aptitude:
Bluetooth Monitoring
- Stop the BlueTooth service
- Make sure all hcid processes are stopped
- Run HIDP daemon in terminal
- a) Press the PS button on the Sixaxis hidd should echo b) Press Ctrl+C to end the process
- Start the BlueTooth service
We first need to install the input-joystick drivers XServer needs, and then either configure HAL (for newer X versions) or add an InputDevice to xorg.conf (for older versions).
Driver Installation
The package xserver-xorg-input-joystick is required to use the Sixaxis as an input device without the use of a third party program. There are two installation methods for the package. The simpler method is to install via the repositories, but you may also compile your own copy of the drivers.
Note: if using Hardy Heron (8.04) you will need to compile the drivers yourself as one of the files needs to be modified.
Install from Repositories
- Install the package xserver-xorg-input-joystick from the Ubuntu Repositories
Compile and Install from source
- The package xorg-dev is required to compile the drivers. To install the package...
- Uninstall the package xserver-xorg-input-joystick if it's already intalled
- Make a directory to download and compile the source in (such as /home/%user%/input-joystick)
- In the terminal...
- Edit the source. (This step can be skipped if using an Ubuntu version prior to 8.04)
- Now we must comment out lines 252-254. After doing so those lines in jstk.c should look like this:
- At this point we are ready to compile and install. Here are the commands you will need:
Configuring newer versions of X.Org (XServer >= 1.5) with HAL and automatic hot-plugging
With this configuration X will automatically detect and hotplug the Sixaxis when needed, and switching betweem USB and Bluetooth happens transparently.
1. Edit /etc/X11/xorg.conf and add the following line in the ServerFlags section (if it does not exist, create it):
2. Configure HAL
- Create the following file: /etc/hal/fdi/policy/x11-joystick.fdi (it must be of the form <name>.fdi) and paste a configuration like the example below (taken from the stock xf86-input-joystick):
3. Restart HAL and X.Org by dropping into console (Ctrl-Alt-F1), then:
Note: Older versions of X.Org (XServer 1.4.x) will support the above configuration and will correctly plug/unplug the joystick, however they don't support the 'input.x11_options.xxx' tags so you cannot customize the controls.
Disable Joystick From Controlling Mouse
If you want to play games with your controller, you might want to disable gamepad control over mouse cursor. To do this, edit /etc/X11/xorg.conf and add those lines:
Configuring older versions of X.Org (non hotplug)
1. First make two copies of xorg.conf. One will be a backup and the other will be the version we edit.
2. Now open xorg.conf in a text editor. To open with gedit:
3. Add the new InputDevice section to xorg.conf. It can be added anywhere in xorg.conf. Here is an example.
- Note: a detailed explanation of the input options can be found in the xserver-xorg-input-joystick manual which can be opened with $man joystick
4. Add the new InputDevice to the ServerLayout section of xorg.conf. The line you need to add is as follows.
- The ServerLayout section should now look similar to this:
5. Now we should test xserver with our new config file. First turn on the ps3 controller, and then try out the following command. You can restart X by logging out and back in, or typing sudo /etc/init.d/gdm restart.
- You should see a static filled screen with a big X for a cursor. At this point you should be able to move that cursor with the left joystick on the Sixaxis. If not, go back and tweak your settings in xorg.conf.
6. To make our settings permanent, replace xorg.conf with xorg.conf.sixaxis.
- The accelerometer and gyro axis do not work but can be used by reading the raw device -- see http://www.pabr.org/sixlinux/sixlinux.en.html for more information.
- The rumble feature is not supported.
- The leds keep blinking and do not report the chosen input device.
- Multiple gamepads on the same system have not been tested.
- When using the static X.Org configuration, the Sixaxis will not be hot pluggable -- if turning on the Sixaxis after Ubuntu is already running it will not work.
- Add sections for using the Sixaxis in variety of emulators
- Add section for using the Sixaxis in MythTV
CategoryBluetoothCategoryHardware
Introduction
The ‘add-apt-repository command not found’ Ubuntu error appears when trying to add a new software repository. This indicates that the add-apt-repository package is missing on your system.
This tutorial resolves the ‘add-apt-repository command not found’ error on Ubuntu and Debian-based Linux distributions.
- A user account with sudo privileges
- Access to a terminal window / command line (Ctrl-Alt-T or Ctrl-Alt-F2)
Steps to Resolve add-apt-repository: command not found error
Step 1: Update Local Ubuntu Repositories
Open a terminal window and enter the command to update repositories:
The system confirms that the software repositories list on your local machine is updating.
Step 2: Install the software-properties-common Package
The add-apt-repository command is not a regular package that can be installed with
apt
on Debian / Ubuntu LTS 18.04, 16.04, and 14.04. Instead, it’s a component of the software-properties-common package.To get the
add-apt-repository
command, install the software-properties-common package:This is an example output after a successful installation:
In Ubuntu 13.10 (and older), the
add-apt-repository
command is part of the Python software package. To install it, use the command:sudo apt-get install python-software-properties
How to Add Apt Repository in Ubuntu & Debian
Certain software packages aren’t included in the default repositories. To make installing easier, developers created their own software repositories. This is when the
add-apt-repository
command is used.For example, Wine is a popular package for running non-Linux software on a Linux system. But the latest version isn’t available through the default repositories.
To install the latest version of Wine on Ubuntu, you first need to grant access to the Wine repository:
Other software may be subject to additional licensing. Such as in the case of Debian, restrictive licensing may disqualify a package from being included in the default repositories. In these cases, the
add-apt-repository
command is the key to grant access to the software you want to install.A software package is an application. In certain cases one package needs other packages (called dependencies) to run.
A package manager does the work of loading the software package you want. If there are any dependencies, the package manager installs those as well. Additionally, a package manager automatically keeps track of all installed software and updates.
A package manager works in tandem with a software repository. A repository is a database of many different software packages. By default, each Linux distribution grants access to a set of basic, default repositories.
In Ubuntu, the default repositories are:
- Main – Free and open-source software from the Ubuntu developers
- Universe – Free and open-source software from the Linux community
- Restricted – Device drivers and other software under licensing from manufacturers
- Multiverse – All other software under copyright or legal restriction
In Debian, the default repositories are:
- Main – Free licensed software
- Contrib – Free software that depends on non-free licensed software
- Non-free – Software with restrictions on use and distribution
If you want to install a software package that’s not included in these default repositories, you need to add that repository to your package manager.
In this tutorial, you learned to use the
add-apt-repositories
command in Ubuntu or Debian to resolve the repository not found error.You have also gained insight into software repositories and package management and the value they bring to maintain your systems and keep them at optimum level.
Next you should also read
In Linux, special tools were developed for managing applications. Application software for Linux typically…
Advanced Package Tool (APT) is a package management system used on Debian, Ubuntu and other Linux…
Ddpkg is a tool used to install packages into a Debian, Ubuntu, Mint, Kali or deb based distributions. The…
If a script is not written correctly, or if something unusual happens, PHP can generate an error message. The…
RPM is a package format used by Red Hat based derivatives like CentOS, RHEL or Fedora. It gets its name from…