Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DualSense Edge controller doesn't work until session restart #454

Open
andre4ik3 opened this issue Dec 14, 2024 · 5 comments
Open

DualSense Edge controller doesn't work until session restart #454

andre4ik3 opened this issue Dec 14, 2024 · 5 comments

Comments

@andre4ik3
Copy link

andre4ik3 commented Dec 14, 2024

Hi, recently I purchased a DualSense Edge controller to play games, as some games I play have adaptive trigger and HD rumble which is quite nice. I was able to connect it to my PC with NixOS and the Jovian-NixOS module over Bluetooth fine, however there is a strange behavior when connecting the controller while a session (Desktop mode or Gaming mode) is running:

  • The input buttons are bounded strangely (O becomes X and the other face buttons are "rotated" by 45 degrees like that)
  • The right joystick is stuck being to the right, and responds to trigger pulls (pulling triggers moves right joystick up/down on Y-axis)
  • The trackpad behaves as a mouse, either as normal mouse in KDE or as a white mouse cursor in SteamOS session. Steam and games can't use/detect it at all
  • Clicking the trackpad (e.g. inventory button in games) doesn't work at all
  • (DS Edge) Paddles and function buttons don't work at all
  • Adaptive triggers, HD rumble doesn't work at all
  • Gyro, accelerometer don't work

I've found the weird mapping issues (first two) can be fixed by simply doing the "input calibration" under Steam controller settings. Also, the controller is treated differently depending on if it was connected while the session was running or before it started? If I connect my controller over Bluetooth, switch to Desktop mode, and back to Gaming mode, it reliably fixes all of the above issues (everything works flawless) until the next time the controller disconnects and reconnects. It's also broken in Desktop mode unless it's connected before Desktop mode starts.

So, in short, it seems the action of switching between desktop and gaming mode does some initialization that makes the controller work, and this initialization isn't done if connected until the next switch? In Desktop mode in particular, restarting Steam has no effect -- the whole session has to be restarted (Log out then log in).

These issues do not occur on the regular DualSense. Actually, when using a regular DualSense and moving the mouse around in Desktop mode as Steam is starting, you can see that Steam "grabs" the mouse trackpad (it stops responding to input for a bit, sensitivity changes) and then reconfigures it when Steam finishes starting up. This sort of "configuration" doesn't happen for the DualSense Edge, which I suspect causes all these issues.

The issues also occur when connecting over USB, with the same behavior (broken until session restart). None of these issues occur on the Steam Deck (OLED, SteamOS 3.6.20), both in Gaming and Desktop modes, and over USB and Bluetooth.

TLDR: DualSense Edge broken until logout + login


NixOS channel: unstable
Kernel version: 6.12.4 (linuxPackages_latest at the time of writing)

(Most of the) System configuration
{
  # (host-specific config)
  # Overrides for unsupported hardware/options
  jovian.steam.environment = {
    STEAM_ENABLE_FAN_CONTROL = "0";
    STEAM_ENABLE_STATUS_LED_BRIGHTNESS = "0";
    STEAM_ENABLE_CEC = "0";
  };
  jovian.hardware.has.amd.gpu = true;
  boot.kernelPackages = pkgs.linuxPackages_latest;
  # ("desktop" shared config)
  hardware.bluetooth.enable = true;
  hardware.uinput.enable = true;
  services.desktopManager.plasma6.enable = true;
  # Hint electron apps to use Wayland
  environment.sessionVariables.NIXOS_OZONE_WL = "1";
  # ("gaming" shared config)
  # Steam with Remote Play and Proton-GE
  programs.steam = {
    enable = true;
    remotePlay.openFirewall = true;
    localNetworkGameTransfers.openFirewall = true;
    extraCompatPackages = with pkgs; [
      proton-ge-bin
    ];
  };
  # Steam Gamescope session option, to avoid multi-monitor conflicts etc.
  jovian.steam = {
    enable = true;
    desktopSession = "plasma";
    user = "andre4ik3";
    updater.splash = "vendor";
  };
  # Allow access to DualSense Edge devices for Steam
  services.udev.extraRules = ''
    KERNEL=="hidraw*", KERNELS=="*054C:0DF2*", MODE="0660", TAG+="uaccess"
    KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0df2", MODE="0660", TAG+="uaccess"
  '';
  # ("gaming-console" shared config)
  jovian.steam.autoStart = true;
  services.displayManager.sddm.enable = lib.mkForce false;
}
@K900
Copy link
Contributor

K900 commented Dec 14, 2024

This is probably just a kernel bug tbh, or a kernel/Steam bug. What happens if you try an older kernel?

@andre4ik3
Copy link
Author

andre4ik3 commented Dec 14, 2024

I couldn't get Steam Deck kernel of 6.5 as it was removed due to EOL, but same issues are present on kernels 6.6 and 6.1.

@samueldr
Copy link
Member

samueldr commented Dec 14, 2024

This is probably just a kernel bug tbh, or a kernel/Steam bug. What happens if you try an older kernel?

They do eagerly load the hid-* drivers for playstation and nintendo controllers in SteamOS, to prevent some issues. Unsure if that would be the issue. The initial fix for playstation controllers was added within the last six months.

I do not expect that it would solve anything, but wanted to point it out just on the off-chance.

@andre4ik3
Copy link
Author

I added "hid_playstation" to boot.kernelModules, and tried Zen kernel 6.12.2. I also hooked it up to a Windows VM and updated the firmware, from 0180 to 0200. Issue still persists unfortunately.

@andre4ik3
Copy link
Author

andre4ik3 commented Dec 20, 2024

Update: I tested it on Jovian NixOS running on a LCD Steam Deck, and the issues were present there (however has not been updated in a few weeks, running kernel 6.8.12-valve3 on NixOS unstable 24.11). So some difference between SteamOS and NixOS is causing these issues.

Also note that the Steam Deck did not have the udev rules for DualSense Edge mentioned above, yet exhibited the exact same issues as the PC with the udev rules (until session logout + login). So maybe the problem is related to the udev rules?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants