Created attachment 1488678 [details] OTG hub Description of problem: I have the lynx7 tablet. This tablet has no separate plug for charger. The charger and USB devices can be connected to the one microUSB plug only. I bought the special mobile otg usb hub for tablet. This hub can be connected to tablet’s microUSB plug. The charger and up to 4 USB devices can be connected to this hub. This hub supports the special mode in which the USB devices and tablet charging work simultaneously. The simultaneous mode works well with 4.16.3 and 4.17.* kernels. But with 4.18.* kernels this mode does not work normally. The USB devices on the hub do not work. The charging works. Version-Release number of selected component (if applicable): Current 4.18.9 and all 4.18.*. How reproducible: Always. Steps to Reproduce: 1. Install Fedora 28 to lynx7 tablet. 2. Upgrade all packages including kernel. 4. Switch the USB hub to simultaneous otg+charging mode (1). 3. Check the work of USB devices that are are connected to USB hub. Actual results: The USB devices on USB hub do not work. Expected results: The USB devices on USB hub must work. Additional info:
Admin, I do not see how to fix the description. Please fix it yourself. Steps to Reproduce: 1. Install Fedora 28 to lynx7 tablet. 2. Upgrade all packages including kernel. 3. Switch the USB hub to simultaneous otg+charging mode (1). 4. Check the work of USB devices that are are connected to USB hub.
Created attachment 1488680 [details] kernel 4.16.3 dmesg
Created attachment 1488681 [details] kernel 4.18.9 dmesg
Created attachment 1488682 [details] lsmod output with kernel 4.16.3
Hello, This bug is not really a bug I'm afraid. Your otg hub has a 1-2-3 switch with the following meanings (I have one myself): 1) Charge (id-pin of the micro-usb floating) 2) ACA mode (70k pulldown on id-pin) 3) Host mode (id-pin shorted to ground) Except for the ACA mode, there is no such thing as a otg_charging mode in the USB specification and the lynx7 does not have hardware to detect ACA mode, it will treat it the same as either 1 or 3. Things used to work due to a bug in the Linux kernel where it would not take the initial state of the otg/charge switch on your otg-hub into account. So if you put it in position 1, then it would happily charge while not touching the mux which switches the data lines between the host controller (needed for the hub to work) and the device-controller (needed for USB gadget mode to work, so that the tablet can e.g. operate as a storage device seen from a PC). If you take a 4.17 kernel and then throw the switch from 1 to 3 and back to 1 again you will see that you end up with a tablet which is charging but not seeing any devices connected to the hub. This is the same as what is happening with kernel 4.18, which now actually checks the location of the switch as boot and then switches to device mode, so the hub will not work. Summarizing earlier kernels had a bug where they would not read the position of the switch on your hub at boot, this accidentally made it possible to use the charge and hub functions at the same time. Now that this bug is fixed this unfortunately no longer is possible. Regards, Hans p.s. This is caused by this fix which is in 4.18: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca876c7483b697b498868b1f575997191b077885
Created attachment 1488683 [details] lsmod output with kernel 4.18.9
Created attachment 1488684 [details] Errors from journalctl with kernel 4.18.9
Hans, it is very sad that I can not use charge and hub functions at the same time now with kernel 4.18. I connected the bluetooth adapter, keyboard, mouse to hub. The tablet do not have the strong battery and need charging regularly. If I change the hub mode all USB devices stop to work. Also often changing hub mode is inconvenient and wear out the switcher. This tablet also has the Windows 9 and there is no such problem with it. Are there some workarounds? Where can I get the last 4.17 kernel rpms for Fedora? It was not saved on the tablet. :( Maybe very first 4.18 kernel will help too.
The hub modes: 1 - simultaneous hub + charging. 2 - hub only. 3 - charging only.
You can find the latest Fedora 4.17 kernel here: https://koji.fedoraproject.org/koji/buildinfo?buildID=1139102 Installation instructions for kernels from koji are here: https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt
Thank you very much.
I found the first 4.18.0 kernel here: https://koji.fedoraproject.org/koji/buildinfo?buildID=1129888 It solved the problem.
*********** MASS BUG UPDATE ************** We apologize for the inconvenience. There are a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs. Fedora 28 has now been rebased to 4.20.5-100.fc28. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 29, and are still experiencing this issue, please change the version to Fedora 29. If you experience different issues, please open a new bug report for those.
In 4.20 kernel this bug still exists. The simultaneous charging and USB devices work is impossible. I connected the mouse and flash drive to USB otg hub. The check result is following: Mode 1: the charging only works. Mode 2: nothing works. Mode 3: the USB devices only works.
(In reply to sergiyvovk69 from comment #14) > In 4.20 kernel this bug still exists. > The simultaneous charging and USB devices work is impossible. > > I connected the mouse and flash drive to USB otg hub. The check result is > following: > Mode 1: the charging only works. > Mode 2: nothing works. > Mode 3: the USB devices only works. As explained in detail in comment 5, this is simply how your hardware works. Micro USB OTG ports typically do not allow both charging and being host at the same type, you need a USB-PD supporting Type-C port for that. That things used to work before under certain circumstances was due to a bug which has since been fixed. Note that things only worked before when the oth-hub you are using was already inserted at boot, since the firmware left the port in host mode independent of the ID pin of the OTG port, this broke device mode when booting in device mode. You we're accidentally relying on the broken device mode. Since the broken which has been fixed, as a side effect you can now no longer charge and use the port in host mode at the same time this is according to the OTG spec.
Ok. I agree. BTW now the USB hub is not important because you did a normal bluetooth driver and I can connect the devices through bluetooth. Thank you!!!