Camera adjustment

…it’s been quite some time since this has been up here, has there been any progress on it ?
The problem of overexposure e.g. is annoying and “should” also be handled on Linux and at least under Mac OS and not be a Windows only thing.

On Linux, controlling exposure and brightness for cameras depends on both the application (in this case, LightBurn) and the system’s infrastructure. Unlike Windows, where APIs are standardized, Linux relies on libraries like v4l2 (Video for Linux 2) for these functionalities.

Here’s how you can resolve the issue and adjust camera controls on Linux:


1. Check if the camera supports adjustments via v4l2

Linux uses the v4l2 module to communicate with cameras. First, install the required package:

sudo apt-get install v4l-utils

Then, list the available cameras:

v4l2-ctl --list-devices

Identify your camera’s device name (e.g., /dev/video0).


2. Manually adjust exposure and brightness

Use the v4l2-ctl command to modify the camera settings. Replace /dev/video0 with your device’s correct path.

  • List available controls:

    v4l2-ctl -d /dev/video0 --list-ctrls
    
  • Set brightness:

    v4l2-ctl -d /dev/video0 --set-ctrl=brightness=128
    
  • Set exposure (absolute):

    v4l2-ctl -d /dev/video0 --set-ctrl=exposure_absolute=200
    
  • Disable auto-exposure:

    v4l2-ctl -d /dev/video0 --set-ctrl=exposure_auto=1
    

3. Make changes persistent

The adjustments made with v4l2-ctl are temporary. To apply them automatically on every system boot:

  • Create a script, e.g., camera-settings.sh:

    #!/bin/bash
    v4l2-ctl -d /dev/video0 --set-ctrl=brightness=128
    v4l2-ctl -d /dev/video0 --set-ctrl=exposure_auto=1
    v4l2-ctl -d /dev/video0 --set-ctrl=exposure_absolute=200
    
  • Make the script executable:

    chmod +x camera-settings.sh
    
  • Add the script to the startup manager, such as crontab:

    crontab -e
    

    Add the following line:

    @reboot /path/to/camera-settings.sh
    
1 Like

Hi Lucas, thank you very much for your detailed instructions. I will definitely try it on my work computer which is the Linux machine.

If it’s not too much trouble, please share your feedback about your experience so it can be recorded for future research on the forum.
We will no longer provide support for the program, but we uphold the Linux spirit of sharing knowledge.

1 Like

I will do that as soon as I have tested it. :+1:

Hi Lucas,
First of all, thank you very much for your effort in keeping the Linux version of LightBurn alive. That’s what you do with the help you’ve given me with my camera problem.
As a Linux amateur, even I could figure out your very nice description and the best thing is that it works!
By copying and pasting your instructions, I was finally able to adjust the settings of my camera. The result is as desired, for the first time ever I can see a handwritten note. This improves the accuracy of this beloved tool even more.

Some wording/operation options in the camera instructions of my LB-camera are different but it’s workable.
I haven’t set it to be persistent, it’s the last step when I’m done playing with the settings.

It would be great if the LightBurn people would implement those features in the very latest Linux-LightBurn version, I don’t think that’s too much to ask for.

I’m attaching a text file with some of the settings as they appear on my system.

Once again, many thanks.

CamControl.txt (3.3 KB)

Hi Bernd,

That’s great news! I must confess that I got some help from ChatGPT to organize my response since English isn’t my native language. However, the important thing is to realize that using Linux opens up possibilities far beyond the traditional scope we are used to with other systems that deliver everything pre-packaged.

You can compare it to people who cook their own meals versus those who buy pre-made ones.
Imagine Linux as a giant box containing every Lego piece ever made, allowing you to create the largest, most complete toy or even an entire city, where everything moves just the way you want. Then compare this to other systems, which are like walking into a store and buying all the toys you want, but they’re all pre-assembled and can only do what they were designed to do.

As for your suggestion about implementing this into LightBurn, it will depend more on the company’s available development time and their planning for the next version.

Perhaps @adammhaile could give us more insight into the possibility.

My suggestion, whenever you have doubts about Linux, is to consult ChatGPT. Even the free version provides excellent answers for managing your Linux system and others.

1 Like

…not here either :wink:

…I know that and 1-2% of LB users also, but unfortunately and understandably it was not (commercially) enough.

Unfortunately, I think it depends more on the will than the time and possibilities. But I think, as I said before, that it would be a nice gesture to many of us who have been with LightBurn for many years, to end Linux development with a shiny final version.

I believe it is still possible since the latest fixes and changes have been quite significant if you follow the changelog. However, I’m not sure if posting on the forum is the best way to request this.

Unfortunately, this is what I’m dealing with.

For Mac OS and Windows we have written entirely custom camera subsystems that work at a very low level with the OS to give us absolute control over the system. We have one developer that basically does only camera work. Unfortunately there is no plan to do any of this work for Linux… in fact it was one of the factors for why we decided not to continue with Linux.
These new camera subsystems are completely custom for each OS and Linux would be the same, which means it runs into the same dilemma we’ve already discussed: Does it make sense to spend that much dev time for such a small user base?

So, unfortunately, no - there won’t be any further camera updates to the Linux build of LightBurn. We did try to end the Linux support on a shiny new version with lots of great new features. I’ve even been continuing to port various bug fixes back to 1.7 despite having LightBurn v2.0 on the near horizon. I’m literally working on one such bug fix right now.
We’ve also been working on finalizing full translations for all 25 supported languages that will be available starting with LightBurn v1.7.04.

I realize that’s not the answer you were hoping for but unfortunately we had to draw the line somewhere and 1.7 was where it stands.

If this had been anticipated, the possibility of adding modules could have been included, and perhaps in the future, someone will share the solution on GitHub, just like other solutions.

I think I’ll create a live Ubuntu version in case I need to migrate to a computer dedicated exclusively to this. As soon as new updates arrive, we run the risk of the system breaking.
@adammhaile, could you help us by listing the libraries added to the AppImage that are not available in the installation version?
I, along with others, can only use the camera with the AppImage, which doesn’t show any errors indicating missing libraries.

Thank you once again for extending the license to Linux users.

That would be a good question for @goeland86 as he’s the one who made the AppImage build.

Basically all the Gstreamer libraries that Lightburn was compiled against are in the AppImage. There’s a number of Qt libraries as well, and some SSL that the bundled Qt uses? The list is reeaaaaally long.

You can extract the AppImage to list all the files into a folder hierarchy with ./LightBurn-Linux64-v1.7.03.AppImage --appimage-extract

I hope that helps for your use-case?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.