View Single Post
Posts: 22 | Thanked: 69 times | Joined on Dec 2017
#65
Bluetooth turns on and off better from the top menu.
As an option to add the option exec_timeout = 2 to the /etc/qca_rome.conf file
It should help a little, but this is not a solution.

For some reason, bluetooth does not turn off.

strace -p <process bluetooth-rfkill-event.service>

Code:
ioctl(5, HCIDEVUP, 0)                   = -1 EALREADY (Operation already in progress)
close(5)                                = 0
poll([{fd=4, events=POLLIN|POLLHUP}], 1, -1) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\5\0\0\0\2\1\0\0", 8)          = 8
poll([{fd=4, events=POLLIN|POLLHUP}], 1, -1) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\6\0\0\0\2\0\0\0", 8)          = 8
open("/sys/class/rfkill/rfkill6/name", O_RDONLY) = 5
read(5, "hci0\n", 4095)                 = 5
close(5)                                = 0
socket(AF_BLUETOOTH, SOCK_RAW, 1)       = 5
ioctl(5, HCIGETDEVINFO, 0xffe2f364)     = 0
close(5)                                = 0
poll([{fd=4, events=POLLIN|POLLHUP}], 1, -1) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\0\0\0\0\2\2\1\0", 8)          = 8
gettimeofday({tv_sec=1548146004, tv_usec=363081}, NULL) = 0
send(3, "<30>Jan 22 13:33:24 bluetooth_rf"..., 111, MSG_NOSIGNAL) = 111
pipe([5, 6])                            = 0
pipe([7, 8])                            = 0
pipe([9, 10])                           = 0
fcntl64(5, F_GETFL)                     = 0 (flags O_RDONLY)
fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(6, F_GETFL)                     = 0x1 (flags O_WRONLY)
fcntl64(6, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(7, F_GETFL)                     = 0 (flags O_RDONLY)
fcntl64(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(8, F_GETFL)                     = 0x1 (flags O_WRONLY)
fcntl64(8, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(9, F_GETFL)                     = 0 (flags O_RDONLY)
fcntl64(9, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(10, F_GETFL)                    = 0x1 (flags O_WRONLY)
fcntl64(10, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xf6c54278) = 8182
close(5)                                = 0
close(8)                                = 0
close(10)                               = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 1 (in [7], left {tv_sec=0, tv_usec=968589})
read(7, "8124\n", 4096)                 = 5
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8182, si_uid=0, si_status=0, si_utime=0, si_stime=2} ---
wait4(8182, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 8182
close(6)                                = 0
close(7)                                = 0
close(9)                                = 0
pipe([5, 6])                            = 0
pipe([7, 8])                            = 0
pipe([9, 10])                           = 0
fcntl64(5, F_GETFL)                     = 0 (flags O_RDONLY)
fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(6, F_GETFL)                     = 0x1 (flags O_WRONLY)
fcntl64(6, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(7, F_GETFL)                     = 0 (flags O_RDONLY)
fcntl64(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(8, F_GETFL)                     = 0x1 (flags O_WRONLY)
fcntl64(8, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(9, F_GETFL)                     = 0 (flags O_RDONLY)
fcntl64(9, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(10, F_GETFL)                    = 0x1 (flags O_WRONLY)
fcntl64(10, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xf6c54278) = 8183
close(5)                                = 0
close(8)                                = 0
close(10)                               = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
wait4(8183, 0xffe2d2ec, WNOHANG, NULL)  = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
wait4(8183, 0xffe2d2ec, WNOHANG, NULL)  = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
wait4(8183, 0xffe2d2ec, WNOHANG, NULL)  = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
wait4(8183, 0xffe2d2ec, WNOHANG, NULL)  = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
wait4(8183, 0xffe2d2ec, WNOHANG, NULL)  = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
wait4(8183, 0xffe2d2ec, WNOHANG, NULL)  = 0
_newselect(10, [7 9], NULL, NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
Link on code: https://github.com/delaya73/bluetoot...l_event.c#L935

Last edited by delaya73; 2019-01-25 at 19:18.
 

The Following 4 Users Say Thank You to delaya73 For This Useful Post: