Author Topic: Patching kernel 2.6.38 to allow FFB for Logitech wheels.  (Read 7511 times)

0 Members and 1 Guest are viewing this topic.

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • Awards
Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« on: September 05, 2011, 01:55:45 pm »
So I have my wheel working using the LTWheelConf tool, however I have no force feedback and in order to do this I need to patch the kernel. There's just one thing. I haven't a scooby what to do, so I'll post what I know/find. Perhaps someone round here can help me solve the last piece of the puzzle.

So from what I know, I need to patch the kernel to allow FFB,however the only bits of information I have right now is this wiki page and some advice a member from another forum gave me. Problem is, the kernel they talk about is very old, as is Ubuntu 8.10 and so I'd imagine quite a few things have changed.

From what I know it's about adding the device id.

Code: [Select]
in drivers/hid/hid-core.c add: 
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL) },

in drivers/hid/hid-ids.h add:
#define USB_DEVICE_ID_LOGITECH_DFGT_WHEEL // DFGT_ID_HERE

in /drivers/hid/hid-lg.c add:
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DFGT_WHEEL), .driver_data = LG_FF },

I just haven't a clue what I'm supposed to be doing and I'd rather someone helped me out, because I don't want to be patching my kernel for it to then screw up and them me going through the whole process of fixing it.
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #1 on: September 05, 2011, 02:19:25 pm »
Can you post the model of your wheel, and (with the wheel attached) the output from:
Code: [Select]
lsusb
so we can get the manufacturer:device ID's

[EDIT]

If I'm reading this correctly:
http://lwn.net/Articles/438003/
and a few other places... isn't force feedback support added/enabled by default for G25/G27 devices in kernels >= 2.6.39 ?
In which case wouldn't it be easier to install 2.6.39, or wait for Oneric (11.10) ?

If you provide the device ID's I can check in the 2.6.39 kernel source, because I'm currently running that ;)

Or (Mwuhahahaha) post me your wheel and I'll test it for you "for a year or two", oops sorry I meant "and post it right back" :)
« Last Edit: September 05, 2011, 04:03:55 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #2 on: September 06, 2011, 02:46:23 am »
Can you post the model of your wheel, and (with the wheel attached) the output from:
Code: [Select]
lsusb


Model of wheel: Logitech Driving Force GT.
Manufacturer id: Bus 005 Device 005: ID 046d:c29a Logitech, Inc.

If I'm reading this correctly:
http://lwn.net/Articles/438003/
and a few other places... isn't force feedback support added/enabled by default for G25/G27 devices in kernels >= 2.6.39 ?
In which case wouldn't it be easier to install 2.6.39, or wait for Oneric (11.10) ?

If you provide the device ID's I can check in the 2.6.39 kernel source, because I'm currently running that ;)

Or (Mwuhahahaha) post me your wheel and I'll test it for you "for a year or two", oops sorry I meant "and post it right back" :)


We can install 2.6.39 if you want, but Oneric is due next month which I was going to upgrade to anyway. I will never send my wheel XD It stays with me :P
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #3 on: September 06, 2011, 02:03:25 pm »
Heh... It's not if *I* want... it's YOUR call :)
« Last Edit: September 06, 2011, 02:15:15 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #4 on: September 06, 2011, 09:34:04 pm »
Ok, well "I" want too then. ::)
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #5 on: September 06, 2011, 10:02:21 pm »
OK, you're going to want 3 files...

For 32bit Ubuntu 11.04 desktop edition:
linux-image-2.6.39-020639rc4-generic_2.6.39-020639rc4.201104191410_i386.deb
and
linux-headers-2.6.39-020639rc4_2.6.39-020639rc4.201104191410_all.deb
and
linux-headers-2.6.39-020639rc4-generic_2.6.39-020639rc4.201104191410_i386.deb

For 64bit Ubuntu 11.04 desktop edition:
linux-image-2.6.39-020639rc4-generic_2.6.39-020639rc4.201104191410_amd64.deb
and
linux-headers-2.6.39-020639rc4_2.6.39-020639rc4.201104191410_all.deb
and
linux-headers-2.6.39-020639rc4-generic_2.6.39-020639rc4.201104191410_amd64.deb

Now put them all in a directory and call it something like kernel-2.6.39

Move that direcory into your home directory

and run these 2 commands:
Code: [Select]
cd ~/kernel-2.6.39
then
Code: [Select]
sudo dpkg -i linux-*.deb

Wait for it to leave you back at an $ prompt (may take a short while)... then reboot.

Once your back at the desktop, run:
Code: [Select]
uname -r

Output should be -
2.6.39-020639rc4-generic



Her's where the files are actually located:
http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.39-rc4-natty/

And remember, you can always select the older kernel fron the GRUB boot screen if necessary.
« Last Edit: September 06, 2011, 11:08:37 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #6 on: September 06, 2011, 10:30:41 pm »
Or would you prefer to try kernel 3.1.0-rc4 ? .. it's listed as for Oneric, but seems to work fine on my system ;)

Though it *did* mention the possibility of some ATI firmware being missing during the install... but everything seems OK (so far).
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #7 on: September 07, 2011, 02:56:37 am »
Two things.

Number one, I can't remember which bit-version I installed, what's the terminal command to check that?

Number two, before we proceed, a guy from the LFS forum has built a kernel patch for 2.6.38. See here for details.

So do we still update, or? I say "we" as in, you're helping me decide because you're far more knowledgeable then me. :Pz
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #8 on: September 07, 2011, 09:47:03 am »
First check to see if you are running 64bit... because if you are, you may be better off using his patched kernel
Code: [Select]
uname -a

here's the output for 64bit Ubuntu

Quote
Linux mark 3.1.0-0301rc4-generic #201108290905 SMP Mon Aug 29 09:11:07 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #9 on: September 07, 2011, 09:22:49 pm »
I got:

Quote from: Terminal
Linux bally-laptop 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:05:14 UTC 2011 i686 i686 i386 GNU/Linux
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #10 on: September 07, 2011, 09:30:13 pm »
Hmmm he's uploaded a 64bit kernel, you've got 32bit Ubuntu .. which will be a problem, as you have 32bit libs and software installed :(
« Last Edit: September 07, 2011, 09:32:02 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #11 on: September 08, 2011, 06:20:27 am »
Hmmm he's uploaded a 64bit kernel, you've got 32bit Ubuntu .. which will be a problem, as you have 32bit libs and software installed :(

Well I have an Intel Core 2 Duo processor, I *believe* it is 64-bit compatible. I guess I'll update to 64-bit version of Natty? or a beta version of Oneric? or Mint 11? I could back-up files etc to the win7 box for now.
« Last Edit: September 08, 2011, 06:27:34 am by BkS »
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #12 on: September 08, 2011, 03:11:53 pm »
Sounds like a plan ;)
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1691
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #13 on: September 08, 2011, 03:21:46 pm »
So which to upgrade too? Oneric beta, or Natty? Mint is out the window, didn't like the look of it at all and I don't like KDE either :P
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Patching kernel 2.6.38 to allow FFB for Logitech wheels.
« Reply #14 on: September 08, 2011, 03:57:28 pm »
Ultimately the choice is yours, but I'd probably go for Natty, till Oneiric has been out for a while :)
« Last Edit: October 19, 2011, 02:16:10 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal