Xbox controller linux driver

Как легко подключить контроллер от Xbox 360 в Ubuntu

С тех пор как Steam стал доступен на Linux, геймеры все чаще и чаще задаются вопросом, как подключить контроллеры от Xbox в Ubuntu.

Драйвер «xpad» доступен в Ubuntu 14.04 LTS по умолчанию. В большинстве случаев все работает гладко и стабильно, но владельцы новых беспроводных контроллеров отмечают существование проблем с некорректным реагированием на нажатие кнопок и беспричинным мерцанием лампочек на контроллере.

Для более гладкого управления игровым процессом, настройками, чувствительностью и назначением кнопок обычно рекомендуется альтернативный драйвер под названием «xboxdrv».

Xboxdrv считается отличным решением, засчет поддержки широкого спектра устройств и огромного количества доступных настроек, такик как:

  • Имитация клавиатуры и мыши
  • Переназначение кнопок
  • Регулировка/настройка/калибровка
  • Макросы для триггеров
  • Настройка лампочек на геймпаде

Настройка Ubuntu Xbox драйвера

Выше мы упомянули драйвер xboxdrv: но его не так то просто установить. Постоянно возникают проблемы несовместимости драйвера с Панелью Управлению Unity, это очень сильно раздражает и мешает настройке.

Но репак драйверов от Rael GC решает большую часть этих проблем (и многие другие!). Его репак драйвера xboxdv — который он назвал «Ubuntu xboxdrv» — доступен для Ubuntu 12.04 LTS, 13.10 и 14.04 LTS с помощью соответствующего PPA, благодаря которому процесс установки (и удаления) значительно упрощается.

Чтобы установить, откройте окно Терминала и введите следующие команды:

sudo apt-add-repository ppa:rael-gc/ubuntu-xboxdrv

sudo apt-get update && sudo apt-get install ubuntu-xboxdrv

После завершения установки необходимо перезагрузить компьютер, чтобы убедиться, что новые драйверы заменили стандартные. Теперь, можно смело пробовать. Особые настройки можно производить в интерфейсе контроллера в Центре программного обеспечения.

За более детальной информацией воспользуйтесь страницей проекта на GitHub.

Источник

How To Use And Configure Your Xbox 360 Controller on Linux

Even though Ubuntu includes support for gaming controllers by default, it is somewhat lacking.

The default xpad driver has been a source of trouble for a long time. And while it works well for some – you don’t need to pay attention to this post if that includes you – there are those for whom it doesn’t.

So, for those, here is another method.

XBoxDriver

xboxdrv is a “Xbox/Xbox360 gamepad driver for Linux that works in userspace”, a more reliable bridge between the OS and the gamepad.

It fully supports most Xbox controllers, more specifically “Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless gamepads, both first and third-party”, like the Logitech F710 which I’m going to be using in this tutorial.

1. Since support for my Logitech controller was only added in xboxdrv 0.8.5, not the 0.8.4 available by default in Ubuntu 13.04, I installed xboxdrv from its PPA.

sudo add-apt-repository ppa:grumbel/ppa

sudo apt-get update && sudo apt-get install xboxdrv

You can read more about compatibility at the xboxdrv website, and if you’re having problems with the driver included in Ubuntu by default, then you can always try upgrading to this version.

2. Next, you need to disable the xpad driver. There are two ways to do this.

To permanently disable the driver from being loaded open a terminal and enter the following command:

Читайте также:  Нужно ли отключить индексирование windows 10

Add the following line to the end of the file to permanently disable the driver from being loaded:

Or, for a less permanent way, you can issue the following command in terminal, so you can disable it immediately and avoid rebooting after modifying blacklist.conf.

sudo rmmod xpad

3. Finally, connect your gamepad and run the new driver from the command line.

sudo xboxdrv —silent

The – -silent option prevents the driver from outputting an extreme amount of information about of information about your gamepad.

That is pretty much it, and the new driver will work with games which support gamepads, like SuperTuxKart and Steam games like Portal.

However, for games which don’t support controller input, you can still use xboxdrv with the – -config option to map the keys and analog sticks on your gamepad to your mouse and keyboard, like so:

sudo xboxdrv —silent —config [file]

While writing these files is beyond the scope of this tutorial, you can find more information here and you can also find many of these scripts around the web. For instance, here’s one I prepared earlier for Minecraft.

QJoyPad – Graphical Axis Editor

If you don’t fancy the idea of writing your own scripts you can use QJoyPad, a graphical option for doing this.

QJoyPad is a bit of a pain to get running under Ubuntu. A bit of Googling should help, as might these out-dated .deb installers.

Once installed the tool can be launched from the command line using:

It will show up as a small window with an old-looking gamepad inside it. You can then use it to bind individual bits of your controller to their corresponding actions on the keyboard or mouse. Here are the basics:

QJoyPad layout editor

Left click the game pad to enter the layout editor. To open a new layout, press ‘Add‘, and then name it. You can then use the jstest-gtk tool to find which axis or button you need to assign to whatever key you want.

For example, say I want to assign the left joystick to the AWSD keys for movement. To do this, I would open the jstest-gtk application from the Unity Dash, double-click my controller and move the left joystick about to see which axis it corresponds to. When I move the joystick sideways, axis 0 moves. When I move it up and down, axis 1 moves.

Since the axis in QJoyPad are always one greater than in jstest-gtk, axis 0 corresponds to axis 1, and axis one corresponds to axis 2. So to set up sideways movement I press axis 1, and then change the left button (these buttons can be found under the white bars) to A, and the right one to D. Likewise with the up and down buttons for axis 2.

Enabling the gradient option ensures that the movements are gradual, so in some games you can move slowly if you move the joystick just a little. Feel free to mess about with some of the settings to find the optimal options for how you want your controller to work.

Similarly, you can make joystick movements correspond to mouse movements, also using the gradient option. Just select one of the four Mouse options rather than the Keyboard option, depending on which direction you want to move the mouse.

Setting up ordinary keys is somewhat simpler. Just press Quick Set at the bottom of the QJoyPad window. When a pop-up appears, press the desired key on your controller, and then the right keyboard key.

Читайте также:  Полезные команды для терминала mac os

You can save the layout using the Update button, or undo the changes to the last saved version using Revert. The Remove option is self explainable. Back in the little joystick window of QJoyPad, you can right-click it to quickly change layouts.

When you’re done with xboxdrv, you can exit it using the Ctrl-C key combination, or just close the terminal.

Home » Gaming » How To Use And Configure Your Xbox 360 Controller on Linux

Источник

Xbox controller linux driver

Updated Xpad Linux Kernel Driver

Driver for the Xbox/ Xbox 360/ Xbox 360 Wireless/ Xbox One Controllers

This driver includes the latest changes in the upstream linux kernel and additionally carries the following staging changes:

  • enable debug outputs to ease resolving issues
  • some minor code refactoring improving readability

This driver does not support the XBox One Wireless Adapter (WiFi)
To get that running, see: medusalix/xow

This driver creates three devices for each attached gamepad

  1. /dev/input/jsN
    • example jstest /dev/input/js0
  2. /sys/class/leds/xpadN/brightness
    • example echo COMMAND > /sys/class/leds/xpad0/brightness where COMMAND is one of
      • 0: off
      • 1: all blink, then previous setting
      • 2: 1/top-left blink, then on
      • 3: 2/top-right blink, then on
      • 4: 3/bottom-left blink, then on
      • 5: 4/bottom-right blink, then on
      • 6: 1/top-left on
      • 7: 2/top-right on
      • 8: 3/bottom-left on
      • 9: 4/bottom-right on
      • 10: rotate
      • 11: blink, based on previous setting
      • 12: slow blink, based on previous setting
      • 13: rotate with two lights
      • 14: persistent slow all blink
      • 15: blink once, then previous setting
  3. the generic event device
    • example fftest /dev/input/by-id/usb-*360*event*

As a regular unpriveledged user

Setup console to display kernel log.
dmesg —level=debug —follow

Open a new console and access the device with jstest.
jstest /dev/input/jsX

Interact with the device and observe that data packets recieved from device are printed to kernel log.

Save dmesg buffer and attach to bug report, don’t forget to describe button sequences in bug report.
dmesg —level=debug > dmesg.txt

Ctrl+C to close interactive console sessions when finished.

Источник

How to Set Up an Xbox One Controller in Ubuntu

For a while now the Linux kernel has supported the Microsoft Xbox One controller officially. That being said, support isn’t the greatest. For starters there are some tweaks that could be done as well as the ability for multiple controller support and more. In this article we’ll show you how to set up an Xbox One controller in Ubuntu.

To be more specific we’ll go over how to use the alternative driver, the SteamOS patched driver, configuring the controller with specific tools, tweaking it, etc. If you’re a Linux gamer and the Xbox One controller is your go-to, you may want to keep on reading! Let’s get started!

Using Xbox DRV

If you want to get the XboxDRV driver installed on Ubuntu, open up a terminal and enter the following command:

Once the driver is installed, everything should be mostly set up. No need to blacklist anything, as everything should work out of the box. However, in order for XboxDRV to work effectively, some systemd services will need to be enabled.

Start off by enabling the service. This will make sure that XboxDRV will work every time you boot right out of the gate.

Читайте также:  Как скрыть разделы жесткого диска зарезервировано системой windows

Now that it’s enabled, you can start the service so that you can use the driver right away.

After all of this is done, XboxDRV should be operational.

Multiple controllers with Xbox DRV

Remember earlier when we said that the XboxDRV driver is better in some ways? This is the main draw to this driver. The default driver, though impressive, doesn’t have solid multi-controller support. We can’t confirm that it’s not possible; however, with XboxDRV this is confirmed to work.

Here’s how to set it up. Start out in a terminal and enter the following:

This is the default configuration file. If you’re looking to add multi-controller support, you’ll need to add the following code to this file. Paste it under “silent = true” in the file. Here’s the code:

After the code has been added, press “Ctrl + O” to save the file, and then restart the driver:

After that you should be able to use multiple controllers.

Using the SteamOS patched driver

If you’re interested in sticking with the Xpad driver, you might be interested in Valve’s modified driver. It’s fixed up and specialized for SteamOS and Valve’s steambox consoles. All you’ll need to get it going is to add a PPA to your system. During the installation the current driver should be taken out, so no worries.

Start off by adding the PPA:

Once the PPA is on your system, you’ll need to update your system’s software sources.

After that, install the driver (along with the kernel headers if you don’t have them already):

After the driver is installed, simply reboot your machine. From here, you’ll be using the Valve-modified controller driver with your Xbox One controller.

Get more out of your controller with AntiMicro and JSTest

Drivers are one thing, and they certainly can make your Xbox One controller better on Ubuntu, but ultimately, if you want some solid configuration, you’ll need to check out some programs – two programs to be exact, the first one being JStest. It’s a simple and useful tool that you can use to calibrate your controllers’ axis.

Install it here:

The second program is Antmicro. If you’ve ever used Windows before, you might be familiar with a program called Xpadder. What it does is allow you to map keyboard and mouse functions directly to any controller plugged in.

This is what Antimicro does. When your Xbox One controller is detected on the system, you’ll easily be able to map keys and mouse gestures to the controller. This sort of thing is perfect if you’re playing a game that does not have gamepad support.

Install it here:

Conclusion

Though we are Linux gamers, we have to admit one thing: Microsoft knows how to make a controller. Out of all the controllers out there, the Xbox gamepad manages to be the most comfortable – and it seems that the gaming community at large agrees with this fact. Both the 360 and the One controller are among some of the most supported gamepads on all of the major PC platforms.

Hopefully, with the help of this article, you’ll be able to get more out of the Xbox One controller on Ubuntu.

What’s your preferred gaming controller to use on Ubuntu? Let us know below!

Derrik Diener is a freelance technology blogger.

Источник

Оцените статью