Focus in Camera (dev preview) app

I reflashed my Librem 5 and confirmed it is running Byzantium. I checked for any available updates with the PureOS Store, with “sudo apt update,” and with “sudo apt-get update,” and there were none. The focus slider for the Camera app still seems to have issues, and the error log seems to reference something related to “sudo,” as well. After I had opened the Camera app from the terminal and slid the focus slider a few times, I went back to the terminal and saw this line: “[sudo] password for purism: purism@pureos:~$” I tried entering my password, but that didn’t take correctly. The app stopped attempting to use the terminal after I attempted to type in the password and hit the “return”/“enter” key. The second to last line shows the attempt at entering the password.

purism@pureos:~$ millipixels
Found config file at /usr/share/millipixels/config/purism,librem5r4.ini
Adding camera big from config
matched GRBG8 to GRBG8 3
matched GRBG8 to GRBG8 3
Adding camera selfie from config
matched GBRG16 to GBRG16 14
matched GBRG16 to GBRG16 14
Found postprocessor script at /usr/share/millipixels/postprocess.sh
mp_device_list_find_remove imx7-csi s5k3l6xx 3-002d
18: there’s csi, looking for s5k3l6xx 3-002d
18: there’s csi capture, looking for s5k3l6xx 3-002d
18: there’s imx8mq-mipi-csi2 30a70000.csi, looking for s5k3l6xx 3-002d
18: there’s hi846 2-0020, looking for s5k3l6xx 3-002d
17: there’s csi, looking for s5k3l6xx 3-002d
17: there’s csi capture, looking for s5k3l6xx 3-002d
17: there’s imx8mq-mipi-csi2 30b60000.csi, looking for s5k3l6xx 3-002d
17: there’s s5k3l6xx 3-002d, looking for s5k3l6xx 3-002d
found!
devname /dev/video1
17: there’s csi, looking for s5k3l6xx 3-002d
17: there’s csi capture, looking for s5k3l6xx 3-002d
17: there’s imx8mq-mipi-csi2 30b60000.csi, looking for s5k3l6xx 3-002d
17: there’s s5k3l6xx 3-002d, looking for s5k3l6xx 3-002d
found!
linking flags 0 source 15:0 sink 10:0
MPDevice: MEDIA_IOC_SETUP_LINK error 22, Invalid argument
mp_device_list_find_remove imx7-csi hi846 2-0020
18: there’s csi, looking for hi846 2-0020
18: there’s csi capture, looking for hi846 2-0020
18: there’s imx8mq-mipi-csi2 30a70000.csi, looking for hi846 2-0020
18: there’s hi846 2-0020, looking for hi846 2-0020
found!
devname /dev/video0
18: there’s csi, looking for hi846 2-0020
18: there’s csi capture, looking for hi846 2-0020
18: there’s imx8mq-mipi-csi2 30a70000.csi, looking for hi846 2-0020
18: there’s hi846 2-0020, looking for hi846 2-0020
found!
linking flags 0 source 15:0 sink 10:0
MPDevice: MEDIA_IOC_SETUP_LINK error 22, Invalid argument
linking flags 1 source 15:0 sink 10:0
MPDevice: MEDIA_IOC_SETUP_LINK error 22, Invalid argument
Setting mode 1052 780
[0:09:37.743889537] [2119] INFO Camera camera_manager.cpp:293 libcamera v0.0.0
[0:09:37.760838778] [2120] WARN CameraSensorProperties camera_sensor_properties.cpp:141 No static properties available for ‘s5k3l6xx’
[0:09:37.760931059] [2120] WARN CameraSensorProperties camera_sensor_properties.cpp:143 Please consider updating the camera sensor properties database
[0:09:37.762050433] [2119] INFO Camera camera.cpp:937 configuring streams: (0) 1052x780-SGRBG8
[0:09:37.762819402] [2120] ERROR DeviceEnumerator device_enumerator.cpp:166 Removing media device /dev/media2 while still in use
ok
[sudo] password for purism: purism@pureos:~$
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
[sudo] password for purism:
sudo: unable to read password: Input/output error
sudo: a password is required
bash: 23456: command not found
purism@pureos:~$

Looks like the program is doing something that requires root access and is using sudo to achieve that but is doing so in a context where sudo can’t get a password (there is no terminal or the terminal can’t be found or some other problem).

You may be able to do sudo before running the program so that the password has been solicited and that will then be valid for X minutes.

Or, strictly for testing purposes, you might reconfigure sudo so that it does not require a password and see whether that makes a difference. However that is a) not at all a good long-term solution, and b) should only be done with care (since if you break your sudo config, you may lock yourself out from making further changes to your sudo config or indeed doing anything else that requires sudo). Hence only recommended for more experienced Linux users.

1 Like

Thank you for your ideas, @irvinewade! Running sudo for something else (e.g. “sudo apt update”) did allow the Camera app to open and the focus slider to actually change the focus. That said, when I closed the Camera app that was launched from the terminal, then closed the terminal, then opened the Camera app using the regular icon, the focus slider doesn’t do anything. I repeated the steps running it from the terminal with having ran something with sudo before running millipixels, and the focus slider actually did stuff again. Based on this functionality/lack of functionality, I would guess this is a bug that Purism devs will have to figure out.

Well, if you click the link that is provided above for a merge request, it appears to be germane to this exact problem. I don’t know why you are missing that change. Has that change been released? Did something go wrong? Does the change need further work? However you can clearly see that the intent of that change is to allow some magic i2ctransfer command to run without prompting for your password for sudo purposes.

So you could manually add that file to your sudo config - with the same implied caveat as above. Don’t stuff it up. :wink:

The safe starting point would be to post here the output from ls -l /etc/sudoers.d

The implication from @dcz is that the above change is an interim solution however.

I don’t even have a SIM in my Librem 5 yet, as I’m waiting for VoLTE to work before I make it my daily driver for my personal phone. As such, I will probably just wait until the fix for millipixels is pushed to everybody through standard updates. Thank you for your time troubleshooting this, though. Hopefully it helps Purism devs get the Librem 5 to a place that’s usable for the average phone user.

Can you post the output of dpkg -l millipixels along with ls /etc/sudoers.d/?

Info from “dpkg -l millipixels:”

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±==============-===============-============-===========================================================
ii millipixels 0.18.0-1pureos2 arm64 GTK3 camera app for mobile using the V4L2 media request API

Info from “ls /etc/sudoers.d/:”

purism@librem5:~$ ls /etc/sudoers.d/
README
purism@librem5:~$

I don’t know what’s going on, but this might help:

sudo apt install --reinstall millipixels/byzantium

Just tried that, but I get the same functionality/lack of functionality as before. The focus slider doesn’t work if I launch the Camera app using the normal icon or from running millipixels in a fresh terminal. If I run a sudo command in a terminal and then immediately launch millipixels from that same terminal, the focus slider works (I assume because millipixels is able to use the “cached” sudo password or whatever sudo does with the password to not make you type it in every time within a certain time window).

Could you share your /var/log/dpkg.log ?

I tried just attaching that file, but it appears to not be a supported file to upload to this forum. Do you want ALL the contents of that file? It’s very large.

I think the last 100 lines will do:

tail -n 100 /var/log/dpkg.log

purism@librem5:~$ tail -n 100 /var/log/dpkg.log
2022-01-19 22:08:31 status half-installed python3-yoyo:all 7.3.1+dfsg1-1
2022-01-19 22:08:31 status config-files python3-yoyo:all 7.3.1+dfsg1-1
2022-01-19 22:08:31 status not-installed python3-yoyo:all
2022-01-19 22:08:31 status installed python3-sqlparse:all 0.4.1-1
2022-01-19 22:08:31 remove python3-sqlparse:all 0.4.1-1
2022-01-19 22:08:31 status half-configured python3-sqlparse:all 0.4.1-1
2022-01-19 22:08:31 status half-installed python3-sqlparse:all 0.4.1-1
2022-01-19 22:08:31 status config-files python3-sqlparse:all 0.4.1-1
2022-01-19 22:08:31 status not-installed python3-sqlparse:all
2022-01-19 22:08:31 status installed python3-tabulate:all 0.8.7-0.1
2022-01-19 22:08:31 remove python3-tabulate:all 0.8.7-0.1
2022-01-19 22:08:31 status half-configured python3-tabulate:all 0.8.7-0.1
2022-01-19 22:08:32 status half-installed python3-tabulate:all 0.8.7-0.1
2022-01-19 22:08:32 status config-files python3-tabulate:all 0.8.7-0.1
2022-01-19 22:08:32 status not-installed python3-tabulate:all
2022-01-19 22:08:32 status installed python3-typing-extensions:all 3.7.4.3-1
2022-01-19 22:08:32 remove python3-typing-extensions:all 3.7.4.3-1
2022-01-19 22:08:32 status half-configured python3-typing-extensions:all 3.7.4.3-1
2022-01-19 22:08:32 status half-installed python3-typing-extensions:all 3.7.4.3-1
2022-01-19 22:08:32 status config-files python3-typing-extensions:all 3.7.4.3-1
2022-01-19 22:08:32 status not-installed python3-typing-extensions:all
2022-01-19 22:08:33 startup packages configure
2022-01-19 22:08:33 trigproc hicolor-icon-theme:all 0.17-2
2022-01-19 22:08:33 status half-configured hicolor-icon-theme:all 0.17-2
2022-01-19 22:08:33 status installed hicolor-icon-theme:all 0.17-2
2022-01-19 22:08:33 trigproc libglib2.0-0:arm64 2.66.8-1pureos3
2022-01-19 22:08:33 status half-configured libglib2.0-0:arm64 2.66.8-1pureos3
2022-01-19 22:08:33 status installed libglib2.0-0:arm64 2.66.8-1pureos3
2022-01-19 22:08:33 trigproc libc-bin:arm64 2.31-13+deb11u2
2022-01-19 22:08:33 status half-configured libc-bin:arm64 2.31-13+deb11u2
2022-01-19 22:08:33 status installed libc-bin:arm64 2.31-13+deb11u2
2022-01-19 22:08:33 trigproc man-db:arm64 2.9.4-2
2022-01-19 22:08:33 status half-configured man-db:arm64 2.9.4-2
2022-01-19 22:08:34 status installed man-db:arm64 2.9.4-2
2022-01-19 22:08:34 trigproc mailcap:all 3.69
2022-01-19 22:08:34 status half-configured mailcap:all 3.69
2022-01-19 22:08:34 status installed mailcap:all 3.69
2022-01-19 22:08:35 trigproc desktop-file-utils:arm64 0.26-1
2022-01-19 22:08:35 status half-configured desktop-file-utils:arm64 0.26-1
2022-01-19 22:08:35 status installed desktop-file-utils:arm64 0.26-1
2022-01-19 22:08:35 startup packages purge
2022-01-19 22:08:35 purge javascript-common:all 11+nmu1
2022-01-19 22:08:35 status config-files javascript-common:all 11+nmu1
2022-01-19 22:08:35 status not-installed javascript-common:all
2022-01-19 22:08:35 purge graphicsmagick:arm64 1.4+really1.3.36+hg16481-2
2022-01-19 22:08:35 status config-files graphicsmagick:arm64 1.4+really1.3.36+hg16481-2
2022-01-19 22:08:35 status not-installed graphicsmagick:arm64
2022-01-19 22:08:35 purge libjs-jquery:all 3.5.1+dfsg+~3.5.5-7
2022-01-19 22:08:35 status config-files libjs-jquery:all 3.5.1+dfsg+~3.5.5-7
2022-01-19 22:08:35 status not-installed libjs-jquery:all
2022-01-19 22:08:36 startup packages configure
2022-01-20 10:00:25 startup archives unpack
2022-01-20 10:00:25 install gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:25 status half-installed gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:25 status triggers-pending mailcap:all 3.69
2022-01-20 10:00:25 status triggers-pending desktop-file-utils:arm64 0.26-1
2022-01-20 10:00:25 status triggers-pending libglib2.0-0:arm64 2.66.8-1pureos3
2022-01-20 10:00:26 status triggers-pending man-db:arm64 2.9.4-2
2022-01-20 10:00:26 status unpacked gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:26 startup packages configure
2022-01-20 10:00:26 configure gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:26 status unpacked gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:26 status half-configured gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:26 status triggers-awaited gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:26 trigproc desktop-file-utils:arm64 0.26-1
2022-01-20 10:00:26 status half-configured desktop-file-utils:arm64 0.26-1
2022-01-20 10:00:26 status installed desktop-file-utils:arm64 0.26-1
2022-01-20 10:00:26 trigproc libglib2.0-0:arm64 2.66.8-1pureos3
2022-01-20 10:00:26 status half-configured libglib2.0-0:arm64 2.66.8-1pureos3
2022-01-20 10:00:26 status installed gnome-dictionary:arm64 3.26.1-6
2022-01-20 10:00:26 status installed libglib2.0-0:arm64 2.66.8-1pureos3
2022-01-20 10:00:26 trigproc man-db:arm64 2.9.4-2
2022-01-20 10:00:26 status half-configured man-db:arm64 2.9.4-2
2022-01-20 10:00:27 status installed man-db:arm64 2.9.4-2
2022-01-20 10:00:27 trigproc mailcap:all 3.69
2022-01-20 10:00:27 status half-configured mailcap:all 3.69
2022-01-20 10:00:28 status installed mailcap:all 3.69
2022-01-20 11:23:52 startup archives unpack
2022-01-20 11:23:52 upgrade millipixels:arm64 0.18.0-1pureos2 0.18.0-1pureos2
2022-01-20 11:23:52 status half-configured millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 status unpacked millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 status half-installed millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 status triggers-pending mailcap:all 3.69
2022-01-20 11:23:52 status triggers-pending desktop-file-utils:arm64 0.26-1
2022-01-20 11:23:52 status triggers-pending hicolor-icon-theme:all 0.17-2
2022-01-20 11:23:52 status unpacked millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 startup packages configure
2022-01-20 11:23:52 configure millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 status unpacked millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 status half-configured millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 status installed millipixels:arm64 0.18.0-1pureos2
2022-01-20 11:23:52 trigproc desktop-file-utils:arm64 0.26-1
2022-01-20 11:23:52 status half-configured desktop-file-utils:arm64 0.26-1
2022-01-20 11:23:52 status installed desktop-file-utils:arm64 0.26-1
2022-01-20 11:23:52 trigproc hicolor-icon-theme:all 0.17-2
2022-01-20 11:23:52 status half-configured hicolor-icon-theme:all 0.17-2
2022-01-20 11:23:53 status installed hicolor-icon-theme:all 0.17-2
2022-01-20 11:23:53 trigproc mailcap:all 3.69
2022-01-20 11:23:53 status half-configured mailcap:all 3.69
2022-01-20 11:23:53 status installed mailcap:all 3.69
purism@librem5:~$

The package isn’t shipping the sudo rule, see https://source.puri.sm/Librem5/debs/megapixels/-/merge_requests/13 - updated package forthcoming.

4 Likes

Thanks for helping us solve this!

3 Likes

millipixels is updated and the focus slider is working when opening the camera app normally!

8 Likes

Hello, I come back to this thread as ùi try to install Calera dev but it crashes at strat. What is the good way to install it please ? (please be informed that my computing level is more or less sudo apt install).
Thank you !

Device info :
All kill switches on “ON” position
Privacy settings : camera enabled
OS : PureOS aarch64
Host : Purism Librem 5r4
kernel : 5.18.0-1-librem5
Desktop Environment : GNOME 3.38.6

I think all the switches being on disables the camera.

That makes no sense. Also, I just tested and confirmed the camera works with the 3 hardware switches on.

Sorry I read “on” as activated.

2 Likes