Skip to content
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

Bluetooth and Dual Shock 3 Playstation Remote will crash System. #1360

Closed
coniferous1 opened this issue Mar 21, 2016 · 122 comments
Closed

Bluetooth and Dual Shock 3 Playstation Remote will crash System. #1360

coniferous1 opened this issue Mar 21, 2016 · 122 comments

Comments

@coniferous1
Copy link

Hello All,

Looking to report a bug with the bluetooth on raspberry pi three with dual shock 3 playstation controllers.

When connected to one controller intermittently I get these errors (around once an hour, but it's pretty random). It seems like a driver issue, But I'll experiment with anything that will help me fix the issue.

Mar 21 21:45:58 retropie kernel: [ 2372.052392] Bluetooth: hci0: Frame reassembly failed (-84)
Mar 21 21:45:58 retropie kernel: [ 2372.052572] Unable to handle kernel paging request at virtual address ffffffc8
Mar 21 21:45:58 retropie kernel: [ 2372.060430] pgd = 80004000
Mar 21 21:45:58 retropie kernel: [ 2372.063467] [ffffffc8] *pgd=2effa821, *pte=00000000, *ppte=00000000

Message from syslogd@retropie at Mar 21 21:45:58 ...
kernel:[ 2372.070115] Internal error: Oops: 17 [#1] SMP ARM

uname -r reports:

4.1.19-v7+

Not a linux Guru, if this is the wrong place or you need more information please let me know.

@pelwell
Copy link
Contributor

pelwell commented Mar 22, 2016

If you can post the whole of the crash dump - down to the "---[ end trace ..." if possible - then it might just help to debug this.

@coniferous1
Copy link
Author

Hey @pelwell ,

Working on getting this now. First time I've created a crash dump so I might be a bit, working on acquiring the prerequisite knowledge.

@pelwell
Copy link
Contributor

pelwell commented Mar 23, 2016

I was thinking that you could just include more of the output in /var/log/syslog. I've never tried to get a crash dump for a kernel crash, and I'm not sure it would work.

@coniferous1
Copy link
Author

That's sort of my thinking as well. It seems that IO simply stops when this occurs. Not sure if I can pipe it out the serial when this happens or not, but I'm looking into that.

In the meantime I'll get more information from /var/log/syslog and post it here as soon as I get home.

@pelwell
Copy link
Contributor

pelwell commented Mar 23, 2016

Alternatively, if you can provoke it with the text console visible (Ctrl-Alt-F1, Ctrl-Alt-F7 to get back to the desktop) then adding framebuffer_height=2160 to config.txt may allow you get the whole backtrace onto the screen where you can photograph it.

@coniferous1
Copy link
Author

Generally it happens with emulators open and me actively using the game pad, but I'm going to try that and mash on the buttons furiously while copying some files in the background and see what happens.

@coniferous1
Copy link
Author

I'm having trouble reproducing this error and being able to capture the trace. I can only seem to get it to happen when emulation station is actively doing something, witch stops me from looking at the text console.

@ruiveir
Copy link

ruiveir commented Mar 30, 2016

Having the same issue here, also unable to get any trace other than the one previously mentioned.

The system only seems to freeze when displaying something heavier than a TTY on screen, I've had these freezes occur while watching video on kodi, playing some games with emulationstation or working with something on a xfce session but never when looking at a TTY, even if something heavy is running in the background.

I did once get only a partial bluetooth fail while attempting to trigger the freeze:

Mar 30 01:53:08 PIPPLWARE dbus[429]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'
Mar 30 01:53:08 PIPPLWARE systemd[4992]: Failed at step EXEC spawning /usr/lib/bluetooth/bluetoothd: Permission denied
Mar 30 01:53:08 PIPPLWARE systemd[1]: bluetooth.service: main process exited, code=exited, status=203/EXEC
Mar 30 01:53:08 PIPPLWARE systemd[1]: Failed to start Bluetooth service.
Mar 30 01:53:08 PIPPLWARE systemd[1]: Unit bluetooth.service entered failed state.
Mar 30 01:53:33 PIPPLWARE dbus[429]: [system] Failed to activate service 'org.bluez': timed out

Another thing of note is that the bluetooth service often fails to start once before actually starting during system startup.

@ghost
Copy link

ghost commented Mar 30, 2016

I'm pretty sure i have the exact same problem, but mine is triggered from a nodejs-program, therefore i'm in the console when it happens, and thus i have logs. I hope they help:

[ 1299.902456] Bluetooth: hci0 unexpected SMP command 0x02 from c8:0f:10:28:ab:51
[ 1300.037106] Bluetooth: hci0 unexpected SMP command 0x03 from c8:0f:10:28:ab:51
[ 1300.292100] Bluetooth: hci0 unexpected SMP command 0x04 from c8:0f:10:28:ab:51
[ 1300.697121] Bluetooth: hci0 unexpected SMP command 0x06 from c8:0f:10:28:ab:51
[ 1300.925752] Bluetooth: hci0: Frame reassembly faild (-84)
[ 1300.931428] Bluetooth: hci0 unexpected SMP command 0x07 from c8:0f:10:28:ab:51
[ 1301.111148] Unable to handle kernel paging request at virtual address ffffffc8
[ 1301.118563] pgd = 80004000
[ 1301.121372] [ffffffc8] *pgd=3dffa821, *pte=00000000, *ppte=00000000
[ 1301.127833] Internal error: Oops: 17 [#1] SMP ARM

Entering kdb (current=0xbbcb6d40, pid 367) on processor 0 Oops: (null)
due to oops @ 0x07f3c8c20
CPU: 0 PID: 367 Comm: kworker/0:3 Not tainted 4.1.20-v7+ #867
Hardware name: BCM2709
Workqueue: events flush_to_ldisc
task: bbcb6d40 ti: b9db4000 task.ti: b9db4000
PC is at h4_recv_buf+0x34/0x22c [hci_uart]
LR is at h4_recv+0x50/0x98 [hci_uart]
pc : [<7f3c8c20>]    lr : [<7f3c8e68>]    psr: a0000013
sp : b9db5e38  ip : b9db5e68  fp : b9db5e64
r10: 00000008  r9 : 00000008  r8 : bb22d000
r7 : 7f3ca194  r6 : bb067c6c  r5 : 00000003  r4 : ffffffac
r3 : 00000008  r2 : bb067c6c  r1 : ffffffac  r0 : bb22d000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5383d  Table: 3bf4406a  DAC: 00000015
CPU: 0 PID: 367 Comm: kworker/0:3 Not tainted 4.1.20-v7+ #867
Hardware name: BCM2709
Workqueue: events flush_to_ldisc
[<800185e0>] (unwind_backtrace) from [<80013f48>] (show_stack+0x20/0x24)
[<80013f48>] (show_stack) from [<80572ddc>] (dump_stack+0xd4/0x118)
[<80572ddc>] (dump_stack) from [<80010d18>] (show_regs+0x1c/0x20)
[<80010d18>] (show_regs) from [<800b4a70>] (kdb_main_loop+0x3ec/0x800)

There it just stops. but i have a longer log from a previous crash that seems to have the same cause:

[  156.026986] Bluetooth: hci0: Frame reassembly faild (-84)
[  156.060272] Bluetooth: hci0 unexpected SMP command 0x07 from c8:0f:10:28:af:c1
Entering kdb (current=0xbc77cac0, pid 96) on processor 0 Oops: (null)
due to oops @ 0x07f3c8c20
CPU: 0 PID: 96 Comm: kworker/0:2 Not tainted 4.1.20-v7+ #867
Hardware name: BCM2709
Workqueue: events flush_to_ldisc
task: bc77cac0 ti: bbf7c000 task.ti: bbf7c000
PC is at h4_recv_buf+0x34/0x22c [hci_uart]
LR is at h4_recv+0x50/0x98 [hci_uart]
pc : [<7f3c2c20>]    lr : [<7f3c2e68>]    psr: a0000013
sp : bbf7de38  ip : bbf7de68  fp : bbf7de64
r10: 0000000a  r9 : 0000000a  r8 : b9de0000
r7 : 7f3c4191  r6 : bb1eb8db  r5 : 00000003  r4 : ffffffac
r3 : 0000000a  r2 : bb1eb8db  r1 : ffffffac  r0 : b9de0000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5383d  Table: 39c3806a  DAC: 00000015
CPU: 0 PID: 96 Comm: kworker/0:2 Not tainted 4.1.20-v7+ #867
Hardware name: BCM2709
Workqueue: events flush_to_ldisc
[<800185e0>] (unwind_backtrace) from [<80013f48>] (show_stack+0x20/0x24)
[<80013f48>] (show_stack) from [<80572ddc>] (dump_stack+0xd4/0x118)
[<80572ddc>] (dump_stack) from [<80010d18>] (show_regs+0x1c/0x20)
[<80010d18>] (show_regs) from [<800b4a70>] (kdb_main_loop+0x3ec/0x800)
more> [<800b4a70>] (kdb_main_loop) from [<800b796c>] (kdb_stub+0x2c4/0x510)
[<800b796c>] (kdb_stub) from [<800ad360>] (kgdb_cpu_enter+0x480/0x838)
[<800ad360>] (kgdb_cpu_enter) from [<800ad974>] (kgdb_handle_exception+0x104/0x218)
[<800ad974>] (kgdb_handle_exception) from [<80017aec>] (kgdb_notify+0x40/0x90)
[<80017aec>] (kgdb_notify) from [<80044cd4>] (notifier_call_chain+0x54/0x94)
[<80044cd4>] (notifier_call_chain) from [<80044eec>] (notify_die+0x48/0x54)
[<80044eec>] (notify_die) from [<80014064>] (die+0x118/0x43c)
[<80014064>] (die) from [<80571c48>] (__do_kernel_fault.part.0+0x74/0x8
[<80571c48>] (__do_kernel_fault.part.0) from [<80578bd4>] (do_page_fault+0x28c/0x398)
[<80578bd4>] (do_page_fault) from [<800091e8>] (do_DataAbort+0x48/0xc4)
[<800091e8>] (do_DataAbort) from [<8057811c>] (__dabt_svc+0x3c/0x60)
Exception stack(0xbbf7ddf0 to 0xbbf7de38)
dde0:                                     b9de0000 ffffffac bb1eb8db 0000000a
de00: ffffffac 00000003 bb1eb8db 7f3c4194 b9de0000 0000000a 0000000a bbf7de64
de20: bbf7de68 bbf7de38 7f3c2e68 7f3c2c20 a0000013 ffffffff
[<8057811c>] (__dabt_svc) from [<7f3c2c20>] (h4_recv_buf+0x34/0x22c [hci_uart])
[<7f3c2c20>] (h4_recv_buf [hci_uart]) from [<7f3c2e68>] (h4_recv+0x50/0x98 [hci_uart])
[<7f3c2e68>] (h4_recv [hci_uart]) from [<7f3c20f0>] (hci_uart_tty_receive+0x74/0xb0 [hci_uart])
[<7f3c20f0>] (hci_uart_tty_receive [hci_uart]) from [<80358b48>] (flush_to_ldisc+0x190/0x1a0)
more> [<80358b48>] (flush_to_ldisc) from [<8003e0b8>] (process_one_work+0x154/0x458)
[<8003e0b8>] (process_one_work) from [<8003e410>] (worker_thread+0x54/0x500)
[<8003e410>] (worker_thread) from [<80043bec>] (kthread+0xec/0x104)
[<80043bec>] (kthread) from [<8000faf8>] (ret_from_fork+0x14/0x3c)

[0]kdb> _

I was careful, but the logs may contain errors, because i had to transcribe them by hand
EDIT: fixed some transcription-errors

@delize
Copy link

delize commented Apr 3, 2016

I am having a similar problem with bluetooth and a Nexus6P device connecting. After pairing the Nexus 6P with blueman and other bluetooth tools, the raspberry pi immediately freezes. Leaving it for ten minutes results in no response, however, I have no logs.

@steverandy
Copy link

I'm having a similar issue with a Logitech bluetooth mouse. If there is an intensive process going on, moving the mouse would often freeze the entire OS.

I'm new to Linux world. What are the steps I can do to provide debug info here?

Is there an instability issue with Bluetooth hardware on rpi3? Or is this a bug in software?

@pelwell
Copy link
Contributor

pelwell commented Apr 6, 2016

Bluetooth throughput is limited on Pi3 because of a lack of flow control signals to BT modem. The Bluetooth H5 protocol is supposed to handle packet loss, but the current BT modem firmware does not work with the BlueZ stack in H5 mode.

@steverandy
Copy link

Is this issue perhaps related to this? raspberrypi/firmware#553

@paulrouget
Copy link

How can we make this issue actionable?

@JamesH65
Copy link
Contributor

It's open and on this bug list, so will be looked at when time allows. Depends on the impact of the issues and the number of people it affects.

@paulrouget
Copy link

Depends on the impact of the issues

For the record, all my bluetooth devices trigger this crash.

Also, as I was googling, I've seen several people reporting "system freeze" with the PS3 bluetooth controller (example http://blog.petrockblock.com/forums/topic/problems-getting-ps3-controller-to-work-properly/#post-119899 and https://www.reddit.com/r/RetroPie/comments/4aoojj/pi3_crashing_with_kernel_474079425_internal_error/)

@paulrouget
Copy link

If there's anything I can do to get a better log, or try a patch, I'd be happy to help.

@BaDvs3viL
Copy link

I just wanted to add that I am having the same issue. I have a Pi3 with a fresh RP3.6 and just started using PS3 DS3 controllers through BT yesterday and almost instantly started seeing the freezes. If I change out the PS3 controller and use a wired 360, I have no issues at all.

@paulrouget
Copy link

(no crash with a bluetooth dongle)

@pelwell
Copy link
Contributor

pelwell commented Apr 12, 2016

We'll get in a DS3 and have a go. Can you say what extra configuration is required beyond pairing and trusing, and perhaps recommend a test application if necessary?

I can see three potential outcomes:

  1. If this crash turns out to be due to a bug/incompatibility in the Linux Bluetooth stack then we have a chance of fixing it.
  2. If it is a bug/incompatibility in the Broadcom firmware then it becomes much harder to get a fix.
  3. If it is due to data loss going through the UART then it may be improved by H5 support, which is somewhere between 1 and 2 in tractability.

@BaDvs3viL
Copy link

All I did was install the required files for the PS3 controllers through the RP-setup and sync.

I also had it freeze pretty much everywhere in ES. Most of the times I could get it to happen while in a game and bringing up the RAGUI and while sitting in there, it would happen.

I have a spare BT dongle that I will try out tonight as I would like to use the DS3 controllers.

@Prindle19
Copy link

Also having this issue with onboard Bluetooth and clone dualshock 3 controller (Shanwan) connected via sixad.

It happen sporadically and under different emulators / roms. When it hangs, system can't be interrupted via keyboard, SSH sessions break and pi stips responding to pings

@paulrouget
Copy link

We'll get in a DS3 and have a go. Can you say what extra configuration is required beyond pairing and trusing, and perhaps recommend a test application if necessary?

Linux retropie 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
No special configuration. I run PSP games. After a minute or so of playing, freeze.

@BaDvs3viL
Copy link

@paulrouget How did you disable the on board BT so you could use you own?

dtoverlay=pi3-disable-bt?

@paulrouget
Copy link

@paulrouget How did you disable the on board BT so you could use you own?

I was reporting what I've found in other forums:

I plugged in a CSR 4.0 bluetooth USB button and am using bluetooth without a hitch - so it seems the issue is with the onboard bluetooth.

@BaDvs3viL
Copy link

I can confirm that I put dtoverlay=pi3-disable-bt in my config.txt and used a USB BT dongle, I played for hours last night without any issues. I soon as I reverted back and tried, I got a freeze with 5 mins.

@KrS14
Copy link

KrS14 commented Apr 13, 2016

I'm also seeing this issue with the onboard BT:
[Apr13 16:55] Bluetooth: hci0: Frame reassembly failed (-84)
[ +0.000152] Unable to handle kernel paging request at virtual address ffffffc8
[ +0.007510] pgd = 80004000
[ +0.002857] [ffffffc8] *pgd=2effa821, *pte=00000000, *ppte=00000000
[ +0.006553] Internal error: Oops: 17 [#1] SMP ARM

Hopefully the PS3 driver gets fixed sooner than later, as I don't have a BT dongle to use :/

@joestrong
Copy link

I can confirm that using a bluetooth dongle solves it for me. On-board bluetooth means a freeze within a few minutes, dongle has allowed me to play for hours with no problems. I didn't have to change any text file to disable the pi3 bluetooth, just plugging in a dongle alone seemed to work.

@Liquidream
Copy link

Liquidream commented May 13, 2016

Thank you everyone!! 😄
Like many others, I've been struggling with this issue on my Pi3 since launch!
I hope I'm not jinxing it, but I've been running Mario 64 for over 40mins now with no freezing (touch wood) using @BaDvs3viL 's upgrade steps above.
Now hopefully my Pi3 can be the RetroGaming device I intended to use it for! 😉
Thanks again

@greener2
Copy link

My two cents worth - the steps, as I took them:

  1. Did a sudo apt-get update && sudo apt-get upgrade to upgrade any software packages.
  2. Did sudo sed -i 's/curl/curl -k/g' /usr/bin/rpi-update to get around some SSL certificate issue.
  3. Did sudo UPDATE_SELF=0 rpi-update 15ffab5493d74b12194e6bfc5bbb1c0f71140155 to update the Pi to the revision 15ffab...
  4. Rebooted, cos that usually fixes things

After that, no lockups after playing for an hour on the PSX emulator in RetroPie. Usually I wouldn't have gotten past the main menu or options screen of a game. Works with SNES, Genesis/Megadrive and N64 too.

@konradsa
Copy link

So the evidence is pretty clear that this bug has been fixed in a newer kernel. Also the diff between old and new kernel clearly shows that it has been addressed:
diff between kernel 4.1 and 4.4

Not sure what should be done here with this issue. Nobody will probably backport this fix to 4.1 kernel and going to kernel 4.4 is clearly the way forward. However most people won't get that fix until Retropie updates its version.

@popcornmix
Copy link
Collaborator

Note: rpi-update is no longer needed.
sudo apt-get update && sudo apt-get dist-upgrade will get the 4.4 kernel now.
See: https://www.raspberrypi.org/blog/another-update-raspbian/

@konradsa
Copy link

That is good news! :-)

On Fri, May 13, 2016 at 9:33 AM, popcornmix [email protected]
wrote:

Note: rpi-update is no longer needed.
sudo apt-get update && sudo apt-get dist-upgrade will get the 4.4 kernel
now.
See: https://www.raspberrypi.org/blog/another-update-raspbian/


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1360 (comment)

@coniferous1
Copy link
Author

Based On the fact this is fixed and people are having success, I'm going to close this issue.

Thanks for all the help everyone.

@konradsa
Copy link

Word of warning, don't run sudo apt-get update && sudo apt-get dist-upgrade, you will lose bluetooth for good, just happened to me. There seem to be more underlying bluetooth changes in the latest raspbian update that break bluetooth for RetroPie.

@konradsa
Copy link

konradsa commented May 14, 2016

Ok, I really hate being the guinea pig for you guys! ;-)

If you lose bluetooth after dist-upgrade, here is how to fix it:
Essentially, you need to downgrade pi-bluetooh from 0.1.1 to 0.1.0

  1. wget http://archive.raspberrypi.org/debian/pool/main/p/pi-bluetooth/pi-bluetooth_0.1.0_armhf.deb
  2. sudo dpkg -i pi-bluetooth_0.1.0_armhf.deb
  3. Reboot

If that works for you, run sudo apt-mark hold pi-bluetooth to prevent it from being updated by accident.

Hope it saves you a lot of time and frustration

@konradsa
Copy link

konradsa commented May 14, 2016

Another weird thing I noticed after the upgrade is that the system was only using the powersave governor, thereby severely slowing down performance of the system. If that happens to you too, then you can run sudo apt-get install cpufrequtils and reboot to fix it. The defaults it to the ondemand governor again.

EDIT: Fixed typo

@greener2
Copy link

That package should be cpufrequtils, you missed the 's'! Nice one though, you're our hero!

@KrS14
Copy link

KrS14 commented May 14, 2016

Still haven't been able to get a PS3 controller to pair. 3.6, 3.7, fixes
posted above, nothing works. It did at one time when I first installed
3.6, but i had the freezing so i've gotten a USB BT adapter since. My OCD
wants the on-board to work though :)

This is what I get with a fresh 3.7 Image:
After initial boot
apt-get update
apt-get dist-upgrade
wget
http://archive.raspberrypi.org/debian/pool/main/p/pi-bluetooth/pi-bluetooth_0.1.0_armhf.deb
sudo dpkg -i pi-bluetooth_0.1.0_armhf.deb
Reboot
Update RetroPie-Setup Script
Install PS3 drivers through menu.
Connect USB cable to controller, works fine in Emulation Station.
Disconnect USB and push PS button
Crickets

root@retropie:/home/pi# dmesg | grep Blue
[ 6.578766] Bluetooth: Core ver 2.21
[ 6.578850] Bluetooth: HCI device and connection manager initialized
[ 6.578866] Bluetooth: HCI socket layer initialized
[ 6.578877] Bluetooth: L2CAP socket layer initialized
[ 6.578906] Bluetooth: SCO socket layer initialized
[ 10.593502] Bluetooth: HCI UART driver ver 2.3
[ 10.593523] Bluetooth: HCI UART protocol H4 registered
[ 10.593533] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 10.593729] Bluetooth: HCI UART protocol BCM registered
[ 10.839018] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 10.839031] Bluetooth: BNEP filters: protocol multicast
[ 10.839045] Bluetooth: BNEP socket layer initialized
[ 13.956338] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 13.956361] Bluetooth: HIDP socket layer initialized

root@retropie:/home/pi# lsusb
Bus 001 Device 004: ID 1997:2433
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514
Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@retropie:/home/pi# hciconfig
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:B8:14:CB ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:775 acl:0 sco:0 events:48 errors:0
TX bytes:1560 acl:0 sco:0 commands:48 errors:0

root@retropie:/home/pi# systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: failed (Result: exit-code) since Sat 2016-05-14 13:48:04 UTC;
1min 6s ago
Docs: man:bluetoothd(8)
Process: 1461 ExecStart=/usr/lib/bluetooth/bluetoothd (code=exited,
status=203/EXEC)
Main PID: 1461 (code=exited, status=203/EXEC)

May 14 13:48:04 retropie systemd[1]: bluetooth.service: main process
exited, code=exited, status=203/EXEC
May 14 13:48:04 retropie systemd[1]: Failed to start Bluetooth service.
May 14 13:48:04 retropie systemd[1]: Unit bluetooth.service entered failed
state.
root@retropie:/home/pi#

The "systemctl status bluetooth.service" error may simply be because of
sixad, and be normal. But nothing I do will get the controller to pair. I
actually can't get it to pair with the USB BT adapter now either.

I've re-paired the controller to my actual PS3 and tried again to the pi
with nothing as a result as well. This should be working.

I'll reflash back to fresh 3.7 and go baby steps trying with the USB BT
adapter mixed in to be sure it still works as I go.

Any ideas?

On Sat, May 14, 2016 at 9:30 AM, greener2 [email protected] wrote:

That package should be cpufrequtils, you missed the 's'! Nice one though,
you're our hero!


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1360 (comment)

@KrS14
Copy link

KrS14 commented May 14, 2016

I've started using hcidump to see what's actually going on. With the USB
BT adapter I can now get it connected no problem, dump looks fine.

When I try using the onboard, I do get events when runnning 'sixad --start'
but nothing from the controller in the events.

Seems the PS3 controller just doesn't like the onboard for some reason,
this is with 4.4.9-v7

More testing to come.

On Sat, May 14, 2016 at 10:16 AM, Kevin Smith [email protected] wrote:

Still haven't been able to get a PS3 controller to pair. 3.6, 3.7, fixes
posted above, nothing works. It did at one time when I first installed
3.6, but i had the freezing so i've gotten a USB BT adapter since. My OCD
wants the on-board to work though :)

This is what I get with a fresh 3.7 Image:
After initial boot
apt-get update
apt-get dist-upgrade
wget
http://archive.raspberrypi.org/debian/pool/main/p/pi-bluetooth/pi-bluetooth_0.1.0_armhf.deb
sudo dpkg -i pi-bluetooth_0.1.0_armhf.deb
Reboot
Update RetroPie-Setup Script
Install PS3 drivers through menu.
Connect USB cable to controller, works fine in Emulation Station.
Disconnect USB and push PS button
Crickets

root@retropie:/home/pi# dmesg | grep Blue
[ 6.578766] Bluetooth: Core ver 2.21
[ 6.578850] Bluetooth: HCI device and connection manager initialized
[ 6.578866] Bluetooth: HCI socket layer initialized
[ 6.578877] Bluetooth: L2CAP socket layer initialized
[ 6.578906] Bluetooth: SCO socket layer initialized
[ 10.593502] Bluetooth: HCI UART driver ver 2.3
[ 10.593523] Bluetooth: HCI UART protocol H4 registered
[ 10.593533] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 10.593729] Bluetooth: HCI UART protocol BCM registered
[ 10.839018] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 10.839031] Bluetooth: BNEP filters: protocol multicast
[ 10.839045] Bluetooth: BNEP socket layer initialized
[ 13.956338] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 13.956361] Bluetooth: HIDP socket layer initialized

root@retropie:/home/pi# lsusb
Bus 001 Device 004: ID 1997:2433
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514
Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@retropie:/home/pi# hciconfig
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:B8:14:CB ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:775 acl:0 sco:0 events:48 errors:0
TX bytes:1560 acl:0 sco:0 commands:48 errors:0

root@retropie:/home/pi# systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: failed (Result: exit-code) since Sat 2016-05-14 13:48:04 UTC;
1min 6s ago
Docs: man:bluetoothd(8)
Process: 1461 ExecStart=/usr/lib/bluetooth/bluetoothd (code=exited,
status=203/EXEC)
Main PID: 1461 (code=exited, status=203/EXEC)

May 14 13:48:04 retropie systemd[1]: bluetooth.service: main process
exited, code=exited, status=203/EXEC
May 14 13:48:04 retropie systemd[1]: Failed to start Bluetooth service.
May 14 13:48:04 retropie systemd[1]: Unit bluetooth.service entered failed
state.
root@retropie:/home/pi#

The "systemctl status bluetooth.service" error may simply be because of
sixad, and be normal. But nothing I do will get the controller to pair. I
actually can't get it to pair with the USB BT adapter now either.

I've re-paired the controller to my actual PS3 and tried again to the pi
with nothing as a result as well. This should be working.

I'll reflash back to fresh 3.7 and go baby steps trying with the USB BT
adapter mixed in to be sure it still works as I go.

Any ideas?

On Sat, May 14, 2016 at 9:30 AM, greener2 [email protected]
wrote:

That package should be cpufrequtils, you missed the 's'! Nice one
though, you're our hero!


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1360 (comment)

@KrS14
Copy link

KrS14 commented May 14, 2016

Actually I really do give up, i'm not getting anything from the onboard at
all, no matter what kernel version or retropie version I use. Without
sixad I can pair my phone no problems with the onboard, it just doesn't
work with sixad.

On Sat, May 14, 2016 at 12:04 PM, Kevin Smith [email protected] wrote:

I've started using hcidump to see what's actually going on. With the USB
BT adapter I can now get it connected no problem, dump looks fine.

When I try using the onboard, I do get events when runnning 'sixad
--start' but nothing from the controller in the events.

Seems the PS3 controller just doesn't like the onboard for some reason,
this is with 4.4.9-v7

More testing to come.

On Sat, May 14, 2016 at 10:16 AM, Kevin Smith [email protected] wrote:

Still haven't been able to get a PS3 controller to pair. 3.6, 3.7, fixes
posted above, nothing works. It did at one time when I first installed
3.6, but i had the freezing so i've gotten a USB BT adapter since. My OCD
wants the on-board to work though :)

This is what I get with a fresh 3.7 Image:
After initial boot
apt-get update
apt-get dist-upgrade
wget
http://archive.raspberrypi.org/debian/pool/main/p/pi-bluetooth/pi-bluetooth_0.1.0_armhf.deb
sudo dpkg -i pi-bluetooth_0.1.0_armhf.deb
Reboot
Update RetroPie-Setup Script
Install PS3 drivers through menu.
Connect USB cable to controller, works fine in Emulation Station.
Disconnect USB and push PS button
Crickets

root@retropie:/home/pi# dmesg | grep Blue
[ 6.578766] Bluetooth: Core ver 2.21
[ 6.578850] Bluetooth: HCI device and connection manager initialized
[ 6.578866] Bluetooth: HCI socket layer initialized
[ 6.578877] Bluetooth: L2CAP socket layer initialized
[ 6.578906] Bluetooth: SCO socket layer initialized
[ 10.593502] Bluetooth: HCI UART driver ver 2.3
[ 10.593523] Bluetooth: HCI UART protocol H4 registered
[ 10.593533] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 10.593729] Bluetooth: HCI UART protocol BCM registered
[ 10.839018] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 10.839031] Bluetooth: BNEP filters: protocol multicast
[ 10.839045] Bluetooth: BNEP socket layer initialized
[ 13.956338] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 13.956361] Bluetooth: HIDP socket layer initialized

root@retropie:/home/pi# lsusb
Bus 001 Device 004: ID 1997:2433
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@retropie:/home/pi# hciconfig
hci0: Type: BR/EDR Bus: UART
BD Address: B8:27:EB:B8:14:CB ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:775 acl:0 sco:0 events:48 errors:0
TX bytes:1560 acl:0 sco:0 commands:48 errors:0

root@retropie:/home/pi# systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: failed (Result: exit-code) since Sat 2016-05-14 13:48:04 UTC;
1min 6s ago
Docs: man:bluetoothd(8)
Process: 1461 ExecStart=/usr/lib/bluetooth/bluetoothd (code=exited,
status=203/EXEC)
Main PID: 1461 (code=exited, status=203/EXEC)

May 14 13:48:04 retropie systemd[1]: bluetooth.service: main process
exited, code=exited, status=203/EXEC
May 14 13:48:04 retropie systemd[1]: Failed to start Bluetooth service.
May 14 13:48:04 retropie systemd[1]: Unit bluetooth.service entered
failed state.
root@retropie:/home/pi#

The "systemctl status bluetooth.service" error may simply be because of
sixad, and be normal. But nothing I do will get the controller to pair. I
actually can't get it to pair with the USB BT adapter now either.

I've re-paired the controller to my actual PS3 and tried again to the pi
with nothing as a result as well. This should be working.

I'll reflash back to fresh 3.7 and go baby steps trying with the USB BT
adapter mixed in to be sure it still works as I go.

Any ideas?

On Sat, May 14, 2016 at 9:30 AM, greener2 [email protected]
wrote:

That package should be cpufrequtils, you missed the 's'! Nice one
though, you're our hero!


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1360 (comment)

@eddywebs
Copy link

@KrS14 try removing the the ps3 controller config from the retrpie-setup menu and then re-install it should pair 1st controller however I found problem in being able to pair any additional controllers.

@paulrouget
Copy link

I'd recommend to wait a bit before updating.

After the raspbian update, bluetooth hardware is not recognized anymore here. See the comments here: https://www.raspberrypi.org/blog/another-update-raspbian/

Downgradding pi-bluetooth didn't help.

@joestrong
Copy link

@paulrouget I just upgraded raspbian and downgraded pi-bluetooth and it worked for me! Did you try rebooting?

@BenjiZombie
Copy link

Removing previous PS3 config, downgrading pi-bluetooth and rebooting worked for me as well.

@KrS14
Copy link

KrS14 commented May 15, 2016

I can try from a state of nothing ever being attempted and it does pair.
No config present.
On May 15, 2016 5:02 PM, "BenjiZombie" [email protected] wrote:

Removing previous PS3 config, downgrading pi-bluetooth and rebooting
worked for me as well.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1360 (comment)

@paulrouget
Copy link

Removing previous PS3 config

That might be the thing I haven't tried.

Anyway, I've reinstalled, and it works now.

@JPLeBreton
Copy link

If the fix for this bug is to work around it by downgrading, then it's not fixed and should be reopened.

@paulrouget
Copy link

If the fix for this bug is to work around it by downgrading, then it's not fixed and should be reopened.

It is fixed. Downgrading is not necessary at least on a fresh install.

If downgrading is necessary after an update, then I believe it's better to file a new issue (and maybe not in raspberrypi/linux) with STRs.

@konradsa
Copy link

Downgrading will not be necessary on a fresh install, since that one uses
pi-bluetooth 0.1.0. But as soon as you run sudo apt dist-upgrade (or
upgrade via the retropie_setup menu) you will get the same problem again.

On Tue, May 17, 2016 at 12:03 AM, Paul Rouget [email protected]
wrote:

If the fix for this bug is to work around it by downgrading, then it's not
fixed and should be reopened.

It is fixed. Downgrading is not necessary at least on a fresh install.

If downgrading is necessary after an update, then I believe it's better to
file a new issue (and maybe not in raspberrypi/linux) with STRs.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1360 (comment)

@Dennisnuel
Copy link

Dennisnuel commented May 19, 2016

Ok I have fixed this without downgrading.
I was looking at this forum thread https://www.raspberrypi.org/forums/viewtopic.php?t=148305&p=976259

Ok the important part was this

After the 5/13/16 upgrade (incl. new 4.4.9 kernel) my pi3 Bluetooth stopped working. I narrowed it down to /dev/serial0 and /dev/serial1 were missing and hence the /lib/systemd/system/hciuart.service failed since it now uses "serial1" instead of "ttyAMA0" in previous releases.

This is the script snippet in question:
ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -

In a separate post - DirkS, indicated that these files were created by 99-com.rules which I did not have on my system.

Using apt-file I figured out that I was missing the raspberrypi-sys-mods package. Once I did an apt-get of the package Bluetooth is working again.

apt-file search 99-com.rules
raspberrypi-sys-mods: /etc/udev/rules.d/99-com.rules
apt-get install raspberrypi-sys-mods

  1. update (via apt-get upgrade and apt-get dist-upgrade)
  2. yes it was working well until the 5/13/16 update
  3. n/a - I have it working now
  4. n/a - I have it working now
  5. n/a - I have it working now

This did no work for me because I forgot to choose replacing 99-com.rules when i did the installation.
So renamed may /etc/udev/rules.d/99-com.rules to 99-com.rules.bak then I used a text editor to create a new 99-com.rules. I then copied the 99-com.rules from here https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/etc/udev/rules.d/99-com.rules .

Every thing works now.

@konradsa
Copy link

I can confirm, apt-get install raspberrypi-sys-mods and selecting Y
during install fixed bluetooth for me, even with pi-bluetooth 0.1.1. Thanks!

Run sudo apt-mark unhold pi-bluetooth in case you put pi-bluetooth on
hold to keep it pinned at 0.1.0.

On Wed, May 18, 2016 at 9:03 PM, Dennisnuel [email protected]
wrote:

Ok I have fixed this without downgrading.
I was looking at this forum thread
https://www.raspberrypi.org/forums/viewtopic.php?t=148305&p=976259

Ok the important part was this

After the 5/13/16 upgrade (incl. new 4.4.9 kernel) my pi3 Bluetooth
stopped working. I narrowed it down to /dev/serial0 and /dev/serial1 were
missing and hence the /lib/systemd/system/hciuart.service failed since it
now uses "serial1" instead of "ttyAMA0" in previous releases.

This is the script snippet in question:
ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -

In a separate post - DirkS, indicated that these files were created by
99-com.rules which I did not have on my system.

Using apt-file I figured out that I was missing the raspberrypi-sys-mods
package. Once I did an apt-get of the package Bluetooth is working again.

apt-file search 99-com.rules
raspberrypi-sys-mods: /etc/udev/rules.d/99-com.rules
apt-get install raspberrypi-sys-mods

  1. update (via apt-get upgrade and apt-get dist-upgrade)
  2. yes it was working well until the 5/13/16 update
  3. n/a - I have it working now
  4. n/a - I have it working now
  5. n/a - I have it working now

This did no work for me because I for got to choose replacing 99-com.rules
when i did the installation.
So renamed may /etc/udev/rules.d/99-com.rules to 99-com.rules.bak then I
used a text editor to create a new 99-com.rules. I then copied the
99-com.rules from here
https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/etc/udev/rules.d/99-com.rules
.

Every thing works now.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1360 (comment)

@david-foo
Copy link

sameting. my hardware is AM4378, software is pybluez:

root@xxx:~/pybluez/examples/simple# python sdp-browse.py all
[18142.090865] Bluetooth: hci0: Frame reassembly failed (-84)
[18142.096799] Unable to handle kernel paging request at virtual address ffffffc8
[18142.104590] pgd = c0004000
...

I can do bluetoothctl scan,but when do pair the kernel crashed.

popcornmix pushed a commit that referenced this issue Oct 10, 2017
…hsmmc_late_init but not both

With 4.13 kernel I get this boot message:

[    1.051727] ------------[ cut here ]------------
[    1.051818] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x74
[    1.051849] sysfs: cannot create duplicate filename '/devices/platform/omap_hsmmc.2'
[    1.051879] Modules linked in:
[    1.051971] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-letux+ #1360
[    1.052001] Hardware name: Generic OMAP3 (Flattened Device Tree)
[    1.052062] [<c010f690>] (unwind_backtrace) from [<c010bba8>] (show_stack+0x10/0x14)
[    1.052124] [<c010bba8>] (show_stack) from [<c075dc88>] (dump_stack+0x98/0xd0)
[    1.052185] [<c075dc88>] (dump_stack) from [<c012f398>] (__warn+0xd0/0x100)
[    1.052215] [<c012f398>] (__warn) from [<c012f3fc>] (warn_slowpath_fmt+0x34/0x44)
[    1.052276] [<c012f3fc>] (warn_slowpath_fmt) from [<c02ebcb4>] (sysfs_warn_dup+0x54/0x74)
[    1.052337] [<c02ebcb4>] (sysfs_warn_dup) from [<c02ebd90>] (sysfs_create_dir_ns+0x74/0x84)
[    1.052398] [<c02ebd90>] (sysfs_create_dir_ns) from [<c0761b8c>] (kobject_add_internal+0xd0/0x294)
[    1.052429] [<c0761b8c>] (kobject_add_internal) from [<c0761f00>] (kobject_add+0x6c/0x8c)
[    1.052490] [<c0761f00>] (kobject_add) from [<c04e831c>] (device_add+0xe4/0x510)
[    1.052551] [<c04e831c>] (device_add) from [<c04ec6e4>] (platform_device_add+0x130/0x1c0)
[    1.052612] [<c04ec6e4>] (platform_device_add) from [<c01281c0>] (omap_hsmmc_late_init+0x3c/0x60)
[    1.052673] [<c01281c0>] (omap_hsmmc_late_init) from [<c0b0fa44>] (omap3_pandora_legacy_init+0x24/0xb4)
[    1.052734] [<c0b0fa44>] (omap3_pandora_legacy_init) from [<c0128178>] (pdata_quirks_check+0x30/0x3c)
[    1.052795] [<c0128178>] (pdata_quirks_check) from [<c0b0f950>] (omap_generic_init+0xc/0x18)
[    1.052856] [<c0b0f950>] (omap_generic_init) from [<c0b03480>] (customize_machine+0x1c/0x28)
[    1.052917] [<c0b03480>] (customize_machine) from [<c0101938>] (do_one_initcall+0xa8/0x150)
[    1.052947] [<c0101938>] (do_one_initcall) from [<c0b00d70>] (kernel_init_freeable+0x110/0x1d4)
[    1.053009] [<c0b00d70>] (kernel_init_freeable) from [<c076f198>] (kernel_init+0x8/0x10c)
[    1.053070] [<c076f198>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
[    1.055023] ---[ end trace 44e490b09ac4ab88 ]---

This can be traced down to the calls of

	omap_hsmmc_init(pandora_mmc3);
	omap_hsmmc_late_init(pandora_mmc3);

in omap3_pandora_legacy_init().

It turns out that both funcions disagree how to decide if the other one was alredy called.

Signed-off-by: H. Nikolaus Schaller <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests