You are not logged in.

#1 2014-08-26 17:18:19

Ch33f
Member
Registered: 2014-07-31
Posts: 6

Apply fix to drivers

Hi everyone,

I hope I'm not in the wrong place for this and I hope this is not to nooby for this forum.

Anyway my problem:
The pressure of my Lenovo Thinkpad Yoga (Laptop/Tablet) is doing weired stuff.
The harder I press, the thicker the line gets... so far so good but(!) at some point the thickness jumps back to minimum and then increases again.

My research has led up to this: http://www.spinics.net/lists/linux-input/msg29435.html
Summary: The yoga has 1024 pressure levels but the driver only supports 512 wich leads to the described behaviour.


Now the part where I kindof feel a little nooby.
The site behind the link contains a patch and now I'm lost... I don't really know what to apply the patch to / where to get the sources.

I guess I could figure the rest out if you guys could help me find the packages/sources I need to apply the patch to. Of course I would post a summary of (hopefully) my success here once I am done.

I have some experience in building packages and my research has shown that I "only" need to run "patch [file]" whereas the [file] should contain the patch from the website.
The thing I am sadly not so familiar with is the way linux does drivers. From what I have gathered I think drivers are (always?) part of the kernel or at least kernelmodules.

Thanks a lot in advance!

Last edited by Ch33f (2014-08-26 17:19:31)

Offline

#2 2014-08-26 18:06:08

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Apply fix to drivers

Have you tried using ABS and adding the patch to the existing ones? You have to modify the PKGBUILD too.

Offline

#3 2014-08-26 18:25:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,671

Re: Apply fix to drivers

It is possible to build your own kernel, or to rebuild the existing kernel and install that patch.  Conceptually, to do that you will want to get the kernel sources and find drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c and apply those changes with the patch command.  Then make and install the kernel and/or just the module.  Easy.

The devil is in the details.   Depending on your skills, you might start by making a request in 'AUR Issues, Discussion, and PKGBUILD Requests" and see what happens.   Alternately, you could grab the package to make our kernel from the ABS, and add the patch to the package and build and install the modified 'linux' package. 

The quick and nasty way I would do it would be to grab the kernel sources from kernel.org, unpack it to a directory in your home,  Grab your running kernel configuration from /proc/config.gz, unpack it, and put that in with the kernel source, patch drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c, compile the kernel, find the module, and manually copy it to the appropriate place under /lib/modules.   

If you are interested in trying to compile the kernel (it really is not that bad), check our wiki, and also check the Gentoo Handbook on how to build a kernel.  The Gentoo documentation is excellent in this regard.  If you are not interested in taking on the kernel and its drivers, the best bet might be the asking for someone to write a PKGBUILD.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2014-08-26 19:25:48

Ch33f
Member
Registered: 2014-07-31
Posts: 6

Re: Apply fix to drivers

Thanks a lot for the quick answers! big_smile

That really does not sound to bad. It's not that I am afraid of building a kernel, it's just a thing that I never did before.

Since I wanted to get into ABS and packaging anyway, I might try it.
Just to make shure that my base idea is right:
I have installed abs and run "sudo abs" it now downloaded it.
My idea right now would be to use the core/linux as a base and add the patch that I need in there and rename it to something like "linux-highpressure" or so. Would that be the right idea?

Assuming I succeed do you guys think it would be interesting for the community? Meaning should I think about submitting it to the AUR?
Sorry for the many questions in one post but: Assuming you guys think it is actually interesting for the AUR, is it alright to take an existing package modify it a little and submit it as my own? That feels kind of wrong to me.

Offline

#5 2014-08-26 19:28:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,671

Re: Apply fix to drivers

Yes, you have the right idea.  You will want to copy the directory for the linux package to your home directory and build it there as a user, not root.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB