Camera is vertical and green

Was excited to see camera support, so just re-installed asahi fedora remix. The camera is trying to capture vertically, i.e. black bars on the sides. It is also green tinted with bright-green lines through it. I am seeing the drivers are available in /lib/firmware/vendor/apple/, and I ran a asahi-fwupdate just to be sure. It’s definitely a step in the right direction, but not sure if this is the “state” of things right now or what is going on.

1 Like

No that is not the state of things. The program you’re using is unfortunately buggy. It seems to select the resolution with the highest vertical resolution. That is on some Apple Silicon devices vertical video with a resolution of 1080x1920. This is not yet a bug but probably unexpected behavior. If possible try to select a different resolution 1920x1080 for example.
The green stripes should vanish with that as well. The green stripes are caused by applications not handling all V4L2 fully. V4L2 supports line padding. That means each line uses more data than require to store all pixels of the line. The image signal processor requires that each line uses a multiple of 64-bytes. 1080 8-bit luma pixel consume 1080 (8 less than the next multiple of 64). The additional 8 bytes are displayed at the beginning of the next line although they should be skipped. This results in image distortion (8 pixels to the right every line). The skipped data is initialized to zero which is for YUV colorspaces green.

Short version: “we’re probably the only desktop platform with a camera that can do vertical video, and so of course that is also uncovering app bugs, just like everything else unique to Asahi” :slight_smile:

4 Likes

Thanks! I had to go into the settings and adjust the resolution. Not sure why I didn’t try that, but I rarely use Cheese.

1 Like

Does macOS even expose vertical video? IIRC 558s defaulted to camera config #1 which was 1920x1080. Annoying userland is making us look bad for doing better though. As a workaround/fallback we could advertise a 64-stride resolution a step below. Though it looks like gstreamer’s the issue. Let me see if I can send a patch…

I think it might be PipeWire actually? gstreamer worked when I tried it directly with v4l2.

This happens on GNOME Cheese, but not on Firefox. I’m on a M2 Air.

Still beats Intel 12th/13th Gen with no webcam on Linux.