[Samsung Galaxy S 5 Unified Development] x2k13:
Okay, here's a log I recorded via MatLog Libre. Steps:

Start recording

Press power to lock the screen

Double-press power again to start the camera

*Error connecting to camera*

Unlock phone

Stop recording, export log

I hope that helps. The issue is already mentioned in this thread several times, not only by me. ;)

Edit: *sighs* xda won't keep my attachments so here's the log online:

2021-11-17-15-08-01 - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com

I think the interesting part begins at line 360.

Edit2: Looking for 'connect' in the log I stumbled across this, starting at line 417:

11-17 15:08:07.946 V/CAM_PhotoModule(25247): Open camera device.
11-17 15:08:07.947 V/CameraHolder(25247): open camera 0
11-17 15:08:07.948 W/ServiceManager( 631): Permission failure: android.permission.SYSTEM_CAMERA from uid=10117 pid=25247
11-17 15:08:07.948 I/CameraService( 631): CameraService::connect call (PID -1 "org.lineageos.snap", camera ID 0) for HAL version 256 and Camera API version 1
11-17 15:08:07.951 I/CameraService( 631): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0
11-17 15:08:07.952 I/CameraService( 631): Camera 0: Access for "org.lineageos.snap" has been restricted
11-17 15:08:07.952 E/CameraService( 631): connectHelper: Could not initialize client from HAL.
11-17 15:08:07.953 E/CameraService( 631): unregisterMonitorUid: Trying to unregister uid: 10117 which is not monitored!
11-17 15:08:07.953 I/CameraService( 631): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
11-17 15:08:07.953 I/CameraService( 631): disconnect: Disconnected client for camera 0 for PID 25247
11-17 15:08:07.954 V/CAM_AndroidCameraManagerImpl(25247): openLegacy failed due to null, using open instead
11-17 15:08:07.955 W/ServiceManager( 631): Permission failure: android.permission.SYSTEM_CAMERA from uid=10117 pid=25247
11-17 15:08:07.955 W/ServiceManager( 631): Permission failure: android.permission.SYSTEM_CAMERA from uid=10117 pid=25247
11-17 15:08:07.955 I/CameraService( 631): CameraService::connect call (PID -1 "org.lineageos.snap", camera ID 0) for HAL version default and Camera API version 1
11-17 15:08:07.961 I/CameraService( 631): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=0
11-17 15:08:07.963 I/CameraService( 631): Camera 0: Access for "org.lineageos.snap" has been restricted
11-17 15:08:07.963 E/CameraService( 631): connectHelper: Could not initialize client from HAL.
11-17 15:08:07.963 D/WifiNl80211Manager( 791): Scan result ready event
11-17 15:08:07.963 E/CameraService( 631): unregisterMonitorUid: Trying to unregister uid: 10117 which is not monitored!
11-17 15:08:07.963 D/WifiNative( 791): Scan result ready event
11-17 15:08:07.963 I/CameraService( 631): onTorchStatusChangedLocked: Torch status changed for cameraId=0, newStatus=1
11-17 15:08:07.964 I/CameraService( 631): disconnect: Disconnected client for camera 0 for PID 25247
11-17 15:08:07.964 W/CameraBase(25247): An error occurred while connecting to camera 0: Status(-8, EX_SERVICE_SPECIFIC): '6: connectHelper:1754: Camera "0" disabled by policy'
11-17 15:08:07.964 E/CameraHolder(25247): fail to connect Camera:-1, aborting.
11-17 15:08:07.964 E/CAM_PhotoModule(25247): Failed to open camera:0