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

Installation on Ubuntu 23.10 not straightforward #6

Open
luisalvarado opened this issue Feb 8, 2024 · 19 comments
Open

Installation on Ubuntu 23.10 not straightforward #6

luisalvarado opened this issue Feb 8, 2024 · 19 comments

Comments

@luisalvarado
Copy link

luisalvarado commented Feb 8, 2024

Hi WW, I am trying to install this but had to do several additional steps not mentioned in the installation steps. Before doing ninja, the meson build command will fail on ubuntu 23.10. What needs to be installed BEFORE are the following packages so far:

sudo apt install libgtkmm-4.0-dev libadwaita-1-dev libudisks2-dev
These 3 will cover at least meson finishing the build process

Then the ninja finishes everything but we still need:

ninja install
in order to install it systemwide.

But even after doing all of these, I get the following when executing fastgame:

fastgame: error while loading shared libraries: libfastgame_nvidia.so: cannot open shared object file: No such file or directory

@wwmm
Copy link
Owner

wwmm commented Feb 8, 2024

Hi @luisalvarado !

Did this problem happen when using our master branch code? As far as I remember the nvidia code should be optional. It is probably going to work fine once you install libxnvctrl. But I do not remember this being mandatory.

@wwmm
Copy link
Owner

wwmm commented Feb 8, 2024

ninja install

The ideal solution would be to create a distribution package instead. But I am only used to do this on Arch Linux.

@luisalvarado
Copy link
Author

@wwmm Thank you, yes it was from the master. And I checked the libxnvctrl package is already installed (including the Dev one). My hardware is this

image

And the Nvidia Driver is the 550. Although the libxnvctrl package is the 510.

@wwmm
Copy link
Owner

wwmm commented Feb 9, 2024

What is printed by ninja install in the terminal window?

@luisalvarado
Copy link
Author

luisalvarado commented Feb 9, 2024

I cant show you now because I did a it git pull and now I am getting this:


luis@xtreme:~/fastgame/build$ ninja
[5/6] Compiling C++ object src/fastgame_apply.p/netlink.cpp.o
FAILED: src/fastgame_apply.p/netlink.cpp.o 
c++ -Isrc/fastgame_apply.p -Isrc -I../src -I../include -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include -I/usr/include/udisks2 -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++20 -O2 -g '-DG_LOG_DOMAIN="fastgame"' -pthread -DBOOST_ALL_NO_LIB -fpermissive -MD -MQ src/fastgame_apply.p/netlink.cpp.o -MF src/fastgame_apply.p/netlink.cpp.o.d -o src/fastgame_apply.p/netlink.cpp.o -c ../src/netlink.cpp
../src/netlink.cpp: In member function ‘void Netlink::handle_msg(cn_msg*)’:
../src/netlink.cpp:165:10: error: ‘PROC_EVENT_FORK’ was not declared in this scope
  165 |     case PROC_EVENT_FORK:
      |          ^~~~~~~~~~~~~~~
../src/netlink.cpp:173:10: error: ‘PROC_EVENT_EXEC’ was not declared in this scope
  173 |     case PROC_EVENT_EXEC:
      |          ^~~~~~~~~~~~~~~
../src/netlink.cpp:185:10: error: ‘PROC_EVENT_COMM’ was not declared in this scope
  185 |     case PROC_EVENT_COMM:
      |          ^~~~~~~~~~~~~~~
../src/netlink.cpp:197:10: error: ‘PROC_EVENT_EXIT’ was not declared in this scope
  197 |     case PROC_EVENT_EXIT:
      |          ^~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

It was working fine 2 days ago.

@wwmm
Copy link
Owner

wwmm commented Feb 9, 2024

I cant show you now because I did a it git pull and now I am getting this

Hum... Here on Arch Linux it compiles. Strange.

@wwmm
Copy link
Owner

wwmm commented Feb 9, 2024

Hum... Here on Arch Linux it compiles. Strange.

And it doesn't if I revert the change. What is happening is that the current stable kernel 6.7.4 has changed its cn_proc.h header. Without the latest commit it does not build on it. But it seems that fixing the compilation on the latest kernel breaks it in the older ones =/

@wwmm
Copy link
Owner

wwmm commented Feb 9, 2024

If you checkout to the commit right before the change you probably can still compile it. You can do it by running

git checkout 9cce38ec152ffa3ad704db53f096fe00d2008bc0

inside the source code folder.

@wwmm
Copy link
Owner

wwmm commented Feb 9, 2024

I've sent a small update to our master branch but I doubt it will be enough to fix the compilation on older kernels. After running the command in my last message you can go back to the master branch through

git checkout master

@wwmm
Copy link
Owner

wwmm commented Feb 9, 2024

By the way what is the kernel version used by your Ubuntu installation?

@luisalvarado
Copy link
Author

luisalvarado commented Feb 9, 2024

Got it, went to that checkout, did a clean build again and got this:

luis@xtreme:~/fastgame/build$ ninja install
[0/1] Installing files.
Installation failed due to insufficient permissions.
Attempt to use /usr/bin/sudo to gain elevated privileges? [y/n] y
[sudo] password for luis: 
Installing data/com.github.wwmm.fastgame.desktop to /usr/local/share/applications
Installing po/nl/LC_MESSAGES/fastgame.mo to /usr/local/share/locale/nl/LC_MESSAGES
Installing src/nvidia/libfastgame_nvidia.so to /usr/local/lib/x86_64-linux-gnu
Installing src/fastgame_launcher to /usr/local/bin
Installing src/fastgame to /usr/local/bin
Installing src/fastgame_apply to /usr/local/bin
Installing /home/luis/fastgame/data/schemas/com.github.wwmm.fastgame.gschema.xml to /usr/local/share/glib-2.0/schemas
Installing /home/luis/fastgame/data/fastgame.svg to /usr/local/share/icons/hicolor/scalable/apps
Installing /home/luis/fastgame/build/data/com.github.wwmm.fastgame.apply.policy to /usr/local/share/polkit-1/actions

image

My Kernel right now is 6.6.14

If I run it I get this

image

@wwmm
Copy link
Owner

wwmm commented Feb 9, 2024

If I run it I get this

Run sudo glib-compile-schemas /usr/local/share/glib-2.0/schemas/. One of the downsides of installing manually is having to run this also manually. The distribution package manager usually does this automatically when necessary.

@luisalvarado
Copy link
Author

luisalvarado commented Feb 10, 2024

Correct, after running it, I get this:

image

So basically, the installation instructions are just missing several more steps to make sure users don't get lost in the road. Thank you as always and great work.

Also, I took so long to install and setup that I forgot what the hell the app was for lol. But I will read the documentation again.

@wwmm
Copy link
Owner

wwmm commented Feb 10, 2024

Also, I took so long to install and setup that I forgot what the hell the app was for lol. But I will read the documentation again.

Think of it as an easy way to test if some systems settings may help to improve performance when playing. For example I see on my computer that increasing the disk read ahead can reduce games loading time by noticeable values even on nvme devices. Disabling pcie aspm while playing may also help to avoid the gpu clock staying low when you want it to be as high as possible. Setting some environmental variables and game command line options may be interesting too. And so on...

None of these settings are guaranteed to boost fps. But fastgame is an easy way to test if they can help in a given situation. And without having to add one more service always running in the background. After a boot save a profile with your systems default settings so you can easily restore them. After this customize the parameters and click on the apply button before launching the game. After closing the game load the profile with the default settings to restore the system to its standard state.

Some settings require the game to be launched through fastgame_launcher. On Steam this can be done by setting fastgame_launcher %command% in Steam's settings.

@luisalvarado
Copy link
Author

luisalvarado commented Feb 10, 2024

Also, I took so long to install and setup that I forgot what the hell the app was for lol. But I will read the documentation again.

Think of it as an easy way to test if some systems settings may help to improve performance when playing. For example I see on my computer that increasing the disk read ahead can reduce games loading time by noticeable values even on nvme devices. Disabling pcie aspm while playing may also help to avoid the gpu clock staying low when you want it to be as high as possible. Setting some environmental variables and game command line options may be interesting too. And so on...

None of these settings are guaranteed to boost fps. But fastgame is an easy way to test if they can help in a given situation. And without having to add one more service always running in the background. After a boot save a profile with your systems default settings so you can easily restore them. After this customize the parameters and click on the apply button before launching the game. After closing the game load the profile with the default settings to restore the system to its standard state.

Some settings require the game to be launched through fastgame_launcher. On Steam this can be done by setting fastgame_launcher %command% in Steam's settings.

YES! Now I remember why this testing tool was needed. Exactly for what you are mentioning. Saves time. The fastgame_launcher parameter I was not aware of, but the variables in the environment is going to save me time when doing specific tests, so yes, this is a very good app to have. One cool idea would be for the app to remember the process to which certain variables were changed to, so that, when it gets loaded again, fastgame can detect it or match it against and run the parameters or variables again.

Now that I have been playing with it. A step by step instructions on how to use fastgame with a steam game would help since I have no idea how they talk to each other. For example this shows empty:

image

So I do not know if this is fed manually or how does it read variables used by an app when launched. Dont know if I am explaining myself so to avoid guessing a lot here. Like:

  1. Launcher the steam app with fastgame_launcher
  2. This will automatically fill in all the Environment Variables and command line arguments
  3. You can see their values and change CPU, GPU, etc..
  4. Save the presets when you see an improvements

Something like this.

BTW do I run fastgame_launcher without any other parameters, I tried doing this to GTA 5 and it failed:

MANGOHUD_CONFIG=output_folder=/home/luis/mangohud-logs,font_size=48,position=top-right,engine_short_names,vram,ram,gpu_name,gpu_power,cpu_mhz,cpu_temp,resolution,fps_metrics=0.001+0.01+0.97+avg gamemoderun mangohud fastgame_launcher %command%

But if I remove the fastgame_launcher it launches the game.

I ran it on the terminal and it shows as existing but this error

image

But on the parameter box inside steam for GTA4 it fails to load the game.

@wwmm
Copy link
Owner

wwmm commented Feb 10, 2024

So I do not know if this is fed manually

The configuration is done manually. And the way to reload them is manually loading a previously saved preset file.

One cool idea would be for the app to remember the process to which certain variables were changed to

I think that the preset file is enough. Many of the settings aren't specific to a process but are system wide parameters. The only information the user has to give about the process is the Executable name. They are usually in the game installation folder. FastGame will use the executable name to find the process and apply the settings that can only be set once the game is already running.

I ran it on the terminal and it shows as existing but this error

The file /tmp/fastgame.json will be created when the user clicks on the Apply button in FastGame window. You have to do this before launching the game. IT will ask your root password because some settings can only be touched by the root user.

@wwmm
Copy link
Owner

wwmm commented Feb 10, 2024

The only information the user has to give about the process is the Executable name

Using Cyberpunk as example in the field for the executable name I put Cyberpunk2077.exe manually and saved the preset file.

@wwmm
Copy link
Owner

wwmm commented Feb 10, 2024

A step by step instructions on how to use fastgame with a steam game would help since I have no idea how they talk to each other.

They don't need to talk to each other. Although the current instructions in our readme do not say much the implementation is a lot more simpler that what is done by other programs like Feral Gamemode. Just manually set the parameters in our window and save a preset. In Steam put fastgame_launcher %command% and before starting the game click on FastGame apply button.

When everything goes well your system log output will have lines similar to these ones when the game starts

com.github.wwmm.fastgame.desktop[20209]: fastgame_apply: wine server pid: 20553
com.github.wwmm.fastgame.desktop[20209]: fastgame_apply: setting wineserver priority to realtime
com.github.wwmm.fastgame.desktop[20209]: fastgame_apply: (20647, granblue_fantas, /home/wallace/games/steam/steamapps/common/Proton - Experimental/files/bin/wine64-preloader, Z:\home\wallace\games\steam\steamapps\common\Granblue Fantasy Relink\granblue_fantasy_relink.exe

In this case I was playing Granblue Fantasy Relink. When I started the game the fastgame_apply process launched by fastgame after I clicked on its Apply button was notified by the Linux kernel that a process matching the executable name was started. Some settings are applied as soon as fastgame_apply starts. Others wait for the game process notification to be sent by the kernel.

@luisalvarado
Copy link
Author

Got it got it. Okay I would need to organize my ideas for this. But I am following a bit better now. Thank you my friend for the very helpful assistance.

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

2 participants