-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
out of memory #12
Comments
this log was taken out of an adb shell so i could create the issue on my laptop |
Yes the mistery we need to solve is this: why is kernel settings like CONFIGFS_F_HID is not effective? We've set it to =y and doesn't happen, although the kernel is flashed, everything else works as expected after our usual patches. I know it's not really an app issue, but you might have a clue @tejado Is there any samsung limitations? |
do you mean some kind of hardware limitation in the exynos chip by 'samsung limitation'? |
Perchaps |
@krzk we need your help. |
CONFIGFS_F_HID is a kernel configuration option, so it's not connected with anything in hardware. Why is it not enabled? You need to check your kernel config. It's difficult to help as I don't know which kernel you are using. The initial report about out of memory looks like user-space problem. To be sure - you can run "dmesg" on the device or try to get kernel logs from adb. The OOM-killer or page allocation failures (when there is not enough of memory for Linux kernel) should be reported. |
Looking slightly more - here out of memory seems to be after mkdir: '/config/usb_gadget/keyboard'. What type of file system is /config? configfs (USB_CONFIGFS_F_HID depends on it)? Or maybe it's something specific to Android? Just to clarify - I maintain the Samsung Exynos SoC for mainline Linux kernel, which is my hobby. If you use Linux kernel coming from a market device - so called vendor or Samsung Android kernel - it deviates from mainline by ~1 - 2 millions of lines of code. It's basically entirely different piece of software, a fork... That code is not maintained by anyone - neither by me, nor by Samsung. |
so i am currently running nezukoOS built on this kernel https://github.com/synt4x93/android_kernel_samsung_universal9810, and obviously it does not work. |
That's Exynos9810, so definitely a vendor kernel. Also commit "import N960FXXU5DTCA OSRC" points to it. It can work, it might not. It might be buggy, might not. Might be doing things entirely different than Linux kernel ( Support is only for the things in the upstream. If someone decides not to upstream source code, he/she needs to live with the outcome. |
@krzk nice to meed you :-) /config is the USB Gadget ConfigFS filesystem - so not Android specific. We have two issues here:
I'm happy to look together on this issue. I have more deeper kernel logs on this (e.g. by adding more debug messages to /drivers/usb/gadget/configfs.c and co) but they were not helpful for me. |
I am afraid the only reasonable hint I can give is to dump this kernel from Samsung. It's full of hacks, not-upstreamed code and pieces of questionable quality. More over, it differs from the mainline so whatever I would say, might not be applicable here. Unfortunately if you ever use vendor kernel, you are entirely on your own (assuming vendor does not care). |
Okay, thanks but I will not dump it ;) Samsung is not the only Kernel with this issue, so I want to know the cause of the ffs.adb conflict and if there is a chance to resolve it (even with a kernel patch). |
|
Sorry, what do you mean? :-) Is the kernel config now showing that it is enabled? |
Okay, can you provide more info? Did you add then ffs.hid to the gadget (app log + dmesg log) ? And if this worked, is ffs.adb still enabled on the same gadget or not (did you created a separate gadget?) ? |
The DWC USB controller itself does not care, neither does driver in mainline kernel. The vendor could do many things with it, including disabling of specific feature etc. |
Try to add this repos but same, not working. I mean usb, permissive and config. |
ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir/configs/; echo CONFIG_PATH="$dir/configs/ ROOT (stdout) - GADGET_PATH=/config/usb_gadget/g1/
|
Yes, I thought that the conflict is not inside the controller. But I want to understand it and fix it inside the (kernel) source - if even possible. |
@CyberKid1987 good luck... I have an Samsung S8 here and so far I was not able to get it working due to the described issue of the ffs.adb conflict. |
ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir/configs/; echo CONFIG_PATH="$dir/configs/ ROOT (stdout) - GADGET_PATH=/config/usb_gadget/g1/
|
On the Note it is working? This could be helpful. Do you have a kernel source from a working Note ROM? Then I can dig into it. |
ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir/configs/; echo CONFIG_PATH="$dir/configs/ ROOT (stdout) - GADGET_PATH=/config/usb_gadget/g1/
|
Please don't paste always the log as it will hard to follow the github issue. Thank you. |
@tejado finally had some time to pop in here. Note 9 has kernel 4.9.x. So where are we at:
I'll push our patches and defconfig, without HID patch This init version works for most phone (which needs it at all) In my opinion, patch shouldn't be needed at all. See S20 FE 5G works without, patch or init file. Although there's something worth try he mentions: disable ADB |
Yes, disabling ADB needs to be done so HID function can work (as I wrote above). |
Yes, show enable but usb gadget not working |
Ok ADB was disabled all the time. Will get dmesg. Now the kernel will be unpatched for first test |
Dmesg file is here https://fromsmash.com/nfV.kUxWc0-dt With New xevs kernel when i give su -c setprop sys.usb.config win,mtp,hid,adb;exit I see hid.0-1 on usb gadget. |
New dmesg after reboot, type + mouse and keyboard |
I am running lineageos 18.1 (android 11 with magisk root) on a samsung note 9 N-960f. I was met with the same issue with OneUI2.5 rom (android 10 with magisk root). I have downloaded the source and tried manually executing the shellscripts for gadget creation but it gives the same 'out of memory' error. I also tried manually creating the directories within /config/usb_gadget and i get the same 'out of memory' error.
The text was updated successfully, but these errors were encountered: