Looking For Tablet ROM With More Complete S-Pen Support

Search This thread

whitedavidp

Senior Member
Jul 31, 2012
632
185
Hello. I have written an app that helps to improve the accuracy of the S-Pen. It works only on Note phones because Samsung has compiled some S-Pen device driver interfaces out of the tablet ROMs. It is not clear why they did this. I have asked Samsung but gotten no replies. I have confirmed that parts of the kernel code is commented out in the open source kernel code (and you can see that some of the interface files found on phones do not exist on the tablets). It seems that the tablets suffer from the same issues related to the S-Pen as do the phones and I have many people asking me to make my app work on their tablets. I cannot do so with the stock ROMs because of the missing interface files.

So I am wondering if there any non-stock ROMs in which the S-Pen is more fully supported. The missing files are located on my phone in /sys/class/sec/sec_epen/ and the two files I need are called epen_hand and epen_rotation. If anyone knows of any ROMs for the S-Pen equipped tablets that provide these interface files, I would appreciate knowing and may be able to direct some folks to using them.

Thanks
 
  • Like
Reactions: Scorpion_Ibm

JSale

Senior Member
Jan 13, 2012
202
30
28
I can confirm that neither are present in Baked build 8, it might be worth checking a dump from the note 8.0

Regards
Jack
 

JSale

Senior Member
Jan 13, 2012
202
30
28
Any progress on this? It looks quite promising in the note 8.0 forums.
Regards
Jack
 

kcrudup

Senior Member
Mar 27, 2007
1,517
749
San Francisco Bay Area
I have confirmed that parts of the kernel code is commented out in the open source kernel code (and you can see that some of the interface files found on phones do not exist on the tablets). ... The missing files are located on my phone in /sys/class/sec/sec_epen/ and the two files I need are called epen_hand and epen_rotation ...
Well, since this is presumably a kernel issue, I'll look into it (PM me with your E-mail address) and IF there's anything that can be done about it (i.e., if the corresponding actions are available in the pen driver; it's not enough to just be able to integrate the sysfs entries) I'll add it into the kernels I release for the Note 10.1
 
  • Like
Reactions: JSale

whitedavidp

Senior Member
Jul 31, 2012
632
185
Well, since this is presumably a kernel issue, I'll look into it (PM me with your E-mail address) and IF there's anything that can be done about it (i.e., if the corresponding actions are available in the pen driver; it's not enough to just be able to integrate the sysfs entries) I'll add it into the kernels I release for the Note 10.1

Hello and thanks for responding/helping out. I am certainly no kernel programmer. But I have downloaded the kernel sources for a couple official Note devices/versions. I have been reading files located in kernel/drivers/input/touchscreen/wacom paying particular attention to the file wacom_i2c.c. I cannot help but note that some of the functions which appear to reference the driver i/o files that are missing are #def'ed out of certain devices - see line 837 #if defined(CONFIG_MACH_P4NOTE).

I have no idea if the Wacom devices used in the various Note models are the same (except for size) or are similar enough to be treated as the same by programs like mine. Heck, I am not even sure if Wacom devices are being used in all the Note models. So I am afraid I am not much in the way of technical help here.

What I do know is that some custom ROMs for Note I and II phones seem to have been created with drivers that DO support and create the needed driver i/o files but which lack the device settings and other mechanisms which actually take advantage of these i/o files. Basically, they do not offer a dominant hand setting nor do they seem to communicate to the Wacom device when an orientation change is detected. I have been able, through my app, to compensate for these lapses on those devices and thereby improve the SPen's accuracy.

I have had users wanting to get the same effect on Note tablets with my app. So I presume they are experiencing the same type of problem on their tablets that I experienced on my Note I phone that led me to get into all of this. But I know that my app cannot help them unless the i/o files are there.

I was surprised to hear, over in the Note 8 forum that the files do exist on those devices. I know from a tester that my app at least runs on the Note 8. But I don't know if it helps any since that tester was not seeing the problem my app is designed to fix. But I read here that the files are not on the larger Note tablets. I don't know why and have asked Samsung and get basically no answer. My underlying assumption is that the Wacom devices are basically the same but I cannot answer why Samsung treats them as different.

I am sure all of this doesn't help much. Sorry. All I would like to do is try to find a way to offer support to the tablet users who want it.

Cheers!
 
  • Like
Reactions: JSale

kcrudup

Senior Member
Mar 27, 2007
1,517
749
San Francisco Bay Area
But baked is based on CyanogenMod
Oh, then yeah- as I suspect CM won't have any of the SPen goodies. My bad.

In any case, let me know. It was a very trivial fix and didn't appear to break anything. I don't use the SPen much at all, but a quick test with SNote appears that everything still seems to work OK.

(But I did notice that the stock Samsung ROM (CMD2) does set these variables, which is unusual as these sysfs entries "shouldn't exist", but it seemed to (re)set them to default values. I wonder if this is used as part of a version check of some sort?)
 

JSale

Senior Member
Jan 13, 2012
202
30
28
Well, after a little bi of testing, I can conclude that this fix has indeed improved the accuracy of the s-pen. It is hard to tell by how much, as I never had very terrible offsets myself, but at the edge of the screen, this has reduced the offsets by an observable amount.

Would it be possible to get the kernel fix implemented into the app so that I can use it on Baked rom ?

Many regards for all the hard work
Jack
 
  • Like
Reactions: aftnoon2

whitedavidp

Senior Member
Jul 31, 2012
632
185
Well, after a little bi of testing, I can conclude that this fix has indeed improved the accuracy of the s-pen. It is hard to tell by how much, as I never had very terrible offsets myself, but at the edge of the screen, this has reduced the offsets by an observable amount.

Would it be possible to get the kernel fix implemented into the app so that I can use it on Baked rom ?

Many regards for all the hard work
Jack

Wow! Thanks for the testing and for the feedback on your results. This is quite interesting. I am not quite sure I can integrate this sort of thing into my app although it may be possible. The kernels for the Samsung devices I have looked at seem quite monolithic rather than modular. But I do know that one app, TouchScreenTune, does something that fiddles with the kernel in some way I do not fully understand. So perhaps. I would sure need help and direction. But it would be very cool indeed.
 

kcrudup

Senior Member
Mar 27, 2007
1,517
749
San Francisco Bay Area
Would it be possible to get the kernel fix implemented into the app so that I can use it on Baked ROM?
Well, the "kernel", the "ROM" and whichever app it uses are quite different things, but at least I can offer up the "commit" that makes it possible in the kernel (which has to then be pasted into a ROM). Have a/the Dev PM me.

But I do know that one app, TouchScreenTune, does something that fiddles with the kernel in some way I do not fully understand.
Most likely via a "sysfs" file, which seems to be the preferred method for this driver.
 

whitedavidp

Senior Member
Jul 31, 2012
632
185
Well, the "kernel", the "ROM" and whichever app it uses are quite different things, but at least I can offer up the "commit" that makes it possible in the kernel (which has to then be pasted into a ROM). Have a/the Dev PM me.


Most likely via a "sysfs" file, which seems to be the preferred method for this driver.

If I want to point users of my app to your kernel as a means of gaining more SPen support, where should I send them? Does the Kernel have a main web page? And if so, what version should I point them towards? Thanks
 

kcrudup

Senior Member
Mar 27, 2007
1,517
749
San Francisco Bay Area
If I want to point users of my app to your kernel as a means of gaining more SPen support, where should I send them?
Well, right now the only kernel that's got this particular support is the one I've posted here- but every now and then I post up a kernel boot.img file for the latest Android Revolution ROM and for Darkman's latest Stock ROM and this patch will be included in those going forward. Most boot.img files among the various Note 10.1 devices are close enough that they'll almost always work for any ROM, Stock or Custom.

I don't keep any seperate thread or site for my kernel, as I'm really just sharing my own personal (yet improved and faster) kernel for Note 10.1 devices (and frankly don't feel like dealing with the inevitable newbie questions that a standalone offering would generate).

But I have a number of commits I'm about to push to my GitHub page; once I do that (give me a day or two, I've made some major changes to the kernel source and I'll need to verify all's well before I make them Public) I'll come back here with the GitHub commit web-page URL, then you can pass that to any ROM/Kernel dev and they can easily incorporate it in their particular builds (it's a really trvial patch, too- I just removed the 3 "#else" directives embedded in the "#ifdef CONFIG_MACH_P4NOTE" conditionals).
 

whitedavidp

Senior Member
Jul 31, 2012
632
185
Well, right now the only kernel that's got this particular support is the one I've posted here- but every now and then I post up a kernel boot.img file for the latest Android Revolution ROM and for Darkman's latest Stock ROM and this patch will be included in those going forward. Most boot.img files among the various Note 10.1 devices are close enough that they'll almost always work for any ROM, Stock or Custom.

I don't keep any seperate thread or site for my kernel, as I'm really just sharing my own personal (yet improved and faster) kernel for Note 10.1 devices (and frankly don't feel like dealing with the inevitable newbie questions that a standalone offering would generate).

But I have a number of commits I'm about to push to my GitHub page; once I do that (give me a day or two, I've made some major changes to the kernel source and I'll need to verify all's well before I make them Public) I'll come back here with the GitHub commit web-page URL, then you can pass that to any ROM/Kernel dev and they can easily incorporate it in their particular builds (it's a really trvial patch, too- I just removed the 3 "#else" directives embedded in the "#ifdef CONFIG_MACH_P4NOTE" conditionals).

Thanks very much once again!
 

Scorpion_Ibm

Senior Member
Jun 14, 2013
123
14
Cairo
Thanks very much once again!
The app seems to work with this kernel :good:

Well, right now the only kernel that's got this particular support is the one I've posted here- but every now and then I post up a kernel boot.img file for the latest Android Revolution ROM and for Darkman's latest Stock ROM and this patch will be included in those going forward. Most boot.img files among the various Note 10.1 devices are close enough that they'll almost always work for any ROM, Stock or Custom.

I don't keep any seperate thread or site for my kernel, as I'm really just sharing my own personal (yet improved and faster) kernel for Note 10.1 devices (and frankly don't feel like dealing with the inevitable newbie questions that a standalone offering would generate).

But I have a number of commits I'm about to push to my GitHub page; once I do that (give me a day or two, I've made some major changes to the kernel source and I'll need to verify all's well before I make them Public) I'll come back here with the GitHub commit web-page URL, then you can pass that to any ROM/Kernel dev and they can easily incorporate it in their particular builds (it's a really trvial patch, too- I just removed the 3 "#else" directives embedded in the "#ifdef CONFIG_MACH_P4NOTE" conditionals).

I really want to know what are the features of this kernel ... would i keep it or there are other ones that have this functionality right now?? OR could just this changes be added to the Stock kernel to only have Spen support .. as i dont want any OC or custom governers :good: :good:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I can confirm that neither are present in Baked build 8, it might be worth checking a dump from the note 8.0

    Regards
    Jack

    Jack, some replies to postings in the Note 8 section indicate that the two files are present on the stock ROM there. Interesting... I am downloading a dump of the 10.1 now to see if I can see anything. Thanks
    1
    Hello. I have written an app that helps to improve the accuracy of the S-Pen. It works only on Note phones because Samsung has compiled some S-Pen device driver interfaces out of the tablet ROMs. It is not clear why they did this. I have asked Samsung but gotten no replies. I have confirmed that parts of the kernel code is commented out in the open source kernel code (and you can see that some of the interface files found on phones do not exist on the tablets). It seems that the tablets suffer from the same issues related to the S-Pen as do the phones and I have many people asking me to make my app work on their tablets. I cannot do so with the stock ROMs because of the missing interface files.

    So I am wondering if there any non-stock ROMs in which the S-Pen is more fully supported. The missing files are located on my phone in /sys/class/sec/sec_epen/ and the two files I need are called epen_hand and epen_rotation. If anyone knows of any ROMs for the S-Pen equipped tablets that provide these interface files, I would appreciate knowing and may be able to direct some folks to using them.

    Thanks
    1
    I have confirmed that parts of the kernel code is commented out in the open source kernel code (and you can see that some of the interface files found on phones do not exist on the tablets). ... The missing files are located on my phone in /sys/class/sec/sec_epen/ and the two files I need are called epen_hand and epen_rotation ...
    Well, since this is presumably a kernel issue, I'll look into it (PM me with your E-mail address) and IF there's anything that can be done about it (i.e., if the corresponding actions are available in the pen driver; it's not enough to just be able to integrate the sysfs entries) I'll add it into the kernels I release for the Note 10.1
    1
    Well, since this is presumably a kernel issue, I'll look into it (PM me with your E-mail address) and IF there's anything that can be done about it (i.e., if the corresponding actions are available in the pen driver; it's not enough to just be able to integrate the sysfs entries) I'll add it into the kernels I release for the Note 10.1

    Hello and thanks for responding/helping out. I am certainly no kernel programmer. But I have downloaded the kernel sources for a couple official Note devices/versions. I have been reading files located in kernel/drivers/input/touchscreen/wacom paying particular attention to the file wacom_i2c.c. I cannot help but note that some of the functions which appear to reference the driver i/o files that are missing are #def'ed out of certain devices - see line 837 #if defined(CONFIG_MACH_P4NOTE).

    I have no idea if the Wacom devices used in the various Note models are the same (except for size) or are similar enough to be treated as the same by programs like mine. Heck, I am not even sure if Wacom devices are being used in all the Note models. So I am afraid I am not much in the way of technical help here.

    What I do know is that some custom ROMs for Note I and II phones seem to have been created with drivers that DO support and create the needed driver i/o files but which lack the device settings and other mechanisms which actually take advantage of these i/o files. Basically, they do not offer a dominant hand setting nor do they seem to communicate to the Wacom device when an orientation change is detected. I have been able, through my app, to compensate for these lapses on those devices and thereby improve the SPen's accuracy.

    I have had users wanting to get the same effect on Note tablets with my app. So I presume they are experiencing the same type of problem on their tablets that I experienced on my Note I phone that led me to get into all of this. But I know that my app cannot help them unless the i/o files are there.

    I was surprised to hear, over in the Note 8 forum that the files do exist on those devices. I know from a tester that my app at least runs on the Note 8. But I don't know if it helps any since that tester was not seeing the problem my app is designed to fix. But I read here that the files are not on the larger Note tablets. I don't know why and have asked Samsung and get basically no answer. My underlying assumption is that the Wacom devices are basically the same but I cannot answer why Samsung treats them as different.

    I am sure all of this doesn't help much. Sorry. All I would like to do is try to find a way to offer support to the tablet users who want it.

    Cheers!
    1
    Try this kernel: http://goo.gl/OBJ4O (PM also sent).