cmoh / lg4l Goto Github PK
View Code? Open in Web Editor NEWThis project forked from martynsmith/lg4l
Logitech for Linux
This project forked from martynsmith/lg4l
Logitech for Linux
Some "faking away with initialization" message seems to appear on all devices.
The initialization sequence seems to be reverse engineered with an USB monitor from the windows drivers until the device "worked". The stages and the messages exchanged at that phase seem to differ for each device, although the results are ignored by the driver.
When I make the driver with kernel 4.12.3 I have the following error:
make -C /lib/modules/4.12.3-1-ARCH/build M=/home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba
make[1]: Entering directory '/usr/lib/modules/4.12.3-1-ARCH/build'
CC [M] /home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba/hid-gcore.o
/home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba/hid-gcore.c: In function 'gcore_leds_probe':
/home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba/hid-gcore.c:264:50: error: 'struct hid_device' has no member named 'minor'; did you mean 'vendor'?
sprintf(led_name, led_templates[i].name, hdev->minor);
^~~~~
vendor
/home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba/hid-gcore.c: In function 'gcore_minor_show':
/home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba/hid-gcore.c:387:43: error: 'struct hid_device' has no member named 'minor'; did you mean 'vendor'?
return sprintf(buf, "%d\n", gdata->hdev->minor);
^~~~~
vendor
/home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba/hid-gcore.c:388:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[2]: *** [scripts/Makefile.build:309: /home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba/hid-gcore.o] Error 1
make[1]: *** [Makefile:1512: _module_/home/ogarcia/Devel/aur/lg4l/src/lg4l-06bff7105c74aba96779cd1145a97ef3b36d76ba] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.12.3-1-ARCH/build'
make: *** [Makefile:14: default] Error 2
If I edit source file and make change as suggest (minor for vendor) seems work well.
Removing the hid-g13 module (with the G13 plugged in) causes the kernel to crash.
It then crashes - http://i.imgur.com/Qmceu.png
In hid-gfb.c, I tried moving the "fb_deferred_io_cleanup(info);" in gfb_free_framebuffer_work() to be the first thing done as this seem to be the order used when gfb_probe() fails. This seem to make it get a little further, but it still crashes on the vfree().
I found the kernel mailinglist threads, but they seem to dead end. Has this project stalled out or is there something in the works that is not visible or I have not found?
I appreciate the effort.
Heyas, G510 support works just fine. Can you please merge my pr, #5 ?
Hi, I have a g15v1 keyboard and I have compiled the driver from 4.11 branch (i'm on debian stretch with kernel 4.9). I have an issue when binding the driver to device. When i do lsusb
, the output is the following:
Bus 001 Device 042: ID 046d:c222 Logitech, Inc. G15 Keyboard / LCD
Bus 001 Device 040: ID 046d:c221 Logitech, Inc. G11/G15 Keyboard / Keyboard
Bus 001 Device 039: ID 046d:c223 Logitech, Inc. G11/G15 Keyboard / USB Hub
the rebind script try to bind the to the device 046d:c222
but the input device seems to be 046d:c221
( since 046d:c222
is clearly related to the keyboard LCD) . So i tried to change the the id into rebind script but I get:
bash: echo: write error: No such device
tried to do it manually but I gate the same error
Thank you for your work
After make install. Ik got a bunch off error messages and don't what to do. Afther make also, but that whas a missing depencie.
hmobron@ubuntu2:/tmp/lg4l$ make install
make -C /lib/modules/4.15.0-43-generic/build M=/tmp/lg4l modules_install
make[1]: Map '/usr/src/linux-headers-4.15.0-43-generic' wordt binnengegaan
INSTALL /tmp/lg4l/hid-g110.ko
cp: kan het normale bestand '/lib/modules/4.15.0-43-generic/extra/hid-g110.ko' niet aanmaken: Toegang geweigerd
At main.c:160:
At build time I give this error:
make -C /lib/modules/3.18.1-1-ARCH/build M=/home/ogarcia/Documentos/lg4l modules
make[1]: Entering directory '/usr/lib/modules/3.18.1-1-ARCH/build'
CC [M] /home/ogarcia/Documentos/lg4l/hid-g19.o
In file included from include/linux/cpumask.h:12:0,
from ./arch/x86/include/asm/cpumask.h:4,
from ./arch/x86/include/asm/msr.h:10,
from ./arch/x86/include/asm/processor.h:20,
from ./arch/x86/include/asm/atomic.h:6,
from include/linux/atomic.h:4,
from include/linux/kgdb.h:18,
from include/linux/fb.h:4,
from /home/ogarcia/Documentos/lg4l/hid-g19.c:19:
include/linux/bug.h:33:45: error: negative width in bit-field '<anonymous>'
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:815:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:75:12: note: in expansion of macro 'VERIFY_OCTAL_PERMISSIONS'
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
include/linux/device.h:540:45: note: in expansion of macro '__ATTR'
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
^
/home/ogarcia/Documentos/lg4l/hid-g19.c:163:8: note: in expansion of macro 'DEVICE_ATTR'
static DEVICE_ATTR(fb_update_rate, 0666,
^
include/linux/bug.h:33:45: error: negative width in bit-field '<anonymous>'
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:815:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:75:12: note: in expansion of macro 'VERIFY_OCTAL_PERMISSIONS'
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
include/linux/device.h:540:45: note: in expansion of macro '__ATTR'
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
^
/home/ogarcia/Documentos/lg4l/hid-g19.c:449:8: note: in expansion of macro 'DEVICE_ATTR'
static DEVICE_ATTR(keymap_index, 0666,
^
include/linux/bug.h:33:45: error: negative width in bit-field '<anonymous>'
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:815:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:75:12: note: in expansion of macro 'VERIFY_OCTAL_PERMISSIONS'
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
include/linux/device.h:540:45: note: in expansion of macro '__ATTR'
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
^
/home/ogarcia/Documentos/lg4l/hid-g19.c:453:8: note: in expansion of macro 'DEVICE_ATTR'
static DEVICE_ATTR(keymap, 0666,
^
include/linux/bug.h:33:45: error: negative width in bit-field '<anonymous>'
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:815:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:75:12: note: in expansion of macro 'VERIFY_OCTAL_PERMISSIONS'
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
include/linux/device.h:540:45: note: in expansion of macro '__ATTR'
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
^
/home/ogarcia/Documentos/lg4l/hid-g19.c:526:8: note: in expansion of macro 'DEVICE_ATTR'
static DEVICE_ATTR(name, 0666, g19_name_show, g19_name_store);
^
scripts/Makefile.build:263: recipe for target '/home/ogarcia/Documentos/lg4l/hid-g19.o' failed
make[2]: *** [/home/ogarcia/Documentos/lg4l/hid-g19.o] Error 1
Makefile:1381: recipe for target '_module_/home/ogarcia/Documentos/lg4l' failed
make[1]: *** [_module_/home/ogarcia/Documentos/lg4l] Error 2
make[1]: Leaving directory '/usr/lib/modules/3.18.1-1-ARCH/build'
Makefile:13: recipe for target 'all' failed
make: *** [all] Error 2
Using your gnome15 overlay on kernels 3.13 and 3.14 with this ebuild:
sys-kernel/lg4l-kernel-module-20130906-r1::gnome15
Relevant boot dmesg output (seems allright?):
# egrep -i 'gnome15|hid|G19' /var/log/messages
kernel: hidraw: raw HID events driver (C) Jiri Kosina
kernel: usbcore: registered new interface driver usbhid
kernel: usbhid: USB HID core driver
kernel: hid-generic 0003:046D:C066.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech G9x Laser Mouse] on usb-0000:00:1a.1-2/input0
kernel: hid-generic 0003:046D:C066.0002: input,hiddev0,hidraw1: USB HID v1.11 Keyboard [Logitech G9x Laser Mouse] on usb-0000:00:1a.1-2/input1
kernel: usb 1-6.1: Product: G19 Gaming Keyboard
kernel: input: G19 Gaming Keyboard as /devices/pci0000:00/0000:00:1a.7/usb1/1-6/1-6.1/1-6.1:1.0/input/input16
kernel: hid-generic 0003:046D:C228.0003: input,hidraw2: USB HID v1.10 Keyboard [G19 Gaming Keyboard] on usb-0000:00:1a.7-6.1/input0
kernel: input: G19 Gaming Keyboard as /devices/pci0000:00/0000:00:1a.7/usb1/1-6/1-6.1/1-6.1:1.1/input/input17
kernel: hid-generic 0003:046D:C228.0004: input,hiddev0,hidraw3: USB HID v1.10 Device [G19 Gaming Keyboard] on usb-0000:00:1a.7-6.1/input1
kernel: usb 1-6.2: Product: G19 Gaming Keyboard
kernel: input: Logitech G19 Gaming Keyboard as /devices/pci0000:00/0000:00:1a.7/usb1/1-6/1-6.2/1-6.2:1.1/input/input18
kernel: hid-generic 0003:046D:C229.0005: input,hiddev0,hidraw4: USB HID v1.11 Keypad [Logitech G19 Gaming Keyboard] on usb-0000:00:1a.7-6.2/input1
kernel: input: Logitech G19 Gaming Keyboard as /devices/pci0000:00/0000:00:1a.7/usb1/1-6/1-6.2/1-6.2:1.1/input/input19
kernel: hid-g19 0003:046D:C229.0005: input,hiddev0,hidraw4: USB HID v1.11 Keypad [Logitech G19 Gaming Keyboard] on usb-0000:00:1a.7-6.2/input1
kernel: input: Logitech G19 as /devices/pci0000:00/0000:00:1a.7/usb1/1-6/1-6.2/1-6.2:1.1/input/input20
kernel: hid-g19 0003:046D:C229.0005: Logitech G19 hasn't completed stage 1 yet, forging ahead with initialization
kernel: hid-g19 0003:046D:C229.0005: Logitech G19 hasn't completed stage 2 yet, forging ahead with initialization
kernel: hid-g19 0003:046D:C229.0005: Logitech G19 hasn't completed stage 3 yet, forging ahead with initialization
kernel: input: gnome15-mouse as /devices/virtual/input/input21
kernel: input: gnome15-keyboard as /devices/virtual/input/input22
kernel: input: gnome15-joystick as /devices/virtual/input/input23
kernel: input: gnome15-digital-joystick as /devices/virtual/input/input24
As soon as the client utilities start (not sure which one causes this, either g15-systemtray or g15-desktop-service) this happens:
dbus[2171]: [system] Activating service name='org.gnome15.SystemService' (using servicehelper)
dbus[2171]: [system] Successfully activated service 'org.gnome15.SystemService'
kernel: BUG: unable to handle kernel paging request at ffff8803309f6930
kernel: IP: [<ffffffffa0a481be>] ginput_setkeycode+0x5e/0xd0 [hid_ginput]
kernel: PGD 1e0f067 PUD 1e12067 PMD 0
kernel: Oops: 0002 [#1] PREEMPT SMP
kernel: Modules linked in: hid_g19(O) hid_gfb(O) hid_ginput(O) nvidia(PO)
kernel: CPU: 6 PID: 3524 Comm: python2.7 Tainted: P O 3.13.6-gentoo #1
kernel: Hardware name: Gigabyte Technology Co., Ltd. EX58-UD4P/EX58-UD4P, BIOS F14p 01/28/2011
kernel: task: ffff8800db9620d0 ti: ffff8802d8398000 task.ti: ffff8802d8398000
kernel: RIP: 0010:[<ffffffffa0a481be>] [<ffffffffa0a481be>] ginput_setkeycode+0x5e/0xd0 [hid_ginput]
kernel: RSP: 0018:ffff8802d8399e30 EFLAGS: 00010046
kernel: RAX: 0000000000000287 RBX: ffff8803109f7800 RCX: 0000000000000025
kernel: RDX: 00000000ffff8803 RSI: 0000000000000067 RDI: ffff8800db141168
kernel: RBP: ffff8802d8399e78 R08: 00000000ffffffb7 R09: ffff8802da981af5
kernel: R10: 0000000000000000 R11: f000000000000000 R12: ffff8800db141120
kernel: R13: ffff8802d8399e74 R14: ffff8800db141168 R15: 00000000000000fb
kernel: FS: 00007f077d7f0700(0000) GS:ffff88031fd80000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: ffff8803309f6930 CR3: 00000002febea000 CR4: 00000000000007e0
kernel: Stack:
kernel: ffff8802da981af9 0000000000000019 ffff8800db141120 0000000000000018
kernel: ffff880310a158e8 ffffffffa0a4840f 000000250000000a 0000000000000067
kernel: ffff880300000000 00000067f0792cc9 0000000000000025 ffff8800c007b5c0
kernel: Call Trace:
kernel: [<ffffffffa0a4840f>] ? ginput_keymap_store+0xff/0x1c0 [hid_ginput]
kernel: [<ffffffff81157cde>] ? sysfs_write_file+0x11e/0x1c0
kernel: [<ffffffff810f520a>] ? vfs_write+0xaa/0x1e0
kernel: [<ffffffff810f5c13>] ? SyS_write+0x43/0xa0
kernel: [<ffffffff817301a2>] ? page_fault+0x22/0x30
kernel: [<ffffffff81730662>] ? system_call_fastpath+0x16/0x1b
kernel: Code: 24 48 4c 89 f7 e8 e3 79 ce e0 8b 4d 08 49 8b 54 24 28 8b 14 8a 41 89 55 00 49 8b 54 24 28 8b 4d 08 8b 75 04 89 34 8a 41 8b 55 00 <48> 0f b3 53 30 8b 55 04 48 0f ab 53 30 44 8b 83 d4 00 00 00 45
kernel: RIP [<ffffffffa0a481be>] ginput_setkeycode+0x5e/0xd0 [hid_ginput]
kernel: RSP <ffff8802d8399e30>
kernel: CR2: ffff8803309f6930
kernel: ---[ end trace 5041fef59d7e362b ]---
After this it's just a matter of time before the whole system goes down.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.