在之前的一篇文章里面,留下的问题是不能完美解决jstest-gtk不能正常识别Logitech G920方向盘的问题。

虽然可以通过重启电脑到windows下进行设置一番,但是始终没有彻底解决jstest-gtk正常识别方向盘的问题。

现在,我通过查资料,逛Github,知道了原因,但是才疏学浅,根据大神的教程,始终未能彻底解决jstest-gtk识别方向盘的问题。这里我附上了原因以及解决问题的教程,望共勉,希望有才之士解决的话分享一下经验,多谢。

在ubuntu系统终端输入lsusb,对于方向盘显示的0xc261与0xc262,是由于方向盘自动默认启动Xbox模式,需要修改模式,安装并启用usb_modeswitch。

参考链接:

1、https://lkml.org/lkml/2016/1/26/763

2、http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2510

3、http://www.draisberghof.de/usb_modeswitch/

4、http://burning-midnight.blogspot.com/2017/11/logitech-g920-steering-wheel-on-linux.html (需要梯子)

5、https://github.com/carla-simulator/carla/issues/1473

问题:

参照这几篇教程,虽然知道是什么原因导致Ubuntu读不出来方向盘,还是没有弄懂如何添加命令行修改参数。虽然是可以成功地解决jstest-gtk识别方向盘的问题。

附上第四条链接的内容:

Logitech G920 Steering Wheel on Linux - Ubuntu 16.04, Linux Mint 18

Yes, it works.  And...well, it's not terrible to make it work, but it was a bitch to find all the missing pieces.

For the search engines... think Euro Truck Simulator 2.  Linux.  Ubuntu and Mint.  This information won't be relevant for too much longer, but for my own sanity I'm writing it down anyway.

For starters, Ubuntu 17 already has the necessary changes to the UDEV rules file.  Mint 18 is based on Ubuntu 16, so you're stuck there without the following.

Upgrading the Kernel Version

Kernel series 4.4 does not have the necessary improvements to the hid_logitech_hidpp.ko module.  The 4.8 and later series kernels (supposedly also 4.6) have it.  Check Linus' kernel git and locate the module source if you want to enjoy a front-row seat in the time-machine.  I pushed my Mint 18 install to 4.10, partly for kicks; I figured it was a good compromise between new and working, although I have virtually no other experience and can't say what else might be fixed/broken over the 4.4 kernel that my Mint install was running...

Now, if you have a clean install of Mint, it might already be on a newer release.  My work computer was on 4.8; I had done upgrades to my home PC, however, and so the kernel version seemed to lag.  USE THE UPDATE MANAGER TO SELECT A NEW KERNEL VERSION!  

References:  http://linuxbsdos.com/2016/12/19/how-to-upgrade-the-kernel-in-linux-mint-18-1-from-4-4-to-4-8/

Also be careful /boot doesn't run out of space.  That is very annoying.

Once you have the newest kernel installed, you can move on to the UDEV system and the usb_modeswitch updates.

UDEV and usb_modeswitch

It's probably a good idea to start with the usb_modeswitch.  Again, newer versions of Ubuntu have this fix already loaded.  You'll need to create a file in /etc/usb_modeswitch.d/ called "046d:c261".  Inside, dump the following:

 

# Logitech G920 Racing Wheel

DefaultVendor=046d

DefaultProduct=c261

MessageEndpoint=01

ResponseEndpoint=01

TargetClass=0x03

MessageContent="0f00010142"

The next step is to insert the following rule into udev.  I stuffed mine into the rules file: /lib/udev/rules.d/40-usb_modeswitch.rules, however you might want to try using the /etc/udev/rules.d/ folder instead.  If the latter doesn't work, the former certainly does...you just run the slight risk of future upgrades wreaking havoc when they get to this file.

 

ATTR{idVendor}=="046d", ATTR{idProduct}=="c261", RUN+="usb_modeswitch '%b/%k'"

References:  http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2510

Why is this necessary?

As explained in the latter link, the steering wheel powers up in XBOX mode.  A command must be sent to switch the wheel over to PC mode, or there is no PC goodness.  usb_modeswitch does this.

Hazards

On these "older" versions of Ubuntu (ahem...Mint), you might run into a problem with usb_modeswitch if you're using USB hubs.  Evidently the older versions of usb_modeswitch might have trouble dealing with cascaded hubs, which could explain why I was able to get this to work on my Mint PC (a laptop I plugged directly into) and not my Xubuntu desktop (where I plugged into my USB KVM switch).  Newer versions of usb_modeswitch, such as that which ships with Ubuntu 17, supposedly do not suffer from this deficiency.  Now, I state this only to help debug, I haven't verified it, and YMMV.  Every time I pull out the steering wheel, I have to do it under cover of closed and locked door because it's a gift for my son (yeah, the kids get all the cool toys).

Also, you CAN actually get the wheel talking to Ubuntu/Mint without the newer kernel, BUT THE FORCE-FEEDBACK WILL NOT WORK!  That component is contingent on the kernel module, and if it doesn't talk to the G920, then you will have nothing more than a very expensive set of potentiometers.  That said, it is reassuring that to find that your wheel IS appearing to the system as a valid device of some sort, just to let you know that you're on the right track.  You'll also note that the incorrect version of the kernel module will not auto-load; the correct version will.  Watch lsmod and grep on "hid" to see the action.

Euro Truck Simulator 2!!!!!!

On my laptop, which is technically a work laptop, I have a shitty Intel graphics chipset, so ETS2 ran basically without textures.  So that's what that looks like....  But it ran enough to let me test the wheel and get everything working without borking my wife's (significantly better) system.  (Yeah, the tech guy who makes old hardware work for a long time suffers with old hardware for a long time...).  Once the correct kernel module was loaded, and the udev rules were in place, I watched the syslog and observed the correct initialization sequence via usb_modeswitch occurring.  On to ETS2, and enable force-feedback, and HOLY DAMN!  Engine rumble, dampening, response... I even crashed on purpose to see how it would feel.  Everything was solid gold.

Torcs gives some minor feedback also; I don't know much about configuring it, though, so I suppose it could be better.  If anyone else has Linux racing sims they'd like to share, that support wheels and force-feedback, I'm all ears!  Never thought I'd honestly buy one of these, but with the newer kernels, it is definitely a good buy.

A Side Note: the Brake Pedal

There are reports that the G29 and G920 both suffer from Logitech trying to, *cough* improve *couch* their brake pedal by inserting a rather rigid piece of rubber into the spring.  You have three choices, two of which involve voiding the 1 year warranty (and mine is already like 6 months gone because the damn things has been sitting in a closet after I bought it on sale)...

  1. Do nothing (and keep your warranty...and possibly suffer with a very stiff brake)
  2. Open the device and remove the rubber insert - this reportedly returns the unit to G27 performance.
  3. Open the device and replace the springs with a SPRING UPGRADE!!!  I totally want to do this...

This set looks pretty cool, and the reviews I have seen tend to be very positive:

http://www.gteye.com.au/product/gteye-complete-pedal-spring-set-for-logitech-g25-g27

The set works in the G920, and now all I need to do is to talk my wife into letting me buy it...um...for my son's steering wheel and pedal set.... ;-)

对于Ubuntu16.04中jstest-gtk不能正常识别Logitech G920 racing wheel的问题补充相关推荐

  1. 在ubuntu16.04中一键创建LAMP环境 新系统

    在ubuntu16.04中一键创建LAMP环境 执行命令apt-get update. 执行命令apt-get install lamp-server^. 在安装过程中会跳出Mysql数据库root用 ...

  2. ubuntu16.04中IDEA无法输入中文问题

    问题: Ubuntu16.04中,IDEA下面无法切换搜狗输入法及其他输入法,无法输入中文,但是原来可以正常输入中文 解决: 在IDEA的bin目录下的idea.sh文件的前面加上 export XM ...

  3. Ubuntu16.04中安装Kermit

    在Ubuntu16.04中安装Kermit的方法有两种:apt-get安装和源码编译安装,下面分别这两种方法进行说明. 1 apt-get安装 根据参考资料[1][2]的说明,可以通过面的命令安装Ke ...

  4. Linux热点无网络,Linux网络配置:手提在连接WIFI热点情况下,Ubuntu16.04中怎样配置网络?...

    Linux网络配置:手提在连接WIFI热点情况下,Ubuntu16.04中怎样配置网络?,范佩西致敬温格:你是我的足球父亲,是你塑造了我,磷菩屹倨竿,布加迪推出Chiron Sport特别版,百公里加 ...

  5. Ubuntu16.04中常用软件QQ,WPS,搜狗,CLion,Pycharm等安装

    Ubuntu16.04中常用软件QQ,WPS,搜狗输入法,CLion,Pycharm等安装 1.QQ链接: https://im.qq.com/linuxqq/index.html sudo dpkg ...

  6. 4.Ubuntu16.04中SNMP配置

    Ubuntu16.04中SNMP配置 SNMP服务配置 zabbix在监控网络设备或者打印机等设备时,需要用到SNMP,单独在被监控的客户端配置SNMP即可 端口:161 1.安装SNMP 服务端:s ...

  7. 在Ubuntu16.04中强制解锁

    在Ubuntu16.04中强制解锁: sudo rm /var/lib/dpkg/lock

  8. Linux怎么接移动热点,Linux网络配置:手提在连接WIFI热点情况下,Ubuntu16.04中怎样配置网络?...

    Linux网络配置:手提在连接WIFI热点情况下,Ubuntu16.04中怎样配置网络?,八维资本近期战略投资重磅项目MobileCoin.Libra Credit,橇凑站肆俏,吉利首款新能源SUV来 ...

  9. Ubuntu16.04中的可重定位目标文件

    最近在看<CSAPP>这本神书,其中看到了第七章链接中的可重定位目标文件,自己动手在ubuntu16.04上试了一试,发现有很多都做了一些改动,在此记录 1.源程序 main.c stat ...

最新文章

  1. 一周焦点 | Dota2团战击溃AI;不如跳舞!伯克利最新人体动作迁移研究
  2. java模拟器apk闪退_急,求帮助,eclipse生成apk安装以后闪退
  3. 人工智能对金融世界的改变_人工智能革命正在改变网络世界
  4. 各种机械原理动态图,看完脑洞大开,绝对涨姿势!
  5. protect 继承_(转)public、protect、private继承方式 C++
  6. hdu 2141 Can you find it(二分)
  7. C# json解析字符串总是多出双引号_一篇长文带你在python里玩转Json数据
  8. bzoj2763:最短路
  9. 2.冒泡排序----还是不懂,先记录下来
  10. JSTL—fn使用方法总结
  11. C程序设计--命令行参数(argc 和 argv[])
  12. 【第43题】【062题库】2019年OCP认证062考试新题
  13. markdown来写API接口文档
  14. mac m1 obs录制麦克风+桌面音频
  15. python 科学计算地磁_用Python控制硬件32-用HMC5883L测量地磁场强度
  16. python环境是什么_三分钟了解什么是Python?python环境搭建
  17. 常见前端九十道面试题及答案-韩烨
  18. python 求解高阶线性方程并画出图像
  19. 美国计算机科学排名前三大学,美国计算机科学专业大学排名(2021 USNEWS)
  20. 基于萤火虫优化算法的图像分割

热门文章

  1. Curator使用手册
  2. python 全栈开发,Day128(创建二维码,扫码,创建玩具的基本属性)
  3. 我的读书清单(持续更新)
  4. 扫地机器人系统,主要划分为哪几个模块?
  5. 命名转小驼峰大驼峰中划线
  6. 【区块链论文整理】SIGMOD篇(一)
  7. 二分法查找(dichotomy)--python实现
  8. Redis从入门到集群分布式实践
  9. 和女友一起学技术,她去了字节,我去了华为
  10. python中取余%