Focus in Camera (dev preview) app

There you go: this means that you don’t have the permissions to set the focus. This could only happen when some packages are at older versions. Could you paste the output of this command?

find /etc/sudoers.d
1 Like

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

Can you do:

sudo apt-get update
sudo apt-get dist-upgrade

~$ sudo apt-get update
[sudo] password for purism:
Get:1 https://repo.pureos.net/pureos byzantium InRelease [5851 B]
Get:2 https://repo.pureos.net/pureos byzantium-updates InRelease [4580 B]
Get:3 https://repo.pureos.net/pureos byzantium-security InRelease [4581 B]
Get:4 https://repo.pureos.net/pureos octarine InRelease [4666 B]
Fetched 19.7 kB in 2s (8192 B/s)
Reading package lists… Done
purism@librem5:~$ sudo apt-get dist-upgrade
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
purism@librem5:~$

That looks wrong, but I’ll get back to you tomorrow.

1 Like

lsb_release -a | grep Code

Adding, actually, better is lsb_release -c

I would say by definition that you should have reflashed this phone from scratch - because obviously otherwise you have no idea of the state of the phone. I mean forget about trust, there are just reliability issues. The previous owner could have been ‘tinkering’. That is after all half the fun of the Librem 5. :wink:

2 Likes

You have the “octarine” repository in the sources, meaning that the previous owner was experimenting with the phone. As such, it makes no sense to try to debug it if you don’t know which customizations were performed. I advise reflashing.

1 Like

I added the octarine repository to be able to install a newer version of Dino that was going to be formatted to the screen of the Librem 5. That said, I didn’t reflash it when I received it, so I suppose that is a decent step. Seems a little overkill, though.

In short, you’re missing this change: https://source.puri.sm/Librem5/millipixels/-/merge_requests/49/diffs

But it’s included in the newest Millipixels, so something more unusual went wrong, and unless it appears in a new install, I don’t think it’s worth spending the time debugging.

2 Likes

Not in my opinion, for a phone where one of the selling points is privacy and security. If you buy a phone from a random on the internet, you won’t know whether the seller has intentionally left compromised software on the phone.

When a phone (any phone) is sold privately I would expect both seller and buyer to nuke the phone. The seller is ensuring that any confidential info has been securely erased. The buyer is ensuring that any malware has been removed.

1 Like

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).