-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
alvr: build from source #308097
alvr: build from source #308097
Conversation
Sure, I'll try to get to this soon |
Appears to build fine but upon running alvr_dashboard, it fails:
|
I just copied the contents of the pr and added it into my flake's custom pkgs folder, will update when it finishes compiling |
Hey @PassiveLemon I'm not sure how ideal this is but maybe as a temporary solution til a solution is found for the source package not working properly; we could target the ALVR nixpkg to the nightly builds? Those still have appimage release files |
I wouldn't necessarily mind that but I'd have to see what other maintainers say. Sometimes they can be picky about unstable packages. In the long run, building from source is definitely the best way and it's where I personally would like to go |
Yeah definitely!
Also quick update, running a backtrace for the app results in the log below.. something to do with Wayland apparently? (which I do have installed, as I'm using Plasma 6 with my desktop which supports a Nvidia RTX 2060 using the propritery drivers)
|
I do not use Wayland but I can report this to the ALVR Discord server and Github repo, unless you already have/are going to |
@PassiveLemon you go ahead, I'm actually trying to troubleshoot an entirely new issue with ALVR, can't get the audio working at all >_< Also I DMed you a particular issue I saw on the ALVR Discord relating to someone's deviation of the latest ALVR release tars, that may help along updating the nixpkg too |
That error is Relevant winit documentation: Here is a winit issue describing the same problem on NixOS: rust-windowing/winit#3244 |
Fixed the Wayland error, but still not running need to look into it:
|
In the next few days I will attempt to build off of this. Have you tried using the |
@PassiveLemon Hey I was testing @mihranmashhud's derivation of the latest ALVR a few weeks back and it actually was working for me at the time! I came across it over in the ALVR discord. They used the
|
Oh nice, I was currently just working on a derivation using the archive and it works. I still have problems with that WinitEventLoop error though |
Seems I have fixed it. Heres my derivation: { lib
, stdenv
, fetchzip
, fetchFromGitHub
, alsa-lib
, autoPatchelfHook
, brotli
, ffmpeg
, libdrm
, libGL
, libunwind
, libva
, libvdpau
, libxkbcommon
, nix-update-script
, openssl
, pipewire
, pulseaudio
, vulkan-loader
, wayland
, x264
, xorg
, xvidcore
}:
stdenv.mkDerivation (finalAttrs: {
pname = "alvr";
version = "20.8.1";
src = fetchzip {
url = "https://github.com/alvr-org/ALVR/releases/download/v${finalAttrs.version}/alvr_streamer_linux.tar.gz";
hash = "sha256-8bQpEnzK4ZGE5P49Gh/fmxgyCBFTzD511q6aZxe0B/Y=";
};
alvrSrc = fetchFromGitHub {
owner = "alvr-org";
repo = "ALVR";
rev = "v${finalAttrs.version}";
hash = "sha256-znIRSax4thuBIpxW8BNqJSUYgIeY8g06qA9P/i8awvQ=";
};
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
alsa-lib
libunwind
libva
libvdpau
vulkan-loader
];
runtimeDependencies = [
brotli
ffmpeg
libdrm
libGL
libxkbcommon
openssl
pipewire
pulseaudio
wayland
x264
xorg.libX11
xorg.libXcursor
xorg.libxcb
xorg.libXi
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/applications
cp -r $src/* $out
install -Dm444 $alvrSrc/alvr/xtask/resources/alvr.desktop -t $out/share/applications
install -Dm444 $alvrSrc/resources/alvr.png -t $out/share/icons/hicolor/256x256/apps
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Stream VR games from your PC to your headset via Wi-Fi";
homepage = "https://github.com/alvr-org/ALVR/";
changelog = "https://github.com/alvr-org/ALVR/releases/tag/v${finalAttrs.version}";
license = licenses.mit;
maintainers = with maintainers; [ passivelemon ];
platforms = platforms.linux;
mainProgram = "alvr_dashboard";
};
}) I haven't actually tested ALVR itself but it builds and runs. I'll give it a real test tomorrow. |
I have not, as that is a binary release and the goal of this pr was to build alvr from source, but that version could be used to update to a newer version, while a source build is still being worked on. |
I can't seem to escape this issue either.
I still do plan on fulling building from source but as a stopgap measure, the archive should work nicely until we can figure out how to build from source. I found a Discourse from December about building ALVR from source and they hit the exact same issue |
So I've given my derivation a test and here are the current problems: |
I cannot seem to get ALVR working at all. I don't think I will maintain it any longer as I do not use it anyways. Feel free to update the package with my derivation and remove me from maintainers. Maybe I'll come back in the future |
I'm going to try my hand at it, finally got my desktop up and running. |
The draft derivation of ALVR works but I got that black screen issue, currently trying to figure out why that's happening but so far I don't see any of the Wayland issues on my end (I have a Nvidia RTX 2060 with the 555 drivers) Edit: Got the black screen issue to go away! I had to do this fix on SteamVR; add |
Got some good news! I can get ALVR fully working with little trouble (NVENC is still a bit buggy but using the H256 encoder works fine) along with the audio enabled and working fine too! One thing that I had to make sure existed is the My VR setup is a Oculus Quest 2 with Nvidia RTX 2060 v555 drivers with AMD 5600G CPU. |
FYI 20.9.1 was recently released, including proper(-er?) Pipewire support. I just tried out the Nixpkgs version (20.6.1) on my Quest 2 and after some workarounds such as the one mentioned in #308097 (comment) and manually wiring up the audio it seems to work okay. Would be awesome to get an up-to-date version in. I could lend a hand with testing the built-from-source derivation, but my setup is very similar to NovaViper's (Quest 2, NVIDIA dGPU). |
Will do another push |
ugh, at this point I just give up. I'll try doing this a different method or something, why tf do some commits have two parents I hate git NixOS/nixpkgs#308097 alvr-org/ALVR#2476 ValveSoftware/SteamVR-for-Linux#748 NixOS/nixpkgs#341219
I'm in the same boat, not having used my VR in a few weeks, I will test this out tonight. |
@LuNeder |
Can you provide a revision of nixpkgs? Also, when you say ALVR is working, do you mean ALVR + SteamVR -> you can actually use it, show you library, fire up a game, etc.? |
NixPkgs rev was 4c2fcb0, This was working fully inside a game on steam; I've just updated my system and can confirm the same, ALVR + steam no longer works. Only way to do this will be a bisect i think, since that puts the change between the 18th and 20th which should be a small enough sample to do without too much pain.
Just checked against LuNeders diff, they didn't update kernel above 6.11.4 or NVIDIA past 560. |
haha thanks for the info @eyJhb. I noticed this issue but just thought steamvr was being buggy (as usual) and I ended up switching to monado + wivrn |
A bunch of issues were found with the decimated steam, particularly around the use of the new `inlcudeClosures`. Adding gamemode or gamescope to steam's `extraPackages` would break in odd ways for instance and those appear to be common patterns. NixOS#350598 NixOS#308097 We definitely want to use something like `includeClosures` in the future but let's revert back to just listing all deps in order to not have a broken steam for 24.11. NixOS#351928 aims to fix the issues experienced here but is a breaking change and a bit too close for comfort w.r.t. staging cycles. Game specific libraries are disabled by default now though because pressure-vessel should be able to take care of those before 24.11 releases. (Though you never know with Valve-time...) The flag to restore the game specific libraries is retained just in case. This partially reverts a3ccb7f
@h7x4 you initially merged alvr. Any change you can get this merged, or are there any further concerns that should be addressed? :) |
😓 Apologizes for the lengthy delay in my tests! I've been doing a ton of code clean up on my repo; so I now I can properly give this a test. This is where my system is at currently (hadn't updated my flake.lock since my last commit).
Edit: completely forgot to include what version of Nvidia drivers I have:
And SteamVR crashes on me the moment the headset tries to connect to ALVR 😰 |
Using that does not fix ALVR/SteamVR here. Weird. Can you confirm it works for you on the PR's latest commits/force-push? |
Please use the issue I've created here for further discussions on the topic of ALVR+SteamVR not working on latest. It's not the fault of this PR in any way :) #352304 |
SteamVR's working for me again after the fhs environment fix to Steam but sadly Hardware acceleration is still broken 😭 |
Anything I can do here to help, for example with testing? |
Right now we're just waiting for the Nix Overlords to merge this tbh |
Will merge this after branch-of because this currently contains breaking changes regarding support of nvidia GPUs. |
Appreciate this being merged! If you don't mind, could someone else take over the maintenance? Seeing as I didn't really contribute to the source-built version and that I don't use ALVR/SteamVR anymore, someone else is probably better suited. |
Description of changes
This builds, but no idea if this actually works, would be cool if you could test this @PassiveLemon.
Closes #305232
Closes #334314
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.