Linux-Force-Feedback icon indicating copy to clipboard operation
Linux-Force-Feedback copied to clipboard

Not working correctly with DFGT on linux 4.4.6

Open nonno-cicala opened this issue 8 years ago • 6 comments

Thank you for your work on these drivers.

I tried it to get more types of FF supported by my hardware, a Logitech Driving Force GT. The only new thing working seemed to be the periodic type, but when testing with fftest the constant type wasn't working any more, and it did with the default driver in linux 4.4.6. I tried Euro Truck Simulator 2, where the periodic worked and nothing more. Then I checked my dmesg and found lots of errors like these:

[ 2780.109936] BUG: workqueue leaked lock or atomic: kworker/u4:3/0x7fffffff/22805 last function: 0xffffffffa08f9460 [ 2780.109939] CPU: 1 PID: 22805 Comm: kworker/u4:3 Tainted: P W O 4.4.6-gentoo #3 [ 2780.109940] Hardware name: System manufacturer System Product Name/M2N-E SLI, BIOS ASUS M2N-E SLI ACPI BIOS Revision 1301 09/16/2010 [ 2780.109942] Workqueue: ffpl_request_work 0xffffffffa08f9460 [ 2780.109945] 0000000000000000 ffffffff812f18d3 ffff88013403e3c0 ffff880082346170 [ 2780.109947] ffffffff810831ad ffffffff81080912 ffff88013403e3c0 ffff88013403e3f0 [ 2780.109948] ffff88014b00cc00 0000000000000088 ffff88014b00cc18 ffff88014b0fda00 [ 2780.109950] Call Trace: [ 2780.109952] [] ? 0xffffffff812f18d3 [ 2780.109953] [] ? 0xffffffff810831ad [ 2780.109954] [] ? 0xffffffff81080912 [ 2780.109954] [] ? 0xffffffff810832b5 [ 2780.109955] [] ? 0xffffffff81083270 [ 2780.109956] [] ? 0xffffffff81088388 [ 2780.109957] [] ? 0xffffffff810882d0 [ 2780.109958] [] ? 0xffffffff815f161f [ 2780.109958] [] ? 0xffffffff810882d0 [ 2780.109960] BUG: scheduling while atomic: kworker/u4:3/22805/0x00000000 [ 2780.109961] Modules linked in: hid_logitech klgd_ff_plugin klgd nvidia_modeset(PO) nvidia(PO) input_leds led_class [last unloaded: klgd] [ 2780.109967] CPU: 1 PID: 22805 Comm: kworker/u4:3 Tainted: P W O 4.4.6-gentoo #3 [ 2780.109967] Hardware name: System manufacturer System Product Name/M2N-E SLI, BIOS ASUS M2N-E SLI ACPI BIOS Revision 1301 09/16/2010 [ 2780.109971] 0000000000000000 ffffffff812f18d3 0000000000013a00 ffff88014b0fda00 [ 2780.109973] ffffffff8108c1d0 ffffffff815edcfe ffff8801238f0000 ffff88014b00cc00 [ 2780.109974] ffff88014b00cc00 0000000000000088 ffff88014b00cc18 ffff88014b0fda00 [ 2780.109975] Call Trace: [ 2780.109976] [] ? 0xffffffff812f18d3 [ 2780.109977] [] ? 0xffffffff8108c1d0 [ 2780.109978] [] ? 0xffffffff815edcfe [ 2780.109978] [] ? 0xffffffff815edf93 [ 2780.109979] [] ? 0xffffffff81083325 [ 2780.109980] [] ? 0xffffffff81083270 [ 2780.109981] [] ? 0xffffffff81088388 [ 2780.109981] [] ? 0xffffffff810882d0 [ 2780.109982] [] ? 0xffffffff815f161f [ 2780.109983] [] ? 0xffffffff810882d0 [ 2780.123138] KLGD: Plugins state locked [ 2780.123143] KLGD: Plugins state unlocked, rescheduled [ 2780.123145] KLGD: Plugins state locked [ 2780.123147] KLGD: Plugins state unlocked, rescheduled [ 2780.123147] KLGD: Plugins state locked [ 2780.123148] KLGD: Plugins state unlocked, rescheduled [ 2780.136483] KLGD: Plugins state locked [ 2780.136489] KLGD: Plugins state unlocked, rescheduled [ 2780.136490] KLGD: Plugins state locked [ 2780.136491] KLGD: Plugins state unlocked, rescheduled [ 2780.149886] KLGD: Plugins state locked [ 2780.149890] KLGD: Plugins state unlocked, rescheduled [ 2780.149892] KLGD: Plugins state locked [ 2780.149892] KLGD: Plugins state unlocked, rescheduled [ 2780.166168] KLGDFF: RQ erase (effect 0) [ 2780.166173] KLGD: Plugins state locked [ 2780.166179] KLGD: Plugins state unlocked, rescheduled [ 2780.166180] KLGD: Plugins state locked [ 2780.166181] KLGD: Plugins state unlocked, NOT scheduled [ 2780.166181] KLGD: Plugins state unlocked, rescheduled [ 2780.166185] BUG: workqueue leaked lock or atomic: kworker/u4:3/0x7fffffff/22805 last function: 0xffffffffa08f9460 [ 2780.166188] CPU: 1 PID: 22805 Comm: kworker/u4:3 Tainted: P W O 4.4.6-gentoo #3 [ 2780.166189] Hardware name: System manufacturer System Product Name/M2N-E SLI, BIOS ASUS M2N-E SLI ACPI BIOS Revision 1301 09/16/2010 [ 2780.166191] Workqueue: ffpl_request_work 0xffffffffa08f9460 [ 2780.166193] 0000000000000000 ffffffff812f18d3 ffff88013403e3c0 ffff880082346170 [ 2780.166195] ffffffff810831ad ffffffff81080912 ffff88013403e3c0 ffff88013403e3f0 [ 2780.166196] ffff88014b00cc00 0000000000000088 ffff88014b00cc18 ffff88014b0fda00 [ 2780.166198] Call Trace: [ 2780.166201] [] ? 0xffffffff812f18d3 [ 2780.166202] [] ? 0xffffffff810831ad [ 2780.166202] [] ? 0xffffffff81080912 [ 2780.166203] [] ? 0xffffffff810832b5 [ 2780.166204] [] ? 0xffffffff81083270 [ 2780.166205] [] ? 0xffffffff81088388 [ 2780.166206] [] ? 0xffffffff810882d0 [ 2780.166207] [] ? 0xffffffff815f161f [ 2780.166207] [] ? 0xffffffff810882d0 [ 2780.166209] BUG: scheduling while atomic: kworker/u4:3/22805/0x00000000 [ 2780.166210] Modules linked in: hid_logitech klgd_ff_plugin klgd nvidia_modeset(PO) nvidia(PO) input_leds led_class [last unloaded: klgd] [ 2780.166215] CPU: 1 PID: 22805 Comm: kworker/u4:3 Tainted: P W O 4.4.6-gentoo #3 [ 2780.166216] Hardware name: System manufacturer System Product Name/M2N-E SLI, BIOS ASUS M2N-E SLI ACPI BIOS Revision 1301 09/16/2010 [ 2780.166219] 0000000000000000 ffffffff812f18d3 0000000000013a00 ffff88014b0fda00 [ 2780.166221] ffffffff8108c1d0 ffffffff815edcfe ffff8801238f0000 ffff88014b00cc00 [ 2780.166222] ffff88014b00cc00 0000000000000088 ffff88014b00cc18 ffff88014b0fda00 [ 2780.166224] Call Trace: [ 2780.166225] [] ? 0xffffffff812f18d3 [ 2780.166225] [] ? 0xffffffff8108c1d0 [ 2780.166226] [] ? 0xffffffff815edcfe [ 2780.166227] [] ? 0xffffffff815edf93 [ 2780.166228] [] ? 0xffffffff81083325 [ 2780.166228] [] ? 0xffffffff81083270 [ 2780.166229] [] ? 0xffffffff81088388 [ 2780.166230] [] ? 0xffffffff810882d0 [ 2780.166231] [] ? 0xffffffff815f161f [ 2780.166231] [] ? 0xffffffff810882d0 [ 2780.166245] KLGDFF: RQ erase (effect 1) [ 2780.166247] KLGD: Plugins state locked [ 2780.166249] KLGD: Plugins state unlocked, rescheduled [ 2780.166290] KLGDFF: RQ erase (effect 2) [ 2780.166293] KLGD: Plugins state locked [ 2780.166294] KLGD: Plugins state unlocked, rescheduled [ 2780.166334] KLGDFF: RQ erase (effect 3) [ 2780.166336] KLGD: Plugins state locked [ 2780.166338] KLGD: Plugins state unlocked, rescheduled [ 2780.166378] KLGDFF: RQ erase (effect 4) [ 2780.166380] KLGD: Plugins state locked [ 2780.166382] KLGD: Plugins state unlocked, rescheduled [ 2780.166386] KLGD: Plugins state locked [ 2780.166387] KLGD: Plugins state unlocked, rescheduled [ 3578.368118] KLGDFF: RQ upload (effect 0) [ 3578.368124] KLGDFF: RQ upload (effect 1) [ 3578.368127] KLGDFF: RQ upload (effect 2) [ 3578.368130] KLGDFF: RQ upload (effect 3) [ 3578.368133] KLGDFF: RQ upload (effect 4) [ 3578.368136] KLGDFF: RQ upload (effect 5) [ 3578.368177] KLGD: Plugins state locked [ 3578.368180] KLGDFF: Effects are of different type - replacing (83 x 81) [ 3578.368181] KLGDFF: Effects are of different type - replacing (81 x 82) [ 3578.368182] KLGDFF: Effects are of different type - replacing (81 x 83) [ 3578.368183] KLGDFF: Effects are of different type - replacing (81 x 85) [ 3578.368183] KLGDFF: Effects are of different type - replacing (81 x 80) [ 3578.368184] KLGD: Plugins state unlocked, rescheduled [ 3785.607979] KLGD: Plugins state locked [ 3785.607983] KLGD: Plugins state unlocked, rescheduled [ 3796.878274] KLGD: Plugins state locked [ 3796.878279] KLGD: Plugins state unlocked, rescheduled [ 3821.885736] KLGD: Plugins state locked [ 3821.885740] KLGD: Plugins state unlocked, rescheduled [ 3821.888087] KLGDFF: RQ erase (effect 0) [ 3821.888090] KLGDFF: RQ erase (effect 1) [ 3821.888091] KLGDFF: RQ erase (effect 2) [ 3821.888091] KLGDFF: RQ erase (effect 3) [ 3821.888092] KLGDFF: RQ erase (effect 4) [ 3821.888093] KLGDFF: RQ erase (effect 5) [ 3821.888175] KLGD: Plugins state locked [ 3821.888181] KLGD: Plugins state unlocked, rescheduled

I'm reverting to the old driver for now.

nonno-cicala avatar May 16 '16 18:05 nonno-cicala

Hi,

the KLGD driver never made it out of the "highly experimental" stage so problems like this are to be expected. I was never able to reproduce the scheduling issue on my machine and since your kernel seems to be built without the necessary debugging info I have no idea what could've happened. The last two commits to KLGDFF are plain wrong so you might have slightly better luck running without them.

MadCatX avatar May 16 '16 20:05 MadCatX

Hi,

thank you for your quick reply. Would you recommend the ff-memless-next driver instead? Why it hasn't been mainlined? Even if highly experimental the KLGDFF driver should have the same features at the moment?

nonno-cicala avatar May 16 '16 20:05 nonno-cicala

I'm not sure in what state the memless-next driver is. We haven't touched it since we began the work on the KLGD framework so at least the hid-lg4ff driver will be quite out of date. memless-next is pretty much just an extension of the original ff-memless with support or the extra FFB effects. It has the same design flaw as ff-memless of not decoupling syscalls from userspace and communication with the hardware. Mainlining memless-next would not make much sense because this design flaw poses a serious problem for many games. We started the work on KLGD exactly because of this problem which we think is unfixable without a framework that decouples the userspace requests and their submission to the hardware.

MadCatX avatar May 18 '16 19:05 MadCatX

I tried commit MadCatX/LinuxFF-KLGDFF@1c8c4b23c9180ef5c67dfa77e0cc57dbb5e209df of KLGDFF with the same results: https://bpaste.net/show/f830c5db3d2e In this log I connected the device and tried fftest /dev/input/event10 with effects 5,1 and 0. Trying rumble and constant I got just a single tiny movement while the periodic sinusoidal worked, like with the latest commit.

nonno-cicala avatar May 23 '16 17:05 nonno-cicala

Hi,

If I remember well, I got better results before commit MadCatX/LinuxFF-KLGDFF@c266562c724a845f0535251f0084153bcf02caa6, (I'm only not sure about the commits of Oct, 2, but I think they worked ok here).

brianch avatar May 23 '16 22:05 brianch

@MadCatX, is there anything we can do to better investigate this? Do you have any suggestions about where to put some "print" statements that could help you better understand what happens? (and what to print, of course).

brianch avatar Jun 26 '16 00:06 brianch