[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Arkbird1000:
I've run into a problem with the torch/flash on LineageOS versions 15.1, 16, and 17.1 (official and unofficial) where it will only work once per boot. After a bunch of searching and flashing, I figured it might be best to ask for assistance.

I'm using a VS995 with only Magisk flashed after installing the ROM. The torch works as it should under stock Nougat/Oreo. Here's the section of the log that looked relevant to my eye, taken under the latest available unofficial 17.1.

07-05 21:11:37.100 1882 1882 D StatusBar: disable<e i a s b h r c s > disable2<q i n >
07-05 21:11:37.108 2272 2272 W DPMReceiver: type=1400 audit(0.0:101): avc: denied { write } for name="dpmd" dev="tmpfs" ino=21694 scontext=u:r:system_app:s0 tcontext=u:object_r:dpmd_socket:s0 tclass=sock_file permissive=0
07-05 21:11:37.111 2272 3416 I DPMJ : |REQ:RCVR| DPM creating socket
07-05 21:11:37.112 664 1039 D sensors_hal_Ctx: poll:polldata:1, sensor:1, type:1, x:-2.359970 y:7.810532 z:6.240860
07-05 21:11:37.113 664 1039 D sensors_hal_Util: waitForResponse: timeout=0
07-05 21:11:37.152 664 1039 D sensors_hal_Ctx: poll:polldata:1, sensor:1, type:1, x:-1.852402 y:7.025238 z:5.642303
07-05 21:11:37.152 664 1039 D sensors_hal_Util: waitForResponse: timeout=0
07-05 21:11:37.192 664 1039 D sensors_hal_Ctx: poll:polldata:1, sensor:1, type:1, x:-1.675232 y:6.656525 z:5.388519
07-05 21:11:37.192 664 1039 D sensors_hal_Util: waitForResponse: timeout=0
07-05 21:11:38.224 786 4040 I CameraProviderManager: Camera device device@1.0/legacy/0 torch status is now AVAILABLE_ON
07-05 21:11:38.224 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=2
07-05 21:11:38.229 786 4040 I CameraProviderManager: Camera device device@3.3/legacy/0 torch status is now AVAILABLE_ON
07-05 21:11:38.229 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=2
07-05 21:11:38.230 786 4040 I CameraService: Torch for camera id 0 turned on for client PID 1882
07-05 21:11:38.238 973 973 V SettingsProvider: Notifying for 0: content://settings/secure/flashlight_enabled
07-05 21:11:39.661 786 4040 I CameraProviderManager: Camera device device@1.0/legacy/0 torch status is now AVAILABLE_OFF
07-05 21:11:39.661 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
07-05 21:11:39.663 786 4040 I CameraProviderManager: Camera device device@3.3/legacy/0 torch status is now AVAILABLE_OFF
07-05 21:11:39.663 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
07-05 21:11:39.664 786 4040 I CameraService: Torch for camera id 0 turned off for client PID 1882
07-05 21:11:40.961 786 4040 I CameraProviderManager: Camera device device@1.0/legacy/0 torch status is now AVAILABLE_ON
07-05 21:11:40.962 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=2
07-05 21:11:40.963 786 4040 I CameraProviderManager: Camera device device@3.3/legacy/0 torch status is now AVAILABLE_ON
07-05 21:11:40.964 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=2
07-05 21:11:40.965 786 4040 I CameraService: Torch for camera id 0 turned on for client PID 1882
07-05 21:11:41.112 2272 2272 W DPMReceiver: type=1400 audit(0.0:102): avc: denied { write } for name="dpmd" dev="tmpfs" ino=21694 scontext=u:r:system_app:s0 tcontext=u:object_r:dpmd_socket:s0 tclass=sock_file permissive=0
07-05 21:11:41.113 2272 3416 I DPMJ : |REQ:RCVR| DPM creating socket
07-05 21:11:42.559 782 809 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
07-05 21:11:42.654 786 4040 I CameraProviderManager: Camera device device@1.0/legacy/0 torch status is now AVAILABLE_OFF
07-05 21:11:42.654 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
07-05 21:11:42.656 786 4040 I CameraProviderManager: Camera device device@3.3/legacy/0 torch status is now AVAILABLE_OFF
07-05 21:11:42.656 786 4040 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
07-05 21:11:42.658 786 4040 I CameraService: Torch for camera id 0 turned off for client PID 1882
07-05 21:11:43.691 1882 1882 D StatusBar: disable<e i a s b h r c s > disable2<q i n >

Help and suggestions appreciated!