Re: ROP Exploitation in openbsd-64 Programs After Removing ROP Gadgets

2023-10-07 Thread Nan ZoE
Hello,

 Thank you very much for all your suggestions first. After our last
discussion, I conducted some additional experiments and gained a more
detailed understanding of the ROP mitigation mechanisms implemented during
the compilation phase of these programs. *I aimed to identify any
shortcomings in these mitigation mechanisms and attempt to improve them*. I
want to continue our in-depth discussion regarding these mitigation
mechanisms.

Firstly, we have observed that OpenBSD is dedicated to reducing the number
of effective Gadgets during the compilation phase while resisting ROP
attacks by increasing the complexity of Gadgets. This is a highly
meaningful and practical approach to ROP defense, as it does not incur the
significant performance overhead that techniques like CFI (Control Flow
Integrity) do. Measures like these can be deployed in various application
scenarios, *as they could be applied to programs in IoT devices or network
equipment *(such as firewalls). Based on my knowledge, many vulnerabilities
still exist in these targets, and ROP attack techniques remain the
preferred choice for attackers during exploitation. *These devices often
prioritize rapid response and tend to weaken their security defenses;*
therefore, adding such mitigation measures during the compilation phase
could significantly enhance their security.

Given that our analysis focuses on ROP attack mitigation measures
implemented during the compilation phase, our primary evaluation method
revolves around assessing how ROP attacks can still be executed using only
Gadgets when these measures are enabled. We conducted experiments where we
attempted to search for and chain Gadgets within programs to construct ROP
payloads that achieve the execution of '*execve("/bin/sh", 0, 0)*'. This
evaluation encompasses two aspects: first, the arbitrary memory-write
capability of the Gadget set (initially setting memory values to *'/bin/sh'*),
and second, the capability to set the values of the key registers *rdi,
rsi, rdx*, and *rax *(for setting* rdi, rsi,* and *rdx *as arguments and *rax
*as the system call number). We conducted experiments on OpenBSD 6.2,
OpenBSD 6.5, and OpenBSD 7.3, extracting the minimal program set for each
version. In *OpenBSD 6.2*, out of 87 programs, we successfully generated
ROP for 84 programs, achieving a success rate of *96.55%*. In *OpenBSD 6.5*,
out of 240 programs, we successfully generated ROP for 191 programs, with a
success rate of *79.58%*. In *OpenBSD 7.3,* out of 264 programs, we only
managed to generate ROP for 134 programs, with a success rate of *50.75%*.
We also manually analyzed the reasons for failure to generate each
program's ROP. In most cases, the inability to control specific register
values led to failures. This was due to a limited number of relevant
Gadgets and their complexity. The range of controllable register values was
restricted. It's worth mentioning that, naturally, if the attack
requirements were lowered, such as requiring control over fewer registers,
it might lead to a higher success rate among the programs.

Based on the experimental data we have gathered, it is evident that
OpenBSD's ROP mitigation measures continually strengthen with each
iteration. They have reduced the number of Gadgets within programs and
increased the complexity of using these Gadgets. The decrease in success
rates is the most compelling evidence of this improvement.

Subsequently, we analyzed the reasons for successfully generating ROP in
some programs, which can be summarized in four key points:

   1. While many 'ret'-ending Gadgets have been removed, many 'call' and
   'jmp'-ending Gadgets remain usable. These Gadgets allow the storage of jump
   addresses in both registers and memory.
   2. Despite a reduction in Gadgets for data transfer through 'mov'
   instructions, numerous Gadgets still feature arithmetic operations. They
   rely on leaked register or memory values to assist in setting target
   values, often involving straightforward calculations. (When you have
   complete control over the value of a register, it can act like a chain
   reaction, assisting in controlling more registers.)
   3. Gadgets that involve memory read/write operations are handy, albeit
   demanding greater control over multiple register values. Once arbitrary
   memory reads or writes are achieved, they can lead to chain reactions,
   facilitating control over additional registers or memory values.
   4. Conditional branch Gadgets can also be utilized.
   5. Additionally, some specific bytecodes employ unique exploitation
   techniques, such as 'retf,' 'retfq,'
   

   'ret n,' Etc., which enhance the utilization of effective Gadgets by 30%.

After completing these experiments, I am considering better resisting ROP
attack

Re: relayd ssl termination advice

2023-10-07 Thread Steven Shockley

On 10/7/2023 9:00 PM, Courtney wrote:

Hello everyone,

I'm seeking an ideal way to make secure https connections to a handful of
web servers in my house. 


I'm currently doing this with haproxy by having it inspect the SNI on 
the incoming traffic and route based on that.  At the time I set it up 
relayd didn't support SNI inspection, not sure if it's been added since.


The main downsides to doing this:
- haproxy has to be in the traffic path
- haproxy has to run as root (ick)

The traffic isn't decrypted by haproxy at all.  I'm not sure how this 
will be affected by encrypted SNI/encrypted client hello.


Relayd can also decrypt the traffic, then re-encrypt it from relayd to 
the web server.  See "TLS RELAYS" in the man page.




relayd ssl termination advice

2023-10-07 Thread Courtney

Hello everyone,

I'm seeking an ideal way to make secure https connections to a handful of
web servers in my house. Currently I have a Nextcloud server and a gitea
server, but only the Nextcloud server is being port forwarded on 80/443.
I want to make my gitea server publicly visible as well as a couple other
projects. My thought is to have relayd running on my router and match
Host headers and forward it to my servers based on the Host. This will also
conveniently let me handle renewing Let's Encrypt certs in one place.
I already do this right now with a VPS, but I have a wireguard tunnel to my
house in this case to access the backend, which is encrypting the traffic
from my relayd server to my backend web server.

With my Nextcloud and gitea server, if I terminate SSL at my router, the
connection between my router and Nextcloud/gitea web servers would be
unencrypted. Even though it is in my own house, I don't really like that
idea. It seems to be overkill too to do peer to peer wireguard between
my Nextcloud/gitea servers in my house. I was wondering if this would
actually be proper or if there are any other ideas you all might have.
Ultimately, I want to serve a handful of services on 80/443 that are
easily accessible internally and externally, and I don't want to have
unencrypted traffic between relayd and my server for the services that
are passing sessions and such.

Thank you,

Courtney



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Comète
It does nothing more, just a black window and no error returned on the terminal.




7 octobre 2023 21:25 "Crystal Kolipe"  a écrit:

> On Sat, Oct 07, 2023 at 07:02:23PM +, Comte wrote:
> 
>> $ video -q -f /dev/video1
>> video: /dev/video1 has no usable YUV encodings
>> 
>> $ video -s 1920x1080 -f /dev/video1
>> video: /dev/video1 has no usable YUV encodings
> 
> What does video -g -f /dev/video0 do?
> 
> (The -g flag being of interest here).
> 
> This error:
> 
>> On 2023 Oct 07 (Sat) at 12:53:12 + (+), Comète wrote:
>> :Hi,
>> :
>> :$ video -f /dev/video0
>> :video: ioctl VIDIOC_DQBUF: Invalid argument
> 
> ... narrows it down quite a bit, but I'm still not sure why it's not working.



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Crystal Kolipe
On Sat, Oct 07, 2023 at 07:02:23PM +, Comte wrote:
> $ video -q -f /dev/video1
> video: /dev/video1 has no usable YUV encodings
> 
> $ video -s 1920x1080 -f /dev/video1
> video: /dev/video1 has no usable YUV encodings

What does video -g -f /dev/video0 do?

(The -g flag being of interest here).

This error:

> >> On 2023 Oct 07 (Sat) at 12:53:12 + (+), Comète wrote:
> >> :Hi,
> >> :
> >> :$ video -f /dev/video0
> >> :video: ioctl VIDIOC_DQBUF: Invalid argument

... narrows it down quite a bit, but I'm still not sure why it's not working.



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Comète
I thought that the webcam was broken but I've tested 
it with a live Debian 12 usb key and it works.




7 octobre 2023 21:02 "Comète"  a écrit:

> Hello,
> 
> $ video -q -f /dev/video1
> video: /dev/video1 has no usable YUV encodings
> 
> $ video -s 1920x1080 -f /dev/video1
> video: /dev/video1 has no usable YUV encodings
> 
> thanks for your suggestion
> 
> Morgan
> 
> 7 octobre 2023 18:56 "Marcus MERIGHI"  a écrit:
> 
>> Hello,
>> 
>> com...@geekandfree.org (Comète), 2023.10.07 (Sat) 17:02 (CEST):
>> 
>>> unfortunately, yes the slider is well opened and I can confirm that
>>> when it is closed no LED will be visible.
>> 
>> on my thinkpad X1 Carbon 5th Gen., /dev/video0 is the infrared camera,
>> /dev/video1 is the one I want.
>> 
>> video -s 1920x1080 -f /dev/video1
>> ^
>> gives me the best it can do, while
>> 
>> video -s 1920x1080 -f /dev/video0
>> ^
>> gives me a small, greenish, pixelated image.
>> 
>> Marcus
>> 
>>> 7 octobre 2023 15:06 "Peter Hessler"  a écrit:
>>> 
>>> A lot of the Thinkpad laptops have a physical switch that will
>>> cover/uncover the camera. Can you switch it to the other and try again?
>>> 
>>> -peter
>>> 
>>> On 2023 Oct 07 (Sat) at 12:53:12 + (+), Comète wrote:
>>> :Hi,
>>> :
>>> :$ video -f /dev/video0
>>> :video: ioctl VIDIOC_DQBUF: Invalid argument
>>> :
>>> :the LED lights up near the camera and a black window is displayed...
>>> :
>>> :
>>> :I've strictly followed https://www.openbsd.org/faq/faq13.html#webcam
>>> :
>>> :
>>> :then to answer Crystal:
>>> :
>>> :$ ffplay -f v4l2 -input_format yuyv422 -video_size 960x540 -i /dev/video0
>>> :ffplay version 4.4.3 Copyright (c) 2003-2022 the FFmpeg developers
>>> :built with OpenBSD clang version 13.0.0
>>> :configuration: --enable-shared --arch=amd64 --cc=cc --enable-debug 
>>> --disable-stripping
>>> :--disable-indev=jack --disable-outdev=sdl2 --enable-fontconfig 
>>> --enable-frei0r --ena
>>> :ble-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
>>> --enable-libfreetype
>>> :--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus 
>>> --ena
>>> :ble-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis 
>>> --enable-libvpx
>>> :--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid 
>>> --enable-libzimg --en
>>> :able-nonfree --enable-openssl --enable-libvidstab 
>>> --extra-cflags='-I/usr/local/include
>>> :-I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
>>> --extra-ldsofla
>>> :gs= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe 
>>> -g -Wno-redundant-decls'
>>> :libavutil 56. 70.100 / 56. 70.100
>>> :libavcodec 58.134.100 / 58.134.100
>>> :libavformat 58. 76.100 / 58. 76.100
>>> :libavdevice 58. 13.100 / 58. 13.100
>>> :libavfilter 7.110.100 / 7.110.100
>>> :libswscale 5. 9.100 / 5. 9.100
>>> :libswresample 3. 9.100 / 3. 9.100
>>> :libpostproc 55. 9.100 / 55. 9.100
>>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>>> :Input #0, video4linux2,v4l2, from '/dev/video0':
>>> :Duration: N/A, bitrate: 124416 kb/s
>>> :Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x540, 124416 
>>> kb/s, 15 fps, 15 tbr,
>>> :1000k tbn, 1000k tbc
>>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>>> :
>>> :
>>> :and yes, to answer Jan:
>>> :
>>> :$ sysctl kern.video
>>> :kern.video.record=1
>>> :
>>> :
>>> :
>>> :Thanks a lot for your help.
>>> :
>>> :Morgan
>>> :
>>> :
>>> :7 octobre 2023 14:36 "Thomas Frohwein"  a écrit:
>>> :
>>> :> On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
>>> :>
>>> :>> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
>>> :>> The webcam seems well detected but no image is displayed...
>>> :>>
>>> :>> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
>>> :>>
>>> :>> # dmesg | grep "uvideo"
>>> :>> ^
>>> :>>
>>> :>> Please post a full dmesg next time.
>>> :>>
>>> :>> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony 
>>> Electronics Co.,Ltd. Integrated
>>> :>> Camera" rev 2.01/54.20 addr 3
>>> :>> video0 at uvideo0
>>> :>> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony 
>>> Electronics Co.,Ltd. Integrated
>>> :>> Camera" rev 2.01/54.20 addr 3
>>> :>> video1 at uvideo1
>>> :>>
>>> :>> However, this camera should almost certainly just work anyway.
>>> :>>
>>> :>> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
>>> :>> ^^^
>>> :>>
>>> :>> Why?
>>> :>
>>> :> Looks like Comte followed the console instructions at [1] to the letter.
>>> :> It seems to me that jumping right to ffplay recording isn't the best
>>> :> way for you to check the camera is working. Simplest way to test seems
>>> :> to me:
>>> :>
>>> :> $ video -f /dev/video0
>>> :>
>>> :> And then you shoul

Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Comète
Hello,

$ video -q -f /dev/video1
video: /dev/video1 has no usable YUV encodings

$ video -s 1920x1080 -f /dev/video1
video: /dev/video1 has no usable YUV encodings


thanks for your suggestion

Morgan

7 octobre 2023 18:56 "Marcus MERIGHI"  a écrit:

> Hello, 
> 
> com...@geekandfree.org (Comète), 2023.10.07 (Sat) 17:02 (CEST):
> 
>> unfortunately, yes the slider is well opened and I can confirm that
>> when it is closed no LED will be visible.
> 
> on my thinkpad X1 Carbon 5th Gen., /dev/video0 is the infrared camera,
> /dev/video1 is the one I want.
> 
> video -s 1920x1080 -f /dev/video1
> ^
> gives me the best it can do, while
> 
> video -s 1920x1080 -f /dev/video0
> ^
> gives me a small, greenish, pixelated image.
> 
> Marcus
> 
>> 7 octobre 2023 15:06 "Peter Hessler"  a écrit:
>> 
>> A lot of the Thinkpad laptops have a physical switch that will
>> cover/uncover the camera. Can you switch it to the other and try again?
>> 
>> -peter
>> 
>> On 2023 Oct 07 (Sat) at 12:53:12 + (+), Comète wrote:
>> :Hi,
>> :
>> :$ video -f /dev/video0
>> :video: ioctl VIDIOC_DQBUF: Invalid argument
>> :
>> :the LED lights up near the camera and a black window is displayed...
>> :
>> :
>> :I've strictly followed https://www.openbsd.org/faq/faq13.html#webcam
>> :
>> :
>> :then to answer Crystal:
>> :
>> :$ ffplay -f v4l2 -input_format yuyv422 -video_size 960x540 -i /dev/video0
>> :ffplay version 4.4.3 Copyright (c) 2003-2022 the FFmpeg developers
>> :built with OpenBSD clang version 13.0.0
>> :configuration: --enable-shared --arch=amd64 --cc=cc --enable-debug 
>> --disable-stripping
>> :--disable-indev=jack --disable-outdev=sdl2 --enable-fontconfig 
>> --enable-frei0r --ena
>> :ble-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
>> --enable-libfreetype
>> :--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus 
>> --ena
>> :ble-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis 
>> --enable-libvpx
>> :--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid 
>> --enable-libzimg --en
>> :able-nonfree --enable-openssl --enable-libvidstab 
>> --extra-cflags='-I/usr/local/include
>> :-I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
>> --extra-ldsofla
>> :gs= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe -g 
>> -Wno-redundant-decls'
>> :libavutil 56. 70.100 / 56. 70.100
>> :libavcodec 58.134.100 / 58.134.100
>> :libavformat 58. 76.100 / 58. 76.100
>> :libavdevice 58. 13.100 / 58. 13.100
>> :libavfilter 7.110.100 / 7.110.100
>> :libswscale 5. 9.100 / 5. 9.100
>> :libswresample 3. 9.100 / 3. 9.100
>> :libpostproc 55. 9.100 / 55. 9.100
>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>> :Input #0, video4linux2,v4l2, from '/dev/video0':
>> :Duration: N/A, bitrate: 124416 kb/s
>> :Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x540, 124416 
>> kb/s, 15 fps, 15 tbr,
>> :1000k tbn, 1000k tbc
>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>> :
>> :
>> :and yes, to answer Jan:
>> :
>> :$ sysctl kern.video
>> :kern.video.record=1
>> :
>> :
>> :
>> :Thanks a lot for your help.
>> :
>> :Morgan
>> :
>> :
>> :7 octobre 2023 14:36 "Thomas Frohwein"  a écrit:
>> :
>> :> On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
>> :>
>> :>> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
>> :>> The webcam seems well detected but no image is displayed...
>> :>>
>> :>> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
>> :>>
>> :>> # dmesg | grep "uvideo"
>> :>> ^
>> :>>
>> :>> Please post a full dmesg next time.
>> :>>
>> :>> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
>> Co.,Ltd. Integrated
>> :>> Camera" rev 2.01/54.20 addr 3
>> :>> video0 at uvideo0
>> :>> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
>> Co.,Ltd. Integrated
>> :>> Camera" rev 2.01/54.20 addr 3
>> :>> video1 at uvideo1
>> :>>
>> :>> However, this camera should almost certainly just work anyway.
>> :>>
>> :>> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
>> :>> ^^^
>> :>>
>> :>> Why?
>> :>
>> :> Looks like Comte followed the console instructions at [1] to the letter.
>> :> It seems to me that jumping right to ffplay recording isn't the best
>> :> way for you to check the camera is working. Simplest way to test seems
>> :> to me:
>> :>
>> :> $ video -f /dev/video0
>> :>
>> :> And then you should see a window with the video stream...
>> :>
>> :> [1] https://www.openbsd.org/faq/faq13.html#webcam
>> :
>> 
>> --
>> Do you realize how many holes there could be if people would just take
>> the time to take the dirt out of them?



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Marcus MERIGHI
Hello, 

com...@geekandfree.org (Comète), 2023.10.07 (Sat) 17:02 (CEST):
> unfortunately, yes the slider is well opened and I can confirm that
> when it is closed no LED will be visible.
 

on my thinkpad X1 Carbon 5th Gen., /dev/video0 is the infrared camera,
/dev/video1 is the one I want. 

video -s 1920x1080 -f /dev/video1
^
gives me the best it can do, while 

video -s 1920x1080 -f /dev/video0
^
gives me a small, greenish, pixelated image. 

Marcus

> 7 octobre 2023 15:06 "Peter Hessler"  a écrit:
> 
> > A lot of the Thinkpad laptops have a physical switch that will
> > cover/uncover the camera. Can you switch it to the other and try again?
> > 
> > -peter
> > 
> > On 2023 Oct 07 (Sat) at 12:53:12 + (+), Comète wrote:
> > :Hi,
> > :
> > :$ video -f /dev/video0
> > :video: ioctl VIDIOC_DQBUF: Invalid argument
> > :
> > :the LED lights up near the camera and a black window is displayed...
> > :
> > :
> > :I've strictly followed https://www.openbsd.org/faq/faq13.html#webcam
> > :
> > :
> > :then to answer Crystal:
> > :
> > :$ ffplay -f v4l2 -input_format yuyv422 -video_size 960x540 -i /dev/video0 
> > :ffplay version 4.4.3 Copyright (c) 2003-2022 the FFmpeg developers 
> > :built with OpenBSD clang version 13.0.0 
> > :configuration: --enable-shared --arch=amd64 --cc=cc --enable-debug 
> > --disable-stripping
> > :--disable-indev=jack --disable-outdev=sdl2 --enable-fontconfig 
> > --enable-frei0r --ena
> > :ble-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
> > --enable-libfreetype
> > :--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus 
> > --ena
> > :ble-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis 
> > --enable-libvpx
> > :--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid 
> > --enable-libzimg --en
> > :able-nonfree --enable-openssl --enable-libvidstab 
> > --extra-cflags='-I/usr/local/include
> > :-I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
> > --extra-ldsofla
> > :gs= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe 
> > -g -Wno-redundant-decls' 
> > :libavutil 56. 70.100 / 56. 70.100 
> > :libavcodec 58.134.100 / 58.134.100 
> > :libavformat 58. 76.100 / 58. 76.100 
> > :libavdevice 58. 13.100 / 58. 13.100 
> > :libavfilter 7.110.100 / 7.110.100 
> > :libswscale 5. 9.100 / 5. 9.100 
> > :libswresample 3. 9.100 / 3. 9.100 
> > :libpostproc 55. 9.100 / 55. 9.100 
> > :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
> > :Input #0, video4linux2,v4l2, from '/dev/video0': 
> > :Duration: N/A, bitrate: 124416 kb/s 
> > :Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x540, 124416 
> > kb/s, 15 fps, 15 tbr,
> > :1000k tbn, 1000k tbc 
> > :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
> > :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
> > :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
> > :
> > :
> > :and yes, to answer Jan:
> > :
> > :$ sysctl kern.video
> > :kern.video.record=1
> > :
> > :
> > :
> > :Thanks a lot for your help.
> > :
> > :Morgan
> > :
> > :
> > :7 octobre 2023 14:36 "Thomas Frohwein"  a écrit:
> > :
> > :> On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
> > :> 
> > :>> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> > :>> The webcam seems well detected but no image is displayed...
> > :>> 
> > :>> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
> > :>> 
> > :>> # dmesg | grep "uvideo"
> > :>> ^
> > :>> 
> > :>> Please post a full dmesg next time.
> > :>> 
> > :>> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony 
> > Electronics Co.,Ltd. Integrated
> > :>> Camera" rev 2.01/54.20 addr 3
> > :>> video0 at uvideo0
> > :>> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony 
> > Electronics Co.,Ltd. Integrated
> > :>> Camera" rev 2.01/54.20 addr 3
> > :>> video1 at uvideo1
> > :>> 
> > :>> However, this camera should almost certainly just work anyway.
> > :>> 
> > :>> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
> > :>> ^^^
> > :>> 
> > :>> Why?
> > :> 
> > :> Looks like Comte followed the console instructions at [1] to the letter.
> > :> It seems to me that jumping right to ffplay recording isn't the best
> > :> way for you to check the camera is working. Simplest way to test seems
> > :> to me:
> > :> 
> > :> $ video -f /dev/video0
> > :> 
> > :> And then you should see a window with the video stream...
> > :> 
> > :> [1] https://www.openbsd.org/faq/faq13.html#webcam
> > :
> > 
> > -- 
> > Do you realize how many holes there could be if people would just take
> > the time to take the dirt out of them?
> 



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Comète
unfortunately, yes the slider is well opened and I can confirm that when it is 
closed no LED will be visible.

Thanks

Morgan


7 octobre 2023 15:06 "Peter Hessler"  a écrit:

> A lot of the Thinkpad laptops have a physical switch that will
> cover/uncover the camera. Can you switch it to the other and try again?
> 
> -peter
> 
> On 2023 Oct 07 (Sat) at 12:53:12 + (+), Comète wrote:
> :Hi,
> :
> :$ video -f /dev/video0
> :video: ioctl VIDIOC_DQBUF: Invalid argument
> :
> :the LED lights up near the camera and a black window is displayed...
> :
> :
> :I've strictly followed https://www.openbsd.org/faq/faq13.html#webcam
> :
> :
> :then to answer Crystal:
> :
> :$ ffplay -f v4l2 -input_format yuyv422 -video_size 960x540 -i /dev/video0 
> :ffplay version 4.4.3 Copyright (c) 2003-2022 the FFmpeg developers 
> :built with OpenBSD clang version 13.0.0 
> :configuration: --enable-shared --arch=amd64 --cc=cc --enable-debug 
> --disable-stripping
> :--disable-indev=jack --disable-outdev=sdl2 --enable-fontconfig 
> --enable-frei0r --ena
> :ble-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
> --enable-libfreetype
> :--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus 
> --ena
> :ble-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis 
> --enable-libvpx
> :--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid 
> --enable-libzimg --en
> :able-nonfree --enable-openssl --enable-libvidstab 
> --extra-cflags='-I/usr/local/include
> :-I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
> --extra-ldsofla
> :gs= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe -g 
> -Wno-redundant-decls' 
> :libavutil 56. 70.100 / 56. 70.100 
> :libavcodec 58.134.100 / 58.134.100 
> :libavformat 58. 76.100 / 58. 76.100 
> :libavdevice 58. 13.100 / 58. 13.100 
> :libavfilter 7.110.100 / 7.110.100 
> :libswscale 5. 9.100 / 5. 9.100 
> :libswresample 3. 9.100 / 3. 9.100 
> :libpostproc 55. 9.100 / 55. 9.100 
> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
> :Input #0, video4linux2,v4l2, from '/dev/video0': 
> :Duration: N/A, bitrate: 124416 kb/s 
> :Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x540, 124416 
> kb/s, 15 fps, 15 tbr,
> :1000k tbn, 1000k tbc 
> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
> :[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
> :
> :
> :and yes, to answer Jan:
> :
> :$ sysctl kern.video
> :kern.video.record=1
> :
> :
> :
> :Thanks a lot for your help.
> :
> :Morgan
> :
> :
> :7 octobre 2023 14:36 "Thomas Frohwein"  a écrit:
> :
> :> On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
> :> 
> :>> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> :>> The webcam seems well detected but no image is displayed...
> :>> 
> :>> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
> :>> 
> :>> # dmesg | grep "uvideo"
> :>> ^
> :>> 
> :>> Please post a full dmesg next time.
> :>> 
> :>> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
> Co.,Ltd. Integrated
> :>> Camera" rev 2.01/54.20 addr 3
> :>> video0 at uvideo0
> :>> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
> Co.,Ltd. Integrated
> :>> Camera" rev 2.01/54.20 addr 3
> :>> video1 at uvideo1
> :>> 
> :>> However, this camera should almost certainly just work anyway.
> :>> 
> :>> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
> :>> ^^^
> :>> 
> :>> Why?
> :> 
> :> Looks like Comte followed the console instructions at [1] to the letter.
> :> It seems to me that jumping right to ffplay recording isn't the best
> :> way for you to check the camera is working. Simplest way to test seems
> :> to me:
> :> 
> :> $ video -f /dev/video0
> :> 
> :> And then you should see a window with the video stream...
> :> 
> :> [1] https://www.openbsd.org/faq/faq13.html#webcam
> :
> 
> -- 
> Do you realize how many holes there could be if people would just take
> the time to take the dirt out of them?



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Comète
Not better with libv4l package installed...

Thanks

Morgan


Le 7 octobre 2023 15:10:18 GMT+02:00, Thomas Frohwein  
a écrit :
>On Sat, Oct 07, 2023 at 12:53:12PM +, Comète wrote:
>> Hi,
>> 
>> $ video -f /dev/video0
>> video: ioctl VIDIOC_DQBUF: Invalid argument
>> 
>> the LED lights up near the camera and a black window is displayed...
>> 
>> 
>> I've strictly followed https://www.openbsd.org/faq/faq13.html#webcam
>
>I'm not 100% sure about this, but maybe worth a try - see if installing
>libv4l from packages makes a difference:
>
># pkg_add libv4l
>
>> 
>> 
>> then to answer Crystal:
>> 
>> $ ffplay -f v4l2 -input_format yuyv422 -video_size 960x540 -i /dev/video0 
>> ffplay version 4.4.3 Copyright (c) 2003-2022 the FFmpeg developers 
>> built with OpenBSD clang version 13.0.0 
>> configuration: --enable-shared --arch=amd64 --cc=cc --enable-debug 
>> --disable-stripping
>> --disable-indev=jack --disable-outdev=sdl2 --enable-fontconfig 
>> --enable-frei0r --ena
>> ble-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
>> --enable-libfreetype
>> --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus 
>> --ena
>> ble-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis 
>> --enable-libvpx
>> --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid 
>> --enable-libzimg --en
>> able-nonfree --enable-openssl --enable-libvidstab 
>> --extra-cflags='-I/usr/local/include
>> -I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
>> --extra-ldsofla
>> gs= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe -g 
>> -Wno-redundant-decls' 
>> libavutil 56. 70.100 / 56. 70.100 
>> libavcodec 58.134.100 / 58.134.100 
>> libavformat 58. 76.100 / 58. 76.100 
>> libavdevice 58. 13.100 / 58. 13.100 
>> libavfilter 7.110.100 / 7.110.100 
>> libswscale 5. 9.100 / 5. 9.100 
>> libswresample 3. 9.100 / 3. 9.100 
>> libpostproc 55. 9.100 / 55. 9.100 
>> [video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
>> Input #0, video4linux2,v4l2, from '/dev/video0': 
>> Duration: N/A, bitrate: 124416 kb/s 
>> Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x540, 124416 
>> kb/s, 15 fps, 15 tbr,
>> 1000k tbn, 1000k tbc 
>> [video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
>> [video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
>> [video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
>> 
>> 
>> and yes, to answer Jan:
>> 
>> $ sysctl kern.video
>> kern.video.record=1
>> 
>> 
>> 
>> Thanks a lot for your help.
>> 
>> Morgan
>> 
>> 
>> 7 octobre 2023 14:36 "Thomas Frohwein"  a écrit:
>> 
>> > On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
>> > 
>> >> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
>> >> The webcam seems well detected but no image is displayed...
>> >> 
>> >> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
>> >> 
>> >> # dmesg | grep "uvideo"
>> >> ^
>> >> 
>> >> Please post a full dmesg next time.
>> >> 
>> >> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
>> >> Co.,Ltd. Integrated
>> >> Camera" rev 2.01/54.20 addr 3
>> >> video0 at uvideo0
>> >> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
>> >> Co.,Ltd. Integrated
>> >> Camera" rev 2.01/54.20 addr 3
>> >> video1 at uvideo1
>> >> 
>> >> However, this camera should almost certainly just work anyway.
>> >> 
>> >> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
>> >> ^^^
>> >> 
>> >> Why?
>> > 
>> > Looks like Comte followed the console instructions at [1] to the letter.
>> > It seems to me that jumping right to ffplay recording isn't the best
>> > way for you to check the camera is working. Simplest way to test seems
>> > to me:
>> > 
>> > $ video -f /dev/video0
>> > 
>> > And then you should see a window with the video stream...
>> > 
>> > [1] https://www.openbsd.org/faq/faq13.html#webcam



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Stuart Henderson
On 2023-10-07, Peter Hessler  wrote:
> A lot of the Thinkpad laptops have a physical switch that will
> cover/uncover the camera.

covers the visible light camera, anyway... not sure about the IR one.

though actually the "camera in use LED" no longer lights when that slider
is closed on mine.

>:video: ioctl VIDIOC_DQBUF: Invalid argument
>:the LED lights up near the camera and a black window is displayed...

just tried on my T14 and same there - same for video(1),
ffplay -i /dev/videoX and mpv av://v4l2:/dev/videoX.




Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Stuart Henderson
On 2023-10-07, Thomas Frohwein  wrote:
> Looks like Comte followed the console instructions at [1] to the letter.
> It seems to me that jumping right to ffplay recording isn't the best
> way for you to check the camera is working. Simplest way to test seems
> to me:
>
> $ video -f /dev/video0
>
> And then you should see a window with the video stream...

FWIW, camera format support in video(1) is a bit limited, ffplay (and vlc)
are able to handle other formats which may be needed by some cameras.


-- 
Please keep replies on the mailing list.



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Peter Hessler
A lot of the Thinkpad laptops have a physical switch that will
cover/uncover the camera.  Can you switch it to the other and try again?

-peter



On 2023 Oct 07 (Sat) at 12:53:12 + (+), Comète wrote:
:Hi,
:
:$ video -f /dev/video0
:video: ioctl VIDIOC_DQBUF: Invalid argument
:
:the LED lights up near the camera and a black window is displayed...
:
:
:I've strictly followed https://www.openbsd.org/faq/faq13.html#webcam
:
:
:then to answer Crystal:
:
:$ ffplay -f v4l2 -input_format yuyv422 -video_size 960x540 -i /dev/video0 
:ffplay version 4.4.3 Copyright (c) 2003-2022 the FFmpeg developers 
:built with OpenBSD clang version 13.0.0 
:configuration: --enable-shared --arch=amd64 --cc=cc --enable-debug 
--disable-stripping
:--disable-indev=jack --disable-outdev=sdl2 --enable-fontconfig --enable-frei0r 
--ena
:ble-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
--enable-libfreetype
:--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus --ena
:ble-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis 
--enable-libvpx
:--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid 
--enable-libzimg --en
:able-nonfree --enable-openssl --enable-libvidstab 
--extra-cflags='-I/usr/local/include
:-I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
--extra-ldsofla
:gs= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe -g 
-Wno-redundant-decls' 
:libavutil 56. 70.100 / 56. 70.100 
:libavcodec 58.134.100 / 58.134.100 
:libavformat 58. 76.100 / 58. 76.100 
:libavdevice 58. 13.100 / 58. 13.100 
:libavfilter 7.110.100 / 7.110.100 
:libswscale 5. 9.100 / 5. 9.100 
:libswresample 3. 9.100 / 3. 9.100 
:libpostproc 55. 9.100 / 55. 9.100 
:[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
:Input #0, video4linux2,v4l2, from '/dev/video0': 
:Duration: N/A, bitrate: 124416 kb/s 
:Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x540, 124416 
kb/s, 15 fps, 15 tbr,
:1000k tbn, 1000k tbc 
:[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
:[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
:[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument
:
:
:and yes, to answer Jan:
:
:$ sysctl kern.video
:kern.video.record=1
:
:
:
:Thanks a lot for your help.
:
:Morgan
:
:
:7 octobre 2023 14:36 "Thomas Frohwein"  a écrit:
:
:> On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
:> 
:>> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
:>> The webcam seems well detected but no image is displayed...
:>> 
:>> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
:>> 
:>> # dmesg | grep "uvideo"
:>> ^
:>> 
:>> Please post a full dmesg next time.
:>> 
:>> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
Co.,Ltd. Integrated
:>> Camera" rev 2.01/54.20 addr 3
:>> video0 at uvideo0
:>> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
Co.,Ltd. Integrated
:>> Camera" rev 2.01/54.20 addr 3
:>> video1 at uvideo1
:>> 
:>> However, this camera should almost certainly just work anyway.
:>> 
:>> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
:>> ^^^
:>> 
:>> Why?
:> 
:> Looks like Comte followed the console instructions at [1] to the letter.
:> It seems to me that jumping right to ffplay recording isn't the best
:> way for you to check the camera is working. Simplest way to test seems
:> to me:
:> 
:> $ video -f /dev/video0
:> 
:> And then you should see a window with the video stream...
:> 
:> [1] https://www.openbsd.org/faq/faq13.html#webcam
:

-- 
Do you realize how many holes there could be if people would just take
the time to take the dirt out of them?



Re: Some harddisks can't be recognized

2023-10-07 Thread Yue Wu
Hi, list,

After some more days passed by again without any response...
I assume it may be related to the hw driver issue, right?

On Mon, Aug 21, 2023 at 11:28:47AM +0800, Yue Wu wrote:
> Hi, any help will be appreciated.
> 
> On Tue, Aug 08, 2023 at 07:15:29PM +0800, Yue Wu wrote:
> > On Tue, Aug 08, 2023 at 09:49:05AM +0100, Zé Loff wrote:
> > > On Tue, Aug 08, 2023 at 04:25:31PM +0800, Yue Wu wrote:
> > > > Hi list,
> > > > 
> > > > I have a mainboard which has 12 SATA ports, but only 8 ports could
> > > > be recognized by openbsd, other 4 ports can't, dmesg has messages
> > > > something like this:
> > > > 
> > > > ahci2.1: port is unplugged
> > > > ahci2.1: unable to probe PMP port; portreset failed
> > > > ahci2.3: port is unplugged
> > > > ahci2.3: unable to probe PMP port; portreset failed
> > > > 
> > > > What should I do?
> > > 
> > > You should send a full dmesg.  There is a lot of crucial information
> > > missing, here, not least about the ahci controller.
> > > 
> > > > btw, debian and FreeBSD work well, all disks could be recognized.
> > 
> > Here it is:
> > ...
> > 
> 
> -- 
> 吴悦
> Yue Wu

-- 
吴悦
Yue Wu



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Comète
Hi,

$ video -f /dev/video0
video: ioctl VIDIOC_DQBUF: Invalid argument

the LED lights up near the camera and a black window is displayed...


I've strictly followed https://www.openbsd.org/faq/faq13.html#webcam


then to answer Crystal:

$ ffplay -f v4l2 -input_format yuyv422 -video_size 960x540 -i /dev/video0 
ffplay version 4.4.3 Copyright (c) 2003-2022 the FFmpeg developers 
built with OpenBSD clang version 13.0.0 
configuration: --enable-shared --arch=amd64 --cc=cc --enable-debug 
--disable-stripping
--disable-indev=jack --disable-outdev=sdl2 --enable-fontconfig --enable-frei0r 
--ena
ble-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d 
--enable-libfreetype
--enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus --ena
ble-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis 
--enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid 
--enable-libzimg --en
able-nonfree --enable-openssl --enable-libvidstab 
--extra-cflags='-I/usr/local/include
-I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' 
--extra-ldsofla
gs= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe -g 
-Wno-redundant-decls' 
libavutil 56. 70.100 / 56. 70.100 
libavcodec 58.134.100 / 58.134.100 
libavformat 58. 76.100 / 58. 76.100 
libavdevice 58. 13.100 / 58. 13.100 
libavfilter 7.110.100 / 7.110.100 
libswscale 5. 9.100 / 5. 9.100 
libswresample 3. 9.100 / 3. 9.100 
libpostproc 55. 9.100 / 55. 9.100 
[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
Input #0, video4linux2,v4l2, from '/dev/video0': 
Duration: N/A, bitrate: 124416 kb/s 
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 960x540, 124416 
kb/s, 15 fps, 15 tbr,
1000k tbn, 1000k tbc 
[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument 
[video4linux2,v4l2 @ 0x68aa563e800] ioctl(VIDIOC_DQBUF): Invalid argument


and yes, to answer Jan:

$ sysctl kern.video
kern.video.record=1



Thanks a lot for your help.

Morgan


7 octobre 2023 14:36 "Thomas Frohwein"  a écrit:

> On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
> 
>> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
>> The webcam seems well detected but no image is displayed...
>> 
>> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
>> 
>> # dmesg | grep "uvideo"
>> ^
>> 
>> Please post a full dmesg next time.
>> 
>> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
>> Co.,Ltd. Integrated
>> Camera" rev 2.01/54.20 addr 3
>> video0 at uvideo0
>> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
>> Co.,Ltd. Integrated
>> Camera" rev 2.01/54.20 addr 3
>> video1 at uvideo1
>> 
>> However, this camera should almost certainly just work anyway.
>> 
>> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
>> ^^^
>> 
>> Why?
> 
> Looks like Comte followed the console instructions at [1] to the letter.
> It seems to me that jumping right to ffplay recording isn't the best
> way for you to check the camera is working. Simplest way to test seems
> to me:
> 
> $ video -f /dev/video0
> 
> And then you should see a window with the video stream...
> 
> [1] https://www.openbsd.org/faq/faq13.html#webcam



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Thomas Frohwein
On Sat, Oct 07, 2023 at 07:08:21AM -0300, Crystal Kolipe wrote:
> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> > The webcam seems well detected but no image is displayed...
> 
> What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?
> 
> > # dmesg | grep "uvideo"
> ^
> 
> Please post a full dmesg next time.
> 
> > uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
> > Co.,Ltd. Integrated Camera" rev 2.01/54.20 addr 3
> > video0 at uvideo0
> > uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
> > Co.,Ltd. Integrated Camera" rev 2.01/54.20 addr 3
> > video1 at uvideo1
> 
> However, this camera should almost certainly just work anyway.
> 
> > $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
>^^^
> 
> Why?

Looks like Comte followed the console instructions at [1] to the letter.
It seems to me that jumping right to ffplay recording isn't the best
way for you to check the camera is working. Simplest way to test seems
to me:

$ video -f /dev/video0

And then you should see a window with the video stream...

[1] https://www.openbsd.org/faq/faq13.html#webcam



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Crystal Kolipe
On Sat, Oct 07, 2023 at 01:33:48PM +0200, Jan Stary wrote:
> On Oct 07 13:30:50, dco...@gmail.com wrote:
> > On Sat, Oct 7, 2023 at 1:26???PM Jan Stary  wrote:
> > >
> > > On Oct 07 07:08:21, kolip...@exoticsilicon.com wrote:
> > > > On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> > > > > The webcam seems well detected but no image is displayed...
> > >
> > > To be sure: you have kern.audio.record=1, right?
> > 
> > kern.video.record, not kern.audio.record.
> 
> ECOFFEE, sorry

His original mail said that he does have it enabled:

On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> # sysctl kern.video.record
> kern.video.record=1

I'm pretty sure that the issue is that he is invoking ffmpeg with
switches that expect mjpeg data from the camera, whereas the camera
actually provides raw YUV pixel data.

On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> # video -q -f /dev/video0
> video device /dev/video0:
>   encodings: yuy2
>   frame sizes (width x height, in pixels) and rates (in frames per second):
> 320x180: 30
> 320x240: 30
> 352x288: 30
> 424x240: 30
> 640x360: 30
> 640x480: 30
> 848x480: 20
> 960x540: 15
> 1280x720: 10
> 1920x1080: 5

These combinations of resolutions and framerates are typical of the
constraints of USB-2 bandwidth streaming YUV data.  If it really was mjpeg,
I'd expect 1920x1080 to be available at 30fps.



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Jan Stary
On Oct 07 13:30:50, dco...@gmail.com wrote:
> On Sat, Oct 7, 2023 at 1:26 PM Jan Stary  wrote:
> >
> > On Oct 07 07:08:21, kolip...@exoticsilicon.com wrote:
> > > On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> > > > The webcam seems well detected but no image is displayed...
> >
> > To be sure: you have kern.audio.record=1, right?
> 
> kern.video.record, not kern.audio.record.

ECOFFEE, sorry



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread David Coppa
On Sat, Oct 7, 2023 at 1:26 PM Jan Stary  wrote:
>
> On Oct 07 07:08:21, kolip...@exoticsilicon.com wrote:
> > On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> > > The webcam seems well detected but no image is displayed...
>
> To be sure: you have kern.audio.record=1, right?

kern.video.record, not kern.audio.record.

Ciao,
David
-- 
"If you try a few times and give up, you'll never get there. But if
you keep at it... There's a lot of problems in the world which can
really be solved by applying two or three times the persistence that
other people will."
-- Stewart Nelson



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Jan Stary
On Oct 07 07:08:21, kolip...@exoticsilicon.com wrote:
> On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> > The webcam seems well detected but no image is displayed...

To be sure: you have kern.audio.record=1, right?



Re: Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Crystal Kolipe
On Sat, Oct 07, 2023 at 08:51:36AM +, Comte wrote:
> The webcam seems well detected but no image is displayed...

What happens if you run /usr/X11R6/bin/video instead of using ffmpeg?

> # dmesg | grep "uvideo"
^

Please post a full dmesg next time.

> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
> Co.,Ltd. Integrated Camera" rev 2.01/54.20 addr 3
> video0 at uvideo0
> uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
> Co.,Ltd. Integrated Camera" rev 2.01/54.20 addr 3
> video1 at uvideo1

However, this camera should almost certainly just work anyway.

> $ ffplay -f v4l2 -input_format mjpeg -video_size 1280x720 -i /dev/video0
   ^^^

Why?



Webcam support on Lenovo Thinkpad T14 Gen3 (Intel)

2023-10-07 Thread Comète
Hello,

I've tried to used the integrated webcam on my brand new Thinkpad T14 on 
OpenBSD 7.3 without success. I've followed the FAQ.
The webcam seems well detected but no image is displayed...
This is what I get:

# uname -a
OpenBSD hyperion.my.domain 7.3 GENERIC#1072 amd64


# usbdevs -v

   
Controller /dev/usb0:   

 
addr 01: 8086: Intel, xHCI root hub 

 
 super speed, self powered, config 1, rev 1.00  

 
 driver: uhub0  

 
addr 02: 2109:0817 VIA Labs, Inc., USB3.0 Hub   

 
 super speed, self powered, config 1, rev 6.23, iSerial 0   

 
 driver: uhub2  

 
addr 03: 0bda:0411 Generic, USB3.2 Hub  

 
 super speed, self powered, config 1, rev 39.20 

 
 driver: uhub3  

 
addr 04: 152d:0578 JMicron, USB to ATA/ATAPI Bridge 

 
 super speed, power 224 mA, config 1, rev 2.14, iSerial 
0123456789ABCDEF
 
 driver: umass0
addr 05: 0bda:8153 Realtek, USB 10/100/1000 LAN
 super speed, power 72 mA, config 1, rev 30.00, iSerial 01
 driver: ure0
Controller /dev/usb1:
addr 01: 8086: Intel, xHCI root hub
 super speed, self powered, config 1, rev 1.00
 driver: uhub1
addr 02: 27c6:6594 Goodix Technology Co., Ltd., Goodix USB2.0 MISC
 full speed, power 100 mA, config 1, rev 1.00, iSerial 
UIDE2B30F1D__MOC_B0 
 driver: ugen0
addr 03: 04f2:b74f Chicony Electronics Co.,Ltd., Integrated Camera
 high speed, power 500 mA, config 1, rev 54.20, iSerial 0001
 driver: uvideo0
 driver: uvideo1
 driver: ugen1
addr 04: 2109:2817 VIA Labs, Inc., USB2.0 Hub
 high speed, self powered, config 1, rev 6.23, iSerial 0
 driver: uhub4
addr 05: 1a40:0801 Terminus Technology, USB 2.0 Hub
 high speed, self powered, config 1, rev 1.00
 driver: uhub5
addr 06: 03f0:1a4a Lite-On Technology Corp., HP Wireless Slim Keyboard - Skylab 
EU
 full speed, power 100 mA, config 1, rev 0.66
 driver: uhidev0
 driver: uhidev1
 driver: uhidev2
addr 07: 19f7:0015 R\M-XDE Microphones, R\M-XDE NT-USB Mini
 full speed, power 100 mA, config 1, rev 1.18, iSerial 45803936
 driver: uaudio0
 driver: uhidev3
addr 08: 0bda:5411 Generic, USB2.1 Hub
 high speed, self powered, config 1, rev 39.20
 driver: uhub6
addr 09: 0bda:1100 Realtek, HID Device
 high speed, self powered, config 1, rev 1.01
 driver: uhidev4
addr 10: 2109:8884 VIA Labs, Inc., USB Billboard Device
 high speed, self powered, config 1, rev 0.01, iSerial 0001
 driver: ugen2
addr 11: 8087:0033 Intel, Bluetooth
 full speed, self powered, config 1, rev 0.00
 driver: ugen3


# sysctl kern.video.record
kern.video.record=1

# dmesg | grep "uvideo"
uvideo0 at uhub1 port 4 configuration 1 interface 0 "Chicony Electronics 
Co.,Ltd. Integrated Camera" rev 2.01/54.20 addr 3
video0 at uvideo0
uvideo1 at uhub1 port 4 configuration 1 interface 2 "Chicony Electronics 
Co.,Ltd. Integrated Camera" rev 2.01/54.20 addr 3
video1 at uvideo1

# video -q -f /dev/video0
video device /dev/video0:
  encodings: yuy2
  frame sizes (width x height, in pixels) and rates (in frames per second):
320x180: 30
320x240: 30
352x288: 30
424x