nexus511 / gpd-ubuntu-packages

This repository shall provide the base for building ubuntu packages from most of the patches currently used to get linux on the gpd-pocket.
GNU General Public License v3.0
73 stars 4 forks source link

Bluetooth does not work on Kernel 4.13.0-2 #26

Closed nexus511 closed 6 years ago

nexus511 commented 7 years ago

It looks like there is some firmware missing to support bluetooth on the current kernel.

GothAck commented 7 years ago

Bizarrely the kernel is now trying to load BCM4354A2 firmware for this device, whereas -1 loaded BCM2045A0. I believe the pocket has the latter (BCM2045) chipset. Did anything else change between builds? I can't seem to get the external/kernel submodule to behave, (fetched submodule but it did not contain $commithash...)

nexus511 commented 7 years ago

@GothAck Thank you for looking at this. I guess that this might be the issue.

I might have not yet pushed the version to github. I will do that later. It basically is the drm-intel-next-queued branch by @jwrdegoede.

nexus511 commented 7 years ago

@GothAck Okay, I just pushed the branch. It is merge/kernel-drm-next.

GothAck commented 7 years ago

Still getting Fetched in submodule path 'external/kernel', but it did not contain 657a724d246d7c5e9504fe3cb978e1bac889b1bb. Direct fetching of that commit failed. on submodule update :/

GothAck commented 7 years ago

The Makefile also tries to run scripts that don't exist, where does external/kernel/patch_kernel come from?

nexus511 commented 7 years ago

@GothAck Please really use this branch on the kernel submodule:

https://github.com/nexus511/linux-sunxi/tree/merge/kernel-drm-next

Then you should have the right version and the scripts.

GothAck commented 6 years ago

Ah cool, I'll update my clone of the repo to point there :)

stockmind commented 6 years ago

No problem with bluetooth on mainline 4.14-rc1, but i have the same problem with bluetooth missing in Hans master repository 4.14-rc1. @jwrdegoede could be some differences related to the bluetooth modules on your repository?

nickelby commented 6 years ago

No problem with bluetooth on mainline 4.14-rc2 as well (although wifi seems to no longer work on this kernel. Always tries to connect with dmesg showing some 'create' errors).

nexus511 commented 6 years ago

I actually tried Hans kernel to rebase onto 4.14-rc1 which basically works flawlessly. After doing so, I still do not have bluetooth and the battery indicator is gone.

I actually have an update of Hans kernel build and available but I did not publish it yet, as it seems not to bring any advantages for now.

GothAck commented 6 years ago

Which commit were the previous two kernels (-1 and -2) based on? Having suspend and reboot issues on the latest commit, although I'm still trying to poke at getting BT working

GothAck commented 6 years ago

Out of interest, why do we use sunxi as the upstream for the kernel?

GothAck commented 6 years ago

Gonna try building against mainline 4.14-rc2 and see what's up there

nexus511 commented 6 years ago

@GothAck We are using this kernel because it contains multiple patches for the platform. I have built the mainline 4.14-rc1 two days ago and it for me it lacks wireless-lan and when I rebase Hans patches onto it, it does not detect the battery anymore.

If you find a way to get 4.14-rc2 working, please give me a hint and I will switch over to it.

Herst commented 6 years ago

@GothAck Hans rebases his kernel on the vanilla kernel regularly, I don't remember seeing any Sunxi patches there.

GothAck commented 6 years ago

4.14-rc2 is working with wlan, bluetooth, and besides trying to load two different modules for the max17047 it does show the battery gauge (detected as a different max17xxx variant, but the data is consistent with previous kernels). Next I wanna look at any patches that are applied in Hans' repo and try and grok if they're still applicable on mainline :)

I mentioned sunxi as the repo description is "Linux source for Allwinner/Boxchip F20 (sun3i), A10 (sun4i) and A12/A13 (sun5i) SoCs" and it seems to be originally forked from https://github.com/linux-sunxi/linux-sunxi which is a pretty weird source for a kernel that doesn't actually run on sunxi chips. Last time I interacted with that source repo I was running on sunxi hw and they have a tonne of platform specific patches that were not being pushed upstream for $reasons, which gpd pocket won't ever use.

Totally happy to try building from the original source of drm-next also (https://cgit.freedesktop.org/~airlied/linux/log/?h=drm-next) to see if there are any improvements to the graphics hw support, but besides some weird renders before I was doing the new builds, I've not seen any graphics issues recently :)

If all goes well with mainline we can prob move the patch & build scripts into this repo & refer directly out to the linux upstream too :)

nexus511 commented 6 years ago

@GothAck for a rebase on 4.14.0-rc1 please see https://github.com/nexus511/linux-sunxi/tree/development/India-2

I might just have missed the battery modules. I might try it again the next days to see, what went wrong there. But this ticket is about bluetooth. Let's maybe move this discussion to a new ticket. (#34)

jwrdegoede commented 6 years ago

Hi All,

So I've been spending some time looking at the bluetooth problems people have been reporting with my kernels.

The GPD win which uses the same BCM4356A2 wift/bt combo as the GPD pocket has the bt part of the combo attached via an UART (/dev/ttyS4) where as the GPD pocket seems to be using USB.

A couple of weeks ago I've written a patch adding support for the GPD win's UART bluetooth which uses ACPI-id BCM2E7E.

This commit is what is causing the issues on the pocket, as it too declares having an BCM2E7E ACPI device and when initializing that device the bt part of the BCM4356A2 switches over to UART mode as it turns out on the pocket it is connected through both USB and UART.

This probably also explains the weird 0000:0000 vid:pid combo on the GPD pocket which commit 9834e586fa works around.

Given that windows seems to be using the device in UART mode and the weird 0000:0000 USB-ID, which points to the USB bits not being configured, I believe that the device should really be used in UART mode.

The problem with UART mode is that until now it requires running a btattach command from userspace to hookup the Bluetooth subsystem to the serial port. People have been working on making the kernel automatically hook this up, without requiring userspace intervention. I've added these patches + some further fixes to my kernel and now bluetooth will work ootb without requiring users to manually run btattach from userspace.

TL;DR: Yes bluetooth was broken (needed a manual btattach from userspace) with my kernels. This is fixed with my latest master branch.

Regards,

Hans

jwrdegoede commented 6 years ago

Hi All,

So some people have been wondering why use my kernel instead of vanilla 4.14-rc# ?

My kernel has a bunch of patches pending upstream which improve the user experience on the GPD pocket (and win):

1) My kernels support USB PD on the Type-C connector, resulting in charging at 12V / 2A (stock charger) instead of 5V / 0.5A

2) My kernels support SuperSpeed USB data over the Type-C connector, this also somewhat works with the vanilla kernel but only if a device is already plugged in at boot.

3) My kernels have various other bug-fixes, e.g.: -Fix waking up by the power button to often result in an immediate re-suspend -Fix some i915 kernel oopses and race conditions -Patches to notify userspace that the screen needs to be rotated (this requires userspace, e.g. mutter patches)

Also some people have been wondering about the linux-sunxi repo name, yes I used to work on Allwinner SoC support (for the mainline kernel) but I'm no longer working on that and my master branch is closely tracking Linus Torvald's master branch with various fixes (mostly GPD related) on top.

Regards,

Hans

vStone commented 6 years ago

@jwrdegoede I've been struggling to get the correct patches to apply on my gentoo-sources. Could you somewhere give any pointers on what would be the easiest way to get all patches related to the gpd pocket on a 4.13.4 kernel? (sorry for abusing this thread)

joshskidmore commented 6 years ago

@jwrdegoede - Thank you so much for this update! I just compiled your master branch on Arch for my GPD Pocket and everything works perfectly! Amen for USB-C data AND bluetooth!

snazzybunny commented 6 years ago

@joshskidmore - could you by any chance provide any info on how to compile the master branch and installing the custom kernel on Arch or point me in the right direction? Thanks!

joshskidmore commented 6 years ago

@snazzybunny - I'm using the Arch packaging scripts found here.

nexus511 commented 6 years ago

Please keep in mind that this is an issue tracker and not a general purpose discussion forum.

Questions on how to build a kernel are completely unrelated to this issue. If you want to ask such questions, please create a new bug as useful posts might get lost in the general noise here otherwise.

snazzybunny commented 6 years ago

Oops - sorry about that. Will a sudo apt update; sudo apt install gpdpocket update me to the latest working kernel with the working bluetooth?

nexus511 commented 6 years ago

Kernel 4.14.0-10.gpd has been build and should be available via

apt update && apt upgrade

The kernel now supports bluetooth again.

stephen-hocking commented 6 years ago

Thank you very much!

On 12 Oct. 2017 08:08, "nexus511" notifications@github.com wrote:

Kernel 4.14.0-10.gpd has been build and should be available via

apt update && apt upgrade

The kernel now supports bluetooth again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nexus511/gpd-ubuntu-packages/issues/26#issuecomment-335948876, or mute the thread https://github.com/notifications/unsubscribe-auth/AM84bMUeN61iAQK92zzim_zsopbhCcZVks5srS4wgaJpZM4PSD4o .

unoexperto commented 6 years ago

Guys, does anyone have problems with their bluetooth and wifi 2.4 GHz ? Two doesn't work together but if I use 5 GHz wifi bluetooth connection stays. Problem first showed up when I upgraded from 4.12 to 4.13 (not sure what minor version it was). But today I upgraded 4.14.0-041400-generic and I still can't use mouse while connected to wifi :(

I'm on Linux Mint 18.2

Could anyone suggest what to do ?

bkchr commented 6 years ago

@unoexperto I have the same problem and judging on this ticket, the bug is known upstream. I think we have to wait for a fix on upstream.

unoexperto commented 6 years ago

@bkchr Emmanuel published pre-release version of BT driver and problem is fixed for me (Jack Daniels in the thread): https://bugzilla.kernel.org/show_bug.cgi?id=197147