• 10 Posts
  • 115 Comments
Joined 3 years ago
cake
Cake day: June 1st, 2023

help-circle







  • The last thing I can suggest are the last two comments on the steam-devices repo: https://github.com/ValveSoftware/steam-devices/issues/64#issuecomment-3092449971

    Try adding these to a file such as /etc/udev/rules.d/71-8bitdo-pro-2.rules

    # 8bitdo pro 2 bluetooth hidraw
    ACTION!="remove", KERNEL=="hidraw*", KERNELS=="*2DC8:6006*", MODE="0660", TAG+="uaccess"
    

    and/or

    ACTION!="remove", KERNEL=="hidraw*", KERNELS=="*2DC8:6012*", MODE="0660", TAG+="uaccess"
    

    The reason I added ACTION!="remove" is due to a recent change with systemd.

    ACLs for device nodes requested by “uaccess” udev tag are now always applied/updated by systemd-udevd through “uaccess” udev builtin, and systemd-logind no longer applies/updates ACLs but triggers “change” uevents to make systemd-udevd apply/update ACLs. Hence, the “uaccess” udev tag should be set not only on “add” action but also on “change” action, and it is highly recommended that the rule is applied all actions except for “remove” action.

    Recommended example:

    ACTION!=“remove”, SUBSYSTEM==“hidraw”, TAG+=“uaccess”

    The following example does not work since v258:

    ACTION==“add”, SUBSYSTEM==“hidraw”, TAG+=“uaccess”













  • So I am not entirely sure. I did find the code for it however if you want to take a look.

    In Firefox it uses the variable for the neqo library, which is the the Mozilla Firefox implementation of QUIC in Rust.

    Line #284: https://github.com/mozilla-firefox/firefox/blob/57e6d88cb3ad7f9777145f2d4fba11d4fc9de369/netwerk/socket/neqo_glue/src/lib.rs#L284

    code:

    let mut params = ConnectionParameters::default()
        .versions(quic_version, version_list)
        .cc_algorithm(cc_algorithm)
        .max_data(max_data)
        .max_stream_data(StreamType::BiDi, false, max_stream_data)
        .grease(static_prefs::pref!("security.tls.grease_http3_enable"))
        .sni_slicing(static_prefs::pref!("network.http.http3.sni-slicing"))
        .idle_timeout(Duration::from_secs(idle_timeout.into()))
        // Disabled on OpenBSD. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1952304>.
        .pmtud_iface_mtu(cfg!(not(target_os = "openbsd")))
        // MLKEM support is configured further below. By default, disable it.
        .mlkem(false);
    

    In the neqo library it’s used here: https://github.com/mozilla/neqo/blob/9e52e922343609dba5171c0adb869cff7bd8d3a0/neqo-transport/src/crypto.rs#L1594

    code:

    let written = if sni_slicing && offset == 0 {
        if let Some(sni) = find_sni(data) {
            // Cut the crypto data in two at the midpoint of the SNI and swap the chunks.
            let mid = sni.start + (sni.end - sni.start) / 2;
            let (left, right) = data.split_at(mid);
    
            // Truncate the chunks so we can fit them into roughly evenly-filled packets.
            let packets_needed = data.len().div_ceil(builder.limit());
            let limit = data.len() / packets_needed;
            let ((left_offset, left), (right_offset, right)) =
                limit_chunks((offset, left), (offset + mid as u64, right), limit);
            (
                write_chunk(right_offset, right, builder),
                write_chunk(left_offset, left, builder),
            )
        } else {
            // No SNI found, write the entire data.
            (write_chunk(offset, data, builder), None)
        }
    } else {
        // SNI slicing disabled or data not at offset 0, write the entire data.
        (write_chunk(offset, data, builder), None)
    };