Giter Club home page Giter Club logo

xbox-cloud-gaming-electron's Introduction

About

This is a fork of the geforcenow-electron app written in Electron, that wraps around the Xbox Cloud Gaming web browser implementation.

Why use this over just using the web browser?

  • Better performance - This forces the browser to use the GPU for hardware acceleration, which results in better performance. It also uses a Windows user agent by default, which apparently results in better performance as well. You can achieve the same results by using the web browser and enabling hardware acceleration and spoofing the user agent with extensions, but this is a lot easier.
  • Better desktop integration - This app integrates with the desktop environment, allowing you to use the window manager to move and resize the window and launch it from the application launcher (which is crucial for the Steam Deck, as you can then add it as a non-Steam game).
  • Better parity with the native Windows app - This app replicates some of the features of the native Windows app, such as hiding the mouse pointer when the controlled is being used.
  • Discord Rich Presence - This app integrates with Discord, allowing you to show what you're playing on your Discord profile.

Installation

Get it from the AUR

Currently the project is available on these repositories: AUR

Manual Installation

  • Go to the latest release.
  • Download the specific file that best fits your disto.
  • Install it

Usage

If you've installed it through your package manager, then it should already contain a launcher for it. Otherwise, run the xbox-cloud-gaming-electron binary.

To toggle full-screen mode, use the F11 keyboard shortcut.

FAQ

I got a "VA-API is not available!" error. What should I do? Is it a bug? Do I need VA-API?

It's not a bug. You generally need VA-API for a smooth experience. If you don't notice any issues, then you can ignore this error and disable it with the --no-vaapi-warning flag.

If you do however notice issues, please refer to your's distro's documentation on how to install and enable VA-API, as the package names and installation methods may vary.

You will also need libva-utils installed so the program can verify you have VA-API enabled. It contains the vainfo command, which will enable the program to cgeck if you have VA-API working. It might be under a different name depending on your distro or merged with the base package. Again, please refer to your distro's documentation.

Why do I keep getting logged out?

This is an issue on Microsoft's side. If you click on the "Sign in" button, it will log you in again without a need to enter your credentials.

How do I get controller vibration to work?

Currently, controller vibration is a preview feature. You can turn it on by clicking on your profile picture in the top right corner and enabling "Preview features" in the settings menu. You will need to restart the app for the changes to take effect. After that, enable "Controller vibration" in the "Audio & input" section.

Will you have a Flatpak version?

A Flatpak version is planned, but it's not a priority at the moment. If you want to help with this, please open an issue. In the meantime, you can use the AppImage version (for example if you're on a Steam Deck).

What are the flags that I can use?

These are the currently available flags:

Name Description
--no-vaapi-warning Disables the VA-API warning
--normal-user-agent Uses the default user agent instead of the Windows one
--no-rpc Disables Discord Rich Presence
--dont-hide-pointer Disables hiding the mouse pointer when you're using a controller

Building from source

Requirements

You will need to install npm, the Node.js package manager. On most distributions, the package is simply called npm.

Cloning the source code

Once you have npm, clone the wrapper to a convenient location:

git clone https://github.com/marzeq/xbox-cloud-gaming-electron.git

Building

cd xbox-cloud-gaming-electron
npm install yarn
npx yarn
npx yarn build

On subsequent runs, npx yarn build will be all that's required.

Updating

Simply pull the latest version of master and install any changed dependencies:

cd xbox-cloud-gaming
git checkout master
git pull
npx yarn
npx yarn build

xbox-cloud-gaming-electron's People

Contributors

dependabot[bot] avatar hmlendea avatar igorkvasn avatar jonathantreffler avatar kaizoho avatar marzeq avatar psy-q avatar ranoke avatar roypen avatar softwarerat avatar tealk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

xbox-cloud-gaming-electron's Issues

Can't get hardware video decoding acceleration working on Linux

Hi,
I've downloaded the latest version but I'm not able to get hardware video acceleration working.
The specs of my system are:

  • OS: Debian unstable
  • DE: Gnome 43.1
  • Graphic server: Wayland

When I run the wrapper vanilla i get:

libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
(node:10916) UnhandledPromiseRejectionWarning: Error: Could not connect
    at Socket.onerror (/tmp/.mount_xbox-crrrPb9/resources/app.asar/node_modules/discord-rpc/src/transports/ipc.js:32:16)
    at Object.onceWrapper (node:events:514:26)
    at Socket.emit (node:events:394:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
(Use `xbox-cloud-gaming-electron --trace-warnings ...` to show where the warning was created)
(node:10916) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[10955:0110/104204.357313:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

If I set export LIBVA_DRIVER_NAME=iHD I no longer have the error libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed but still no hardware acceleration:

libva info: VA-API version 1.17.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
(node:11129) UnhandledPromiseRejectionWarning: Error: Could not connect
    at Socket.onerror (/tmp/.mount_xbox-cxsCJt7/resources/app.asar/node_modules/discord-rpc/src/transports/ipc.js:32:16)
    at Object.onceWrapper (node:events:514:26)
    at Socket.emit (node:events:394:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
(Use `xbox-cloud-gaming-electron --trace-warnings ...` to show where the warning was created)
(node:11129) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[11168:0110/104405.159984:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

I check if hardware acceleration is working with sudo intel_gpu_top, as you can see no app is using hardware video decoding:
Screenshot from 2023-01-09 17-09-50
If I play a YT video through FireFox I have video decoding workload:
Screenshot from 2023-01-09 17-10-42

Can you help me out?

Error page rendered instead of the expected home screen

What and where

This line will not resolve the page correctly if you're outside of the english-speaking world, and may result in an error page being displayed instead:

mainWindow.loadURL(`https://www.xbox.com/${app.getLocale()}/play`)

Details

If the app.getLocale() returns pl, as it is in my case, the URL will resolve to:
https://www.xbox.com/pl/play
which then will get auto-redirected to
https://www.xbox.com/en-GB/pl/play
as the Xbox website doesn't recognize the shortened locale/market string. The /en-GB/pl/play renders an error page.

Correct URL for pl locale would be https://www.xbox.com/pl-PL/play. Chromium API won't return what Xbox website expects in many cases, as evidenced here: https://source.chromium.org/chromium/chromium/src/+/main:ui/base/l10n/l10n_util.cc

Solution

My proposal would be to stick to https://www.xbox.com/play URL, as it will auto-redirect to the correct locale.

Alternatively, you could check the locale string length, and default to en-GB if it's shorter than expected (trying to do some magic with guessing/reconstructing the correct string will be problematic from my overall experience).

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.