Giter Site home page Giter Site logo

maximbaz / wluma Goto Github PK

View Code? Open in Web Editor NEW
589.0 14.0 26.0 326 KB

Automatic brightness adjustment based on screen contents and ALS

License: ISC License

Makefile 1.63% Rust 98.37%
brightness brightness-adjustment brightness-level adaptive adaptive-learning screen night-mode dark-mode dark-theme backlight

wluma's Issues

[Bug]: No such file or directory

Steps for reproducing the issue

image

What is the buggy behavior?

image

What is the expected behavior?

image

Logs

RUST_LOG=debug wluma

Version

image

Environment

lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"

[Bug]: Panick if needed Vulkan extensions are not available

Steps for reproducing the issue

I have an old Nvidia GPU running with nouveau, which does not provide Vulkan. Instead, a probably not very conformant software implementation, lavapipe (part of mesa), is available and used.

What is the buggy behavior?

Shortly after launching wluma it panickes/crashes (see logs).

I think by moving the initialization of the frame_processor in main.rs line 70 to the case when the capturer config is Wlroots, no Vulkan is required/initialized if no capturer is used, fixing my problem.

What is the expected behavior?

As I set capturer = "none" on all outputs in the config, no Vulkan is required and wluma doesn't choke on missing features or other errors regarding Vulkan.

Logs

$ RUST_LOG=trace wluma
[2022-01-27T12:12:51Z DEBUG wluma] Using Config {
        als: Time {
            thresholds: {
                7: "dark",
                11: "normal",
                0: "night",
                9: "dim",
                18: "dark",
                13: "bright",
                16: "normal",
                20: "night",
            },
        },
        output: [
            DdcUtil(
                DdcUtilOutput {
                    name: "DELL 1908FP",
                    capturer: None,
                    min_brightness: 1,
                },
            ),
            DdcUtil(
                DdcUtilOutput {
                    name: "W2443",
                    capturer: None,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2022-01-27T12:12:52Z TRACE ddc_hi] DisplayInfo::from_edid(I2cDevice, 22785)
[2022-01-27T12:12:52Z TRACE ddc_hi] DisplayInfo::from_edid(I2cDevice, 22789)
[2022-01-27T12:12:53Z TRACE ddc_hi] DisplayInfo::from_capabilities(I2cDevice, 22785)
[2022-01-27T12:12:54Z DEBUG wluma::brightness::ddcutil] Discovered displays: ["W2443 "]
[2022-01-27T12:12:54Z WARN  wluma] Skipping 'DELL 1908FP' as it might be disconnected: Unable to find display
[2022-01-27T12:12:54Z TRACE ddc_hi] DisplayInfo::from_edid(I2cDevice, 22785)
[2022-01-27T12:12:54Z TRACE ddc_hi] DisplayInfo::from_edid(I2cDevice, 22789)
[2022-01-27T12:12:55Z TRACE ddc_hi] DisplayInfo::from_capabilities(I2cDevice, 22785)
[2022-01-27T12:12:56Z DEBUG wluma::brightness::ddcutil] Discovered displays: ["W2443 "]
[2022-01-27T12:12:56Z DEBUG wluma::brightness::ddcutil] Using display 'W2443 ' for config 'W2443'
[2022-01-27T12:12:56Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
[2022-01-27T12:12:56Z TRACE wluma::als::time] ALS (time): bright (13)
thread 'predictor-W2443' panicked at 'Unable to initialize Vulkan: ERROR_EXTENSION_NOT_PRESENT', src/main.rs:72:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
vulkaninfo
$ vulkaninfo
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Driver /usr/lib/libvulkan_intel.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Driver /usr/lib/libvulkan_lvp.so supports Vulkan 1.1, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Driver /usr/lib/libvulkan_radeon.so supports Vulkan 1.2, but only supports loader interface version 4. Interface version 5 or newer required to support this version of Vulkan (Policy #LDP_DRIVER_7)
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 3.  Skipping ICD.
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
==========
VULKANINFO
==========

Vulkan Instance Version: 1.2.203


Instance Extensions: count = 19
===============================
  VK_EXT_acquire_drm_display             : extension revision 1
  VK_EXT_acquire_xlib_display            : extension revision 1
  VK_EXT_debug_report                    : extension revision 10
  VK_EXT_debug_utils                     : extension revision 2
  VK_EXT_direct_mode_display             : extension revision 1
  VK_EXT_display_surface_counter         : extension revision 1
  VK_KHR_device_group_creation           : extension revision 1
  VK_KHR_display                         : extension revision 23
  VK_KHR_external_fence_capabilities     : extension revision 1
  VK_KHR_external_memory_capabilities    : extension revision 1
  VK_KHR_external_semaphore_capabilities : extension revision 1
  VK_KHR_get_display_properties2         : extension revision 1
  VK_KHR_get_physical_device_properties2 : extension revision 2
  VK_KHR_get_surface_capabilities2       : extension revision 1
  VK_KHR_surface                         : extension revision 25
  VK_KHR_surface_protected_capabilities  : extension revision 1
  VK_KHR_wayland_surface                 : extension revision 6
  VK_KHR_xcb_surface                     : extension revision 6
  VK_KHR_xlib_surface                    : extension revision 6

Layers: count = 6
=================
VK_LAYER_MESA_device_select (Linux device selection layer) Vulkan version 1.2.73, layer version 1:
  Layer Extensions: count = 0
  Devices: count = 1
  	GPU id = 0 (llvmpipe (LLVM 13.0.0, 256 bits))
  	Layer-Device Extensions: count = 0

VK_LAYER_MESA_overlay (Mesa Overlay layer) Vulkan version 1.2.199, layer version 1:
  Layer Extensions: count = 0
  Devices: count = 1
  	GPU id = 0 (llvmpipe (LLVM 13.0.0, 256 bits))
  	Layer-Device Extensions: count = 0

VK_LAYER_VALVE_steam_fossilize_32 (Steam Pipeline Caching Layer) Vulkan version 1.2.136, layer version 1:
  Layer Extensions: count = 0
  Devices: count = 1
  	GPU id = 0 (llvmpipe (LLVM 13.0.0, 256 bits))
  	Layer-Device Extensions: count = 0

VK_LAYER_VALVE_steam_fossilize_64 (Steam Pipeline Caching Layer) Vulkan version 1.2.136, layer version 1:
  Layer Extensions: count = 0
  Devices: count = 1
  	GPU id = 0 (llvmpipe (LLVM 13.0.0, 256 bits))
  	Layer-Device Extensions: count = 0

VK_LAYER_VALVE_steam_overlay_32 (Steam Overlay Layer) Vulkan version 1.2.136, layer version 1:
  Layer Extensions: count = 0
  Devices: count = 1
  	GPU id = 0 (llvmpipe (LLVM 13.0.0, 256 bits))
  	Layer-Device Extensions: count = 0

VK_LAYER_VALVE_steam_overlay_64 (Steam Overlay Layer) Vulkan version 1.2.136, layer version 1:
  Layer Extensions: count = 0
  Devices: count = 1
  	GPU id = 0 (llvmpipe (LLVM 13.0.0, 256 bits))
  	Layer-Device Extensions: count = 0

Presentable Surfaces:
=====================
GPU id : 0 (llvmpipe (LLVM 13.0.0, 256 bits)):
  Surface types: count = 2
  	VK_KHR_xcb_surface
  	VK_KHR_xlib_surface
  Formats: count = 2
  	SurfaceFormat[0]:
  		format = FORMAT_B8G8R8A8_SRGB
  		colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
  	SurfaceFormat[1]:
  		format = FORMAT_B8G8R8A8_UNORM
  		colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
  Present Modes: count = 4
  	PRESENT_MODE_IMMEDIATE_KHR
  	PRESENT_MODE_MAILBOX_KHR
  	PRESENT_MODE_FIFO_KHR
  	PRESENT_MODE_FIFO_RELAXED_KHR
  VkSurfaceCapabilitiesKHR:
  -------------------------
  	minImageCount = 3
  	maxImageCount = 0
  	currentExtent:
  		width = 256
  		height = 256
  	minImageExtent:
  		width = 256
  		height = 256
  	maxImageExtent:
  		width = 256
  		height = 256
  	maxImageArrayLayers = 1
  	supportedTransforms: count = 1
  		SURFACE_TRANSFORM_IDENTITY_BIT_KHR
  	currentTransform = SURFACE_TRANSFORM_IDENTITY_BIT_KHR
  	supportedCompositeAlpha: count = 2
  		COMPOSITE_ALPHA_OPAQUE_BIT_KHR
  		COMPOSITE_ALPHA_INHERIT_BIT_KHR
  	supportedUsageFlags: count = 5
  		IMAGE_USAGE_TRANSFER_SRC_BIT
  		IMAGE_USAGE_TRANSFER_DST_BIT
  		IMAGE_USAGE_SAMPLED_BIT
  		IMAGE_USAGE_STORAGE_BIT
  		IMAGE_USAGE_COLOR_ATTACHMENT_BIT
  VkSurfaceCapabilities2EXT:
  --------------------------
  	supportedSurfaceCounters:
  		None
  VkSurfaceProtectedCapabilitiesKHRWARNING: lavapipe is not a conformant vulkan implementation, testing use only.
:
  ----------------------------------
  	supportsProtected = false


GPU id : 0 (llvmpipe (LLVM 13.0.0, 256 bits)):
  Surface type = VK_KHR_wayland_surface
  Formats: count = 0
  Present Modes: count = 2
  	PRESENT_MODE_MAILBOX_KHR
  	PRESENT_MODE_FIFO_KHR
  VkSurfaceCapabilitiesKHR:
  -------------------------
  	minImageCount = 4
  	maxImageCount = 0
  	currentExtent:
  		width = 4294967295
  		height = 4294967295
  	minImageExtent:
  		width = 1
  		height = 1
  	maxImageExtent:
  		width = 16384
  		height = 16384
  	maxImageArrayLayers = 1
  	supportedTransforms: count = 1
  		SURFACE_TRANSFORM_IDENTITY_BIT_KHR
  	currentTransform = SURFACE_TRANSFORM_IDENTITY_BIT_KHR
  	supportedCompositeAlpha: count = 2
  		COMPOSITE_ALPHA_OPAQUE_BIT_KHR
  		COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
  	supportedUsageFlags: count = 5
  		IMAGE_USAGE_TRANSFER_SRC_BIT
  		IMAGE_USAGE_TRANSFER_DST_BIT
  		IMAGE_USAGE_SAMPLED_BIT
  		IMAGE_USAGE_STORAGE_BIT
  		IMAGE_USAGE_COLOR_ATTACHMENT_BIT
  VkSurfaceCapabilities2EXT:
  --------------------------
  	supportedSurfaceCounters:
  		None
  VkSurfaceProtectedCapabilitiesKHR:
  ----------------------------------
  	supportsProtected = false



Device Groups:
==============
Group 0:
  Properties:
  	physicalDevices: count = 1
  		llvmpipe (LLVM 13.0.0, 256 bits) (ID: 0)
  	subsetAllocation = 0

  Present Capabilities:
  	llvmpipe (LLVM 13.0.0, 256 bits) (ID: 0):
  		Can present images from the following devices: count = 1
  			llvmpipe (LLVM 13.0.0, 256 bits) (ID: 0)
  	Present modes: count = 1
  		DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR


Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
  apiVersion        = 4202695 (1.2.199)
  driverVersion     = 1 (0x0001)
  vendorID          = 0x10005
  deviceID          = 0x0000
  deviceType        = PHYSICAL_DEVICE_TYPE_CPU
  deviceName        = llvmpipe (LLVM 13.0.0, 256 bits)
  pipelineCacheUUID = 76616c2d-742d-3237-3963-633337616300

VkPhysicalDeviceLimits:
-----------------------
  maxImageDimension1D                             = 16384
  maxImageDimension2D                             = 16384
  maxImageDimension3D                             = 4096
  maxImageDimensionCube                           = 32768
  maxImageArrayLayers                             = 2048
  maxTexelBufferElements                          = 134217728
  maxUniformBufferRange                           = 65536
  maxStorageBufferRange                           = 134217728
  maxPushConstantsSize                            = 128
  maxMemoryAllocationCount                        = 4294967295
  maxSamplerAllocationCount                       = 32768
  bufferImageGranularity                          = 0x00000040
  sparseAddressSpaceSize                          = 0x00000000
  maxBoundDescriptorSets                          = 8
  maxPerStageDescriptorSamplers                   = 32
  maxPerStageDescriptorUniformBuffers             = 15
  maxPerStageDescriptorStorageBuffers             = 16
  maxPerStageDescriptorSampledImages              = 128
  maxPerStageDescriptorStorageImages              = 16
  maxPerStageDescriptorInputAttachments           = 8
  maxPerStageResources                            = 128
  maxDescriptorSetSamplers                        = 32768
  maxDescriptorSetUniformBuffers                  = 256
  maxDescriptorSetUniformBuffersDynamic           = 256
  maxDescriptorSetStorageBuffers                  = 256
  maxDescriptorSetStorageBuffersDynamic           = 256
  maxDescriptorSetSampledImages                   = 256
  maxDescriptorSetStorageImages                   = 256
  maxDescriptorSetInputAttachments                = 256
  maxVertexInputAttributes                        = 32
  maxVertexInputBindings                          = 32
  maxVertexInputAttributeOffset                   = 2047
  maxVertexInputBindingStride                     = 2048
  maxVertexOutputComponents                       = 128
  maxTessellationGenerationLevel                  = 64
  maxTessellationPatchSize                        = 32
  maxTessellationControlPerVertexInputComponents  = 128
  maxTessellationControlPerVertexOutputComponents = 128
  maxTessellationControlPerPatchOutputComponents  = 128
  maxTessellationControlTotalOutputComponents     = 4096
  maxTessellationEvaluationInputComponents        = 128
  maxTessellationEvaluationOutputComponents       = 128
  maxGeometryShaderInvocations                    = 32
  maxGeometryInputComponents                      = 64
  maxGeometryOutputComponents                     = 128
  maxGeometryOutputVertices                       = 1024
  maxGeometryTotalOutputComponents                = 1024
  maxFragmentInputComponents                      = 128
  maxFragmentOutputAttachments                    = 8
  maxFragmentDualSrcAttachments                   = 2
  maxFragmentCombinedOutputResources              = 40
  maxComputeSharedMemorySize                      = 32768
  maxComputeWorkGroupCount: count = 3
  	65535
  	65535
  	65535
  maxComputeWorkGroupInvocations                  = 1024
  maxComputeWorkGroupSize: count = 3
  	1024
  	1024
  	1024
  subPixelPrecisionBits                           = 8
  subTexelPrecisionBits                           = 8
  mipmapPrecisionBits                             = 4
  maxDrawIndexedIndexValue                        = 4294967295
  maxDrawIndirectCount                            = 4294967295
  maxSamplerLodBias                               = 16
  maxSamplerAnisotropy                            = 16
  maxViewports                                    = 16
  maxViewportDimensions: count = 2
  	16384
  	16384
  viewportBoundsRange: count = 2
  	-32768
  	32768
  viewportSubPixelBits                            = 0
  minMemoryMapAlignment                           = 64
  minTexelBufferOffsetAlignment                   = 0x00000010
  minUniformBufferOffsetAlignment                 = 0x00000010
  minStorageBufferOffsetAlignment                 = 0x00000010
  minTexelOffset                                  = -32
  maxTexelOffset                                  = 31
  minTexelGatherOffset                            = -32
  maxTexelGatherOffset                            = 31
  minInterpolationOffset                          = -2
  maxInterpolationOffset                          = 2
  subPixelInterpolationOffsetBits                 = 8
  maxFramebufferWidth                             = 16384
  maxFramebufferHeight                            = 16384
  maxFramebufferLayers                            = 2048
  framebufferColorSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  framebufferDepthSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  framebufferStencilSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  framebufferNoAttachmentsSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  maxColorAttachments                             = 8
  sampledImageColorSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  sampledImageIntegerSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  sampledImageDepthSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  sampledImageStencilSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  storageImageSampleCounts: count = 2
  	SAMPLE_COUNT_1_BIT
  	SAMPLE_COUNT_4_BIT
  maxSampleMaskWords                              = 1
  timestampComputeAndGraphics                     = true
  timestampPeriod                                 = 1
  maxClipDistances                                = 8
  maxCullDistances                                = 8
  maxCombinedClipAndCullDistances                 = 8
  discreteQueuePriorities                         = 2
  pointSizeRange: count = 2
  	0
  	255
  lineWidthRange: count = 2
  	1
  	255
  pointSizeGranularity                            = 0.125
  lineWidthGranularity                            = 0.0078125
  strictLines                                     = true
  standardSampleLocations                         = true
  optimalBufferCopyOffsetAlignment                = 0x00000080
  optimalBufferCopyRowPitchAlignment              = 0x00000080
  nonCoherentAtomSize                             = 0x00000040

VkPhysicalDeviceSparseProperties:
---------------------------------
  residencyStandard2DBlockShape            = false
  residencyStandard2DMultisampleBlockShape = false
  residencyStandard3DBlockShape            = false
  residencyAlignedMipSize                  = false
  residencyNonResidentStrict               = false

VkPhysicalDeviceCustomBorderColorPropertiesEXT:
-----------------------------------------------
  maxCustomBorderColorSamplers = 32768

VkPhysicalDeviceDepthStencilResolveProperties:
----------------------------------------------
  supportedDepthResolveModes: count = 2
  	RESOLVE_MODE_SAMPLE_ZERO_BIT
  	RESOLVE_MODE_AVERAGE_BIT
  supportedStencilResolveModes: count = 1
  	RESOLVE_MODE_SAMPLE_ZERO_BIT
  independentResolveNone = false
  independentResolve     = false

VkPhysicalDeviceDescriptorIndexingProperties:
---------------------------------------------
  maxUpdateAfterBindDescriptorsInAllPools              = 67108863
  shaderUniformBufferArrayNonUniformIndexingNative     = false
  shaderSampledImageArrayNonUniformIndexingNative      = false
  shaderStorageBufferArrayNonUniformIndexingNative     = false
  shaderStorageImageArrayNonUniformIndexingNative      = false
  shaderInputAttachmentArrayNonUniformIndexingNative   = false
  robustBufferAccessUpdateAfterBind                    = true
  quadDivergentImplicitLod                             = false
  maxPerStageDescriptorUpdateAfterBindSamplers         = 65536
  maxPerStageDescriptorUpdateAfterBindUniformBuffers   = 65536
  maxPerStageDescriptorUpdateAfterBindStorageBuffers   = 65536
  maxPerStageDescriptorUpdateAfterBindSampledImages    = 65536
  maxPerStageDescriptorUpdateAfterBindStorageImages    = 65536
  maxPerStageDescriptorUpdateAfterBindInputAttachments = 65536
  maxPerStageUpdateAfterBindResources                  = 65536
  maxDescriptorSetUpdateAfterBindSamplers              = 65536
  maxDescriptorSetUpdateAfterBindUniformBuffers        = 65536
  maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 16
  maxDescriptorSetUpdateAfterBindStorageBuffers        = 65536
  maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 16
  maxDescriptorSetUpdateAfterBindSampledImages         = 65536
  maxDescriptorSetUpdateAfterBindStorageImages         = 65536
  maxDescriptorSetUpdateAfterBindInputAttachments      = 65536

VkPhysicalDeviceDriverProperties:
---------------------------------
  driverID           = DRIVER_ID_MESA_LLVMPIPE
  driverName         = llvmpipe
  driverInfo         = Mesa 22.0.0-devel (git-279cc37ac0) (LLVM 13.0.0)
  conformanceVersion = 0.0.0.0

VkPhysicalDeviceExternalMemoryHostPropertiesEXT:
------------------------------------------------
  minImportedHostPointerAlignment = 0x00001000

VkPhysicalDeviceFloatControlsProperties:
----------------------------------------
  denormBehaviorIndependence            = SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL
  roundingModeIndependence              = SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL
  shaderSignedZeroInfNanPreserveFloat16 = true
  shaderSignedZeroInfNanPreserveFloat32 = true
  shaderSignedZeroInfNanPreserveFloat64 = true
  shaderDenormPreserveFloat16           = false
  shaderDenormPreserveFloat32           = false
  shaderDenormPreserveFloat64           = false
  shaderDenormFlushToZeroFloat16        = false
  shaderDenormFlushToZeroFloat32        = false
  shaderDenormFlushToZeroFloat64        = false
  shaderRoundingModeRTEFloat16          = true
  shaderRoundingModeRTEFloat32          = true
  shaderRoundingModeRTEFloat64          = true
  shaderRoundingModeRTZFloat16          = false
  shaderRoundingModeRTZFloat32          = false
  shaderRoundingModeRTZFloat64          = false

VkPhysicalDeviceIDProperties:
-----------------------------
  deviceUUID      = 00000000-0000-0000-0000-000000000000
  driverUUID      = 00000000-0000-0000-0000-000000000000
  deviceNodeMask  = 0
  deviceLUIDValid = false

VkPhysicalDeviceLineRasterizationPropertiesEXT:
-----------------------------------------------
  lineSubPixelPrecisionBits = 8

VkPhysicalDeviceMaintenance3Properties:
---------------------------------------
  maxPerSetDescriptors    = 1024
  maxMemoryAllocationSize = 0x80000000

VkPhysicalDeviceMultiDrawPropertiesEXT:
---------------------------------------
  maxMultiDrawCount = 2048

VkPhysicalDeviceMultiviewProperties:
------------------------------------
  maxMultiviewViewCount     = 6
  maxMultiviewInstanceIndex = 2147483647

VkPhysicalDevicePointClippingProperties:
----------------------------------------
  pointClippingBehavior = POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES

VkPhysicalDeviceProtectedMemoryProperties:
------------------------------------------
  protectedNoFault = false

VkPhysicalDeviceProvokingVertexPropertiesEXT:
---------------------------------------------
  provokingVertexModePerPipeline                       = true
  transformFeedbackPreservesTriangleFanProvokingVertex = true

VkPhysicalDevicePushDescriptorPropertiesKHR:
--------------------------------------------
  maxPushDescriptors = 32

VkPhysicalDeviceSamplerFilterMinmaxProperties:
----------------------------------------------
  filterMinmaxSingleComponentFormats = true
  filterMinmaxImageComponentMapping  = true

VkPhysicalDeviceSubgroupProperties:
-----------------------------------
  subgroupSize              = 8
  supportedStages: count = 4
  	SHADER_STAGE_FRAGMENT_BIT
  	SHADER_STAGE_COMPUTE_BIT
  	SHADER_STAGE_ALL_GRAPHICS
  	SHADER_STAGE_ALL
  supportedOperations: count = 4
  	SUBGROUP_FEATURE_BASIC_BIT
  	SUBGROUP_FEATURE_VOTE_BIT
  	SUBGROUP_FEATURE_ARITHMETIC_BIT
  	SUBGROUP_FEATURE_BALLOT_BIT
  quadOperationsInAllStages = false

VkPhysicalDeviceTimelineSemaphoreProperties:
--------------------------------------------
  maxTimelineSemaphoreValueDifference = 18446744073709551615

VkPhysicalDeviceTransformFeedbackPropertiesEXT:
-----------------------------------------------
  maxTransformFeedbackStreams                = 4
  maxTransformFeedbackBuffers                = 4
  maxTransformFeedbackBufferSize             = 0xffffffff
  maxTransformFeedbackStreamDataSize         = 512
  maxTransformFeedbackBufferDataSize         = 512
  maxTransformFeedbackBufferDataStride       = 512
  transformFeedbackQueries                   = true
  transformFeedbackStreamsLinesTriangles     = false
  transformFeedbackRasterizationStreamSelect = false
  transformFeedbackDraw                      = true

VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT:
----------------------------------------------------
  maxVertexAttribDivisor = 4294967295

VkPhysicalDeviceVulkan11Properties:
-----------------------------------
  deviceUUID                        = 00000000-0000-0000-0000-000000000000
  driverUUID                        = 00000000-0000-0000-0000-000000000000
  deviceNodeMask                    = 0
  deviceLUIDValid                   = false
  subgroupSize                      = 8
  subgroupSupportedStages: count = 4
  	SHADER_STAGE_FRAGMENT_BIT
  	SHADER_STAGE_COMPUTE_BIT
  	SHADER_STAGE_ALL_GRAPHICS
  	SHADER_STAGE_ALL
  subgroupSupportedOperations: count = 4
  	SUBGROUP_FEATURE_BASIC_BIT
  	SUBGROUP_FEATURE_VOTE_BIT
  	SUBGROUP_FEATURE_ARITHMETIC_BIT
  	SUBGROUP_FEATURE_BALLOT_BIT
  subgroupQuadOperationsInAllStages = false
  pointClippingBehavior             = POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES
  maxMultiviewViewCount             = 6
  maxMultiviewInstanceIndex         = 2147483647
  protectedNoFault                  = false
  maxPerSetDescriptors              = 1024
  maxMemoryAllocationSize           = 0x80000000

VkPhysicalDeviceVulkan12Properties:
-----------------------------------
  driverID                                             = DRIVER_ID_MESA_LLVMPIPE
  driverName                                           = llvmpipe
  driverInfo                                           = Mesa 22.0.0-devel (git-279cc37ac0) (LLVM 13.0.0)
  conformanceVersion                                   = 0.0.0.0
  denormBehaviorIndependence                           = SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL
  roundingModeIndependence                             = SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL
  shaderSignedZeroInfNanPreserveFloat16                = true
  shaderSignedZeroInfNanPreserveFloat32                = true
  shaderSignedZeroInfNanPreserveFloat64                = true
  shaderDenormPreserveFloat16                          = false
  shaderDenormPreserveFloat32                          = false
  shaderDenormPreserveFloat64                          = false
  shaderDenormFlushToZeroFloat16                       = false
  shaderDenormFlushToZeroFloat32                       = false
  shaderDenormFlushToZeroFloat64                       = false
  shaderRoundingModeRTEFloat16                         = true
  shaderRoundingModeRTEFloat32                         = true
  shaderRoundingModeRTEFloat64                         = true
  shaderRoundingModeRTZFloat16                         = false
  shaderRoundingModeRTZFloat32                         = false
  shaderRoundingModeRTZFloat64                         = false
  maxUpdateAfterBindDescriptorsInAllPools              = 67108863
  shaderUniformBufferArrayNonUniformIndexingNative     = false
  shaderSampledImageArrayNonUniformIndexingNative      = false
  shaderStorageBufferArrayNonUniformIndexingNative     = false
  shaderStorageImageArrayNonUniformIndexingNative      = false
  shaderInputAttachmentArrayNonUniformIndexingNative   = false
  robustBufferAccessUpdateAfterBind                    = true
  quadDivergentImplicitLod                             = false
  maxPerStageDescriptorUpdateAfterBindSamplers         = 65536
  maxPerStageDescriptorUpdateAfterBindUniformBuffers   = 65536
  maxPerStageDescriptorUpdateAfterBindStorageBuffers   = 65536
  maxPerStageDescriptorUpdateAfterBindSampledImages    = 65536
  maxPerStageDescriptorUpdateAfterBindStorageImages    = 65536
  maxPerStageDescriptorUpdateAfterBindInputAttachments = 65536
  maxPerStageUpdateAfterBindResources                  = 65536
  maxDescriptorSetUpdateAfterBindSamplers              = 65536
  maxDescriptorSetUpdateAfterBindUniformBuffers        = 65536
  maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = 16
  maxDescriptorSetUpdateAfterBindStorageBuffers        = 65536
  maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = 16
  maxDescriptorSetUpdateAfterBindSampledImages         = 65536
  maxDescriptorSetUpdateAfterBindStorageImages         = 65536
  maxDescriptorSetUpdateAfterBindInputAttachments      = 65536
  supportedDepthResolveModes: count = 2
  	RESOLVE_MODE_SAMPLE_ZERO_BIT
  	RESOLVE_MODE_AVERAGE_BIT
  supportedStencilResolveModes: count = 1
  	RESOLVE_MODE_SAMPLE_ZERO_BIT
  independentResolveNone                               = false
  independentResolve                                   = false
  filterMinmaxSingleComponentFormats                   = true
  filterMinmaxImageComponentMapping                    = true
  maxTimelineSemaphoreValueDifference                  = 18446744073709551615
  framebufferIntegerColorSampleCounts: count = 1
  	SAMPLE_COUNT_1_BIT


Device Extensions: count = 67
  VK_EXT_4444_formats                    : extension revision 1
  VK_EXT_calibrated_timestamps           : extension revision 2
  VK_EXT_color_write_enable              : extension revision 1
  VK_EXT_conditional_rendering           : extension revision 2
  VK_EXT_custom_border_color             : extension revision 12
  VK_EXT_depth_clip_enable               : extension revision 1
  VK_EXT_extended_dynamic_state          : extension revision 1
  VK_EXT_extended_dynamic_state2         : extension revision 1
  VK_EXT_external_memory_host            : extension revision 1
  VK_EXT_host_query_reset                : extension revision 1
  VK_EXT_index_type_uint8                : extension revision 1
  VK_EXT_line_rasterization              : extension revision 1
  VK_EXT_multi_draw                      : extension revision 1
  VK_EXT_post_depth_coverage             : extension revision 1
  VK_EXT_primitive_topology_list_restart : extension revision 1
  VK_EXT_private_data                    : extension revision 1
  VK_EXT_provoking_vertex                : extension revision 1
  VK_EXT_sampler_filter_minmax           : extension revision 2
  VK_EXT_scalar_block_layout             : extension revision 1
  VK_EXT_separate_stencil_usage          : extension revision 1
  VK_EXT_shader_stencil_export           : extension revision 1
  VK_EXT_shader_viewport_index_layer     : extension revision 1
  VK_EXT_transform_feedback              : extension revision 1
  VK_EXT_vertex_attribute_divisor        : extension revision 3
  VK_EXT_vertex_input_dynamic_state      : extension revision 2
  VK_GOOGLE_decorate_string              : extension revision 1
  VK_GOOGLE_hlsl_functionality1          : extension revision 1
  VK_KHR_16bit_storage                   : extension revision 1
  VK_KHR_8bit_storage                    : extension revision 1
  VK_KHR_bind_memory2                    : extension revision 1
  VK_KHR_buffer_device_address           : extension revision 1
  VK_KHR_copy_commands2                  : extension revision 1
  VK_KHR_create_renderpass2              : extension revision 1
  VK_KHR_dedicated_allocation            : extension revision 3
  VK_KHR_depth_stencil_resolve           : extension revision 1
  VK_KHR_descriptor_update_template      : extension revision 1
  VK_KHR_device_group                    : extension revision 4
  VK_KHR_draw_indirect_count             : extension revision 1
  VK_KHR_driver_properties               : extension revision 1
  VK_KHR_dynamic_rendering               : extension revision 1
  VK_KHR_external_fence                  : extension revision 1
  VK_KHR_external_memory                 : extension revision 1
  VK_KHR_external_memory_fd              : extension revision 1
  VK_KHR_external_semaphore              : extension revision 1
  VK_KHR_get_memory_requirements2        : extension revision 1
  VK_KHR_image_format_list               : extension revision 1
  VK_KHR_imageless_framebuffer           : extension revision 1
  VK_KHR_incremental_present             : extension revision 2
  VK_KHR_maintenance1                    : extension revision 2
  VK_KHR_maintenance2                    : extension revision 1
  VK_KHR_maintenance3                    : extension revision 1
  VK_KHR_multiview                       : extension revision 1
  VK_KHR_push_descriptor                 : extension revision 2
  VK_KHR_relaxed_block_layout            : extension revision 1
  VK_KHR_sampler_mirror_clamp_to_edge    : extension revision 3
  VK_KHR_separate_depth_stencil_layouts  : extension revision 1
  VK_KHR_shader_atomic_int64             : extension revision 1
  VK_KHR_shader_draw_parameters          : extension revision 1
  VK_KHR_shader_float16_int8             : extension revision 1
  VK_KHR_shader_float_controls           : extension revision 4
  VK_KHR_shader_subgroup_extended_types  : extension revision 1
  VK_KHR_spirv_1_4                       : extension revision 1
  VK_KHR_storage_buffer_storage_class    : extension revision 1
  VK_KHR_swapchain                       : extension revision 70
  VK_KHR_timeline_semaphore              : extension revision 2
  VK_KHR_uniform_buffer_standard_layout  : extension revision 1
  VK_KHR_variable_pointers               : extension revision 1

VkQueueFamilyProperties:
========================
  queueProperties[0]:
  -------------------
  	minImageTransferGranularity = (1,1,1)
  	queueCount                  = 1
  	queueFlags                  = QUEUE_GRAPHICS | QUEUE_COMPUTE | QUEUE_TRANSFER
  	timestampValidBits          = 64
  	present support             = true

VkPhysicalDeviceMemoryProperties:
=================================
memoryHeaps: count = 1
  memoryHeaps[0]:
  	size   = 2147483648 (0x80000000) (2.00 GiB)
  	flags: count = 1
  		MEMORY_HEAP_DEVICE_LOCAL_BIT
memoryTypes: count = 1
  memoryTypes[0]:
  	heapIndex     = 0
  	propertyFlags = 0x000f: count = 4
  		MEMORY_PROPERTY_DEVICE_LOCAL_BIT
  		MEMORY_PROPERTY_HOST_VISIBLE_BIT
  		MEMORY_PROPERTY_HOST_COHERENT_BIT
  		MEMORY_PROPERTY_HOST_CACHED_BIT
  	usable for:
  		IMAGE_TILING_OPTIMAL:
  			color images
  			FORMAT_D16_UNORM
  			FORMAT_X8_D24_UNORM_PACK32
  			FORMAT_D32_SFLOAT
  			FORMAT_S8_UINT
  			FORMAT_D24_UNORM_S8_UINT
  			FORMAT_D32_SFLOAT_S8_UINT
  			(non-sparse)
  		IMAGE_TILING_LINEAR:
  			color images
  			(non-sparse)

VkPhysicalDeviceFeatures:
=========================
  robustBufferAccess                      = true
  fullDrawIndexUint32                     = true
  imageCubeArray                          = true
  independentBlend                        = true
  geometryShader                          = true
  tessellationShader                      = true
  sampleRateShading                       = true
  dualSrcBlend                            = true
  logicOp                                 = true
  multiDrawIndirect                       = true
  drawIndirectFirstInstance               = true
  depthClamp                              = true
  depthBiasClamp                          = true
  fillModeNonSolid                        = true
  depthBounds                             = false
  wideLines                               = true
  largePoints                             = true
  alphaToOne                              = true
  multiViewport                           = true
  samplerAnisotropy                       = true
  textureCompressionETC2                  = false
  textureCompressionASTC_LDR              = false
  textureCompressionBC                    = true
  occlusionQueryPrecise                   = true
  pipelineStatisticsQuery                 = true
  vertexPipelineStoresAndAtomics          = true
  fragmentStoresAndAtomics                = true
  shaderTessellationAndGeometryPointSize  = true
  shaderImageGatherExtended               = true
  shaderStorageImageExtendedFormats       = true
  shaderStorageImageMultisample           = true
  shaderStorageImageReadWithoutFormat     = false
  shaderStorageImageWriteWithoutFormat    = true
  shaderUniformBufferArrayDynamicIndexing = true
  shaderSampledImageArrayDynamicIndexing  = false
  shaderStorageBufferArrayDynamicIndexing = true
  shaderStorageImageArrayDynamicIndexing  = false
  shaderClipDistance                      = true
  shaderCullDistance                      = true
  shaderFloat64                           = true
  shaderInt64                             = true
  shaderInt16                             = true
  shaderResourceResidency                 = false
  shaderResourceMinLod                    = false
  sparseBinding                           = false
  sparseResidencyBuffer                   = false
  sparseResidencyImage2D                  = false
  sparseResidencyImage3D                  = false
  sparseResidency2Samples                 = false
  sparseResidency4Samples                 = false
  sparseResidency8Samples                 = false
  sparseResidency16Samples                = false
  sparseResidencyAliased                  = false
  variableMultisampleRate                 = false
  inheritedQueries                        = false

VkPhysicalDevice16BitStorageFeatures:
-------------------------------------
  storageBuffer16BitAccess           = true
  uniformAndStorageBuffer16BitAccess = true
  storagePushConstant16              = true
  storageInputOutput16               = false

VkPhysicalDevice4444FormatsFeaturesEXT:
---------------------------------------
  formatA4R4G4B4 = true
  formatA4B4G4R4 = true

VkPhysicalDevice8BitStorageFeatures:
------------------------------------
  storageBuffer8BitAccess           = true
  uniformAndStorageBuffer8BitAccess = true
  storagePushConstant8              = true

VkPhysicalDeviceBufferDeviceAddressFeatures:
--------------------------------------------
  bufferDeviceAddress              = true
  bufferDeviceAddressCaptureReplay = false
  bufferDeviceAddressMultiDevice   = false

VkPhysicalDeviceColorWriteEnableFeaturesEXT:
--------------------------------------------
  colorWriteEnable = true

VkPhysicalDeviceConditionalRenderingFeaturesEXT:
------------------------------------------------
  conditionalRendering          = true
  inheritedConditionalRendering = false

VkPhysicalDeviceCustomBorderColorFeaturesEXT:
---------------------------------------------
  customBorderColors             = true
  customBorderColorWithoutFormat = true

VkPhysicalDeviceDepthClipEnableFeaturesEXT:
-------------------------------------------
  depthClipEnable = true

VkPhysicalDeviceDescriptorIndexingFeatures:
-------------------------------------------
  shaderInputAttachmentArrayDynamicIndexing          = false
  shaderUniformTexelBufferArrayDynamicIndexing       = false
  shaderStorageTexelBufferArrayDynamicIndexing       = false
  shaderUniformBufferArrayNonUniformIndexing         = false
  shaderSampledImageArrayNonUniformIndexing          = false
  shaderStorageBufferArrayNonUniformIndexing         = false
  shaderStorageImageArrayNonUniformIndexing          = false
  shaderInputAttachmentArrayNonUniformIndexing       = false
  shaderUniformTexelBufferArrayNonUniformIndexing    = false
  shaderStorageTexelBufferArrayNonUniformIndexing    = false
  descriptorBindingUniformBufferUpdateAfterBind      = false
  descriptorBindingSampledImageUpdateAfterBind       = false
  descriptorBindingStorageImageUpdateAfterBind       = false
  descriptorBindingStorageBufferUpdateAfterBind      = false
  descriptorBindingUniformTexelBufferUpdateAfterBind = false
  descriptorBindingStorageTexelBufferUpdateAfterBind = false
  descriptorBindingUpdateUnusedWhilePending          = false
  descriptorBindingPartiallyBound                    = false
  descriptorBindingVariableDescriptorCount           = false
  runtimeDescriptorArray                             = false

VkPhysicalDeviceDynamicRenderingFeaturesKHR:
--------------------------------------------
  dynamicRendering = true

VkPhysicalDeviceExtendedDynamicState2FeaturesEXT:
-------------------------------------------------
  extendedDynamicState2                   = true
  extendedDynamicState2LogicOp            = true
  extendedDynamicState2PatchControlPoints = true

VkPhysicalDeviceExtendedDynamicStateFeaturesEXT:
------------------------------------------------
  extendedDynamicState = true

VkPhysicalDeviceHostQueryResetFeatures:
---------------------------------------
  hostQueryReset = true

VkPhysicalDeviceImagelessFramebufferFeatures:
---------------------------------------------
  imagelessFramebuffer = true

VkPhysicalDeviceIndexTypeUint8FeaturesEXT:
------------------------------------------
  indexTypeUint8 = true

VkPhysicalDeviceLineRasterizationFeaturesEXT:
---------------------------------------------
  rectangularLines         = true
  bresenhamLines           = true
  smoothLines              = true
  stippledRectangularLines = true
  stippledBresenhamLines   = true
  stippledSmoothLines      = true

VkPhysicalDeviceMultiDrawFeaturesEXT:
-------------------------------------
  multiDraw = true

VkPhysicalDeviceMultiviewFeatures:
----------------------------------
  multiview                   = true
  multiviewGeometryShader     = true
  multiviewTessellationShader = true

VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT:
--------------------------------------------------------
  primitiveTopologyListRestart      = true
  primitiveTopologyPatchListRestart = true

VkPhysicalDevicePrivateDataFeaturesEXT:
---------------------------------------
  privateData = true

VkPhysicalDeviceProtectedMemoryFeatures:
----------------------------------------
  protectedMemory = false

VkPhysicalDeviceProvokingVertexFeaturesEXT:
-------------------------------------------
  provokingVertexLast                       = true
  transformFeedbackPreservesProvokingVertex = true

VkPhysicalDeviceSamplerYcbcrConversionFeatures:
-----------------------------------------------
  samplerYcbcrConversion = false

VkPhysicalDeviceScalarBlockLayoutFeatures:
------------------------------------------
  scalarBlockLayout = true

VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures:
----------------------------------------------------
  separateDepthStencilLayouts = true

VkPhysicalDeviceShaderAtomicInt64Features:
------------------------------------------
  shaderBufferInt64Atomics = true
  shaderSharedInt64Atomics = true

VkPhysicalDeviceShaderDrawParametersFeatures:
---------------------------------------------
  shaderDrawParameters = true

VkPhysicalDeviceShaderFloat16Int8Features:
------------------------------------------
  shaderFloat16 = true
  shaderInt8    = true

VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures:
----------------------------------------------------
  shaderSubgroupExtendedTypes = true

VkPhysicalDeviceTimelineSemaphoreFeatures:
------------------------------------------
  timelineSemaphore = true

VkPhysicalDeviceTransformFeedbackFeaturesEXT:
---------------------------------------------
  transformFeedback = true
  geometryStreams   = true

VkPhysicalDeviceUniformBufferStandardLayoutFeatures:
----------------------------------------------------
  uniformBufferStandardLayout = true

VkPhysicalDeviceVariablePointersFeatures:
-----------------------------------------
  variablePointersStorageBuffer = true
  variablePointers              = false

VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT:
--------------------------------------------------
  vertexAttributeInstanceRateDivisor     = true
  vertexAttributeInstanceRateZeroDivisor = false

VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT:
---------------------------------------------------
  vertexInputDynamicState = true

VkPhysicalDeviceVulkan11Features:
---------------------------------
  storageBuffer16BitAccess           = true
  uniformAndStorageBuffer16BitAccess = true
  storagePushConstant16              = true
  storageInputOutput16               = false
  multiview                          = true
  multiviewGeometryShader            = true
  multiviewTessellationShader        = true
  variablePointersStorageBuffer      = true
  variablePointers                   = false
  protectedMemory                    = false
  samplerYcbcrConversion             = false
  shaderDrawParameters               = true

VkPhysicalDeviceVulkan12Features:
---------------------------------
  samplerMirrorClampToEdge                           = true
  drawIndirectCount                                  = true
  storageBuffer8BitAccess                            = true
  uniformAndStorageBuffer8BitAccess                  = true
  storagePushConstant8                               = true
  shaderBufferInt64Atomics                           = true
  shaderSharedInt64Atomics                           = true
  shaderFloat16                                      = true
  shaderInt8                                         = true
  descriptorIndexing                                 = false
  shaderInputAttachmentArrayDynamicIndexing          = false
  shaderUniformTexelBufferArrayDynamicIndexing       = false
  shaderStorageTexelBufferArrayDynamicIndexing       = false
  shaderUniformBufferArrayNonUniformIndexing         = false
  shaderSampledImageArrayNonUniformIndexing          = false
  shaderStorageBufferArrayNonUniformIndexing         = false
  shaderStorageImageArrayNonUniformIndexing          = false
  shaderInputAttachmentArrayNonUniformIndexing       = false
  shaderUniformTexelBufferArrayNonUniformIndexing    = false
  shaderStorageTexelBufferArrayNonUniformIndexing    = false
  descriptorBindingUniformBufferUpdateAfterBind      = false
  descriptorBindingSampledImageUpdateAfterBind       = false
  descriptorBindingStorageImageUpdateAfterBind       = false
  descriptorBindingStorageBufferUpdateAfterBind      = false
  descriptorBindingUniformTexelBufferUpdateAfterBind = false
  descriptorBindingStorageTexelBufferUpdateAfterBind = false
  descriptorBindingUpdateUnusedWhilePending          = false
  descriptorBindingPartiallyBound                    = false
  descriptorBindingVariableDescriptorCount           = false
  runtimeDescriptorArray                             = false
  samplerFilterMinmax                                = true
  scalarBlockLayout                                  = true
  imagelessFramebuffer                               = true
  uniformBufferStandardLayout                        = true
  shaderSubgroupExtendedTypes                        = true
  separateDepthStencilLayouts                        = true
  hostQueryReset                                     = true
  timelineSemaphore                                  = true
  bufferDeviceAddress                                = true
  bufferDeviceAddressCaptureReplay                   = false
  bufferDeviceAddressMultiDevice                     = false
  vulkanMemoryModel                                  = false
  vulkanMemoryModelDeviceScope                       = false
  vulkanMemoryModelAvailabilityVisibilityChains      = false
  shaderOutputViewportIndex                          = true
  shaderOutputLayer                                  = true
  subgroupBroadcastDynamicId                         = true

VkPhysicalDeviceVulkanMemoryModelFeatures:
------------------------------------------
  vulkanMemoryModel                             = false
  vulkanMemoryModelDeviceScope                  = false
  vulkanMemoryModelAvailabilityVisibilityChains = false

Version

wluma 4.1.0-1 from AUR

Environment

- Arch Linux
- development mesa-git version 22.0 with a MR containing fixes for nouveau
- sway

wluma/config.toml:

[als.time]
thresholds = { 0 = "night", 7 = "dark", 9 = "dim", 11 = "normal", 13 = "bright", 16 = "normal", 18 = "dark", 20 = "night" }

[[output.ddcutil]]
name = "DELL 1908FP"
min_brightness = 0
capturer = "none"

[[output.ddcutil]]
name = "W2443"
min_brightness = 0
capturer = "none"

[Bug]: Panicked when running both with sudo and not

Steps for reproducing the issue

after installing wluma, I run wluma, and output this

$ wluma
[2023-07-30T02:49:33Z WARN  wluma] Skipping 'keyboard-dell' as it might be disconnected: No such file or directory (os error 2)
[2023-07-30T02:49:33Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'Unable to init export_dmabuf_manager: Missing', src/frame/capturer/wlroots.rs:80:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

when I run sudo wluma, output this

$ sudo wluma
[2023-07-30T02:52:13Z WARN  wluma] Skipping 'keyboard-dell' as it might be disconnected: No such file or directory (os error 2)
[2023-07-30T02:52:13Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'called `Result::unwrap()` on an `Err` value: XdgRuntimeDirNotSet', src/frame/capturer/wlroots.rs:70:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

What is the buggy behavior?

there are some error messages when I run wluma

What is the expected behavior?

I think there should be no error messages

Logs

RUST_LOG=debug wluma
RUST_LOG=debug ./target/release/wluma 
[2023-07-30T02:56:53Z DEBUG wluma] Using Config {
        als: Iio {
            path: "/sys/bus/iio/devices",
            thresholds: {
                80: "dim",
                20: "dark",
                800: "outdoors",
                0: "night",
                250: "normal",
                500: "bright",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
            Backlight(
                BacklightOutput {
                    name: "keyboard-dell",
                    path: "/sys/bus/platform/devices/dell-laptop/leds/dell::kbd_backlight",
                    capturer: None,
                    min_brightness: 0,
                },
            ),
        ],
    }
[2023-07-30T02:56:53Z WARN  wluma] Skipping 'keyboard-dell' as it might be disconnected: No such file or directory (os error 2)
[2023-07-30T02:56:53Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'Unable to init export_dmabuf_manager: Missing', src/frame/capturer/wlroots.rs:80:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

4.3.0

Environment

lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"
Linux evael 6.4.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 11 Jul 2023 05:13:39 +0000 x86_64 GNU/Linux
clang 15.0.7-9
vulkan-headers 1:1.3.256-1
vulkan-icd-loader 1.3.255-1
vulkan-intel 23.1.3-2
vulkan-tools 1.3.255-1

[Feature request]: Dim screen after inactivity

Please describe your feature request

Some config option to dim the screen after some amount of time of inactivity would be very useful. Since I am already running wluma to control brightness, I'd prefer not to have to run another daemon just to lower brightness after some time.

[Bug]: als.webcam panics on ThinkPad T14s AMD with integrated camera

Steps for reproducing the issue

Iโ€™m afraid that this will be some device-specific issue. Iโ€™ll test it with an external webcam later.

Capturing an image via ffmpeg works though.

What is the buggy behavior?

wluma crashes when als.webcam is enabled.

What is the expected behavior?

wluma shouldnโ€™t crash

Logs

[2022-02-06T23:54:19Z DEBUG wluma] Using Config {
        als: Webcam {
            video: 0,
            thresholds: {
                60: "bright",
                45: "normal",
                75: "outdoors",
                15: "dark",
                30: "dim",
                0: "night",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/amdgpu_bl0",
                    capturer: None,
                    min_brightness: 1,
                },
            ),
            Backlight(
                BacklightOutput {
                    name: "keyboard-thinkpad",
                    path: "/sys/bus/platform/devices/thinkpad_acpi/leds/tpacpi::kbd_backlight",
                    capturer: None,
                    min_brightness: 0,
                },
            ),
        ],
    }
[2022-02-06T23:54:19Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'als-webcam' panicked at 'called `Option::unwrap()` on a `None` value', src/frame/mod.rs:16:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

4.1.0

Environment

  • Alpine Linux v3.15
  • Linux 5.15.16-0-lts
  • Sway 1.6.1
  • wlroots 0.14.1
  • Vulkan 1.3.204
  • Rust 1.56.1
  • ThinkPad T14s AMD with integrated AMD graphic
$ v4l2-ctl --all
Driver Info:
	Driver name      : uvcvideo
	Card type        : Integrated Camera: Integrated C
	Bus info         : usb-0000:06:00.0-2
	Driver version   : 5.15.16
	Capabilities     : 0x84a00001
		Video Capture
		Metadata Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : uvcvideo
	Model            : Integrated Camera: Integrated C
	Serial           : 0000
	Bus info         : usb-0000:06:00.0-2
	Media version    : 5.15.16
	Hardware revision: 0x00006001 (24577)
	Driver version   : 5.15.16
Interface Info:
	ID               : 0x03000002
	Type             : V4L Video
Entity Info:
	ID               : 0x00000001 (1)
	Name             : Integrated Camera: Integrated C
	Function         : V4L2 I/O
	Flags            : default
	Pad 0x01000007   : 0: Sink
	 Link 0x02000016: from remote pad 0x100000a of entity 'Microsoft Extended Controls Uni' (Video Pixel Formatter): Data, Enabled, Immutable
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
	Width/Height      : 320/180
	Pixel Format      : 'YUYV' (YUYV 4:2:2)
	Field             : None
	Bytes per Line    : 640
	Size Image        : 115200
	Colorspace        : sRGB
	Transfer Function : Rec. 709
	YCbCr/HSV Encoding: ITU-R 601
	Quantization      : Default (maps to Limited Range)
	Flags             : 
Crop Capability Video Capture:
	Bounds      : Left 0, Top 0, Width 320, Height 180
	Default     : Left 0, Top 0, Width 320, Height 180
	Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 320, Height 180, Flags: 
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 320, Height 180, Flags: 
Streaming Parameters Video Capture:
	Capabilities     : timeperframe
	Frames per second: 30.000 (30/1)
	Read buffers     : 0
                     brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=128
                       contrast 0x00980901 (int)    : min=0 max=100 step=1 default=32 value=32
                     saturation 0x00980902 (int)    : min=0 max=100 step=1 default=64 value=64
                            hue 0x00980903 (int)    : min=-180 max=180 step=1 default=0 value=0
 white_balance_temperature_auto 0x0098090c (bool)   : default=1 value=1
                          gamma 0x00980910 (int)    : min=90 max=150 step=1 default=120 value=120
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=1 value=2 (60 Hz)
				0: Disabled
				1: 50 Hz
				2: 60 Hz
      white_balance_temperature 0x0098091a (int)    : min=2800 max=6500 step=10 default=4600 value=4600 flags=inactive
                      sharpness 0x0098091b (int)    : min=0 max=7 step=1 default=3 value=3
         backlight_compensation 0x0098091c (int)    : min=0 max=2 step=1 default=1 value=1
                  exposure_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=3 (Aperture Priority Mode)
				1: Manual Mode
				3: Aperture Priority Mode
              exposure_absolute 0x009a0902 (int)    : min=2 max=1250 step=1 default=156 value=156 flags=inactive
         exposure_auto_priority 0x009a0903 (bool)   : default=0 value=0
$ v4l2-compliance 
v4l2-compliance 1.22.1, 64 bits, 64-bit time_t

Compliance test for uvcvideo device /dev/video0:

Driver Info:
	Driver name      : uvcvideo
	Card type        : Integrated Camera: Integrated C
	Bus info         : usb-0000:06:00.0-2
	Driver version   : 5.15.16
	Capabilities     : 0x84a00001
		Video Capture
		Metadata Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : uvcvideo
	Model            : Integrated Camera: Integrated C
	Serial           : 0000
	Bus info         : usb-0000:06:00.0-2
	Media version    : 5.15.16
	Hardware revision: 0x00006001 (24577)
	Driver version   : 5.15.16
Interface Info:
	ID               : 0x03000002
	Type             : V4L Video
Entity Info:
	ID               : 0x00000001 (1)
	Name             : Integrated Camera: Integrated C
	Function         : V4L2 I/O
	Flags            : default
	Pad 0x01000007   : 0: Sink
	 Link 0x02000016: from remote pad 0x100000a of entity 'Microsoft Extended Controls Uni' (Video Pixel Formatter): Data, Enabled, Immutable

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
	test VIDIOC_QUERYCAP: OK
	test invalid ioctls: OK

Allow for multiple opens:
	test second /dev/video0 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
		fail: v4l2-test-controls.cpp(209): missing control class for class 00980000
		fail: v4l2-test-controls.cpp(246): missing control class for class 009a0000
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
	test VIDIOC_QUERYCTRL: OK
		warn: v4l2-test-controls.cpp(486): s_ctrl returned EILSEQ
		warn: v4l2-test-controls.cpp(486): s_ctrl returned EILSEQ
	test VIDIOC_G/S_CTRL: OK
		warn: v4l2-test-controls.cpp(732): s_ext_ctrls returned EILSEQ
		warn: v4l2-test-controls.cpp(732): s_ext_ctrls returned EILSEQ
		warn: v4l2-test-controls.cpp(757): g_ext_ctrls(0) invalid error_idx 0
		warn: v4l2-test-controls.cpp(808): s_ext_ctrls returned EILSEQ
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 13 Private Controls: 0

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
		warn: v4l2-test-formats.cpp(1036): Could not set fmt2
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
	test Scaling: OK (Not Supported)

Codec ioctls (Input 0):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)

Total for uvcvideo device /dev/video0: 46, Succeeded: 45, Failed: 1, Warnings: 7

[Bug]: thread 'predictor-eDP-1' panicked at 'assertion failed: \`(left == right)\`

Steps for reproducing the issue

just run wluma or enable wluma service

What is the buggy behavior?

thread 'predictor-eDP-1' panicked at 'assertion failed: `(left == right)`

What is the expected behavior?

wluma changes my laptop's backlight

Logs

$ RUST_LOG=debug wluma
[2022-05-28T16:34:36Z DEBUG wluma] Using Config {
        als: Webcam {
            video: 1,
            thresholds: {
                0: "night",
                30: "dim",
                60: "bright",
                75: "outdoors",
                45: "normal",
                15: "dark",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2022-05-28T16:34:36Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
[2022-05-28T16:34:36Z DEBUG wluma::frame::capturer::wlroots] Using output 'Unknown 0x07BE 0x00000000 (eDP-1)' for config 'eDP-1'
thread 'predictor-eDP-1' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`: Frames with multiple objects are not supported yet', src/frame/vulkan.rs:145:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

$ sudo pacman -Qi wluma
Name            : wluma-git
Version         : 4.1.2.r1.g0c49755-1
Description     : Automatic brightness adjustment based on screen contents and ALS
Architecture    : x86_64
URL             : https://github.com/maximbaz/wluma
Licenses        : ISC
Groups          : None
Provides        : wluma
Depends On      : vulkan-icd-loader  systemd-libs  glibc  gcc-libs  v4l-utils
Optional Deps   : vulkan-driver: for using capturer=wlroots in config.toml [installed]
                  wayland: for using capturer=wlroots in config.toml [installed]
Required By     : None
Optional For    : None
Conflicts With  : wluma
Replaces        : None
Installed Size  : 2.46 MiB
Packager        : Unknown Packager
Build Date      : Sun 29 May 2022 01:10:17 AM KST
Install Date    : Sun 29 May 2022 01:13:48 AM KST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

Environment

$ lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"
LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
Linux zenbookarch 5.17.9-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 18 May 2022 17:58:27 +0000 x86_64 GNU/Linux
5637 sway
5681 swaybg
clang 13.0.1-2
intel-opencl-clang 13.0.0.r6+gd06733f-1
lib32-vulkan-icd-loader 1.3.213-1
lib32-vulkan-intel 22.1.0-1
rustup 1.24.3-2
sway 1:1.7-9
swaybg-git r120.de77798-1
vulkan-headers 1:1.3.213-1
vulkan-icd-loader 1.3.213-1
vulkan-intel 22.1.0-1
vulkan-validation-layers 1.3.211.0-1
wlroots 0.15.1-5
wlroots-git-debug 0.16.0.r5530.75d31509-1
zsh: command not found: dpkg

'predictor-eDP-1' panicked at 'Did not receive initial ALS value in time' on Microsoft Surface Pro 8

Steps for reproducing the issue

Running wluma (either as super user or normal user)

What is the buggy behavior?

Program waits 5 seconds before outputting the following error message within the terminal:
thread 'predictor-eDP-1' panicked at 'Did not receive initial ALS value in time', src/predictor/controller.rs:62:25

What is the expected behavior?

Expected behavior is the program running normally without any error messages

Logs

[2023-08-21T23:36:10Z DEBUG wluma] Using Config {
        als: Iio {
            path: "/sys/bus/iio/devices",
            thresholds: {
                80: "dim",
                500: "bright",
                0: "night",
                800: "outdoors",
                250: "normal",
                20: "dark",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: None,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2023-08-21T23:36:10Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'Did not receive initial ALS value in time', src/predictor/controller.rs:62:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

I installed the program using the wluma AUR package. I am running version 4.3.0-1

Environment

LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
Linux TGP-Surface 6.4.7-arch1-1-surface #1 SMP PREEMPT_DYNAMIC Fri, 28 Jul 2023 17:35:22 +0000 x86_64 GNU/Linux
egrep: warning: egrep is obsolescent; using grep -E
clang 15.0.7-9
lib32-vulkan-icd-loader 1.3.255-1
rust 1:1.71.1-1
vulkan-headers 1:1.3.257-1
vulkan-icd-loader 1.3.255-1
vulkan-intel 1:23.1.6-1
egrep: warning: egrep is obsolescent; using grep -E

[Bug]: Percent calculation timeout error

Steps for reproducing the issue

Start wluma on my machine with the following config:

[als.webcam]
video = 4
thresholds = { 0 = "night", 15 = "dark", 30 = "dim", 45 = "normal", 60 = "bright", 75 = "outdoors" }

[[output.backlight]]
name = "eDP-1"
path = "/sys/class/backlight/amdgpu_bl0"
capturer = "wlroots"

What is the buggy behavior?

wluma does not run after identifying the correct output.

What is the expected behavior?

wluma should run without error.

Logs

wluma.log
src/archlinux/wluma
 โฏ RUST_LOG=trace RUST_BACKTRACE=full vk_radv cargo run                 main 306d โฌก
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `target/debug/wluma`
[2022-12-11T03:19:51Z DEBUG wluma] Using Config {
        als: Webcam {
            video: 4,
            thresholds: {
                75: "outdoors",
                0: "night",
                60: "bright",
                30: "dim",
                45: "normal",
                15: "dark",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/amdgpu_bl0",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2022-12-11T03:19:51Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
[2022-12-11T03:19:51Z TRACE wluma::als::webcam] ALS (webcam): outdoors (100)
[2022-12-11T03:19:51Z DEBUG wluma::frame::capturer::wlroots] Using output 'IVO 0x057D (eDP-1)' for config 'eDP-1'
[2022-12-11T03:19:51Z TRACE wluma::als::webcam] ALS (webcam): outdoors (100)
[2022-12-11T03:19:51Z TRACE wluma::als::webcam] ALS (webcam): outdoors (100)
[2022-12-11T03:19:51Z TRACE wluma::als::webcam] ALS (webcam): outdoors (100)
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): outdoors (100)
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): outdoors (100)
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): night (7)
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): night (7)
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): night (7)
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): night (7)
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): night (7)
thread 'predictor-eDP-1' panicked at 'Unable to compute luma percent: TIMEOUT', src/frame/capturer/wlroots.rs:128:26
stack backtrace:
   0:     0x55e2c939e1ad - std::backtrace_rs::backtrace::libunwind::trace::h8217d0a8f3fd2f41
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55e2c939e1ad - std::backtrace_rs::backtrace::trace_unsynchronized::h308103876b3af410
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55e2c939e1ad - std::sys_common::backtrace::_print_fmt::hc208018c6153605e
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x55e2c939e1ad - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf89a7ed694dfb585
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x55e2c93c11dc - core::fmt::write::h21038c1382fe4264
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/fmt/mod.rs:1197:17
   5:     0x55e2c939b441 - std::io::Write::write_fmt::h7dbb1c9a3c254aef
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/io/mod.rs:1672:15
   6:     0x55e2c939fb85 - std::sys_common::backtrace::_print::h4e8889719c9ddeb8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x55e2c939fb85 - std::sys_common::backtrace::print::h1506fe2cb3022667
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x55e2c939fb85 - std::panicking::default_hook::{{closure}}::hd9d7ce2a8a782440
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:295:22
   9:     0x55e2c939f8a6 - std::panicking::default_hook::h5b16ec25444b1b5d
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:314:9
  10:     0x55e2c8e577a3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h18f9b59372de987a
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1965:9
  11:     0x55e2c8efda6b - wluma::main::{{closure}}::h8f2587462ebf5029
                               at /home/user/src/archlinux/wluma/src/main.rs:14:9
  12:     0x55e2c93a022a - std::panicking::rust_panic_with_hook::hb0138cb6e6fea3e4
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17
  13:     0x55e2c93a0067 - std::panicking::begin_panic_handler::{{closure}}::h4cb67095557cd1aa
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
  14:     0x55e2c939e664 - std::sys_common::backtrace::__rust_end_short_backtrace::h2bfcac279dcdc911
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
  15:     0x55e2c939fd99 - rust_begin_unwind
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
  16:     0x55e2c93bf223 - core::panicking::panic_fmt::h1de71520faaa17d3
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
  17:     0x55e2c93bf4d3 - core::result::unwrap_failed::hc0baa33ef8bc7db8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/result.rs:1805:5
  18:     0x55e2c8f05bf8 - core::result::Result<T,E>::expect::ha29aa314488aa8bd
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/result.rs:1055:23
  19:     0x55e2c8e6bcb4 - wluma::frame::capturer::wlroots::Capturer::capture_frame::{{closure}}::ha72c3da1b6b9ecc6
                               at /home/user/src/archlinux/wluma/src/frame/capturer/wlroots.rs:125:32
  20:     0x55e2c8ef828a - wayland_client::proxy::Main<I>::quick_assign::{{closure}}::h91bc8b8c43151e02
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/proxy.rs:273:64
  21:     0x55e2c8eef49c - wayland_commons::filter::Filter<E>::send::h2f4523b57e127e1a
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-commons-0.29.4/src/filter.rs:100:13
  22:     0x55e2c8e8b2aa - wayland_client::imp::proxy::ProxyInner::assign::{{closure}}::h9c02564c5b59b747
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/native_lib/proxy.rs:257:57
  23:     0x55e2c9170db3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h5e3bb732b04d1149
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1965:9
  24:     0x55e2c916d230 - wayland_client::imp::proxy::proxy_dispatcher::{{closure}}::{{closure}}::hf0b9b66a75586466
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/native_lib/proxy.rs:418:25
  25:     0x55e2c9174997 - scoped_tls::ScopedKey<T>::with::h3777d35c56da1e14
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:171:13
  26:     0x55e2c916bb91 - wayland_client::imp::proxy::proxy_dispatcher::{{closure}}::hb3c2a045a7411ea3
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/native_lib/proxy.rs:415:21
  27:     0x55e2c91728af - std::panicking::try::do_call::h4791231fab94fe69
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  28:     0x55e2c91735eb - __rust_try
  29:     0x55e2c9172734 - std::panicking::try::ha69f8a1463c4ddda
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
  30:     0x55e2c916f861 - std::panic::catch_unwind::h62efa39d5b2ece0d
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  31:     0x55e2c916b355 - wayland_client::imp::proxy::proxy_dispatcher::h936486be88d714ff
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/native_lib/proxy.rs:387:15
  32:     0x7f4501ad7d65 - <unknown>
  33:     0x7f4501ad7ffc - wl_display_dispatch_queue_pending
  34:     0x55e2c8e1802f - wayland_client::imp::event_queue::EventQueueInner::dispatch::{{closure}}::he5be4c6b209acefd
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/native_lib/event_queue.rs:43:17
  35:     0x55e2c8e77a3a - scoped_tls::ScopedKey<T>::set::h268c1a44093cf2c2
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.0/src/lib.rs:137:9
  36:     0x55e2c8e18357 - wayland_client::imp::event_queue::with_dispatch_meta::hb1ca4c5c9ed07d47
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/native_lib/event_queue.rs:24:5
  37:     0x55e2c8e17f89 - wayland_client::imp::event_queue::EventQueueInner::dispatch::hbf22d8c60d2fbcde
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/native_lib/event_queue.rs:41:9
  38:     0x55e2c8f2de9d - wayland_client::event_queue::EventQueue::dispatch::h258dff99bbbecfff
                               at /home/user/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/event_queue.rs:152:9
  39:     0x55e2c8e36bb5 - <wluma::frame::capturer::wlroots::Capturer as wluma::frame::capturer::Capturer>::run::h7e624e302a4ca6c5
                               at /home/user/src/archlinux/wluma/src/frame/capturer/wlroots.rs:60:13
  40:     0x55e2c8eff146 - wluma::main::{{closure}}::{{closure}}::hc1116d90a2b1acb9
                               at /home/user/src/archlinux/wluma/src/main.rs:87:29
  41:     0x55e2c8f0f24c - std::sys_common::backtrace::__rust_begin_short_backtrace::ha867c14475f61191
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:122:18
  42:     0x55e2c8e1fcb0 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h48905f39b26bcdf2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/mod.rs:505:17
  43:     0x55e2c8ef7810 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h894b536c22485698
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panic/unwind_safe.rs:271:9
  44:     0x55e2c8f1502a - std::panicking::try::do_call::h2d01533784ba40f1
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
  45:     0x55e2c8f1579b - __rust_try
  46:     0x55e2c8f14da1 - std::panicking::try::hd88ba560baf39e41
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
[2022-12-11T03:19:52Z TRACE wluma::als::webcam] ALS (webcam): night (7)
  47:     0x55e2c8e659f0 - std::panic::catch_unwind::h26efa7a672967e7e
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
  48:     0x55e2c8e1ef0b - std::thread::Builder::spawn_unchecked_::{{closure}}::h014fcc1dd2f9e66b
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/thread/mod.rs:504:30
  49:     0x55e2c8e7a0be - core::ops::function::FnOnce::call_once{{vtable.shim}}::h0bb2c2c1c85ec0a2
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:248:5
  50:     0x55e2c93a2f43 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1680342795a2dc08
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9
  51:     0x55e2c93a2f43 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h45204a69827b0e83
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9
  52:     0x55e2c93a2f43 - std::sys::unix::thread::Thread::new::thread_start::h5d4e11bbda4161c8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys/unix/thread.rs:108:17
  53:     0x7f450177c8fd - <unknown>
  54:     0x7f45017fea60 - <unknown>
  55:                0x0 - <unknown>
syslog
Dec 10 20:19:51 kernel: [30707.226531] gmc_v9_0_process_interrupt: 152 callbacks suppressed
Dec 10 20:19:51 kernel: [30707.226538] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226547] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e08000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226553] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00601031
Dec 10 20:19:51 kernel: [30707.226555] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: TCP (0x8)
Dec 10 20:19:51 kernel: [30707.226558] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x1
Dec 10 20:19:51 kernel: [30707.226559] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226561] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x3
Dec 10 20:19:51 kernel: [30707.226563] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226564] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226567] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226572] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e09000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226576] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226578] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226580] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226581] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226583] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226584] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226586] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226588] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226592] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e0a000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226595] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226597] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226599] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226600] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226602] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226603] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226605] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226607] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226610] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e0b000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226614] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226616] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226617] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226619] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226620] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226622] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226624] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226625] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226629] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e01000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226632] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226634] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226636] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226637] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226639] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226640] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226642] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226644] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226647] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e00000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226651] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226653] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226654] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226656] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226658] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226659] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226661] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226663] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226666] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e02000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226670] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226671] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226673] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226675] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226676] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226678] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226679] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226681] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226685] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e08000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226688] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226690] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226692] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226693] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226695] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226696] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226698] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226700] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226703] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100de9000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226707] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226708] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226710] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226712] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226713] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226715] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226716] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:19:51 kernel: [30707.226718] amdgpu 0000:06:00.0: amdgpu: [gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:6 pasid:32778, for process wluma pid 731265 thread predictor-eDP-1 pid 731268)
Dec 10 20:19:51 kernel: [30707.226722] amdgpu 0000:06:00.0: amdgpu:   in page starting at address 0x0000800100e0b000 from IH client 0x1b (UTCL2)
Dec 10 20:19:51 kernel: [30707.226725] amdgpu 0000:06:00.0: amdgpu: VM_L2_PROTECTION_FAULT_STATUS:0x00000000
Dec 10 20:19:51 kernel: [30707.226727] amdgpu 0000:06:00.0: amdgpu:     Faulty UTCL2 client ID: CB (0x0)
Dec 10 20:19:51 kernel: [30707.226729] amdgpu 0000:06:00.0: amdgpu:     MORE_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226730] amdgpu 0000:06:00.0: amdgpu:     WALKER_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226732] amdgpu 0000:06:00.0: amdgpu:     PERMISSION_FAULTS: 0x0
Dec 10 20:19:51 kernel: [30707.226734] amdgpu 0000:06:00.0: amdgpu:     MAPPING_ERROR: 0x0
Dec 10 20:19:51 kernel: [30707.226736] amdgpu 0000:06:00.0: amdgpu:     RW: 0x0
Dec 10 20:20:02 kernel: [30717.636063] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout, but soft recovered

Version

I am running this commit version 0c49755. I have built it from source.

Environment

LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
Linux baalsecundus 6.0.12-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:40 +0000 x86_64 GNU/Linux
amd-vulkan-prefixes 1-1
clang 14.0.6-4
clang13 13.0.1-4
lib32-clang 14.0.6-2
lib32-vulkan-amdgpu-pro 22.20.4_1498766-2
lib32-vulkan-icd-loader 1.3.235-1
lib32-vulkan-mesa-layers 22.2.3-1
lib32-vulkan-radeon 22.2.3-1
rust-analyzer 20221205-1
rustup 1.25.1-2
swayidle-git 1.8.0.r8.g4b9e70c-1
vulkan-amdgpu-pro 22.20.5_1511376-2
vulkan-headers 1:1.3.235-1
vulkan-icd-loader 1.3.235-1
vulkan-mesa-layers 22.2.3-1
vulkan-radeon 22.2.3-1
vulkan-swrast 22.2.3-1
vulkan-tools 1.3.226-1
vulkan-validation-layers 1.3.231.1-1
wlroots 0.15.1-6
river-0.2.0-dev.138+e603c54

[Bug]: permission denied erros if ran without sudo, no config found if ran with sudo

Steps for reproducing the issue

  • download the releases
  • create a config file in ~/.config/wluma/config.toml
  • try to launch the built artifact without sudo and then with sudo.

What is the buggy behavior?

behavior when ran without sudo:

vega@dart ~/s/w/t/release [1]> ./wluma 
[2022-01-27T19:56:04Z WARN  wluma] Skipping 'eDP-1' as it might be disconnected: Permission denied (os error 13)
[2022-01-27T19:56:04Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.

behavior when ran with sudo:

 vega@dart ~/s/w/t/release [SIGINT]> sudo ./wluma
[2022-01-27T19:53:16Z WARN  wluma] Skipping 'keyboard-dell' as it might be disconnected: No such file or directory (os error 2)
[2022-01-27T19:53:16Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'als' panicked at 'Unable to initialize ALS IIO sensor: "No iio device found"', src/main.rs:116:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

here's a link to a file with RUST_BACKTRACE=full when running with sudo:
https://paste.centos.org/view/33b45dcf

What is the expected behavior?

I think the issue there is that when it's ran with sudo it thinks the user is root and looks for config file in /root/.config/wluma/config.toml

Logs

https://paste.centos.org/view/2df8ad43

Version

version 4.1.0, from the built artifact in releases folder

Environment

default command doesn't work, so here's information from neofetch, I guess.

             .',;::::;,'.                vega@dart 
         .';:cccccccccccc:;,.            --------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 35.20220125.0 (Silverblue) x86_64 
    .:cccccccccccccccccccccccccc:.       Host: Notebook NS50MU 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 5.15.16-200.fc35.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 1 day, 7 hours, 3 mins 
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.   Packages: 1432 (rpm), 101 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,   Shell: fish 3.3.1 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 1920x1080 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 41.3 (Wayland) 
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;   Theme: Adwaita-dark [GTK2/3] 
ccccc;XM0';cccc;MMM.;cccccccccccccccc'   Icons: Adwaita [GTK2/3] 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Terminal: gnome-terminal 
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;     CPU: 11th Gen Intel i7-1165G7 (8) @ 4.700GHz 
cccccc;dNMWXXXWM0:;cccccccccccccc:,      GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
cccccccc;.:odl:.;cccccccccccccc:,.       Memory: 6620MiB / 31889MiB 
:cccccccccccccccccccccccccccc:'.
.:cccccccccccccccccccccc:;,..                                    
  '::cccccccccccccc::;,.                                         

[Feature request]: Wildcard support in backlight path.

Please describe your feature request

I have an amd cpu in my laptop and the path to the backlight device changes from boot to boot. The device changes names from "amdgpu_bl0" to "amdgpu_bl1" and so on. This makes it impossible to configure wluma as it cannot find the device after a reboot.

Therefore I think it would be nice to be able to use a wildcard in the path such as "amdgpu_bl*" and have wluma use the first directory that matches this but it does not seem to work/be implemented.

[Bug]: Can't use DDC with identical monitors

Steps for reproducing the issue

  • Have two monitors with identical EDIDs
  • Attempt to use them with wluma

What is the buggy behavior?

Wluma "detects" two identical displays. You cannot have identical configuration blocks, but trying to initialize just one results in an error. It is impossible to initialize both

What is the expected behavior?

Both monitors can be enumerated and accessed, since they can be through ddcutil. A possible way around buggy monitor behavior may include allowing users to manually specify the path (i.e. /dev/i2c-7), or by including the path in the monitor name that is matched.

Logs

[2023-03-07T19:23:00Z DEBUG wluma::brightness::ddcutil] Discovered displays: ["ED273UR ", "ED273UR "]
[2023-03-07T19:23:00Z DEBUG wluma::brightness::ddcutil] Using display 'ED273UR ' for config 'ED273UR '
[2023-03-07T19:23:00Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
[2023-03-07T19:23:03Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: invalid DDC/CI length
[2023-03-07T19:23:05Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: invalid DDC/CI length
[2023-03-07T19:23:06Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: Unsupported VCP code
[2023-03-07T19:23:06Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: Expected DDC/CI length bit
[2023-03-07T19:23:07Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: Expected DDC/CI length bit
[2023-03-07T19:23:07Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: invalid DDC/CI length
[2023-03-07T19:23:08Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: Expected DDC/CI length bit
[2023-03-07T19:23:09Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: Expected DDC/CI length bit
[2023-03-07T19:23:09Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: Expected DDC/CI length bit
[2023-03-07T19:23:09Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: invalid DDC/CI length
[2023-03-07T19:23:11Z ERROR wluma::brightness::controller] Unable to get brightness value: DDC/CI error: invalid DDC/CI length
[2023-03-07T19:23:12Z DEBUG wluma::predictor::controller] [ED273UR ] Learning Entry { lux: "lighter", luma: 0, brightness: 100 }

Version

4.2.0

Environment

LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
Linux cole-pc 6.2.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 03 Mar 2023 15:58:31 +0000 x86_64 GNU/Linux
egrep: warning: egrep is obsolescent; using grep -E
clang 15.0.7-1
intel-opencl-clang 15.0.0-1
lib32-vulkan-icd-loader 1.3.240-1
lib32-vulkan-radeon 22.3.6-1
rocm-clang-ocl 5.4.3-1
rocthrust 5.4.3-1
rust 1:1.67.1-1
vulkan-amdgpu-pro 22.40_1538781-1
vulkan-headers 1:1.3.240-1
vulkan-icd-loader 1.3.240-1
vulkan-radeon 22.3.6-1
vulkan-tools 1.3.240-1
wlroots 0.16.2-1
egrep: warning: egrep is obsolescent; using grep -E
zsh: command not found: dpkg

Support DRM modifiers (e.g. frames with multiple objects)

% RUST_BACKTRACE=full sudo ./target/debug/wluma
Using config: Config { frame: Frame { capturer: Wlroots, processor: Vulkan }, als: None, output_by_type: OutputByType { backlight: {}, ddcutil: {} }, keyboard: None, output: {"eDP-1": Backlight(BacklightOutput { path: "/sys/class/backlight/intel_backlight", use_contents: false })} }
Continue adjusting brightness and wluma will learn your preference over time.
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`: Frames with multiple objects are not supported yet', src/frame/processor/vulkan.rs:33:9
stack backtrace:
   0:     0x55999594f530 - std::backtrace_rs::backtrace::libunwind::trace::h34055254b57d8e79
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55999594f530 - std::backtrace_rs::backtrace::trace_unsynchronized::h8f1e3fbd9afff6ec
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55999594f530 - std::sys_common::backtrace::_print_fmt::h3a99a796b770c360
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55999594f530 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h32d1f94a80615d18
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55999597059c - core::fmt::write::h306731c068f7162c
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/fmt/mod.rs:1110:17
   5:     0x55999594d265 - std::io::Write::write_fmt::hd2fa90334eee2a21
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/io/mod.rs:1588:15
   6:     0x55999595148b - std::sys_common::backtrace::_print::h5abaa2601a852287
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55999595148b - std::sys_common::backtrace::print::h8d81445442bb638f
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55999595148b - std::panicking::default_hook::{{closure}}::hcfe804496a9fa747
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:208:50
   9:     0x559995950f61 - std::panicking::default_hook::hbea8e3ccf2ba8901
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:225:9
  10:     0x559995951b54 - std::panicking::rust_panic_with_hook::h7ee9e1a2d0f8975a
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:622:17
  11:     0x559995951637 - std::panicking::begin_panic_handler::{{closure}}::h8ab3b4491718b2c7
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:519:13
  12:     0x55999594fa2c - std::sys_common::backtrace::__rust_end_short_backtrace::hd489062ffa586a9f
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x559995951599 - rust_begin_unwind
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
  14:     0x5599956cd1d1 - core::panicking::panic_fmt::hca6330e3e14086b4
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/panicking.rs:92:14
  15:     0x55999596ecee - core::panicking::assert_failed_inner::h33b45280069a80ed
  16:     0x55999592e51a - core::panicking::assert_failed::hd5d39009fc2e6e38
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/panicking.rs:117:5
  17:     0x5599957eca86 - <wluma::frame::processor::vulkan::Processor as wluma::frame::processor::Processor>::luma_percent::hf23bf165a7e7c977
                               at /home/sergio/wluma/wluma/src/frame/processor/vulkan.rs:33:9
  18:     0x559995723a7e - wluma::frame::capturer::wlroots::Capturer::capture_frame::{{closure}}::hde5f027331db226b
                               at /home/sergio/wluma/wluma/src/frame/capturer/wlroots.rs:84:32
  19:     0x55999571e6f9 - wayland_client::proxy::Main<I>::quick_assign::{{closure}}::hc1e7f3c4bfd2ecaf
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.0/src/proxy.rs:273:64
  20:     0x559995783182 - wayland_commons::filter::Filter<E>::send::h43a3d7e7c9d79941
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-commons-0.29.0/src/filter.rs:100:13
  21:     0x5599956dffef - wayland_client::imp::make_dispatcher::{{closure}}::hd5e454f34ef927ba
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.0/src/rust_imp/mod.rs:194:49
  22:     0x5599956dfb4d - <wayland_client::imp::ImplDispatcher<I,F> as wayland_client::imp::Dispatcher>::dispatch::hb15f2f9aef44e051
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.0/src/rust_imp/mod.rs:179:9
  23:     0x559995725c39 - wayland_client::imp::queues::EventQueueInner::dispatch_buffer::h1c059b0df934cc63
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.0/src/rust_imp/queues.rs:163:23
  24:     0x55999572ab5f - wayland_client::imp::queues::EventQueueInner::dispatch_pending::h4f77d1714405bd5d
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.0/src/rust_imp/queues.rs:198:31
  25:     0x55999572b3f7 - wayland_client::imp::queues::EventQueueInner::dispatch::h6836c9a3dc9983ca
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.0/src/rust_imp/queues.rs:102:28
  26:     0x559995730ee7 - wayland_client::event_queue::EventQueue::dispatch::h94e6e99670791d0c
                               at /home/sergio/.cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.0/src/event_queue.rs:152:9
  27:     0x55999573251c - <wluma::frame::capturer::wlroots::Capturer as wluma::frame::capturer::Capturer>::run::h9649790b732a7765
                               at /home/sergio/wluma/wluma/src/frame/capturer/wlroots.rs:29:13
  28:     0x559995749d43 - wluma::main::h82011a5073039c33
                               at /home/sergio/wluma/wluma/src/main.rs:61:5
  29:     0x5599957f3b4b - core::ops::function::FnOnce::call_once::hcde0aa4c2b506cf5
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:227:5
  30:     0x55999576806e - std::sys_common::backtrace::__rust_begin_short_backtrace::hbd999ebb6582003e
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:125:18
  31:     0x5599957986b1 - std::rt::lang_start::{{closure}}::hbe445be29ab97048
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/rt.rs:49:18
  32:     0x559995952059 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h2aabc384aab89b7b
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:259:13
  33:     0x559995952059 - std::panicking::try::do_call::hc5fcacb7a85fc7b1
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:401:40
  34:     0x559995952059 - std::panicking::try::hb5d9603af3abbe3a
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:365:19
  35:     0x559995952059 - std::panic::catch_unwind::h98fe6ac3925e64b4
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panic.rs:434:14
  36:     0x559995952059 - std::rt::lang_start_internal::h22ac7383c516f93e
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/rt.rs:34:21
  37:     0x559995798690 - std::rt::lang_start::h3ba78dae42f73555
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/rt.rs:48:5
  38:     0x559995749fdc - main
  39:     0x7f1326609d0a - __libc_start_main
  40:     0x5599956cd9ca - _start
  41:                0x0 - <unknown>

[Bug]: error: failed to run custom build command for `v4l-sys v0.2.0`

Steps for reproducing the issue

#https://www.rust-lang.org/tools/install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

sudo apt-get install libudev-dev
sudo apt-get install -y clang


git clone https://github.com/maximbaz/wluma.git
cd wluma

make build

rust version:

rustup
rustup 1.25.1 (bb60b1e89 2022-07-12)

What is the buggy behavior?

error: failed to run custom build command for `v4l-sys v0.2.0`

What is the expected behavior?

make build to be successful

Logs

RUST_LOG=debug wluma

Version

4.1.2 and main

Environment

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy
Linux yogao 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Command 'pacman' not found, but can be installed with:
sudo apt install pacman
ii  clang                                                       1:14.0-55~exp2                          amd64        C, C++ and Objective-C compiler (LLVM based), clang binary
ii  clang-14                                                    1:14.0.0-1ubuntu1                       amd64        C, C++ and Objective-C compiler
ii  libclang-common-14-dev                                      1:14.0.0-1ubuntu1                       amd64        Clang library - Common development package
ii  libclang-cpp14                                              1:14.0.0-1ubuntu1                       amd64        C++ interface to the Clang library
ii  libclang1-14                                                1:14.0.0-1ubuntu1                       amd64        C interface to the Clang library
ii  libvulkan-dev:amd64                                         1.3.204.1-2                             amd64        Vulkan loader library -- development files
ii  libvulkan1:amd64                                            1.3.204.1-2                             amd64        Vulkan loader library
ii  mesa-vulkan-drivers:amd64                                   22.0.5-0ubuntu0.1                       amd64        Mesa Vulkan graphics drivers
ii  p11-kit-modules:amd64                                       0.24.0-6build1                          amd64        p11-glue proxy and trust modules

[Bug]: wluma writing "1" to /sys/class/backlight/intel_backlight/brightness *really* fast while laptop lid is closed

Steps for reproducing the issue

Run wluma with this config:

[als.iio]
path = "/sys/bus/iio/devices"
thresholds = { 0 = "night", 20 = "dark", 80 = "dim", 250 = "normal", 500 = "bright", 800 = "outdoors" }

# [als.webcam]
# video = 0
# thresholds = { 0 = "night", 15 = "dark", 30 = "dim", 45 = "normal", 60 = "bright", 75 = "outdoors" }

# [als.time]
# thresholds = { 0 = "night", 7 = "dark", 9 = "dim", 11 = "normal", 13 = "bright", 16 = "normal", 18 = "dark", 20 = "night" }

# [als.none]

[[output.backlight]]
name = "eDP-1"
path = "/sys/class/backlight/intel_backlight"
capturer = "none"

Then close the laptop lid.

What is the buggy behavior?

I remember doing an strace and it kept writing "1" to /sys/class/backlight/intel_backlight/brightness

To the point that systemd-udevd was using 100% CPU and a udevadm monitor would spam the console with brightness changes

What is the expected behavior?

That it set it to 1 once, and leave it there.

Logs

No logs when seting RUST_LOG=debug


> cat ~/.local/share/wluma/eDP-1.yaml
---
output_name: eDP-1
entries:
  - lux: dark
    luma: 0
    brightness: 10561
  - lux: night
    luma: 0
    brightness: 1
  - lux: normal
    luma: 0
    brightness: 22081


### Version

4.1.2.r1.g0c49755-1

### Environment

```shell
lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)";


LSB Version:    n/a
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a
Linux kelvie-fw 5.19.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 20 Sep 2022 15:17:59 +0000 x86_64 GNU/Linux
egrep: warning: egrep is obsolescent; using grep -E
clang 14.0.6-2
rust 1:1.63.0-1
rust-analyzer 20220919-1
rust-src 1:1.63.0-1
vulkan-icd-loader 1.3.226-1
vulkan-tools 1.3.226-1

[Bug]: not version

Steps for reproducing the issue

image

What is the buggy behavior?

1

What is the expected behavior?

1

Logs

RUST_LOG=debug wluma

Version

1

Environment

lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"

[Feature request]: Support `applesmc` ALS sensor type

Please describe your feature request

Trying to use wluma on a MacBook Pro 11,x on Arch. The ALS output is at
/sys/devices/platform/applesmc.768/light

Error shown is thread 'als' panicked at 'Unable to initialize ALS IIO sensor: "No iio device found"', src/main.rs:112:26

wluma will not launch.

Fake device not working

ERROR: Failed to find ambient light sensor device file in base dir: /tmp/fake-devices/light-sensor/ although i started wluma-als-emulator --strategy=time

[Bug]: Unable to read config if top table name is specified

Steps for reproducing the issue

Add [als] on top of [als.iio] in config.toml:

[als]
[als.iio]
path = "/sys/bus/iio/devices"
thresholds = { 0 = "night", 20 = "dark", 80 = "dim", 250 = "normal", 500 = "bright", 800 = "outdoors" }

What is the buggy behavior?

Application failed to read the config file

What is the expected behavior?

Application should read the config file without any issues (see toml example)

Logs

thread 'main' panicked at 'Unable to load config: expected to be able to determine enum type, found no values for key `als` at line 6 column 1', src/main.rs:25:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

4.1.0

Environment

No LSB modules are available.
Distributor ID:	NixOS
Description:	NixOS 21.11 (Porcupine)
Release:	21.11
Codename:	porcupine
Linux fl 5.15.12 #1-NixOS SMP Wed Dec 29 11:29:03 UTC 2021 x86_64 GNU/Linux
1670 sway
1703 swaybg
1712 swayidle

Support for IIO RGBC "intensity" based sensors

My laptop uses an apds9960 based sensor that doesn't report a single processed illuminance value, but uses RGBC. An illuminance value has to be manually calculated from the values.

What: /sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
What: /sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
What: /sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw](
What: /sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
KernelVersion: 3.6.0
Contact: [email protected]
Description:
This property is supported by sensors that have a RGBC and if expressed in SI units, should include _input. If this value is not in SI units (irradiance, uW/mm^2), then it should include _raw.

There's an easy formula that produces wrong results but is a good start:

(-0.32466F * color_data.r) + (1.57837F * color_data.g) + (-0.73191F * color_data.b)

There's a more complex formula but we don't know the constants for apds9960 sadly:

https://github.com/adafruit/Adafruit_CircuitPython_TCS34725/blob/master/adafruit_tcs34725.py#L282-L332

use of unstable library feature 'option_insert'

error[E0658]: use of unstable library feature 'option_insert': newly added
   --> src/frame/processor/vulkan.rs:215:33
    |
215 |         self.image.borrow_mut().insert(image);
    |                                 ^^^^^^
    |
    = note: see issue #78271 <https://github.com/rust-lang/rust/issues/78271> for more information

error[E0658]: use of unstable library feature 'option_insert': newly added
   --> src/frame/processor/vulkan.rs:216:40
    |
216 |         self.image_memory.borrow_mut().insert(image_memory);
    |                                        ^^^^^^
    |
    = note: see issue #78271 <https://github.com/rust-lang/rust/issues/78271> for more information

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `wluma`.

To learn more, run the command again with --verbose.
make: *** [Makefile:11: build-dev] Error 101
% apt policy rustc 
rustc:
  Installed: 1.52.1+dfsg1-1~exp3
  Candidate: 1.52.1+dfsg1-1~exp3
  Version table:
 *** 1.52.1+dfsg1-1~exp3 200
        200 https://deb.debian.org/debian experimental/main amd64 Packages
        100 /var/lib/dpkg/status
     1.48.0+dfsg1-2 800
        800 https://deb.debian.org/debian sid/main amd64 Packages

binary release glibc dependency

debian bullseye:

% ./wluma 
./wluma: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./wluma)
./wluma: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./wluma)

% apt policy libc6
libc6:
  Installed: 2.31-13
  Candidate: 2.31-13
  Version table:
 *** 2.31-13 500
        500 https://deb.debian.org/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status

debian sid:

% ./target/release/wluma             
./target/release/wluma: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./target/release/wluma)
./target/release/wluma: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./target/release/wluma)

% apt policy libc6                                                                                  
libc6:
  Installed: 2.31-17
  Candidate: 2.31-17
  Version table:
     2.32-0experimental1 200
        200 https://deb.debian.org/debian experimental/main amd64 Packages
 *** 2.31-17 800
        800 https://deb.debian.org/debian sid/main amd64 Packages
        100 /var/lib/dpkg/status

[Feature request]: support GPUs without Vulkan

I have an older laptop with Nvidia Quadro 3000m GPU that has no Vulkan support under Linux.

When I try to spawn wluma it prints:

[2022-11-21T17:14:32Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-LVDS-1' panicked at 'Unable to initialize Vulkan: ERROR_INITIALIZATION_FAILED', src/frame/capturer/wlroots.rs:86:44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Would you consider adding OpenGL capturer?

[Feature request]: Support monitor disconnect

Please describe your feature request

When my laptop screen times out and turns off, wluma crashes with this error:
thread 'predictor-eDP-1' panicked at 'Frame was cancelled due to a permanent error. If you just disconnected screen, this is not implemented yet.', src/frame/capturer/wlroots.rs:142:25.
I understand that this is currently expected, however, it would be nice to not have to restart wluma each time the display is powered on again.

If this is not feasible, that's fine; but if it is, I would be willing to try to submit a PR. I have some experience with rust, but I have done almost no graphics work so I might need some pointers there.

BTW, thanks for this great tool!

Support non-wlroots compositors using Pipewire

I know Gnome is not wlroot based (or at least that is what I think), but I was hoping to get a little insight in to what work I'd have to do to get this working with Gnome. I hate the autobrightness on Gnome so that is what prompted this.

I know you can get the screen using pipewire on Gnome, and I think there is an experimental setting for enabling DMA buffer sharing, but I'm not entirely sure how much of the code I would have to change to enable this.

Thanks for any insight in advance. I understand you are probably busy but if you would like to help me implement that it would be greatly appreciated as well :)

Failed to find backlight device file (it does exist!)

Hello, I am getting this error "ERROR: Failed to find backlight device file in base dir: /sys/class/backlight".

I do in fact have a backlight in here, along with the two files needed by the code. These are located at
/sys/class/backlight/amdgpu_bl0/brightness and /sys/class/backlight/amdgpu_bl0/max_brightness.

Not sure what is causing this problem

Crash with AMD GPU

Hey,

I wanted to try wluma with ddcutil support on my desktop but it crashes immediately (I tried both amdvlk and vulkan-radeon since it seems to be a vulkan issue).
On my notebook with an integrated Intel GPU it runs fine, unless I connect my external display, then it fails here:

|_| panic!("Did not receive initial brightness value in time"),

ddcutil by itself works completely fine as the same user that runs wluma:

ddcutil --mfg GSM getvcp 10
VCP code 0x10 (Brightness                    ): current value =    85, max value =   100

I appended my config and the backtrace.

config
[frame]
processor = "vulkan"
capturer = "wlroots"

[als.time]
thresholds = { 0 = "night", 7 = "dark", 9 = "dim", 11 = "normal", 13 = "bright", 16 = "normal", 18 = "dark", 20 = "night" }

[[output.ddcutil]]
name = "LG HDR 4K"
backtrace

Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-LG HDR 4K' panicked at 'Unable to compute luma percent: ERROR_MEMORY_MAP_FAILED', src/frame/capturer/wlroots.rs:124:26
stack backtrace:
0: rust_begin_unwind
at /rustc/1.58.0/library/std/src/panicking.rs:498:5
1: core::panicking::panic_fmt
at /rustc/1.58.0/library/core/src/panicking.rs:107:14
2: core::result::unwrap_failed
at /rustc/1.58.0/library/core/src/result.rs:1613:5
3: core::result::Result<T,E>::expect
at /rustc/1.58.0/library/core/src/result.rs:1255:23
4: wluma::frame::capturer::wlroots::Capturer::capture_frame::{{closure}}
at ./src/frame/capturer/wlroots.rs:121:32
5: wayland_client::proxy::Main::quick_assign::{{closure}}
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/proxy.rs:273:64
6: wayland_commons::filter::Filter::send
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-commons-0.29.4/src/filter.rs:100:13
7: wayland_client::imp::make_dispatcher::{{closure}}
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/rust_imp/mod.rs:194:49
8: <wayland_client::imp::ImplDispatcher<I,F> as wayland_client::imp::Dispatcher>::dispatch
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/rust_imp/mod.rs:179:9
9: wayland_client::imp::queues::EventQueueInner::dispatch_buffer
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/rust_imp/queues.rs:163:23
10: wayland_client::imp::queues::EventQueueInner::dispatch_pending
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/rust_imp/queues.rs:198:31
11: wayland_client::imp::queues::EventQueueInner::dispatch
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/rust_imp/queues.rs:102:28
12: wayland_client::event_queue::EventQueue::dispatch
at /home/xenrox/.local/state/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.29.4/src/event_queue.rs:152:9
13: <wluma::frame::capturer::wlroots::Capturer as wluma::frame::capturer::Capturer>::run
at ./src/frame/capturer/wlroots.rs:60:13
14: wluma::main::{{closure}}::{{closure}}
at ./src/main.rs:99:21
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

[Feature request]: Disable learning

Please describe your feature request

While learning is an awesome feature, DDC/I2C is not reliable at all. This means that many readings are incorrect and makes the entire adjustings wrong. After reading the yaml output of the learning feature, I think it would be possible to manually set some fixed value and let wluma use those. Of course, this would still be an optional feature, learning should be activated by default, as it is now.

I'd be willing to contribute to this change, but I'd first want to know your opinion. Thanks for working on this great software :)

Failed to find backlight device

running wluma:
ERROR: Failed to find backlight device file in base dir: /sys/class/backlight

ls /sys/class/backlight
lrwxrwxrwx root root 0 B Thu Sep 24 08:15:56 2020 intel_backlight โ‡’ ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight

any chances to wluma automatically detects type of graphic card ?
or some command line switches to point to correct folder ?

Running archlinux 5.8.10-arch1-1

[Bug]: 'Unable to compute luma percent: ERROR_OUT_OF_DEVICE_MEMORY'

Steps for reproducing the issue

  1. setup wluma with webcam as sensor
  2. do the workaround for #8
  3. run wluma

What is the buggy behavior?

It panics instantly

What is the expected behavior?

It works and doesn't crash (or at least has a more approachable error)

Logs

RUST_LOG=debug wluma$ RUST_BACKTRACE=debug wluma
[2022-11-23T09:36:00Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'Unable to compute luma percent: ERROR_OUT_OF_DEVICE_MEMORY', src/frame/capturer/wlroots.rs:128:26
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Version

I am using version 4.1.2-1 from the Arch User Repositories

Environment

lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"
bash: lsb_release: command not found
Linux HappyPc 6.0.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 16 Nov 2022 17:01:17 +0000 x86_64 GNU/Linux
2053 sway
2076 swaybg
egrep: warning: egrep is obsolescent; using grep -E
clang 14.0.6-4
rust 1:1.65.0-1
sway 1:1.7-10
swaybg 1.1.1-1
swayidle 1.7.1-3
swaylock 1.6-2
vulkan-headers 1:1.3.235-1
vulkan-icd-loader 1.3.235-1
wlroots 0.15.1-6
bash: dpkg: command not found
egrep: warning: egrep is obsolescent; using grep -E

[Feature request]: Allow specifying the physical device for Vulkan

Please describe your feature request

What do you think about adding an option to specify the physical device for Vulkan? I have two on my system and the first one doesn't have the required extensions, so Vulkan can't initialize. It works fine if I change the code to use the second one.

let physical_devices = unsafe { instance.enumerate_physical_devices()? };
let physical_device = *physical_devices
.get(0)
.ok_or("Unable to find a physical device")?;

[Bug]: Monitors with missing Model / MCCS version fields are not detected

Steps for reproducing the issue

Having a bad monitor with unspecified Model and MCCS version :/

What is the buggy behavior?

Wluma does not detect one of my two monitors. See logs.

What is the expected behavior?

Even with broken/missing information, this monitor is able to change brightness and other parameters over DDC. Wluma should be able to support those partially broken monitors as well.

Logs

$ RUST_LOG=debug wluma
[2022-02-13T19:48:56Z DEBUG wluma] Using Config {
        als: Time {
            thresholds: {
                11: "normal",
                0: "night",
                7: "dark",
                16: "normal",
                20: "night",
                9: "dim",
                18: "dark",
                13: "bright",
            },
        },
        output: [
            DdcUtil(
                DdcUtilOutput {
                    name: "1908FP",
                    capturer: None,
                    min_brightness: 1,
                },
            ),
            DdcUtil(
                DdcUtilOutput {
                    name: "W2443",
                    capturer: None,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2022-02-13T19:48:58Z DEBUG wluma::brightness::ddcutil] Discovered displays: ["W2443 "]
[2022-02-13T19:48:58Z WARN  wluma] Skipping '1908FP' as it might be disconnected: Unable to find display
[2022-02-13T19:49:00Z DEBUG wluma::brightness::ddcutil] Discovered displays: ["W2443 "]
[2022-02-13T19:49:00Z DEBUG wluma::brightness::ddcutil] Using display 'W2443 ' for config 'W2443'
[2022-02-13T19:49:00Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.

Version

wluma 4.1.2-1 from AUR

Environment

Still sway on Arch Linux.

Monitor information from ddcutil:

$ ddcutil detect
Display 2
   I2C bus:  /dev/i2c-5
   EDID synopsis:
      Mfg id:               DEL
      Model:                DELL 1908FP
      Product code:         16422
      Serial number:        [redacted]
      Binary serial number: [redacted] (0x[redacted])
      Manufacture year:     2008,  Week: 24
   VCP version:         2.0
$ ddcutil probe
EDID version: 1.3
Mfg id: DEL, model: DELL 1908FP, sn: [redacted]
Product code: 16422, binary serial number [redacted] (0x[redacted])

How display reports unsupported feature: DREF_DDC_USES_DDC_FLAG_FOR_UNSUPPORTED

Capabilities for display on bus /dev/i2c-5
Read cached capabilities string from /home/paul/.cache/ddcutil/capabilities
Unparsed capabilities string: type(LCD)vcp(02 04 05 08 0B 0C 0E 10 12 14(01 04 08 0B) 16 18 1A 1E 20 30 3E 52 6C 6E 70 AC AE B2 B6 C0 C8 C9 CA D6(01 02 03 04) DF) mswhql(1)
Model: Not specified
MCCS version: Not specified
VCP Features:
   Feature: 02 (New control value)
   Feature: 04 (Restore factory defaults)
   Feature: 05 (Restore factory brightness/contrast defaults)
   Feature: 08 (Restore color defaults)
   Feature: 0B (Color temperature increment)
   Feature: 0C (Color temperature request)
   Feature: 0E (Clock)
   Feature: 10 (Brightness)
   Feature: 12 (Contrast)
   Feature: 14 (Select color preset)
      Values (unparsed): 01 04 08 0B
      Values (  parsed):
         01: sRGB
         04: 5000 K
         08: 9300 K
         0b: User 1
   Feature: 16 (Video gain: Red)
   Feature: 18 (Video gain: Green)
   Feature: 1A (Video gain: Blue)
   Feature: 1E (Auto setup)
   Feature: 20 (Horizontal Position)
   Feature: 30 (Vertical Position)
   Feature: 3E (Clock phase)
   Feature: 52 (Active control)
   Feature: 6C (Video black level: Red)
   Feature: 6E (Video black level: Green)
   Feature: 70 (Video black level: Blue)
   Feature: AC (Horizontal frequency)
   Feature: AE (Vertical frequency)
   Feature: B2 (Flat panel sub-pixel layout)
   Feature: B6 (Display technology type)
   Feature: C0 (Display usage time)
   Feature: C8 (Display controller type)
   Feature: C9 (Display firmware level)
   Feature: CA (OSD)
   Feature: D6 (Power mode)
      Values (unparsed): 01 02 03 04
      Values (  parsed):
         01: DPM: On,  DPMS: Off
         02: DPM: Off, DPMS: Standby
         03: DPM: Off, DPMS: Suspend
         04: DPM: Off, DPMS: Off
   Feature: DF (VCP Version)

May support table reads:   false

Scanning all VCP feature codes for display Display_Handle[i2c: fd=3, busno=5 @0x55f13b991fd0]
VCP code 0x02 (New control value             ): <reserved code, must be ignored> (0x00)
VCP code 0x03 (Soft controls                 ): Unsupported feature code
VCP code 0x07 (Unknown feature               ): Unsupported feature code
VCP code 0x09 (Unknown feature               ): Unsupported feature code
VCP code 0x0b (Color temperature increment   ): 3000 degree(s) Kelvin
VCP code 0x0c (Color temperature request     ): 3000 + 2 * (feature 0B color temp increment) degree(s) Kelvin
VCP code 0x0d (Unknown feature               ): Unsupported feature code
VCP code 0x0e (Clock                         ): current value =     0, max value = 65535
VCP code 0x0f (Unknown feature               ): Unsupported feature code
VCP code 0x10 (Brightness                    ): current value =     0, max value =   100
VCP code 0x11 (Flesh tone enhancement        ): Unsupported feature code
VCP code 0x12 (Contrast                      ): current value =    50, max value =   100
VCP code 0x13 (Backlight control             ): Unsupported feature code
VCP code 0x14 (Select color preset           ): sRGB (sl=0x01)
VCP code 0x15 (Unknown feature               ): Unsupported feature code
VCP code 0x16 (Video gain: Red               ): current value =   100, max value =   100
VCP code 0x17 (User color vision compensation): Unsupported feature code
VCP code 0x18 (Video gain: Green             ): current value =   100, max value =   100
VCP code 0x19 (Unknown feature               ): Unsupported feature code
VCP code 0x1a (Video gain: Blue              ): current value =   100, max value =   100
VCP code 0x1b (Unknown feature               ): Unsupported feature code
VCP code 0x1c (Focus                         ): Unsupported feature code
VCP code 0x1d (Unknown feature               ): Unsupported feature code
VCP code 0x1e (Auto setup                    ): Auto setup not active (sl=0x00)
VCP code 0x1f (Auto color setup              ): Unsupported feature code
VCP code 0x20 (Horizontal Position           ): current value =     0, max value = 65535
VCP code 0x21 (Unknown feature               ): Unsupported feature code
VCP code 0x22 (Horizontal Size               ): Unsupported feature code
VCP code 0x23 (Unknown feature               ): Unsupported feature code
VCP code 0x24 (Horizontal Pincushion         ): Unsupported feature code
VCP code 0x25 (Unknown feature               ): Unsupported feature code
VCP code 0x26 (Horizontal Pincushion Balance ): Unsupported feature code
VCP code 0x27 (Unknown feature               ): Unsupported feature code
VCP code 0x28 (Horizontal Convergence        ): Unsupported feature code
VCP code 0x29 (Horizontal Convergence M/G    ): Unsupported feature code
VCP code 0x2a (Horizontal Linearity          ): Unsupported feature code
VCP code 0x2b (Unknown feature               ): Unsupported feature code
VCP code 0x2c (Horizontal Linearity Balance  ): Unsupported feature code
VCP code 0x2d (Unknown feature               ): Unsupported feature code
VCP code 0x2e (Gray scale expansion          ): Unsupported feature code
VCP code 0x2f (Unknown feature               ): Unsupported feature code
VCP code 0x30 (Vertical Position             ): current value =     0, max value = 65535
VCP code 0x31 (Unknown feature               ): Unsupported feature code
VCP code 0x32 (Vertical Size                 ): Unsupported feature code
VCP code 0x33 (Unknown feature               ): Unsupported feature code
VCP code 0x34 (Vertical Pincushion           ): Unsupported feature code
VCP code 0x35 (Unknown feature               ): Unsupported feature code
VCP code 0x36 (Vertical Pincushion Balance   ): Unsupported feature code
VCP code 0x37 (Unknown feature               ): Unsupported feature code
VCP code 0x38 (Vertical Convergence          ): Unsupported feature code
VCP code 0x39 (Vertical Convergence M/G      ): Unsupported feature code
VCP code 0x3a (Vertical Linearity            ): Unsupported feature code
VCP code 0x3b (Unknown feature               ): Unsupported feature code
VCP code 0x3c (Vertical Linearity Balance    ): Unsupported feature code
VCP code 0x3d (Unknown feature               ): Unsupported feature code
VCP code 0x3e (Clock phase                   ): current value =     0, max value = 65535
VCP code 0x3f (Unknown feature               ): Unsupported feature code
VCP code 0x40 (Key Balance                   ): Unsupported feature code
VCP code 0x41 (Vertical Parallelogram        ): Unsupported feature code
VCP code 0x42 (Horizontal Trapezoid          ): Unsupported feature code
VCP code 0x43 (Vertical Trapezoid            ): Unsupported feature code
VCP code 0x44 (Tilt (rotation)               ): Unsupported feature code
VCP code 0x45 (Unknown feature               ): Unsupported feature code
VCP code 0x46 (Top Corner                    ): Unsupported feature code
VCP code 0x47 (Unknown feature               ): Unsupported feature code
VCP code 0x48 (Top Corner Balance            ): Unsupported feature code
VCP code 0x49 (Unknown feature               ): Unsupported feature code
VCP code 0x4a (Bottom Corner                 ): Unsupported feature code
VCP code 0x4b (Unknown feature               ): Unsupported feature code
VCP code 0x4c (Bottom Corner Balance         ): Unsupported feature code
VCP code 0x4d (Unknown feature               ): Unsupported feature code
VCP code 0x4e (Unknown feature               ): Unsupported feature code
VCP code 0x4f (Unknown feature               ): Unsupported feature code
VCP code 0x50 (Unknown feature               ): Unsupported feature code
VCP code 0x51 (Unknown feature               ): Unsupported feature code
VCP code 0x52 (Active control                ): Value: 0x00
VCP code 0x53 (Unknown feature               ): Unsupported feature code
VCP code 0x54 (Performance Preservation      ): Unsupported feature code
VCP code 0x55 (Unknown feature               ): Unsupported feature code
VCP code 0x56 (Horizontal Moire              ): Unsupported feature code
VCP code 0x57 (Unknown feature               ): Unsupported feature code
VCP code 0x58 (Vertical Moire                ): Unsupported feature code
VCP code 0x59 (6 axis saturation: Red        ): Unsupported feature code
VCP code 0x5a (6 axis saturation: Yellow     ): Unsupported feature code
VCP code 0x5b (6 axis saturation: Green      ): Unsupported feature code
VCP code 0x5c (6 axis saturation: Cyan       ): Unsupported feature code
VCP code 0x5d (6 axis saturation: Blue       ): Unsupported feature code
VCP code 0x5e (6 axis saturation: Magenta    ): Unsupported feature code
VCP code 0x5f (Unknown feature               ): Unsupported feature code
VCP code 0x60 (Input Source                  ): DVI-1 (sl=0x03)
VCP code 0x61 (Unknown feature               ): Unsupported feature code
VCP code 0x62 (Audio speaker volume          ): Unsupported feature code
VCP code 0x63 (Speaker Select                ): Unsupported feature code
VCP code 0x64 (Audio: Microphone Volume      ): Unsupported feature code
VCP code 0x65 (Unknown feature               ): Unsupported feature code
VCP code 0x66 (Ambient light sensor          ): Unsupported feature code
VCP code 0x67 (Unknown feature               ): Unsupported feature code
VCP code 0x68 (Unknown feature               ): mh=0xff, ml=0xff, sh=0x00, sl=0x01
VCP code 0x69 (Unknown feature               ): Unsupported feature code
VCP code 0x6a (Unknown feature               ): Unsupported feature code
VCP code 0x6b (Backlight Level: White        ): Unsupported feature code
VCP code 0x6c (Video black level: Red        ): current value =    10, max value =   100
VCP code 0x6d (Backlight Level: Red          ): Unsupported feature code
VCP code 0x6e (Video black level: Green      ): current value =    10, max value =   100
VCP code 0x6f (Backlight Level: Green        ): Unsupported feature code
VCP code 0x70 (Video black level: Blue       ): current value =    10, max value =   100
VCP code 0x71 (Backlight Level: Blue         ): Unsupported feature code
VCP code 0x72 (Gamma                         ): Unsupported feature code
VCP code 0x73 (LUT Size                      ): Unsupported feature code (DDC NULL Message)
VCP code 0x74 (Single point LUT operation    ): Unsupported feature code (DDC NULL Message)
VCP code 0x75 (Block LUT operation           ): Unsupported feature code (DDC NULL Message)
VCP code 0x77 (Unknown feature               ): Unsupported feature code
VCP code 0x78 (EDID operation                ): Unsupported feature code (DDC NULL Message)
VCP code 0x79 (Unknown feature               ): Unsupported feature code
VCP code 0x7a (Adjust Focal Plane            ): Unsupported feature code
VCP code 0x7b (Unknown feature               ): Unsupported feature code
VCP code 0x7c (Adjust Zoom                   ): Unsupported feature code
VCP code 0x7d (Unknown feature               ): Unsupported feature code
VCP code 0x7e (Trapezoid                     ): Unsupported feature code
VCP code 0x7f (Unknown feature               ): Unsupported feature code
VCP code 0x80 (Keystone                      ): Unsupported feature code
VCP code 0x81 (Unknown feature               ): Unsupported feature code
VCP code 0x83 (Unknown feature               ): Unsupported feature code
VCP code 0x85 (Unknown feature               ): Unsupported feature code
VCP code 0x86 (Display Scaling               ): Unsupported feature code
VCP code 0x87 (Sharpness                     ): Unsupported feature code
VCP code 0x88 (Velocity Scan Modulation      ): Unsupported feature code
VCP code 0x89 (Unknown feature               ): Unsupported feature code
VCP code 0x8a (TV Color Saturation           ): Unsupported feature code
VCP code 0x8c (TV Sharpness                  ): Unsupported feature code
VCP code 0x8d (Audio Mute                    ): Unsupported feature code
VCP code 0x8e (TV Contrast                   ): Unsupported feature code
VCP code 0x8f (Audio Treble                  ): Unsupported feature code
VCP code 0x90 (Hue                           ): Unsupported feature code
VCP code 0x91 (Audio Bass                    ): Unsupported feature code
VCP code 0x92 (TV Black level/Brightness     ): Unsupported feature code
VCP code 0x93 (Audio Balance L/R             ): Unsupported feature code
VCP code 0x94 (Audio Stereo Mode             ): Unsupported feature code
VCP code 0x95 (Window Position(TL_X)         ): Unsupported feature code
VCP code 0x96 (Window Position(TL_Y)         ): Unsupported feature code
VCP code 0x97 (Window Position(BR_X)         ): Unsupported feature code
VCP code 0x98 (Window Position(BR_Y)         ): Unsupported feature code
VCP code 0x99 (Window control on/off         ): Unsupported feature code
VCP code 0x9a (Window background             ): Unsupported feature code
VCP code 0x9b (6 axis hue control: Red       ): current value =   100, max value =   100
VCP code 0x9c (6 axis hue control: Yellow    ): Unsupported feature code
VCP code 0x9d (6 axis hue control: Green     ): current value =   100, max value =   100
VCP code 0x9e (6 axis hue control: Cyan      ): Unsupported feature code
VCP code 0x9f (6 axis hue control: Blue      ): current value =   100, max value =   100
VCP code 0xa0 (6 axis hue control: Magenta   ): Unsupported feature code
VCP code 0xa1 (Unknown feature               ): Unsupported feature code
VCP code 0xa3 (Unknown feature               ): Unsupported feature code
VCP code 0xa4 (Turn the selected window operation on/off): Unsupported feature code
VCP code 0xa5 (Change the selected window    ): Unsupported feature code
VCP code 0xa6 (Unknown feature               ): Unsupported feature code
VCP code 0xa7 (Unknown feature               ): Unsupported feature code
VCP code 0xa8 (Unknown feature               ): Unsupported feature code
VCP code 0xa9 (Unknown feature               ): Unsupported feature code
VCP code 0xaa (Screen Orientation            ): Unsupported feature code
VCP code 0xab (Unknown feature               ): Unsupported feature code
VCP code 0xac (Horizontal frequency          ): 79 hz
VCP code 0xad (Unknown feature               ): Unsupported feature code
VCP code 0xae (Vertical frequency            ): 0.75 hz
VCP code 0xaf (Unknown feature               ): Unsupported feature code
VCP code 0xb1 (Unknown feature               ): Unsupported feature code
VCP code 0xb2 (Flat panel sub-pixel layout   ): Sub-pixel layout not defined (sl=0x00)
VCP code 0xb3 (Unknown feature               ): Unsupported feature code
VCP code 0xb4 (Source Timing Mode            ): Unsupported feature code
VCP code 0xb5 (Unknown feature               ): Unsupported feature code
VCP code 0xb6 (Display technology type       ): LCD (active matrix) (sl=0x03)
VCP code 0xb7 (Monitor status                ): Unsupported feature code
VCP code 0xb8 (Packet count                  ): Unsupported feature code
VCP code 0xb9 (Monitor X origin              ): Unsupported feature code
VCP code 0xba (Monitor Y origin              ): Unsupported feature code
VCP code 0xbb (Header error count            ): Unsupported feature code
VCP code 0xbc (Body CRC error count          ): Unsupported feature code
VCP code 0xbd (Client ID                     ): Unsupported feature code
VCP code 0xbe (Link control                  ): Unsupported feature code
VCP code 0xbf (Unknown feature               ): Unsupported feature code
VCP code 0xc0 (Display usage time            ): Usage time (hours) = 30000 (0x007530) mh=0xff, ml=0xff, sh=0x75, sl=0x30
VCP code 0xc1 (Unknown feature               ): Unsupported feature code
VCP code 0xc2 (Display descriptor length     ): Unsupported feature code
VCP code 0xc3 (Transmit display descriptor   ): Unsupported feature code (DDC NULL Message)
VCP code 0xc4 (Enable display of 'display descriptor'): Unsupported feature code
VCP code 0xc5 (Unknown feature               ): Unsupported feature code
VCP code 0xc6 (Application enable key        ): Unsupported feature code
VCP code 0xc7 (Unknown feature               ): Unsupported feature code
VCP code 0xc8 (Display controller type       ): Mfg: Genesis (sl=0x02), controller number: mh=0xff, ml=0xff, sh=0x21
VCP code 0xc9 (Display firmware level        ): 1.2
VCP code 0xca (OSD                           ): OSD Disabled (sl=0x01)
VCP code 0xcb (Unknown feature               ): Unsupported feature code
VCP code 0xcc (OSD Language                  ): Unsupported feature code
VCP code 0xcd (Status Indicators             ): Unsupported feature code
VCP code 0xce (Auxiliary display size        ): Unsupported feature code
VCP code 0xd0 (Output select                 ): Unsupported feature code
VCP code 0xd1 (Unknown feature               ): Unsupported feature code
VCP code 0xd2 (Asset Tag                     ): Unsupported feature code (DDC NULL Message)
VCP code 0xd3 (Unknown feature               ): Unsupported feature code
VCP code 0xd4 (Stereo video mode             ): Unsupported feature code
VCP code 0xd5 (Unknown feature               ): Unsupported feature code
VCP code 0xd6 (Power mode                    ): DPM: On,  DPMS: Off (sl=0x01)
VCP code 0xd7 (Auxiliary power output        ): Unsupported feature code
VCP code 0xd8 (Unknown feature               ): Unsupported feature code
VCP code 0xd9 (Unknown feature               ): Unsupported feature code
VCP code 0xda (Scan format                   ): Unsupported feature code
VCP code 0xdb (Image Mode                    ): Unsupported feature code
VCP code 0xdc (Display Mode                  ): Unsupported feature code
VCP code 0xdd (Unknown feature               ): Unsupported feature code
VCP code 0xdf (VCP Version                   ): 2.0
VCP code 0xe0 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe1 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe2 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe3 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe4 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe5 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe6 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe7 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe8 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xe9 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xea (Manufacturer Specific         ): Unsupported feature code
VCP code 0xeb (Manufacturer Specific         ): Unsupported feature code
VCP code 0xec (Manufacturer Specific         ): Unsupported feature code
VCP code 0xed (Manufacturer Specific         ): Unsupported feature code
VCP code 0xee (Manufacturer Specific         ): Unsupported feature code
VCP code 0xef (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf0 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf1 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf2 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf3 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf4 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf5 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf6 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf7 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf8 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xf9 (Manufacturer Specific         ): Unsupported feature code
VCP code 0xfa (Manufacturer Specific         ): Unsupported feature code
VCP code 0xfb (Manufacturer Specific         ): Unsupported feature code
VCP code 0xfc (Manufacturer Specific         ): Unsupported feature code
VCP code 0xfd (Manufacturer Specific         ): Unsupported feature code
VCP code 0xfe (Manufacturer Specific         ): Unsupported feature code
VCP code 0xff (Manufacturer Specific         ): mh=0xff, ml=0xff, sh=0x00, sl=0x00


Comparing declared capabilities to observed features...

Readable features declared in capabilities string: 02 0b 0c 0e 10 12 14 16 18 1a 1e 20 30 3e 52 6c 6e 70 ac ae b2 b6 c0 c8 c9 ca d6 df

MCCS (VCP) version reported by capabilities: Unqueried
MCCS (VCP) version reported by feature 0xDf: 2.0
Versions do not match!!!

All readable features declared in capabilities were found by scanning.

Features found by scanning but not declared as capabilities:
   Feature x60 - Input Source
   Feature x68 - Unknown feature
   Feature x9b - 6 axis hue control: Red
   Feature x9d - 6 axis hue control: Green
   Feature x9f - 6 axis hue control: Blue
   Feature xff - Manufacturer Specific

Color temperature increment (x0b) = 184 degrees Kelvin
Color temperature request   (x0c) = 2
Requested color temperature = (3000 deg Kelvin) + 2 * (184 degrees Kelvin) = 3368 degrees Kelvin

[Bug]: Empty discovered displays

Steps for reproducing the issue

Hi, I'm not able to see my displays on the Discovered displays array when running wluma. At first I thought it might be permissions-related so I added my user to the video and i2c groups such that running ddcutil detect shows:

Display 1
   I2C bus:  /dev/i2c-6
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               LEN - Lenovo Group Limited
      Model:                LEN T2224dA
      Product code:         ********
      Serial number:        ********
      Binary serial number: *******
      Manufacture year:     2019,  Week: 26
   VCP version:         2.2

Display 2
   I2C bus:  /dev/i2c-9
   DRM connector:           card0-DP-3
   EDID synopsis:
      Mfg id:               LEN - Lenovo Group Limited
      Model:                G27q-20
      Product code:         ******
      Serial number:        *******
      Binary serial number: *********
      Manufacture year:     2021,  Week: 31
   VCP version:         2.2

(I've crossed out some info)

Since I can see this without sudo I'm wondering what's going on that the ddc Rust code can't read the output. Would love any help!

What is the buggy behavior?

Cannot find displays

What is the expected behavior?

Something like Discovered displays: ["SERIAL_NUMBER"]

Logs

RUST_LOG=debug wluma

[2023-04-26T06:55:31Z DEBUG wluma] Using Config {
        als: Time {
            thresholds: {
                7: "dark",
                9: "dim",
                18: "dark",
                20: "night",
                0: "night",
                13: "bright",
                11: "normal",
                16: "normal",
            },
        },
        output: [
            DdcUtil(
                DdcUtilOutput {
                    name: "card0-DP-3",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2023-04-26T06:55:31Z DEBUG wluma::brightness::ddcutil] Discovered displays: []
[2023-04-26T06:55:31Z WARN  wluma] Skipping 'card0-DP-3' as it might be disconnected: Unable to find display
[2023-04-26T06:55:31Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.

Version

4.2.0-1 through AUR/yay

Environment

lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"

LSB Version:	n/a
Distributor ID:	EndeavourOS
Description:	EndeavourOS Linux
Release:	rolling
Codename:	rolling
Linux my-pc 6.2.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 20 Apr 2023 16:11:55 +0000 x86_64 GNU/Linux
clang 15.0.7-2
clang-format-static-bin 9.1d7ec53d-1
lib32-vulkan-icd-loader 1.3.245-1
vulkan-headers 1:1.3.246-1
vulkan-icd-loader 1.3.245-1

Possibily modify target of wluma.service

Please describe your feature request

The unit file wluma.service relies on graphical-session.target in order to get started at boot. However, not all display managers start this target, for instance greetd.

โžœ  ~ systemctl list-units --user --type=target
  UNIT             LOAD   ACTIVE SUB    DESCRIPTION     
  basic.target     loaded active active Basic System
  bluetooth.target loaded active active Bluetooth
  default.target   loaded active active Main User Target
  paths.target     loaded active active Paths
  sockets.target   loaded active active Sockets
  timers.target    loaded active active Timers

Which causes wluma service not to start at all and remain in an inactive (dead) state.
Changing the target to default.target does the job and it is started at boot as expected (and benefits from the auto-restart on crash)

[Unit]
Description=Adjusting screen brightness based on screen contents and amount of ambient light
PartOf=default.target
After=default.target

[Service]
ExecStart=/usr/bin/wluma
Restart=always
EnvironmentFile=-%E/wluma/service.conf
PrivateNetwork=true

[Install]
WantedBy=default.target

I guess some open questions would be:

  1. Would it be fine commit these changes? Would there be any other side effect from starting the wluma service before the compositor has started?
  2. Does wluma actually requires a wlroots compositor to be up and running in order to adjust the screen brightness or would it be something optional (to also adjust brightness based on the screen content)? A use case would be in ttys (/dev/tty1) without a DE running, adjusting the brightness based on the light sensor only would already be a great benefit.

[Feature request]: Keyboard detection

How to detect my keyboard?
I have DELL laptop, but I don't have file:
/sys/bus/platform/devices/dell-laptop/leds/dell::kbd_backlight
I don't even leds folder in dell-laptop

[Bug]: wluma does not build on 4.2.0

Steps for reproducing the issue

git clone [email protected]:maximbaz/wluma.git /tmp/wluma
cd /tmp/wluma
cargo build --locked --release

What is the buggy behavior?

Does not build using tag 4.2.0

What is the expected behavior?

Should build

Logs

`cargo build --locked --release`

    Updating crates.io index
error: failed to select a version for the requirement `predicates = "^2.0.1"`
candidate versions found which didn't match: 2.1.1, 2.1.0, 2.0.3, ...
location searched: crates.io index
required by package `mockall v0.11.3`
    ... which satisfies dependency `mockall = "^0.11.2"` (locked to 0.11.3) of package `wluma v4.2.0 (/tmp/wluma)`

Version

git log --oneline --decorate -n5

1f4f3f9 (HEAD -> main, tag: 4.2.0, origin/main, origin/HEAD) Bump version, update deps
d64d06d Add support for system-level config in /etc/xdg/wluma/ (#66)
89fb8c3 chore: fix clippy warnings (#67)
d13f50a chore: dependencies update (#59)
e2350be Revert a1c69bd, add test for current=0 desired=1

Environment

lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"

bash: lsb_release : commande introuvable
Linux archlinux 6.2.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 20 Apr 2023 16:11:55 +0000 x86_64 GNU/Linux
egrep: warning: egrep is obsolescent; using grep -E
clang 15.0.7-2
i3status-rust 0.30.7-1
rustup 1.25.2-1
vulkan-icd-loader 1.3.245-1
bash: dpkg : commande introuvable
egrep: warning: egrep is obsolescent; using grep -E

[Bug]:

Steps for reproducing the issue

  • add user to video group
  • reboot
  • Install wluma from AUR (on Manjaro i3)
  • run wluma

What is the buggy behavior?

thread 'predictor-eDP-1' panicked at 'called `Result::unwrap()` on an `Err` value: NoCompositorListening', src/frame/capturer/wlroots.rs:70:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

What is the expected behavior?

running process without errors, adjusting brightness

Logs

[2022-11-26T08:44:09Z DEBUG wluma] Using Config {
        als: Iio {
            path: "/sys/bus/iio/devices",
            thresholds: {
                250: "normal",
                80: "dim",
                20: "dark",
                0: "night",
                800: "outdoors",
                500: "bright",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
            Backlight(
                BacklightOutput {
                    name: "keyboard-dell",
                    path: "/sys/bus/platform/devices/dell-laptop/leds/dell::kbd_backlight",
                    capturer: None,
                    min_brightness: 0,
                },
            ),
        ],
    }
thread 'predictor-eDP-1' panicked at 'called `Result::unwrap()` on an `Err` value: NoCompositorListening', src/frame/capturer/wlroots.rs:70:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

4.1.2-1

Environment

LSB Version:	n/a
Distributor ID:	ManjaroLinux
Description:	Manjaro Linux
Release:	22.0.0
Codename:	Sikaris
Linux kindle 5.15.76-1-MANJARO #1 SMP PREEMPT Sat Oct 29 14:22:16 UTC 2022 x86_64 GNU/Linux
egrep: warning: egrep is obsolescent; using grep -E
clang 14.0.6-3
lib32-vulkan-icd-loader 1.3.226-1
lib32-vulkan-intel 22.2.3-1
lib32-vulkan-radeon 22.2.3-1
rust 1:1.65.0-1
rust-analyzer 20221107-1
rust-src 1:1.65.0-1
vulkan-headers 1:1.3.227-1
vulkan-icd-loader 1.3.226-1
vulkan-intel 22.2.3-1
zsh: command not found: dpkg
egrep: warning: egrep is obsolescent; using grep -E

[Bug]: wluma refuses to read my config file

Steps for reproducing the issue

i copied the example config.toml file from /usr/share/wluma/examples to the /usr/share/wluma folder and then changed it to the following

  GNU nano 7.2                       /usr/share/wluma/config.toml                                  
#[als.iio]
#path = "/sys/bus/iio/devices"
#thresholds = { 0 = "night", 20 = "dark", 80 = "dim", 250 = "normal", 500 = "bright", 800 = "outdo>

[als.webcam]
video = 0
thresholds = { 0 = "night", 15 = "dark", 30 = "dim", 45 = "normal", 60 = "bright", 75 = "outdoors">

# [als.time]
# thresholds = { 0 = "night", 7 = "dark", 9 = "dim", 11 = "normal", 13 = "bright", 16 = "normal", >

# [als.none]

[[output.backlight]]
name = "eDP-1"
path = "/sys/class/backlight/intel_backlight"
capturer = "wlroots"

# [[output.ddcutil]]
# name = "Dell Inc. DELL P2415Q"
# capturer = "none"

[[keyboard]]
name = "keyboard-dell"
path = "/sys/class/leds/asus::kbd_backlight"

# [[keyboard]]
# name = "keyboard-thinkpad"
# path = "/sys/bus/platform/devices/thinkpad_acpi/leds/tpacpi::kbd_backlight"

but whenever i run the script it keeps saying no iio devices found (which of course i dont have those!)

What is the buggy behavior?

it doesn't read the config file

What is the expected behavior?

run according to config

Logs

RUST_LOG=debug wluma

[2023-12-03T21:34:11Z DEBUG wluma] Using Config {
        als: Iio {
            path: "/sys/bus/iio/devices",
            thresholds: {
                0: "night",
                20: "dark",
                250: "normal",
                80: "dim",
                500: "bright",
                800: "outdoors",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
            Backlight(
                BacklightOutput {
                    name: "keyboard-dell",
                    path: "/sys/bus/platform/devices/dell-laptop/leds/dell::kbd_backlight",
                    capturer: None,
                    min_brightness: 0,
                },
            ),
        ],
    }
[2023-12-03T21:34:11Z WARN  wluma] Skipping 'keyboard-dell' as it might be disconnected: No such file or directory (os error 2)
[2023-12-03T21:34:11Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'als' panicked at src/main.rs:112:26:
Unable to initialize ALS IIO sensor: "No iio device found"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


### Version

latest

### Environment

```shell
lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"


LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
Linux haku 6.6.3-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Wed, 29 Nov 2023 00:40:39 +0000 x86_64 GNU/Linux
2597 swayidle
2603 swayidle
egrep: warning: egrep is obsolescent; using grep -E
clang 16.0.6-1
lib32-vulkan-icd-loader 1.3.269-1
rustup 1.26.0-5
swayidle 1.8.0-1
swaylock-effects-git r469.4f2234c-1
vulkan-headers 1:1.3.269-1
vulkan-icd-loader 1.3.269-1
vulkan-validation-layers 1.3.268.0-1
wlroots 0.17.0-1
egrep: warning: egrep is obsolescent; using grep -E

[Bug]: wlroots capture shows NoCompositorListening, Sway on Void Linux, from WezTerm terminal

Steps for reproducing the issue

Hardware: ThinkPad T14 Gen 1 (AMD), Chicony webcam, AMDGPU
Software: Void Linux, SwayWM, wluma run from WezTerm

  1. Compile from source (make build && sudo make install)
  2. Run wluma
  3. Error log:
โฏ RUST_BACKTRACE=full wluma
thread 'predictor-eDP-1' panicked at 'called `Result::unwrap()` on an `Err` value: NoCompositorListening', src/frame/capturer/wlroots.rs:70:49
stack backtrace:
[2022-05-28T20:45:08Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
   0:     0x55e2748c66b0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h18674753585b8cc5
   1:     0x55e2748e916c - core::fmt::write::h650970577346edc1
   2:     0x55e2748c2fb5 - std::io::Write::write_fmt::hcdbe4458fe2ebdfb
   3:     0x55e2748c84cb - std::panicking::default_hook::{{closure}}::h2b3ca2e1a25274db
   4:     0x55e2748c8043 - std::panicking::default_hook::hb3d80776b693aaeb
   5:     0x55e27475b33e - wluma::main::{{closure}}::hac5ad5b4efe56de1
   6:     0x55e2748c8bc9 - std::panicking::rust_panic_with_hook::habc6079310c0728a
   7:     0x55e2748c8670 - std::panicking::begin_panic_handler::{{closure}}::ha449aee990d62948
   8:     0x55e2748c6b54 - std::sys_common::backtrace::__rust_end_short_backtrace::h54cc540f2a5a6bf2
   9:     0x55e2748c85d9 - rust_begin_unwind
  10:     0x55e274735231 - core::panicking::panic_fmt::he85288327cd30385
  11:     0x55e274735323 - core::result::unwrap_failed::ha180eafd08eaf142
  12:     0x55e27475f857 - <wluma::frame::capturer::wlroots::Capturer as core::default::Default>::default::hf2d4c68db8240d60
  13:     0x55e274760d9b - std::sys_common::backtrace::__rust_begin_short_backtrace::h1b6ace0267256e64
  14:     0x55e274784a58 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h2d19e92af92472d4
  15:     0x55e2748cbf43 - std::sys::unix::thread::Thread::new::thread_start::h2582dd3e3de2d3c5
  16:     0x7f45fa2f3eae - start_thread
                               at /builddir/glibc-2.32/nptl/pthread_create.c:463:8
  17:     0x7f45fa0de2ff - __GI___clone
                               at /builddir/glibc-2.32/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  18:                0x0 - <unknown>

What is the buggy behavior?

wlroots capture panics wluma on launch, with error "NoCompositorListening".

What is the expected behavior?

I can use wlroots capture without errors.

Logs

[2022-05-28T20:47:12Z DEBUG wluma] Using Config {
        als: Webcam {
            video: 0,
            thresholds: {
                60: "bright",
                45: "normal",
                0: "night",
                30: "dim",
                15: "dark",
                75: "outdoors",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/amdgpu_bl0",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
            Backlight(
                BacklightOutput {
                    name: "keyboard-thinkpad",
                    path: "/sys/bus/platform/devices/thinkpad_acpi/leds/tpacpi::kbd_backlight",
                    capturer: None,
                    min_brightness: 0,
                },
            ),
        ],
    }
thread 'predictor-eDP-1' panicked at 'called `Result::unwrap()` on an `Err` value: NoCompositorListening', src/frame/capturer/wlroots.rs:70:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

Latest commit from master, which should also mean 4.1.2?

Environment

Hardware: ThinkPad T14 Gen 1 (**AMD**), Chicony webcam, AMDGPU
Software: Void Linux, SwayWM, `wluma` run from WezTerm

`lsb_release -a; uname -a; pgrep -l sway;`

LSB Version:    1.0
Distributor ID: VoidLinux
Description:    Void Linux
Release:        rolling
Codename:       void
Linux [HOSTNAME REDACTED] #1 SMP 1653511930 x86_64 GNU/Linux
12018 swayidle
12213 swaybg
12218 swaybar
20880 sway

`xbps-query -l | egrep "(wlroots|vulkan|sway|clang|rust)"`

ii autotiling-1.6_1                                            Automatically switch horizontal/vertical split orientation in i3/sway
ii clang-12.0.1_2                                              Low Level Virtual Machine - C language family frontend
ii dnssec-anchors-20181012_2                                   DNSSEC trust anchors for the root zone
ii fuzzel-1.7.0_1                                              Application launcher for wlroots based Wayland compositors
ii grimshot-1.7_20220521                                       Helper for screenshots within sway
ii i3status-rust-0.21.9_1                                      Replacement for i3status, written in Rust
ii libclang-12.0.1_2                                           Low Level Virtual Machine - C frontend runtime library
ii libclang-cpp-12.0.1_2                                       Low Level Virtual Machine - C frontend runtime library (C++ interface)
ii mesa-vulkan-radeon-21.3.7_1                                 Mesa Radeon Vulkan driver
ii mesa-vulkan-radeon-32bit-21.3.7_1                           Mesa Radeon Vulkan driver (32bit)
ii python3-i3ipc-2.2.1_5                                       Improved Python library to control i3wm and sway
ii rust-1.57.0_1                                               Safe, concurrent, practical systems language
ii rust-std-1.57.0_1                                           Safe, concurrent, practical systems language - standard library
ii sway-1.7_20220521                                           Tiling Wayland compositor compatible with i3
ii sway-audio-idle-inhibit-0.1.1_1                             Prevent swayidle from sleeping when audio is playing
ii swaybg-1.1_1                                                Wallpaper tool for Wayland compositors
ii swayidle-1.7.1_1                                            Idle management daemon for Wayland
ii swaylock-1.5_1                                              Screen locker for Wayland
ii trousers-0.3.14_11                                          Trusted Computing Software Stack for the TPM
ii vulkan-loader-1.3.204.1_1                                   Vulkan Installable Client Driver (ICD) loader
ii vulkan-loader-32bit-1.3.204.1_1                             Vulkan Installable Client Driver (ICD) loader (32bit)
ii wayvnc-0.4.1_1                                              VNC server for wlroots based Wayland compositors
ii wlr-randr-0.2.0_1                                           Wayland clone of xrandr for wlroots compositors
ii wlroots-0.15.1_1                                            Modular Wayland compositor library
ii wlroots-devel-0.15.1_1                                      Modular Wayland compositor library - development files
ii xdg-desktop-portal-wlr-0.5.0_1                              Backend of xdg-desktop-portal for wlroots

[Bug]: ALS.webcam makes webcam hang

Steps for reproducing the issue

  • install a distro using gnome
  • run wluma as a user systemd service file
  • put computer to sleep

What is the buggy behavior?

upon waking up webcam starts behaving weirdly, very.

  • Before sleep the webcam light was blinking for a couple of milliseconds every second, now it's constantly on.
  • Wluma thinks it's really bright, and enables outdoors brightness mode, even if I cover the camera with my finger.
  • Accessing the webcam from any other app (including ffplay /dev/video0 shows nothing but a 720p black screen.
  • Stopping wluma does not fix the webcam, the light is still on and the video is still a malevich square.
  • if I reboot, nothing changes, the issue persists. Light doesn't even go off.
  • If I shutdown the laptop completely, and boot back up the light is off, BUT;
  • After a shutdown, as soon as I try using the webcam is gets back to showing nothing but a black screen with the light constantly on, even if I'm not using the webcam. ffplay returns NaN instead of a video stream.

What is the expected behavior?

Well perhaps wluma should not murder my webcam.

Logs

vega@dart ~/s/w/t/release [SIGINT]> RUST_LOG=debug ./wluma
[2022-02-01T06:03:12Z DEBUG wluma] Using Config {
        als: Webcam {
            video: 0,
            thresholds: {
                45: "normal",
                15: "dark",
                75: "outdoors",
                60: "bright",
                30: "dim",
                0: "night",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: None,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2022-02-01T06:03:12Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

libv4l2: error setting pixformat: Input/output error
libv4l2: error setting pixformat: Input/output error

Version

version 4.1.0, from the built artifact in releases folder

Environment

default command doesn't work, so here's information from neofetch, I guess.

             .',;::::;,'.                vega@dart 
         .';:cccccccccccc:;,.            --------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 35.20220125.0 (Silverblue) x86_64 
    .:cccccccccccccccccccccccccc:.       Host: Notebook NS50MU 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 5.15.16-200.fc35.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 1 day, 7 hours, 3 mins 
.:ccccccccccccc;KMMc;cc;xMMc;ccccccc:.   Packages: 1432 (rpm), 101 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW:;cccccccc,   Shell: fish 3.3.1 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 1920x1080 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 41.3 (Wayland) 
cccccc;0MMKxdd:;MMMkddc.;cccccccccccc;   Theme: Adwaita-dark [GTK2/3] 
ccccc;XM0';cccc;MMM.;cccccccccccccccc'   Icons: Adwaita [GTK2/3] 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Terminal: gnome-terminal 
ccccc;0MNc.ccc.xMMd;ccccccccccccccc;     CPU: 11th Gen Intel i7-1165G7 (8) @ 4.700GHz 
cccccc;dNMWXXXWM0:;cccccccccccccc:,      GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
cccccccc;.:odl:.;cccccccccccccc:,.       Memory: 6620MiB / 31889MiB 
:cccccccccccccccccccccccccccc:'.
.:cccccccccccccccccccccc:;,..                                    
  '::cccccccccccccc::;,.

[Bug]: Crash on PC with AMD GPU (capturer = wlroots)

Steps for reproducing the issue

I have an AMD RX 6600 GPU, probably it's what causes the problem. When I run wluma with capturer set to wlroots in config.toml, it crashes shortly after starting.

What is the buggy behavior?

$ wluma
[2023-07-25T10:53:34Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
ac_compute_device_uuid's output is based on invalid pci bus info.
thread 'predictor-BenQ GW2270' panicked at 'Unable to compute luma percent: ERROR_UNKNOWN', src/frame/capturer/wlroots.rs:128:26

What is the expected behavior?

It should run properly, like when I set capturer to none in config

Logs

$ sudo pacman -S vulkan-validation-layers
...
$ export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
$ RUST_LOG=debug wluma
[2023-07-25T11:05:11Z DEBUG wluma] Using Config {
        als: Time {
            thresholds: {
                11: "normal",
                20: "night",
                18: "dark",
                9: "dim",
                16: "normal",
                0: "night",
                7: "dark",
                13: "bright",
            },
        },
        output: [
            DdcUtil(
                DdcUtilOutput {
                    name: "BenQ GW2270",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2023-07-25T11:05:13Z DEBUG wluma::brightness::ddcutil] Discovered displays: ["BenQ GW2270 W9G06281SL0"]
[2023-07-25T11:05:13Z DEBUG wluma::brightness::ddcutil] Using display 'BenQ GW2270 W9G06281SL0' for config 'BenQ GW2270'
[2023-07-25T11:05:13Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
ac_compute_device_uuid's output is based on invalid pci bus info.
[2023-07-25T11:05:13Z DEBUG wluma::frame::capturer::wlroots] Using output 'BNQ BenQ GW2270 W9G06281SL0 (HDMI-A-1)' for config 'BenQ GW2270'
VUID-vkBindImageMemory-size-01049(ERROR / SPEC): msgNum: 694023407 - Validation Error: [ VUID-vkBindImageMemory-size-01049 ] Object 0: handle = 0xcb3ee80000000007, type = VK_OBJECT_TYPE_IMAGE; Object 1: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0x295df4ef | vkBindImageMemory(): memory size minus memoryOffset is 0x7e9000 but must be at least as large as VkMemoryRequirements::size value 0x870000, returned from a call to vkGetImageMemoryRequirements with image. The Vulkan spec states: The difference of the size of memory and memoryOffset must be greater than or equal to the size member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements with the same image (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkBindImageMemory-size-01049)
    Objects: 2
        [0] 0xcb3ee80000000007, type: 10, name: NULL
        [1] 0xead9370000000008, type: 8, name: NULL
thread 'predictor-BenQ GW2270' panicked at 'Unable to compute luma percent: ERROR_UNKNOWN', src/frame/capturer/wlroots.rs:128:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

wluma-git 4.2.0.r4.g54874c1-1 installed from AUR

Environment

- Arch Linux
- kernel version: 6.4.4-arch1-1
- sway 1:1.8.1-1
- vulkan-radeon 23.1.4-2
- amdvlk 2023.Q2.3-1 (set as a default vulkan implementation)
- mesa 23.1.4-2

[Bug]: predictor-eDP-1 panicked at 'assertion failed: `(left == right)`

Steps for reproducing the issue

I installed wluma in archlinux/sway 1.7 and run wluma without any further or initial configuration and got the crash.

What is the buggy behavior?

~ RUST_BACKTRACE=full wluma
[2022-11-06T08:56:34Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `3`: Frames with multiple objects are not supported yet', src/frame/vulkan.rs:145:9
stack backtrace:
   0:     0x5585a997c8bd - <unknown>
   1:     0x5585a999ecfc - <unknown>
   2:     0x5585a997a061 - <unknown>
   3:     0x5585a997e2e5 - <unknown>
   4:     0x5585a997e001 - <unknown>
   5:     0x5585a9812aae - <unknown>
   6:     0x5585a997e92a - <unknown>
   7:     0x5585a997e767 - <unknown>
   8:     0x5585a997cdb4 - <unknown>
   9:     0x5585a997e499 - <unknown>
  10:     0x5585a97ee433 - <unknown>
  11:     0x5585a999cffe - <unknown>
  12:     0x5585a97e4e2b - <unknown>
  13:     0x5585a98410fc - <unknown>
  14:     0x5585a9834a6a - <unknown>
  15:     0x5585a9835783 - <unknown>
  16:     0x5585a98272c5 - <unknown>
  17:     0x5585a98f7db0 - <unknown>
  18:     0x5585a98f68ba - <unknown>
  19:     0x5585a98fa736 - <unknown>
  20:     0x7f26c8ea2d65 - <unknown>
  21:     0x7f26c8ea2ffc - wl_display_dispatch_queue_pending
  22:     0x5585a9830485 - <unknown>
  23:     0x5585a984bf6b - <unknown>
  24:     0x5585a9813372 - <unknown>
  25:     0x5585a981f8aa - <unknown>
  26:     0x5585a9981703 - <unknown>
  27:     0x7f26c8b688fd - <unknown>
  28:     0x7f26c8beaa60 - <unknown>
  29:                0x0 - <unknown>

What is the expected behavior?

expected things to work :)

Logs

~ RUST_LOG=debug wluma
[2022-11-06T08:58:55Z DEBUG wluma] Using Config {
        als: Iio {
            path: "/sys/bus/iio/devices",
            thresholds: {
                500: "bright",
                20: "dark",
                0: "night",
                80: "dim",
                250: "normal",
                800: "outdoors",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
            Backlight(
                BacklightOutput {
                    name: "keyboard-dell",
                    path: "/sys/bus/platform/devices/dell-laptop/leds/dell::kbd_backlight",
                    capturer: None,
                    min_brightness: 0,
                },
            ),
        ],
    }
[2022-11-06T08:58:55Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
[2022-11-06T08:58:56Z DEBUG wluma::frame::capturer::wlroots] Using output 'Unknown 0x06B3 0x00000000 (eDP-1)' for config 'eDP-1'
thread 'predictor-eDP-1' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `3`: Frames with multiple objects are not supported yet', src/frame/vulkan.rs:145:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

[Aur:1] wluma-4.1.2-1

Environment

~ lsb_release -a; uname -a; pgrep -l sway; pacman -Q | egrep "(wlroots|vulkan|sway|clang|rust)"; dpkg -l | egrep "(wlroots|vulkan|sway|clang|rust)"
LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a
Linux butterfly 6.0.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 29 Oct 2022 14:08:39 +0000 x86_64 GNU/Linux
5696 sway
clang 14.0.6-3
lib32-vulkan-icd-loader 1.3.226-1
lib32-vulkan-intel 22.2.1-1
rust 1:1.64.0-1
sway 1:1.7-9
swaybg 1.1.1-1
vulkan-headers 1:1.3.227-1
vulkan-icd-loader 1.3.226-1
vulkan-intel 22.2.1-1
vulkan-tools 1.3.226-1
wlroots 0.15.1-6
zsh: command not found: dpkg

[Bug]: Unable to initialize Vulkan: ERROR_EXTENSION_NOT_PRESENT

Steps for reproducing the issue

Launched wluma the first time.

What is the buggy behavior?

Wluma panicks because of a missing extension.

What is the expected behavior?

Wluma should work.

I followed some guides to install Vulkan, so I expect the extension to be available, somehow.

Logs

RUST_LOG=debug wluma                                               
[2023-11-21T13:40:58Z DEBUG wluma] Using Config {
        als: Iio {
            path: "/sys/bus/iio/devices",
            thresholds: {
                800: "outdoors",
                20: "dark",
                0: "night",
                250: "normal",
                500: "bright",
                80: "dim",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/intel_backlight",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
            Backlight(
                BacklightOutput {
                    name: "keyboard-dell",
                    path: "/sys/bus/platform/devices/dell-laptop/leds/dell::kbd_backlight",
                    capturer: None,
                    min_brightness: 0,
                },
            ),
        ],
    }
[2023-11-21T13:40:58Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at src/frame/capturer/wlroots.rs:86:44:
Unable to initialize Vulkan: ERROR_EXTENSION_NOT_PRESENT
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Version

wluma 4.3.0-1 packaged by archlinux.

Environment

Linux vogon 6.6.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 08 Nov 2023 16:05:38 +0000 x86_64 GNU/Linux

Processes:
1958 sway
2031 swaybg
2061 swayrd
2062 swaync
2064 swayidle
2223 swaync-client
33009 swaync-client

Packaged installed: 
clang 16.0.6-1
rust 1:1.73.0-1
sway 1:1.8.1-3
swaybg 1.2.0-1
swayidle 1.8.0-1
swaylock-effects-git r420.7c5681c-1
swaync 0.9.0-1
swayr 0.27.1-1
vulkan-icd-loader 1.3.269-1
vulkan-tools 1.3.269-1
wlroots 0.16.2-2

[Bug]: Crash on AMD APU (Laptop)

Steps for reproducing the issue

Run wluma on a laptop with an AMD APU
Environment:
WM: qtile -b wayland
wluma config:

[als.webcam]
video = 0
thresholds = { 0 = "night", 15 = "dark", 30 = "dim", 45 = "normal", 60 = "bright", 75 = "outdoors" }

[[output.backlight]]
name = "eDP-1"
path = "/sys/class/backlight/amdgpu_bl0"
capturer = "wlroots"

What is the buggy behavior?

wluma crashes with ERROR_EXTENSION_NOT_PRESENT

What is the expected behavior?

wluma should run properly

Logs

RUST_BACKTRACE=full RUST_LOG=debug wluma
[2023-05-02T02:56:31Z DEBUG wluma] Using Config {
        als: Webcam {
            video: 0,
            thresholds: {
                0: "night",
                15: "dark",
                45: "normal",
                60: "bright",
                75: "outdoors",
                30: "dim",
            },
        },
        output: [
            Backlight(
                BacklightOutput {
                    name: "eDP-1",
                    path: "/sys/class/backlight/amdgpu_bl0",
                    capturer: Wlroots,
                    min_brightness: 1,
                },
            ),
        ],
    }
[2023-05-02T02:56:31Z INFO  wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'Unable to initialize Vulkan: ERROR_EXTENSION_NOT_PRESENT', src/frame/capturer/wlroots.rs:86:44
stack backtrace:
   0:     0x55a852ffd07a - <unknown>
   1:     0x55a85301fb1e - <unknown>
   2:     0x55a852ffa945 - <unknown>
   3:     0x55a852ffce45 - <unknown>
   4:     0x55a852ffe94f - <unknown>
   5:     0x55a852ffe68b - <unknown>
   6:     0x55a852ea9cee - <unknown>
   7:     0x55a852fff07d - <unknown>
   8:     0x55a852ffedf9 - <unknown>
   9:     0x55a852ffd4e6 - <unknown>
  10:     0x55a852ffeb02 - <unknown>
  11:     0x55a852e60dd3 - <unknown>
  12:     0x55a852e61283 - <unknown>
  13:     0x55a852ebed5f - <unknown>
  14:     0x55a852e852c3 - <unknown>
  15:     0x55a852ea4c00 - <unknown>
  16:     0x55a853001bb3 - <unknown>
  17:     0x7f5391841bb5 - <unknown>
  18:     0x7f53918c3d90 - <unknown>
  19:                0x0 - <unknown>

Version

aur/wluma 4.2.0-1

Environment

LSB Version:	n/a
Distributor ID:	Artix
Description:	Artix Linux
Release:	rolling
Codename:	n/a
Linux LNV21LT001 6.2.13-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 27 Apr 2023 19:59:36 +0000 x86_64 GNU/Linux
egrep: warning: egrep is obsolescent; using grep -E
lib32-vulkan-icd-loader 1.3.245-1
python-pywlroots 0.15.24-3
vulkan-headers 1:1.3.248-1
vulkan-icd-loader 1.3.245-1
vulkan-tools 1.3.245-1
vulkan-validation-layers 1.3.243.0-1
wlroots0.15 0.15.1-2
zsh: command not found: dpkg
egrep: warning: egrep is obsolescent; using grep -E

Related: #27

configuration question

Please describe your feature request

Hi, there was no proper section for the question, so I'm creating feature request.

The only thing I need from wluma is described in the first sentence of the readme:

The app will automatically brighten the screen when you are looking at a dark window (such as a fullscreen terminal) and darken the screen when you are looking at a bright window (such as web browser).

I've NixOS on Thinkpad t440s. There are no errors in the log except MESA-INTEL: warning: Haswell Vulkan support is incomplete.

The configurations I've tried:

  1. [als.none]
    
    [[output.backlight]]
    name = "eDP-1"
    path = "/sys/class/backlight/intel_backlight"
    capturer = "wlroots"
  2. [als.webcam]
    video = 0
    thresholds = { 0 = "night", 15 = "dark", 30 = "dim", 45 = "normal", 60 = "bright", 75 = "outdoors" }
    
    [[output.backlight]]
    name = "eDP-1"
    path = "/sys/class/backlight/intel_backlight"
    capturer = "wlroots"

but nothing works, and with the second cfg I have an annoying webcam light blinking. WHat am I doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.