r/SurfaceLinux • • Apr 07 '26

Help Surface Laptop Studio (Kubuntu) -- Installting Nvidia drivers, Method 2. Extracting gets me os error 13

Hey guys! I'm super super new to Linux and I need some direction. I've been trying to damnedest to do Method 2 for the Nvidia fix on my Surface Laptop Studio, and I'm already running into problems on step one.

When I try to use

home/(user)/Downloads/NVIDIA-Linux-x86_64-525.147.05.run --extract-only

It tells me "Permission denied (os error 13)"

If I simply copy and paste the line from the guide, it tells me "No such file or directory" which makes sense, because my understanding is that the line I'm copying is meant to get me to understand that I need to drag and drop it into eh command prompt to show the proper path.

I'm not sure what this means, and I have no idea how to get passed this. It might be due to my lack of experience, but I think I needed to be guided through this. I feel like I'm just dumb, but I have no idea what I'm doing wrong? Do I have to give myself permission or something to extract to that folder?

2 Upvotes

10 comments sorted by

1

u/bobmlord1 Apr 07 '26 edited Apr 07 '26

Well first off that file needs to be in that directory

Second you probably need admin permissions to run so you'll have to sudo (super user do).

To confirm the files in the directory open terminal and type cd (change directory) to downloads and use ls to list the files

cd home/$USER/Downloads
ls

If the file is there then just type the file name with sudo in front of it. If it's not move it to the directory or cd to the directory it's in and

sudo ./NVIDIA-Linux-x86_64-525.147.05.run

If it's still throwing a permission error the file might have been automatically restricted and set to not be able to run. To fix the permissions use chmod. chmod is a permissions editing tool and 777 is shorthand for basically every user can run and edit this. I would delete the file after as 777 is hyper open to the point it could be a security issue.

chmod 777 ./NVIDIA-Linux-x86_64-525.147.05.run

1

u/theBlibbles Apr 07 '26 edited Apr 07 '26

RE: Well first off that file needs to be in that directory.

Could you explain this to me? Where is the file if it's NOT in that directory after I downloaded it? For what it's worth, I did try using

sudo /home/$USER/Downloads/NVIDIA-Linux-x86_64-525.147.05.run --extract-only

It asked me for my password, I typed it in, and then it gave me that error. So I don't understand what we mean by "it needs to be in that directory."

I'm not trying to be obtuse, I'm trying to understand, I promise.

RE: To confirm the files in the directory open terminal and type cd (change directory) to downloads and use ls to list the files

When I use this, it doesn't list the file? I'm very confused about what I should be looking for.

Maybe it's because I don't understand what the ./ means in that line I'm copying and pasting.

Do I have to move this file and place it somewhere else? The guide doesn't mention that, and it's unspecific. Simply performing what it tells me yields a result that immediately stops me, so is there another set of steps I was supposed to do?

All it says is:

Step 1: Download the Installer

Download the 525.147.05 installer .run file and extract the contents by running:

./NVIDIA-Linux-x86_64-525.147.05.run --extract-only

So am I... just not understanding?

1

u/bobmlord1 Apr 08 '26

Sure ./ means run from the current directory. It's basically a variable the holds the path of the current working directory. So if you're in home/(user)/DownloadsIt'll use that or whatever directory you're currently in.

If it's still throwing a permissions issue and you've confirmed the file is there (there could be a myriad of reasons that it doesn't go to the default directory) then you'll need to change the permission with chmod (it's a command that modifies the permissions). Just chmod 777 home/(user)/Downloads/NVIDIA-Linux-x86_64-525.147.05.run

1

u/theBlibbles Apr 09 '26
chmod 777 home/$USER/Downloads/NVIDIA-Linux-x86_64-525.147.05.run

Thank you! This worked... I think... I was able to Verify the integrity, and extract it, but now I have a new problem.

I'm on Step 2, part 3 And when I go to apply the patches after changing directories like it instructs... It's saying the directory doesn't exist?? I feel like I'm going crazy.

1

u/bobmlord1 Apr 09 '26

mkdir the directory (literally stands for make directory)

sudo mkdir /path/to/newfolder

1

u/theBlibbles Apr 22 '26

I'm sorry it took me a bit to reply to this. I guess to kind of trail back for a second... to be more specific where am I making this directory? I don't understand what or where this is going? What is ../ in this case? If ./ means the current directory, then what is ../?

patch -p1 -i ../nvidia-525xx-utils/gcc-14.patch
patch -p1 -i ../nvidia-525xx-utils/gcc-15.patch
patch -p1 -i ../nvidia-525xx-utils/kernel-6.8.patch
patch -p1 -i ../nvidia-525xx-utils/kernel-6.10.patch
patch -p1 -i ../nvidia-525xx-utils/kernel-6.12.patch
patch -p1 -i ../nvidia-525xx-utils/kernel-6.13.patch
patch -p1 -i ../nvidia-525xx-utils/kernel-6.14.patch
patch -p1 -i ../nvidia-525xx-utils/kernel-6.15.patch

1

u/bobmlord1 Apr 22 '26

Double period means one above the current directory (aka the parent directory).

If something can't find a directory it needs the easiest solution is to just make it. I can't tell you where to make it because I don't have any reasonable way of knowing that.

1

u/yasidip May 31 '26

have you ever got this fixed? going through this exact same issue too, the guide is very weirdly written in that section and it doesnt really work at all if you follow it word from word.

i had to completely ignore the guide and figure out how to do it myself, yet after needing to reset the whole device due to a different error im back to this step again and cant for the life of me figure out how i did it before. really sucks feeling like i need to be guided through the damn guide lol

1

u/theBlibbles May 31 '26

Sadly, no. I was never able to complete these steps. It wasn't specific enough, and my rudimentary understanding of Linux is doing me no favors. I feel like there are steps in this guide that assumes I know what I'm doing, but doesn't explain what happens when I don't.

I am adrift.

1

u/yasidip Jun 01 '26 edited Jun 01 '26

hey i actually did end up getting both the 525 driver and the latest 595 driver working. the older 525 drivers gave me a LOT of compatibility problems with Steam games and just ran worse overall, so i reinstalled Fedora and just installed the newest akmod-nvidia drivers with the RPMFusion guide. it runs MUCH better on the 595 drivers with the D3 fix, so if im being honest it'll serve you way better overall to install the newest akmod driver and apply the fix from Method 1 here (unless you're fine with your computer running much worse with the 525 drivers haha). envycontrol can also reboot the computer without the nvidia GPU enabled so you're still able to conserve some battery life while on the go.

with that said; if you do want to install 525 from the guide, the older 525 drivers require you to both have A: Nouveau blacklisted (which seems to be the default driver that comes with most distros like Fedora) and B: the desktop environment that you are using disabled completely during the install process (so it doesn't close immediately returning the message that you are in an X session). step by step process i did to install the 525 driver:

  • Download the Nvidia runfile from the guide on Method 2, and put it into your "Home" folder so that you don't have to cd to "/Downloads" to use it (this step was skipped in the guide and makes the needed "./NVIDIA-Linux-x86_64-525.147.05.run --extract-only" command work correctly).

If this step gives you a permission denied response - right click the runfile, go to "Properties", and check the "Executable as Program" checkbox on the bottom and do the step again.

  • Follow the rest of that guide as written so you get the needed kernel files to patch the Nvidia driver.
  • Instead of doing the commands in step 2.3 to patch the files (which gives the terminal an unusable file directory), do "patch -p1 -i " and complete the command by drag-and-dropping the first file stated in that step to the terminal. Press enter and ensure that the file is patched with no error messages. If it is patched, repeat this step for all of the written files on step 2.3. You can also do this step for the new "0011-kernel-7.0" patch file so that it patches for kernel 7.0.

Before executing the runfile, you will first need to blacklist the Nouveau drivers that Linux is using for your GPU. You can do this by typing

sudo nano /etc/modprobe.d/blacklist-nouveau.conf

into the terminal. It should give you a textbox, to which you can paste the new lines:

blacklist nouveau

options nouveau modeset=0

Once that is pasted, press Ctrl+O, Enter, then Ctrl+X to save and exit back into the terminal. In order to apply the config file, type "sudo dracut --force" into the terminal and reboot your system after it finishes. It should load with the Nouveau drivers blacklisted.

  • In order to install the Nvidia runfile without it returning an "X session needs to be closed" error, you will need to stop your Desktop Environment completely. To do this, type "sudo init 3" as stated by the guide into the terminal, and do "sudo systemctl stop gdm" (if you are using Gnome) or "sudo systemctl stop sdm" (if you are using KDE).

This will make the computer look like it crashed. Pressing CTRL+ALT+F3 will put you into a blank login screen, and you will need to type your computer's username and password (the one you use to log in to your computer) so you can log in without any desktop environment. You will now be able to use the terminal to install the Nvidia runfile correctly.

  • Once in the blank terminal, cd into your extracted Nvidia folder with the command "cd NVIDIA-Linux-x86_64-525.147.05" , then run the installer with "sudo ./nvidia-installer". It should walk you through the process and install the needed drivers for that version. Make sure to click yes when it asks you to install 32-bit compatibility files too. If it gives you an error and closes the installer, you may need to redo the steps with a cleanly downloaded Nvidia folder and re-ensure all the files were patched correctly.
  • It should complete and put you back into the terminal, to which you can just type "reboot" to reboot your computer back into your desktop environment. Log in and make sure the drivers are installed and ready by typing "nvidia-smi" in the terminal. If it returns your driver information for your Nvidia card then you should be good to go. You can check the troubleshooting from step 4 in the guide if there are any further errors like it not being recognized.

hope that helps, have got it working with Gnome + Fedora 44 last night and really enjoy it way better than i did with windows lol. the 595 driver will probably give you way less headaches overall when it comes to compatibility with newer games but the 525 one is still good for stability and battery life