dec05eba / gpu-screen-recorder-issues

GPU Screen Recorder issue tracker
11 stars 0 forks source link

[BUG] Can't use on an Optimus laptop with Wayland #32

Closed Reonu closed 1 month ago

Reonu commented 1 month ago

Describe the bug So I've been loving this software on my desktop PC but I'm trying to also use it on my laptop and running into an issue.

I'm running wayland and using envy-control to use my laptop in Nvidia-only mode. But when I launch gpu-screen-recorder-gtk (again, in Nvidia only mode) it says "running on Intel" and it throws an error that H264/HEVC recording isn't available on my system. I can't seem to get it to run on my Nvidia GPU, despite the fact that my system is set to Nvidia only.

I'm using the AUR package.

How can I make it work? Thanks!

To Reproduce Launch the GUI, I can't even get to choose any options since it just throws the error and then closes itself.

Screenshots imagen

Desktop (please complete the following information):

Additional context

It was fine on X11 iirc, the issue seems to present itself on Wayland only.

It's an MSI GE65 Raider 9SF with an RTX 2070.

LOG FILE WITH drm_info OUTPUT log.txt

dec05eba commented 1 month ago

The log shows that your monitor is being displayed by your intel card, not your nvidia card. Can you run eglinfo > log.txt and upload that file here? eglinfo is part of the mesa-utils package. Also your intel iGPU is capable of video encoding so it should work anyways. When you installed gpu screen recorder from aur it should have mentioned that you need to install additional software to use it on intel: intel-media-driver and libva-intel-driver if your games are running on your nvidia gpu but your monitor is being displayed on your intel gpu then that is fine too, in fact its better. If you just install those packages and start recording on your intel iGPU then it should be better than recording on your nvidia gpu since nvidia gpus have a bug with cuda that nvidia refuses to fix.

Reonu commented 1 month ago

(I ran it as sudo)

log.txt

To be clear my laptop is one of the terrible ones that have forced optimus, that is, the display is physically only wired to the Intel GPU. But in theory, the GPU that is rendering my screen is the Nvidia one, the Intel GPU is only used to copy the framebuffer over to it and display the image...

If I have some sort of misconfiguration on my system I'd of course appreciate some help on how to get it working right for GPU screen recording.

I just saw your edits about the Intel stuff, I'll try it.

dec05eba commented 1 month ago

Can you run that eglinfo command without root? the command has to be run as the same user that is running the wayland session.

Reonu commented 1 month ago

Here's the output without sudo: log.txt

Installing those packages didn't work. Neither did setting envy-control to hybrid mode, which I tried just in case.

dec05eba commented 1 month ago

Can you run vainfo > log.txt and upload that log.txt file? vainfo is part of the libva-utils package. Surely your intel iGPU supports video encoding. Also that log says that wayland is being run on your intel iGPU.

dec05eba commented 1 month ago

Btw, just to make sure. Do you have linux-firmware installed? that is needed on newer intel iGPUs for video encoding support. You need to reboot after installing that.

Reonu commented 1 month ago

I "installed" the linux-firmware package, but I'm not sure if it actually worked, because it shows a "broken pipe" error during the kernel-install process:

(1/1) checking keys in keyring                     [------------------------] 100%
(1/1) checking package integrity                   [------------------------] 100%
(1/1) loading package files                        [------------------------] 100%
(1/1) checking for file conflicts                  [------------------------] 100%
:: Processing package changes...
(1/1) reinstalling linux-firmware                  [------------------------] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Running kernel-install...
Running kernel-install for 6.9.6-arch1-1
dracut[I]: Executing: /usr/bin/dracut --no-hostonly --force /efi/3aee184de6a24fd391982fb1c65a72be/6.9.6-arch1-1/initrd-fallback 6.9.6-arch1-1
dracut[E]: Module 'systemd-pcrphase' depends on 'tpm2-tss', which can't be installed
dracut[I]: *** Including module: systemd ***
dracut[I]: *** Including module: systemd-ask-password ***
dracut[I]: *** Including module: systemd-initrd ***
dracut[I]: *** Including module: systemd-journald ***
dracut[I]: *** Including module: systemd-modules-load ***
dracut[I]: *** Including module: systemd-sysctl ***
dracut[I]: *** Including module: systemd-sysusers ***
dracut[I]: *** Including module: systemd-tmpfiles ***
dracut[I]: *** Including module: systemd-udevd ***
dracut[I]: *** Including module: modsign ***
dracut[I]: *** Including module: i18n ***
dracut[I]: *** Including module: btrfs ***
dracut[I]: *** Including module: crypt ***
dracut[I]: *** Including module: dm ***
dracut[I]: *** Including module: kernel-modules ***
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[I]: *** Including module: lvm ***
dracut[I]: *** Including module: mdraid ***
dracut[I]: *** Including module: nvdimm ***
dracut[I]: *** Including module: pcmcia ***
dracut[I]: *** Including module: qemu ***
dracut[I]: *** Including module: qemu-net ***
dracut[I]: *** Including module: systemd-cryptsetup ***
dracut[I]: *** Including module: fido2 ***
dracut[I]: *** Including module: pkcs11 ***
dracut[I]: *** Including module: lunmask ***
dracut[I]: *** Including module: resume ***
dracut[I]: *** Including module: rootfs-block ***
dracut[I]: *** Including module: terminfo ***
dracut[I]: *** Including module: udev-rules ***
dracut[I]: *** Including module: virtiofs ***
dracut[I]: *** Including module: dracut-systemd ***
dracut[I]: *** Including module: usrmount ***
dracut[I]: *** Including module: base ***
dracut[I]: *** Including module: fs-lib ***
dracut[I]: *** Including module: shutdown ***
dracut[I]: *** Including modules done ***
dracut[I]: *** Installing kernel module dependencies ***
dracut[I]: *** Installing kernel module dependencies done ***
dracut[I]: *** Resolving executable dependencies ***
dracut[I]: *** Resolving executable dependencies done ***
dracut[I]: *** Hardlinking files ***
dracut[I]: *** Hardlinking files done ***
dracut[I]: *** Generating early-microcode cpio image ***
dracut[I]: *** Constructing GenuineIntel.bin ***
dracut[I]: *** Store current command line parameters ***
dracut[I]: *** Stripping files ***
dracut[I]: *** Stripping files done ***
dracut[I]: *** Creating image file '/efi/3aee184de6a24fd391982fb1c65a72be/6.9.6-arch1-1/initrd-fallback' ***
dracut[I]: *** Creating initramfs image file '/efi/3aee184de6a24fd391982fb1c65a72be/6.9.6-arch1-1/initrd-fallback' done ***
dracut[I]: Executing: /usr/bin/dracut --hostonly --no-hostonly-cmdline -f /efi/3aee184de6a24fd391982fb1c65a72be/6.9.6-arch1-1/initrd 6.9.6-arch1-1
dracut[E]: Module 'systemd-pcrphase' depends on 'tpm2-tss', which can't be installed
dracut[E]: Module 'systemd-pcrphase' depends on 'tpm2-tss', which can't be installed
dracut[I]: *** Including module: systemd ***
dracut[I]: *** Including module: systemd-ask-password ***
dracut[I]: *** Including module: systemd-initrd ***
dracut[I]: *** Including module: systemd-journald ***
dracut[I]: *** Including module: systemd-modules-load ***
dracut[I]: *** Including module: systemd-sysctl ***
dracut[I]: *** Including module: systemd-sysusers ***
dracut[I]: *** Including module: systemd-tmpfiles ***
dracut[I]: *** Including module: systemd-udevd ***
dracut[I]: *** Including module: i18n ***
dracut[I]: *** Including module: kernel-modules ***
dracut[I]: *** Including module: kernel-modules-extra ***
dracut[I]: *** Including module: pcmcia ***
dracut[I]: *** Including module: rootfs-block ***
dracut[I]: *** Including module: terminfo ***
dracut[I]: *** Including module: udev-rules ***
dracut[I]: *** Including module: dracut-systemd ***
dracut[I]: *** Including module: usrmount ***
dracut[I]: *** Including module: base ***
dracut[I]: *** Including module: fs-lib ***
dracut[I]: *** Including module: shutdown ***
dracut[I]: *** Including modules done ***
dracut[I]: *** Installing kernel module dependencies ***
dracut[I]: *** Installing kernel module dependencies done ***
dracut[I]: *** Resolving executable dependencies ***
dracut[I]: *** Resolving executable dependencies done ***
dracut[I]: *** Hardlinking files ***
dracut[I]: *** Hardlinking files done ***
dracut[I]: *** Generating early-microcode cpio image ***
dracut[I]: *** Constructing GenuineIntel.bin ***
dracut[I]: *** Store current command line parameters ***
dracut[I]: *** Stripping files ***
dracut[I]: *** Stripping files done ***
dracut[I]: *** Creating image file '/efi/3aee184de6a24fd391982fb1c65a72be/6.9.6-arch1-1/initrd' ***
dracut[I]: *** Creating initramfs image file '/efi/3aee184de6a24fd391982fb1c65a72be/6.9.6-arch1-1/initrd' done ***
error: unable to write to pipe (Broken pipe)
(3/5) Refreshing PackageKit...
(4/5) Check if user should be informed about rebooting after certain system package upgrades.
(5/5) Checking which packages need to be rebuilt

The package is supposedly installed though, but GPU Screen Recorder still won't work.

How should I proceed?

Reonu commented 1 month ago

Oh I forgot, here's the output from the command you mentioned in the previous comment: log.txt

Reonu commented 1 month ago

I'm confused as to why Wayland is running on my Intel GPU though... Is running absolutely everything on the Nvidia GPU not possible on Wayland like it was on X11?

dec05eba commented 1 month ago

It should be possible in the same way but I dont know, I dont use wayland (especially on nvidia, it has never worked properly with nvidia for me). But anyways, your vainfo output shows that video encoding is detected at least. Can you try running gpu-screen-recorder -w screen -f 60 -o video.mp4 and post the terminal output?

Reonu commented 1 month ago

Here's the output: gpu-screen-recorder: error while loading shared libraries: libavcodec.so.60: cannot open shared object file: No such file or directory

dec05eba commented 1 month ago

Oh, you upgraded your system incorrectly. It seems like this is a common issue for endevour users, see https://github.com/dec05eba/gpu-screen-recorder-issues/issues/30 look at the last comment if you use paru

Reonu commented 1 month ago

Btw for wayland to work on nvidia you need the new 555 Nvidia driver as well as an up to date DE that supports explicit sync (for example, KDE 6.1). Wayland works correctly on Nvidia now, but it's a very recent development.

Reonu commented 1 month ago

I don't use paru, I install everything with yay -S packagename. I don't seem to even have paru installed. Should I install it?

dec05eba commented 1 month ago

Nah, you should be able to do yay -S gpu-screen-recorder-git --rebuild

Reonu commented 1 month ago

Yup, it does work now after that. Thanks.

However what you said about "upgrading my system incorrectly" worries me. I always upgrade my system by just typing yay in the terminal. Do you happen to know what I might have done wrong? I'm still getting familiar with Linux, so if I have some sort of bad habit I'd like to get rid of it.

Also, I still don't understand why I can't just run Wayland on the Nvidia GPU, but whatever lol. Closing the issue since the program does work now (but i'd still be thankful if you have an answer to my question)

dec05eba commented 1 month ago

This issue happened because ffmpeg updated to 7.0 and every application that depends on ffmpeg needs to update. Aur packages dont update automatically unfortunately (there is an issue in yay repository about this but it seems like it cant really be fixed). But I have pushed changes to gpu screen recorder after ffmpeg updated, so I dont know, when did you last update gpu screen recorder? or if you did partial updates without updating aur packages as well.

Reonu commented 1 month ago

I haven't used my laptop in like a month and updated everything in one go today. Maybe GPU screen recorder got updated before ffmpeg?

Anyways this is good info to have. Thanks.

PS: Really looking forward to window recording support in Wayland ;)

dec05eba commented 1 month ago

Ok then yay must have updated aur packages before the official arch packages? that seems like an issue in yay :S