Re: Ignore some USB devices

2024-02-19 Thread Nowarez Market
>bios0: vendor HUAWEI version "1.10" date 01/12/2023
>bios0: HUAWEI EUL-WX9

Thanks, appreciated.

> N0\/\/@r€Z
> --
>    /\/\@rk€T

Feb 19, 2024 23:39:05 Kirill A. Korinsky :

>> You could also send a dmesg showing all of those devies.
>> 
> 
> attched



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Tue, 20 Feb 2024 00:21:30 +0100,
Stuart Henderson wrote:
>
> No - ugen acts as a fallback. If a USB device is claimed by another driver,
> ugen won't get a chance to attach to it.
>
> There is a common mechanism to recognise devices by vid/pid for special
> handling - sometimes to prevent attaching - sometimes for other adaptations
> which are needed. If you're interested, see sys/dev/usb/usb_quirks.c and look
> at how UQ_BAD_HID is used to knock out devices which would normally be
> claimed by uhid(4); you could use something similar to prevent e.g. uaudio
> from attaching to a certain device. However, it would require compiling
> the kernel to configure it.
>

Thanks, this is that I'm looking for.

I hope that I can do it without rebuilding the kernel, but after reading
some code around I see that adding a global flag to ignore some USB
devices makes code quite frigile. Or should be duplicated a lot.

--
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Thomas L.
On Mon, 19 Feb 2024 19:43:14 +0100
Kirill A. Korinsky  wrote:
> I do have two USB audio device:
>
>   ~ $ usbdevs  -v
>   Controller /dev/usb0:
>   ...
>   addr 07: 043e:9a66 LG Electronics Inc., LG UltraFine Display Audio
>high speed, self powered, config 1, rev 0.03
>driver: uaudio0
>   ...
>   addr 13: 041e:3130 Creative, Creative BT-W5
>full speed, self powered, config 1, rev 10.00, iSerial
> D97E0B7F86B95AC32000 driver: uhidev10
>driver: uhidev11
>driver: uaudio1
>   ~ $
>
> both of them is managed by uaudio. How can I dissable the first one,
> without disabling the second one?

you can select which audio device is used with -f/-F flags to sndiod
(details in man-page) in /etc/rc.conf.local. maybe that helps?



Re: Ignore some USB devices

2024-02-19 Thread Stuart Henderson
On 2024-02-19, Kirill A  Korinsky  wrote:
> On Mon, 19 Feb 2024 23:09:35 +0100,
> Stuart Henderson wrote:
>> 
>> > I read that as it is impossible to blacklist a device, right?
>> 
>> Only by running a kernel where the driver's attach routine has been
>> modified to skip attaching the device e.g. if it matches certain
>> vendor/device id. OpenBSD doesn't have any other way to detach a USB
>> driver from a device.
>> 
>
> As an alternative solution, is it possible to enforce ugen to specific
> device by vendor and product IDs?
>
> I've tried:
>
>   $ doas config -e -o /bsd.new /bsd
>   ukc> find ugen
>   309 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
> product -1 release -1 flags 0x0
>   ukc> find uaudio
>   303 uaudio* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
> product -1 release -1 flags 0x0
>   ukc> add ugen
>   Device not complete number or * is missing
>   ukc> add ugen*
>   Clone Device (DevNo, 'q' or '?') ? 309
>   Insert before Device (DevNo, 'q' or '?') ? 303
>   303 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
> product -1 release -1 flags 0x0
>   ukc> change 303
>   303 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
> product -1 release -1 flags 0x0
>   change [n] y
>   port [-1] ?
>   configuration [-1] ?
>   interface [-1] ?
>   vendor [-1] ? 0x041e
>   product [-1] ? 0x3130
>   release [-1] ?
>   flags [0] ?
>   303 ugen* changed
>   303 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor 0x41e 
> product 0x3130 release -1 flags 0x0
>   ukc> find ugen*
>   303 ugen* at uhub*|uhub* disable port -1 configuration -1 interface -1 
> vendor 0x41e product 0x3130 release -1 flags 0x0
>   310 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
> product -1 release -1 flags 0x0
>   ukc> quit
>   Saving modified kernel.
>
> with no luck.
>

No - ugen acts as a fallback. If a USB device is claimed by another driver,
ugen won't get a chance to attach to it.

There is a common mechanism to recognise devices by vid/pid for special
handling - sometimes to prevent attaching - sometimes for other adaptations
which are needed. If you're interested, see sys/dev/usb/usb_quirks.c and look
at how UQ_BAD_HID is used to knock out devices which would normally be
claimed by uhid(4); you could use something similar to prevent e.g. uaudio
from attaching to a certain device. However, it would require compiling
the kernel to configure it.




Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 23:09:35 +0100,
Stuart Henderson wrote:
> 
> > I read that as it is impossible to blacklist a device, right?
> 
> Only by running a kernel where the driver's attach routine has been
> modified to skip attaching the device e.g. if it matches certain
> vendor/device id. OpenBSD doesn't have any other way to detach a USB
> driver from a device.
> 

As an alternative solution, is it possible to enforce ugen to specific
device by vendor and product IDs?

I've tried:

  $ doas config -e -o /bsd.new /bsd
  ukc> find ugen
  309 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
product -1 release -1 flags 0x0
  ukc> find uaudio
  303 uaudio* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
product -1 release -1 flags 0x0
  ukc> add ugen
  Device not complete number or * is missing
  ukc> add ugen*
  Clone Device (DevNo, 'q' or '?') ? 309
  Insert before Device (DevNo, 'q' or '?') ? 303
  303 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
product -1 release -1 flags 0x0
  ukc> change 303
  303 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
product -1 release -1 flags 0x0
  change [n] y
  port [-1] ?
  configuration [-1] ?
  interface [-1] ?
  vendor [-1] ? 0x041e
  product [-1] ? 0x3130
  release [-1] ?
  flags [0] ?
  303 ugen* changed
  303 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor 0x41e 
product 0x3130 release -1 flags 0x0
  ukc> find ugen*
  303 ugen* at uhub*|uhub* disable port -1 configuration -1 interface -1 vendor 
0x41e product 0x3130 release -1 flags 0x0
  310 ugen* at uhub*|uhub* port -1 configuration -1 interface -1 vendor -1 
product -1 release -1 flags 0x0
  ukc> quit
  Saving modified kernel.

with no luck.

-- 
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 22:43:45 +0100,
Jan Stary wrote:
> 
> On Feb 19 22:33:53, kir...@korins.ky wrote:
> > 
> > I use the rsnd/1 or rsnd/2 to listen music via wireless headphones,
> 
> Why do you have two of those?
>

Because it depends on the order of attaching devices.

> > and rsnd/0 with wired headset to make video calls.
> > 
> > I never use display's audio and it creates only issue for me.
> 
> To be clear: even when you connect the display,
> presumably because you want to use it as a display
> (and maybe even its camera), you want the sound
> to stay at whatever snd device you are using;
> in particular, you don't want sndio to switch
> to the new snd device provided by the newly plugged
> display's uaudio.
> 
> Is there a setting in the display
> that would completely disable its audio?
>

No, this display hasn't got any settigns which I'm aware of.

See: LG UltraFine 5K

> > Let take two use cases:
> > 1. Listen some music when laptop is connected to the display on wireless
> >headphones by attaching USB dongle;
> > 2. Connect laptop to the display when listen some music on wireless
> >headphones via USB dongle.
> > 
> > The first one leads to rsnd/2 as desired device, and the second one to
> > rsnd/1 as desired device.
> > 
> > As side effect of (2) music might be redirect to the display which has
> > quite hight default level of volume.
> > 
> > So, right now to attach laptop to the screen and do not wake famly up at
> > the night I should:
> >  - pause the music;
> >  - deattach USB dongle;
> >  - connect laptop to the screen;
> >  - attach USB dongle;
> >  - and finaly resume music.
> 
> You could also detach-and-reattach the headphones dongle
> *after* you attach the display.
>

Yeah, it still to many things to do :(

> You could also send a dmesg showing all of those devies.
> 

attched

-- 
wbr, Kirill
OpenBSD 7.5-beta (GENERIC.MP) #39: Mon Feb 19 12:28:22 CET 2024

ca...@matebook.sa31-home.catap.net:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 16890646528 (16108MB)
avail mem = 16357588992 (15599MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.2 @ 0x8e2c2000 (32 entries)
bios0: vendor HUAWEI version "1.10" date 01/12/2023
bios0: HUAWEI EUL-WX9
efi0 at bios0: UEFI 2.7
efi0: XX rev 0x10010
acpi0 at bios0: ACPI 5.1
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP UEFI SSDT SSDT SSDT SSDT SSDT TPM2 SSDT MSDM LPIT WSMT 
SSDT DBGP DBG2 SSDT NHLT HPET APIC MCFG SSDT SSDT DMAR FPDT BGRT
acpi0: wakeup devices XHC_(S3) XDCI(S4) HDAS(S4) RP01(S4) PXSX(S4) RP02(S4) 
PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) 
PXSX(S4) RP07(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 2399 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 3292.33 MHz, 06-8e-0c, patch 
00f8
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,IBRS_ALL,SKIP_L1DFL,MDS_NO,MISC_PKG_CT,ENERGY_FILT,FB_CLEAR,RRSBA,GDS_CTRL,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
4-way L2 cache, 6MB 64b/line 12-way L3 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 3292.33 MHz, 06-8e-0c, patch 
00f8
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,IBRS_ALL,SKIP_L1DFL,MDS_NO,MISC_PKG_CT,ENERGY_FILT,FB_CLEAR,RRSBA,GDS_CTRL,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu1: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 
4-way L2 cache, 6MB 64b/line 12-way L3 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 3189.24 MHz, 06-8e-0c, patch 
00f8
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,S

Re: Ignore some USB devices

2024-02-19 Thread Stuart Henderson
On 2024-02-19, Kirill A  Korinsky  wrote:
> On Mon, 19 Feb 2024 22:32:18 +0100,
> Jan Stary wrote:
>> 
>> So get some normal headphones that plug into the laptop
>> (without creating a new device)
>> and simply connect the display when you want,
>> or don't connect it when you don't.
>> 
>
> I read that as it is impossible to blacklist a device, right?

Only by running a kernel where the driver's attach routine has been
modified to skip attaching the device e.g. if it matches certain
vendor/device id. OpenBSD doesn't have any other way to detach a USB
driver from a device.




Re: Ignore some USB devices

2024-02-19 Thread Jan Stary
On Feb 19 22:33:53, kir...@korins.ky wrote:
> On Mon, 19 Feb 2024 22:15:40 +0100,
> Jan Stary wrote:
> > 
> > On Feb 19 22:08:40, kir...@korins.ky wrote:
> > > On Mon, 19 Feb 2024 21:58:51 +0100,
> > > Thomas L. wrote:
> > > > 
> > > > you can select which audio device is used with -f/-F flags to sndiod
> > > > (details in man-page) in /etc/rc.conf.local. maybe that helps?
> > > 
> > > thanks, but I right now I do have:
> > > 
> > >   ~ $ rcctl get sndiod flags
> > >   -f rsnd/0 -F rsnd/1 -F rsnd/2
> > 
> > Do you actualy want to switch between the three?
> > What are the three audio devices you want to use, and why?
> 
> I use the rsnd/1 or rsnd/2 to listen music via wireless headphones,

Why do you have two of those?

> and rsnd/0 with wired headset to make video calls.
> 
> I never use display's audio and it creates only issue for me.

To be clear: even when you connect the display,
presumably because you want to use it as a display
(and maybe even its camera), you want the sound
to stay at whatever snd device you are using;
in particular, you don't want sndio to switch
to the new snd device provided by the newly plugged
display's uaudio.

Is there a setting in the display
that would completely disable its audio?

> Let take two use cases:
> 1. Listen some music when laptop is connected to the display on wireless
>headphones by attaching USB dongle;
> 2. Connect laptop to the display when listen some music on wireless
>headphones via USB dongle.
> 
> The first one leads to rsnd/2 as desired device, and the second one to
> rsnd/1 as desired device.
> 
> As side effect of (2) music might be redirect to the display which has
> quite hight default level of volume.
> 
> So, right now to attach laptop to the screen and do not wake famly up at
> the night I should:
>  - pause the music;
>  - deattach USB dongle;
>  - connect laptop to the screen;
>  - attach USB dongle;
>  - and finaly resume music.

You could also detach-and-reattach the headphones dongle
*after* you attach the display.

You could also send a dmesg showing all of those devies.



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 22:32:18 +0100,
Jan Stary wrote:
> 
> So get some normal headphones that plug into the laptop
> (without creating a new device)
> and simply connect the display when you want,
> or don't connect it when you don't.
> 

I read that as it is impossible to blacklist a device, right?

-- 
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 22:15:40 +0100,
Jan Stary wrote:
> 
> On Feb 19 22:08:40, kir...@korins.ky wrote:
> > On Mon, 19 Feb 2024 21:58:51 +0100,
> > Thomas L. wrote:
> > > 
> > > you can select which audio device is used with -f/-F flags to sndiod
> > > (details in man-page) in /etc/rc.conf.local. maybe that helps?
> > 
> > thanks, but I right now I do have:
> > 
> >   ~ $ rcctl get sndiod flags
> >   -f rsnd/0 -F rsnd/1 -F rsnd/2
> 
> Do you actualy want to switch between the three?
> What are the three audio devices you want to use, and why?

I use the rsnd/1 or rsnd/2 to listen music via wireless headphones,
and rsnd/0 with wired headset to make video calls.

I never use display's audio and it creates only issue for me.

>
> > that works almost fine, but requires to deattach USB dongle
> 
> What USB dongle?

Creative BT-W5

> 
> > before I connect laptop to the display.
> > If I forgot to do it, the display's audio will be rsnd/2 with priority.
> 
> What is the rsnd/2 you _want_?
> How does _detaching_ anything before the display attaches help that?
> 

Right now I do have 3 audio devices:
 - embeded inside laptop;
 - embeded inside display;
 - USB dongle to connect to bluetooth headphones.

The first one is always rsdn/0; and the next two depends on the order of
connection.

Let take two use cases:
1. Listen some music when laptop is connected to the display on wireless
   headphones by attaching USB dongle;
2. Connect laptop to the display when listen some music on wireless
   headphones via USB dongle.

The first one leads to rsnd/2 as desired device, and the second one to
rsnd/1 as desired device.

As side effect of (2) music might be redirect to the display which has
quite hight default level of volume.

So, right now to attach laptop to the screen and do not wake famly up at
the night I should:
 - pause the music;
 - deattach USB dongle;
 - connect laptop to the screen;
 - attach USB dongle;
 - and finaly resume music.

If I find the way to blacklist display's audio device, this can be as
simple as connect laptop to the display.

-- 
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Jan Stary
On Feb 19 22:16:37, kir...@korins.ky wrote:
> On Mon, 19 Feb 2024 22:05:37 +0100,
> Jan Stary wrote:Ri
> > 
> > Why are you using this camera, and not the other one?
> >
> > > and after that
> > > X11 screen dissapear, and fplay doesn't response on C-c anymore.
> > > Deattach the display helps to kills fplay.
> > 
> > It is entirely unclear what you are trying to do.
> > 
> > Are you using ffplay to record from a camera?
> > Which camera? The display's camera? I thought you had
> > another camera (which you want to use instead):
> > why don't you just run ffplay with _that_ camera?
> > 
> > Generaly, if the devices you don't want to use
> > (such as the display's camera as uvideo1,
> > ar the display's microphone as uaudio1)
> > simply attach and exist, it doesn't mean
> > you have to use them; having them exist
> > breaks nothing, just tell you applications
> > to use the ones you want (uaudio0, uvideo0?).
> > 
> 
> Sorry, I wasn't clear.
> 
> Camera just exists and I use one in laptop which works, and just
> existing camera doesn't create any issue.
> 
> But 3rd audio device does create some issue.
> 
> Right now I do have 3 audio devices:
>  - embeded inside laptop;
>  - embeded inside display;
>  - USB dongle to connect to bluetooth headphones.
> 
> I also have:
> 
>   ~ $ rcctl get sndiod flags
>   -f rsnd/0 -F rsnd/1 -F rsnd/2
>   ~ $
> 
> that works almost fine, but requires to deattach USB dongle before I
> connect laptop to the display, otherwise the display's one will bersnd/2
> with priority, and music will be redirect into it.
> 
> That can be quite unfair regarding my family, special at 3 am because
> default volume level of display's audio isn't low.

OK, now I see: the headphones dongle needs to connect last
to become the -F snd/2 that overrides the previous.
You should have started by saying that.

So get some normal headphones that plug into the laptop
(without creating a new device)
and simply connect the display when you want,
or don't connect it when you don't.



Re: Ignore some USB devices

2024-02-19 Thread Jan Stary
On Feb 19 22:08:40, kir...@korins.ky wrote:
> On Mon, 19 Feb 2024 21:58:51 +0100,
> Thomas L. wrote:
> > 
> > you can select which audio device is used with -f/-F flags to sndiod
> > (details in man-page) in /etc/rc.conf.local. maybe that helps?
> 
> thanks, but I right now I do have:
> 
>   ~ $ rcctl get sndiod flags
>   -f rsnd/0 -F rsnd/1 -F rsnd/2

Do you actualy want to switch between the three?
What are the three audio devices you want to use, and why?

> that works almost fine, but requires to deattach USB dongle

What USB dongle?

> before I connect laptop to the display.
> If I forgot to do it, the display's audio will be rsnd/2 with priority.

What is the rsnd/2 you _want_?
How does _detaching_ anything before the display attaches help that?



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 21:58:51 +0100,
Thomas L. wrote:
> 
> you can select which audio device is used with -f/-F flags to sndiod
> (details in man-page) in /etc/rc.conf.local. maybe that helps?

thanks, but I right now I do have:

  ~ $ rcctl get sndiod flags
  -f rsnd/0 -F rsnd/1 -F rsnd/2
  ~ $

that works almost fine, but requires to deattach USB dongle before I
connect laptop to the display.

If I forgot to do it, the display's audio will be rsnd/2 with priority.


-- 
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 20:34:10 +0100,
Nowarez Market wrote:
> 
> After all your list of *american gigs* missed only that OS.
> Just do a switch to Windows and you solved. Maybe...
> 

Well, I doubt that this display works well on Windows.

The first OS which supports it was macOS, but support of this display
isn't stable and if attach and deattach it often, the macOS may hang out
on some iteration :)

-- 
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 20:10:46 +0100,
Nowarez Market wrote:
> 
> >Feb 19, 2024 19:46:21 Kirill A. Korinsky :
> >
> >I can't disable uaudio because I use it, and I can't uplug (physically)
> >the LG's Audio because it is integrated into the display which I'm
> >using.
> 
> Curious, what is the connection between your display audio that comes
> watched so magically by your station ?
> 
> Sorry for my investigation..but sometimes seems falks just miss Windows
> left click to unplug stuff..
> 

This is USB-C display and I connect my laptop to it via single USB-C
port.

This connection attach the display, the AC addpater, the USB hub, and
integrated video and audio.

If I can do not connect it, I won't ask about how to ban some devices.

-- 
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Nowarez Market
>Sorry for my investigation..but sometimes seems falks just miss Windows
>left click to unplug stuff..
>
>N0\/\/@r€Z
>--
>   /\/\@rk€T

After all your list of *american gigs* missed only that OS.
Just do a switch to Windows and you solved. Maybe...


> N0\/\/@r€Z
> --
>    /\/\@rk€T



Re: Ignore some USB devices

2024-02-19 Thread Nowarez Market
>Feb 19, 2024 19:46:21 Kirill A. Korinsky :
>
>I can't disable uaudio because I use it, and I can't uplug (physically)
>the LG's Audio because it is integrated into the display which I'm
>using.

Curious, what is the connection between your display audio that comes
watched so magically by your station ?

Sorry for my investigation..but sometimes seems falks just miss Windows
left click to unplug stuff..

> N0\/\/@r€Z
> --
>    /\/\@rk€T

Feb 19, 2024 19:46:21 Kirill A. Korinsky :

> I can't disable uaudio because I use it, and I can't uplug (physically)
> the LG's Audio because it is integrated into the display which I'm
> using.



Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 19:09:16 +0100,
deich...@placebonol.com wrote:
>
> You can enter the kernel on boot and disable device drivers,
> boot-config(8) .

I do have two USB audio device:

  ~ $ usbdevs  -v
  Controller /dev/usb0:
  ...
  addr 07: 043e:9a66 LG Electronics Inc., LG UltraFine Display Audio
   high speed, self powered, config 1, rev 0.03
   driver: uaudio0
  ...
  addr 13: 041e:3130 Creative, Creative BT-W5
   full speed, self powered, config 1, rev 10.00, iSerial 
D97E0B7F86B95AC32000
   driver: uhidev10
   driver: uhidev11
   driver: uaudio1
  ~ $ 

both of them is managed by uaudio. How can I dissable the first one,
without disabling the second one?

I can't disable uaudio because I use it, and I can't uplug (physically)
the LG's Audio because it is integrated into the display which I'm
using.

Ideally I'm looking for a syntax like:

  disable uaudio vendor 0x043e product 0x9a66

--
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread deich...@placebonol.com
OpenBSD is a monolithic kernel, unlike Linux module design.

You can enter the kernel on boot and disable device drivers, boot-config(8) .

On February 19, 2024 9:30:22 AM MST, "Kirill A. Korinsky"  
wrote:
>On Mon, 19 Feb 2024 17:10:27 +0100,
>Nowarez Market wrote:
>> 
>> You should be able to do it by the /etc/bsd.re-config file, you can start 
>> from here:
>> 
>> http://man.openbsd.org/bsd.re-config
>> 
>> Please be very careful.
>> 
>> (It needs two reboots to apply any change)
>> 
>
>I feel consfused: isn't it a way to exclude some module?
>
>If yes, it isn't that I'm looking.
>
>For example, I'm using USB audio, but I'd like to ban USB audio which is
>included into my display, but not ban the module because if I do so, I
>won't able to use USB audio dingle which I use to connect to wireless
>headphones.
>
>Right now I have:
>
>  ~ $ usbdevs  
>  Controller /dev/usb0:
>  addr 01: 8086: Intel, xHCI root hub
>  addr 02: 1050:0404 Yubico, YubiKey CCID
>  addr 03: 13d3:56f2 Azurewave, USB camera
>  addr 04: 8087:0026 Intel, Bluetooth
>  addr 05: 043e:9a61 LG Electronics Inc., USB2.1 Hub
>  addr 06: 043e:9a73 LG USA, product 0x9a73
>  addr 07: 043e:9a66 LG Electronics Inc., LG UltraFine Display Audio
>  addr 08: 043e:9a68 LG Electronlcs Inc., LG UltraFine Display Camera
>  addr 09: 05ac:0265 Apple Inc., Magic Trackpad
>  addr 10: 05ac:026c Apple Inc., Magic Keyboard with Numeric Keypad
>  addr 11: 043e:9a70 LG Electronics Inc., LG UltraFine Display Controls
>  addr 12: 0a12:4010 Cambridge Silicon Radio, product 0x4010
>  addr 13: 041e:3130 Creative, Creative BT-W5
>  ~ $
>
>and I would like somehow to disable
>
>  addr 07: 043e:9a66 LG Electronics Inc., LG UltraFine Display Audio
>  addr 08: 043e:9a68 LG Electronlcs Inc., LG UltraFine Display Camera
>
>but keeping
>
>  addr 03: 13d3:56f2 Azurewave, USB camera
>  addr 13: 041e:3130 Creative, Creative BT-W5
>
>I've tried to play with config -e /bsd but the best that I can figure
>out is how to disable uaudio, and not only one, specific, device.
>
>-- 
>wbr, Kirill
>


Re: Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
On Mon, 19 Feb 2024 17:10:27 +0100,
Nowarez Market wrote:
> 
> You should be able to do it by the /etc/bsd.re-config file, you can start 
> from here:
> 
> http://man.openbsd.org/bsd.re-config
> 
> Please be very careful.
> 
> (It needs two reboots to apply any change)
> 

I feel consfused: isn't it a way to exclude some module?

If yes, it isn't that I'm looking.

For example, I'm using USB audio, but I'd like to ban USB audio which is
included into my display, but not ban the module because if I do so, I
won't able to use USB audio dingle which I use to connect to wireless
headphones.

Right now I have:

  ~ $ usbdevs  
  Controller /dev/usb0:
  addr 01: 8086: Intel, xHCI root hub
  addr 02: 1050:0404 Yubico, YubiKey CCID
  addr 03: 13d3:56f2 Azurewave, USB camera
  addr 04: 8087:0026 Intel, Bluetooth
  addr 05: 043e:9a61 LG Electronics Inc., USB2.1 Hub
  addr 06: 043e:9a73 LG USA, product 0x9a73
  addr 07: 043e:9a66 LG Electronics Inc., LG UltraFine Display Audio
  addr 08: 043e:9a68 LG Electronlcs Inc., LG UltraFine Display Camera
  addr 09: 05ac:0265 Apple Inc., Magic Trackpad
  addr 10: 05ac:026c Apple Inc., Magic Keyboard with Numeric Keypad
  addr 11: 043e:9a70 LG Electronics Inc., LG UltraFine Display Controls
  addr 12: 0a12:4010 Cambridge Silicon Radio, product 0x4010
  addr 13: 041e:3130 Creative, Creative BT-W5
  ~ $

and I would like somehow to disable

  addr 07: 043e:9a66 LG Electronics Inc., LG UltraFine Display Audio
  addr 08: 043e:9a68 LG Electronlcs Inc., LG UltraFine Display Camera

but keeping

  addr 03: 13d3:56f2 Azurewave, USB camera
  addr 13: 041e:3130 Creative, Creative BT-W5

I've tried to play with config -e /bsd but the best that I can figure
out is how to disable uaudio, and not only one, specific, device.

-- 
wbr, Kirill



Re: Ignore some USB devices

2024-02-19 Thread Nowarez Market
You should be able to do it by the /etc/bsd.re-config file, you can start from 
here:

http://man.openbsd.org/bsd.re-config

Please be very careful.

(It needs two reboots to apply any change)

> N0\/\/@r€Z
> --
>    /\/\@rk€T

Feb 19, 2024 16:15:31 Kirill A. Korinsky :

> I run OpenBSD and some times connect an external display which contains
> integraded web cam, microphone and speakers.
> 
> Web-cam doesn't work, but both microphone and speakers work.
> 
> Is it possible to ignore it somehow?
> 
> Ideally I'm for a black list of usb divecs base on some id.



Ignore some USB devices

2024-02-19 Thread Kirill A . Korinsky
Folks,

I run OpenBSD and some times connect an external display which contains
integraded web cam, microphone and speakers.

Web-cam doesn't work, but both microphone and speakers work.

Is it possible to ignore it somehow?

Ideally I'm for a black list of usb divecs base on some id.

Thanks.

-- 
wbr, Kirill