Code Monkey home page Code Monkey logo

Comments (12)

theofficialgman avatar theofficialgman commented on September 26, 2024

same issue on flatpak

from cemu.

Squall-Leonhart avatar Squall-Leonhart commented on September 26, 2024

insufficient information to act on or investigate.

What controller is this.
what linux distribution and version

Your github profile tells me you should know better than to post such a vague and unactionable issue.

from cemu.

theofficialgman avatar theofficialgman commented on September 26, 2024

What controller is this.

Controller name already provided twice. To reiterate, it's an official Nintendo switch pro controller.

what linux distribution and version

Also already partially provided. Flatpak distribution and appimage on Kubuntu Mantic 23.10.
I tested the appimages on another system today on Kubuntu Noble 24.04 development and do not have this issue.

Your github profile tells me you should know better than to post such a vague and unactionable issue.

I typically don't provide repetitive and extra irrelevant information. At the time it appeared that distro was likey irrelevant as long as hid-nintendo driver was being used from the kernel as sdl is provided in the appimage statically linked in the main binary.

from cemu.

Squall-Leonhart avatar Squall-Leonhart commented on September 26, 2024

6.5.0.25.25 has a proposed(and accepted) fix for switch pro controller issues.

from cemu.

theofficialgman avatar theofficialgman commented on September 26, 2024

I looked into this. it appears that one system is in the input group (the one that works) and the other is not. the system with the user in the input group can read all /dev/input/ nodes without root. the one that isn't cannot and can only read the device node for Nintendo Switch Pro Controller and not Nintendo Switch Pro Controller IMU because only the former has extended permissions for my user (getfacl shows this).

from cemu.

Squall-Leonhart avatar Squall-Leonhart commented on September 26, 2024

Then this SDL issue explains whats up libsdl-org/SDL#8125

from cemu.

Squall-Leonhart avatar Squall-Leonhart commented on September 26, 2024

Actually, apologies but its this one libsdl-org/SDL#6478

The current dkms-nintendo driver only supplies the motion data as a dev/input/event

from cemu.

theofficialgman avatar theofficialgman commented on September 26, 2024

Then this SDL issue explains whats up libsdl-org/SDL#8125
Actually, apologies but its this one libsdl-org/SDL#6478

no and no. the problem is not that it is exposed separated. that is solved in SDL2 years ago now (see the second issue PR close reason). the problem is that Nintendo Switch Pro Controller IMU doesn't have extended permissions to be read by my user without input group access.

from cemu.

Squall-Leonhart avatar Squall-Leonhart commented on September 26, 2024

libsdl-org/SDL#7697 was first added to SDL 3.0 to partially (not fully) mitigate
the udev rule with read access is still required to get the sensor.

libsdl-org/SDL#8336 backports the change to SDL 2.30 which has only just come out, should in part correct this issue and #753.

from cemu.

theofficialgman avatar theofficialgman commented on September 26, 2024

libsdl-org/SDL#7697 was first added to SDL 3.0 to partially (not fully) mitigate the udev rule with read access is still required to get the sensor.

libsdl-org/SDL#8336 backports the change to SDL 2.30 which has only just come out, should in part correct this issue and #753.

I don't see what that PR changes. This already works on SDL2.28.5 (what is used in latest CEMU 2.0-65) as long as read access exists. I am not really sure why it works already since that PR is not in 2.28.5 edit: see #1097 (comment)

The PR to systemd linked within that PR (libsdl-org/SDL#7697 (comment)) is what is needed though to add uaccess so that regular users can read the IMU systemd/systemd#22860

from cemu.

theofficialgman avatar theofficialgman commented on September 26, 2024

even after removing the user from the input group and rebooting it still works on my noble machine. it appears that on connecting the controller in CEMU the controller restarts or reconnects (the lights change). according to the PRs hidraw based input and motion should already be functioning in SDL2 and I have found that is what is being used here (instead of hid-nintendo event# inputs).

It works on my one system through HIDRAW as a side affect of having Steam installed, which installs a udev rule for hidraw access by user as part of the package

/lib/udev/rules.d/60-steam-input.rules

# Nintendo Switch Pro Controller over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0660", TAG+="uaccess"

# Nintendo Switch Pro Controller over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0660", TAG+="uaccess"

60-steam-input.rules.zip

so basically, the only way it is going to work in the current SDL2 (2.28.5) is if the user has that udev rule provided for hidraw access via user, like steam provides.

I have confirmed adding that rule (not all of steam, just the rule) to the system that previously was not working fixes it.

from cemu.

theofficialgman avatar theofficialgman commented on September 26, 2024

testing the gyro in Nintendo Land it works but it appears to be offset by 90deg (I am looking at the ground with the controller flat, I have to hold the controller up/down to make it look forward).

Not sure if this is incorrect parsing by SDL2 of the hidraw input or incorrect parsing by Cemu.

edit: nevermind, just checked, that is just how this game was and I forgot.

from cemu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.