wdehoog / sailfish-bacon-images

home made Sailfish images for the Oneplus One
24 stars 1 forks source link

torch button from shortcut menu not working #2

Open verymilan opened 7 years ago

verymilan commented 7 years ago

I just noticed that the torch button in the pull-down menu, in the notification page is not working. This is not a big deal since we have the awesome gestructures (finally <3) but it is still an issue. :)

wdehoog commented 7 years ago

You mean the shortcut icon? It's working for me.

verymilan commented 7 years ago

I mean the one which is disabled by default (custom shortcuts). Gestructure is still working for me but yeah - the button won't work.^^ I don't know which command it runs - if you know and wanna tell me, i could (maybe) debug.

wdehoog commented 7 years ago

Weird. You really mean the one from Settings -> Event View -> Select shortcuts -> Flashlight? I have no idea what is uses to toggle the torch. Maybe dbus-monitor shows something.

wdehoog commented 7 years ago

When pressing the shortcut dbus-monitor shows:

method call time=1485296181.960928 sender=:1.15 -> destination=com.jolla.settings.system.flashlight serial=594 path=/com/jolla/settings/system/flashlight; interface=com.jolla.settings.system.flashlight; member=toggleFlashlight signal time=1485296182.524140 sender=:1.78 -> destination=(null destination) serial=16 path=/com/jolla/settings/system/flashlight; interface=com.jolla.settings.system.flashlight; member=flashlightOnChanged boolean true

method call time=1485296182.772914 sender=:1.15 -> destination=com.jolla.settings.system.flashlight serial=595 path=/com/jolla/settings/system/flashlight; interface=com.jolla.settings.system.flashlight; member=toggleFlashlight signal time=1485296182.895390 sender=:1.78 -> destination=(null destination) serial=17 path=/com/jolla/settings/system/flashlight; interface=com.jolla.settings.system.flashlight; member=flashlightOnChanged boolean false

You can trigger it yourself using: dbus-send --print-reply --type=method_call --dest=com.jolla.settings.system.flashlight /com/jolla/settings/system/flashlight com.jolla.settings.system.flashlight.toggleFlashlight

verymilan commented 7 years ago

You really mean the one from Settings -> Event View -> Select shortcuts -> Flashlight?

Yes

Too bad, it only returns:

method return time=1485297340.273115 sender=:1.141 -> destination=:1.140 serial=3 reply_serial=2
   boolean true

I hoped for an error message to work with.

wdehoog commented 7 years ago

Currently I have this in my /init.bacon.rc:

on boot

Torch permissions.

chown system camera /sys/class/leds/led:flash_torch/brightness
chmod 0660 /sys/class/leds/led:flash_torch/brightness

Can you check if you have it as well and what the actual permissions are on '/sys/class/leds/led:flash_torch/brightness'

verymilan commented 7 years ago

I am sorry but i am not able to compare anymore since sailfish (sailfish itself) lacks too many things i need for production right now. I should play around with multirom somewhen... . Looks like my system fails to decompress the backup i made with twrp, otherwise i may would be able to mount it and take a look. I may be back with sailfish on my phone in some weeks.