You are not logged in.

#26 2024-05-12 12:13:14

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: [SOLVED] nvidia-390xx-dkms build failure

DVDisco wrote:

When editing prepare() how to know the right directory to cd into and the correct path for the input argument of the patch command?

The directory to use depends on where the PKGBUILD puts the sourcefiles AND the value used for -p / --strip when creating the patch (you can avoid needing the separate cd command though)
The input path can be specfifed so it will always work as long as the patch-file is included in the source= array .


Also using the long versions of the parameters makes the patch command  a lot easier to read and understand.

example

patch --directory="$srcdir/folder_where_sourcecode_is_downloaded_to" --forward --strip=1 --input="$srcdir/your.patch"

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#27 2024-05-13 18:46:22

twilight0
Member
From: Greece
Registered: 2011-05-01
Posts: 233
Website

Re: [SOLVED] nvidia-390xx-dkms build failure

Eventually I had to boot into Windows (after 8+ months!) to prepare the sources in the Linux partition because with that screen resolution in the terminal without GUI, I had difficulties. It's one thing to have a bunch of commands typed whereever (in a DE for instance), its another to be stuck in tty2. So in order to help other users like @TechXero I will provide the following simple instructions. You can even use your phone to visually copy the commands as I did.

cd ~

git clone https://aur.archlinux.org/nvidia-390xx-utils.git

cd nvidia-390xx-utils

curl https://pastebin.com/raw/yFUHW90p > gcc14.patch

curl https://pastebin.com/raw/h6cNVmN3 > PKGBUILD

makepkg

sudo pacman -U ./nvidia-390xx-dkms-390.157-8-x86_64.pkg.tar.zst

reboot

Thank me now, you 're welcome. Sure I am a long time Linux user, but not so advanced as others. I came back to Arch after using Mint for almost 10 years.

Last edited by twilight0 (2024-05-14 02:53:36)


Proud Arch Linux user since 2007.

Offline

#28 2024-05-13 18:53:47

loqs
Member
Registered: 2014-03-06
Posts: 17,861

Re: [SOLVED] nvidia-390xx-dkms build failure

@twilight0 what were your reasons for choosing that patch?

Offline

#29 2024-05-13 18:58:55

twilight0
Member
From: Greece
Registered: 2011-05-01
Posts: 233
Website

Re: [SOLVED] nvidia-390xx-dkms build failure

loqs wrote:

@twilight0 what were your reasons for choosing that patch?

No reason in particular, it just works.


Proud Arch Linux user since 2007.

Offline

#30 2024-05-13 21:25:12

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: [SOLVED] nvidia-390xx-dkms build failure

The reason why loqs asked is because this is the -fpermissive/-fno-pie patch which loosens the compiler way beyond what's actually necessary (and I'm not even sure whether -fno-pie  matches the linker settings here - if not, this might actually just introduce relocation issues)

Offline

#31 2024-05-14 14:56:25

SanguineNoctis
Member
Registered: 2024-05-14
Posts: 1

Re: [SOLVED] nvidia-390xx-dkms build failure

Lone_Wolf wrote:
DVDisco wrote:

When editing prepare() how to know the right directory to cd into and the correct path for the input argument of the patch command?

The directory to use depends on where the PKGBUILD puts the sourcefiles AND the value used for -p / --strip when creating the patch (you can avoid needing the separate cd command though)
The input path can be specfifed so it will always work as long as the patch-file is included in the source= array .


Also using the long versions of the parameters makes the patch command  a lot easier to read and understand.

example

patch --directory="$srcdir/folder_where_sourcecode_is_downloaded_to" --forward --strip=1 --input="$srcdir/your.patch"

More directly, to save other doofys like me hours of frustration (not because the comments on this post wheren't helpful, you all are amazing and I'm so thankful I found this post, I just didn't understand something lmao), these are the specifics for the 390 at least. I use an NVIDIA Quadro 4000 myself.

your patch should be in /path/to/nvidia-390xx-utils/gcc14.patch, and the exact patch command to insert is this:

patch --dircetory="$srcdir/NVIDIA-Linux-x86_64-390.157" --foreward --strip=1 --input="$srcdir/../gcc14.patch"

Have a nice day, my friends, and thank you so much to the previous posters for all the help! I hope this helps as well!


Explain it to me like I'm a 5 year old. (not actually, but I'm bit doofy sometimes, be patient haha)
Arch Nerd since 2020, and never going back!!!

Offline

#32 2024-05-14 16:35:03

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: [SOLVED] nvidia-390xx-dkms build failure

--input="$srcdir/../gcc14.patch"

The parent of $srcdir while running makepkg (building) is undefined and can't be relied upon.
example: during clean chroot building $srcdir/../ DOES NOT point to the directory the build command was executed from but to the buildroot of the chroot .

However, makepkg does put everything in source-array in $srcdir, so it should be --input="$srcdir/gcc14.patch"


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#33 2024-05-19 14:17:44

Trevor_B
Member
Registered: 2019-12-28
Posts: 93

Re: [SOLVED] nvidia-390xx-dkms build failure

Altough marked Solved I'm still vey unsure what I have to do to get into Arch to run from  3.8.7-arch1-1 or more

I've just tried the latest 6.9 update but it still gets stuck at boot, so had to Timeshift back to the previous installation running 3.8.7-arch1-1 (have added to my Pacman conf IgnorePkg   = linux linux-headers to stop updating the kernel)

I'm running a Nvidia GTX 760 card

I keep seeing about patches gcc14 but am totaly unsure how to to do this (am I the only one here who doesn't understand)

Can some kindly clearly explain where to start and how to go about making and using this patch so I can update to the latet kernel and get Arch back up and running for me please, if this is the solution

Thanks

Offline

#34 2024-05-19 14:21:43

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,895

Re: [SOLVED] nvidia-390xx-dkms build failure

The AUR packages have already been patched, just use them.

Offline

#35 2024-05-19 14:42:18

Trevor_B
Member
Registered: 2019-12-28
Posts: 93

Re: [SOLVED] nvidia-390xx-dkms build failure

strange as I tried the -Syu less than an hour ago and no luck

https://pastebin.com/RRaPmSDa

Have I missed something ?

Offline

#36 2024-05-19 14:44:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,895

Re: [SOLVED] nvidia-390xx-dkms build failure

And how did you install the nvidia 470 drivers?

https://wiki.archlinux.org/title/Arch_User_Repository

Offline

#37 2024-05-19 14:45:08

seth
Member
Registered: 2012-09-03
Posts: 56,103

Re: [SOLVED] nvidia-390xx-dkms build failure

pacman -Syu will not update your AUR packages…

Offline

#38 2024-05-19 15:01:28

Trevor_B
Member
Registered: 2019-12-28
Posts: 93

Re: [SOLVED] nvidia-390xx-dkms build failure

seth wrote:

pacman -Syu will not update your AUR packages…


Went and had a cup of tea, and twigged the 'AUR' while drinking it and then saw your message Seth

Ran yay -Syu, all is good

Many thanks for pointing it out smile

Question, sometimes I run Pacman sometimes Yay, is it better to run just Yay all the time rather than Pacman , or ?


have a great afternoon all

Offline

#39 2024-05-19 15:04:51

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,895

Re: [SOLVED] nvidia-390xx-dkms build failure

This is actually one of the downsides of using yay, it blurs the line between repo packages and AUR packages and leaves people confused about what they're actually doing too often.

Offline

Board footer

Powered by FluxBB