atar-axis / xpadneo

Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
https://atar-axis.github.io/xpadneo/
GNU General Public License v3.0
1.95k stars 112 forks source link

Can't Run Install Script #257

Closed cow-killer closed 3 years ago

cow-killer commented 3 years ago

Version of xpadneo

The latest commit from kakra's fork: https://github.com/kakra/xpadneo

Severity / Impact

Describe the bug

Was able to successfully clone kakra's repository with git clone https://github.com/kakra/xpadneo.git, but getting this when running the install script as sudo: sed: can't read ./lib/../VERSION: No such file or directory

Steps to Reproduce

Expected behavior

Installs just fine with atar's repository, but not kakra's

System information

# uname -a
Linux pop-os 5.8.16-050816-lowlatency #202010170731 SMP PREEMPT Sat Oct 17 07:50:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
gort818 commented 3 years ago

It is not working since that repo doesn't have any git tags.

You can cd into the git repo and git tag 0.9-beta or something similar.

also if you try to build the default branch you will get a compilation error S16MAX is undefined looks to be a typo probably should be S16_MAX :)

you can fix those in /src/hid-xpadneo.c and then run the install script

kakra commented 3 years ago

It is not working since that repo doesn't have any git tags.

In this case, run git fetch --tags.

Also, try sudo ./install.sh --verbose and post the output.

Edit: ...yeah, plus the steps below...

kakra commented 3 years ago

also if you try to build the default branch you will get a compilation error S16MAX is undefined looks to be a typo probably should be S16_MAX

Whoops... Didn't show up in my test builds. Strange. I'll fix that.

kakra commented 3 years ago

Instead of cloning from a different repo, you can add a remote:

  1. Start from a git clone of atar-axis
  2. Run git remote add kakra https://github.com/kakra/xpadneo
  3. Update all remotes: git remote update
  4. Checkout a worktree: git worktree add ../kakra-xpadneo kakra/NAME-OF-A-BRANCH-FROM-ME

This is how I work with multiple repositories: I clone just the original, and then only add remotes per fork. That's why my repo doesn't have any tags.

cow-killer commented 3 years ago

Getting this when running the install script with verbose:

* verbose mode enabled
++ dirname ./install.sh
+ source ./lib/installer.sh
++ '[' 0 -ne 0 ']'
+++ git rev-parse --show-toplevel
++ GIT_ROOT=/home/cowkiller/Programs/xpadneo
+++ __version
+++ git describe --tags --dirty
++++ dirname ./lib/installer.sh
+++ sed '-res/v?(.*)/v\1/' ./lib/../VERSION
sed: can't read ./lib/../VERSION: No such file or directory
++ VERSION=

Run git add remote kakra https://github.com/kakra/xpadneo

Got this when trying to run that: fatal: pathspec 'remote' did not match any files

kakra commented 3 years ago

Run git add remote kakra https://github.com/kakra/xpadneo

Got this when trying to run that: fatal: pathspec 'remote' did not match any files

This happens if one is in a hurry...

It should be git remote add ...

kakra commented 3 years ago

+++ sed '-res/v?(.*)/v\1/' ./lib/../VERSION

Yeah, I think I need to fix that line or guard it better. I'll be looking into it.

cow-killer commented 3 years ago

Alright, so good news is I was able to install after adding the remote repository. Bad news is, my Series X pad is still not connecting. At this rate I'm pretty certain my internal Bluetooth card doesn't support low energy. I ordered a low energy adapter yesterday, should be getting it in the mail tomorrow. I'll let you know the results then.

kakra commented 3 years ago

Is this about the XBXS? If yes, we should probably put a note about BLE in the docs, and also compile a list of adapters that work.

kakra commented 3 years ago

Nevermind, the info is here (just not in the top post):

Bad news is, my Series X pad is still not connecting

So I'll be adding more info to the docs.

kakra commented 3 years ago

also if you try to build the default branch you will get a compilation error S16MAX is undefined looks to be a typo probably should be S16_MAX :)

This is from the branch queue/wip-patches - do not use this branch: Those commits are unfinished, may crash, may break several things, or are not working at all. Nevertheless, I fixed the symbol.

I also updated the default branch in my repo to use the queue/for-0.9: Those commits are stable and is what I'm using here for actual gaming and testing.

cow-killer commented 3 years ago

So I just got this adapter today. When trying to pair with the Series X pad, the computer says it's connected, but the Xbox button keeps glowing and jstest won't detect it. Secure Boot is disabled, tried both USB 2.0 and 3.0, same result.

I followed the instructions from this comment, changed into the kakra/xpadneo directory, ran the install script from there, and restarted the machine.

ugly95 commented 3 years ago

So I just got this adapter today. When trying to pair with the Series X pad, the computer says it's connected, but the Xbox button keeps glowing and jstest won't detect it. Secure Boot is disabled, tried both USB 2.0 and 3.0, same result.

I followed the instructions from this comment, changed into the kakra/xpadneo directory, ran the install script from there, and restarted the machine.

I don't know if it helps, but I actually have that exact same adapter. I haven't used that one in a while, but that particular Sabrent adapter did work for me with the XBox One S controller. Like most other CSR-based USB adapters that I've tried, it does have difficulty making the initial connection, but works well once the connection is established. I usually have to manually send the 'connect' command in bluetoothctl to get it to connect.

kakra commented 3 years ago

This problem occurred due to checking out a repository without tags, more exactly: My own fork is not to be used outside of the context of https://github.com/atar-axis/xpadneo. But support for the XBXS controller has been merged now, so I'm going to close this.