Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Nvidia graphics card cannot be used after manually building
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
wlmosv
n00b
n00b


Joined: 19 Apr 2024
Posts: 38

PostPosted: Mon Apr 29, 2024 12:07 pm    Post subject: Nvidia graphics card cannot be used after manually building Reply with quote

Hello everyone, when I manually compiled the kernel and loaded the modules and then completed the compilation, the xorg configuration seemed to be invalid when starting. I can only delete it and start kde.
Code:
> Failed to emerge x11-drivers/nvidia-drivers-550.78, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-550.78/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-550.78:

 * '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.8.8-gentoo tree at that location has not been built.
 *
 * Please verify that this is the intended kernel version, then perform
 * a full build[1] (i.e. make && make modules_install && make install).
 *
 * Alternatively, consider a distribution kernel[2] that does not need
 * these manual steps (e.g. sys-kernel/gentoo-kernel or gentoo-kernel-bin).
 *
 * [1] https://wiki.gentoo.org/wiki/Kernel/Configuration#Build
 * [2] https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
 * ERROR: x11-drivers/nvidia-drivers-550.78::gentoo failed (setup phase):
 *   built kernel sources are required to build kernel modules
 *
 * Call stack:
 *                      ebuild.sh, line 136:  Called pkg_setup
 *   nvidia-drivers-550.78.ebuild, line 121:  Called linux-mod-r1_pkg_setup
 *            linux-mod-r1.eclass, line 311:  Called _modules_prepare_kernel
 *            linux-mod-r1.eclass, line 636:  Called _modules_sanity_kernelbuilt
 *            linux-mod-r1.eclass, line 1061:  Called die
 * The specific snippet of code:
 *              die "built kernel sources are required to build kernel modules"
 *
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-550.78::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-550.78::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-550.78/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-550.78/temp/die.env'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-550.78/empty'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-550.78/work'
wlmosv$

When I deleted the nvidia configuration, a new problem appeared. Is it because my kernel is not configured correctly?
this is my kernel .config:
https://0x0.st/XHk4.txt

dmesg:
https://bpa.st/YOPQ
My last nvidia configuration file was generated using nvidia-xconfig --prime, but when I generated it again this time, X11 could not start normally. This is the last xorg configuration file (I made a backup):(6.8.7)
Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 550.76


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Inactive       "InactiveDevice1"
    Inactive       "InactiveDevice1"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from data in "/etc/conf.d/gpm"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "InactiveDevice1"
    Driver         "modesetting"
    VendorName     "Unknown"
EndSection

Section "Device"
    Identifier     "InactiveDevice1"
    Driver         "modesetting"
    VendorName     "Unknown"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection



Since I cannot install the nvidia driver now, I cannot generate the configuration file
fastfetch:
Code:
wlmosv$ fastfetch
         -/oyddmdhs+:.                 wlmosv@wlmosv
     -odNMMMMMMMMNNmhy+-`              -------------
   -yNMMMMMMMMMMMNNNmmdhy+-            OS: Gentoo 2.15 x86_64
 `omMMMMMMMMMMMMNmdmmmmddhhy/`         Host: 81FW (Lenovo Legion Y7000)
 omMMMMMMMMMMMNhhyyyohmdddhhhdo`       Kernel: 6.8.8-gentoo-x86_64
.ydMMMMMMMMMMdhs++so/smdddhhhhdm+`     Uptime: 19 mins
 oyhdmNMMMMMMMNdyooydmddddhhhhyhNd.    Packages: 1383 (emerge)
  :oyhhdNNMMMMMMMNNNmmdddhhhhhyymMh    Shell: bash 5.2.26
    .:+sydNMMMMMNNNmmmdddhhhhhhmMmy    Display (LGD05E5): 1920x1080 @ 60Hz
       /mMMMMMMNNNmmmdddhhhhhmMNhs:    DE: KDE Plasma 5.27.11
    `oNMMMMMMMNNNmmmddddhhdmMNhs+`     WM: KWin (X11)
  `sNMMMMMMMMNNNmmmdddddmNMmhs/.       WM Theme: plastik
 /NMMMMMMMMNNNNmmmdddmNMNdso:`         Theme: Breeze (Light) [QT], Adwaita-dark [GTK2/3/4]
+MMMMMMMNNNNNmmmmdmNMNdso/-            Icons: breeze [QT], breeze [GTK2/3/4]
yMMNNNNNNNmmmmmNNMmhs+/-`              Font: Noto Sans Osage (11pt) [QT], Noto Sans Osage (11pt) [GTK2/3/4]
/hMMNNNNNNNNMNdhs++/-`                 Cursor: breeze (24px)
`/ohdmmddhys+++/:.`                    Terminal: konsole 23.8.5
  `-//////:--.                         Terminal Font: JetBrains Mono (11pt)
                                       CPU: Intel(R) Core(TM) i5-8300H (8) @ 4.00 GHz
                                       GPU 1: Intel UHD Graphics 630 @ 1.00 GHz
                                       GPU 2: NVIDIA GeForce GTX 1050 Mobile
                                       Memory: 2.92 GiB / 15.51 GiB (19%)
                                       Swap: 0 B / 4.00 GiB (0%)
                                       Disk (/): 223.56 GiB / 463.46 GiB (48%) - ext4
                                       Local IP (wlan0): 10.202.211.250/16,10.202.212.77/16 *
                                       Battery: 100% [AC Connected]
                                       Locale: zh_CN.UTF-8

                                       ████████████████████████
                                       ████████████████████████
wlmosv$

_________________
学习他,成为他,超越他:Embrace the journey of learning from him, becoming like him, and ultimately surpassing him.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2412

PostPosted: Mon Apr 29, 2024 2:41 pm    Post subject: Reply with quote

Here is the meaningful part of the error message:

Code:

 * '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.8.8-gentoo tree at that location has not been built.


You haven't built your kernel.

Post the output of

Code:
equery list sys-kernel/*


Best Regards,
Georgi
Back to top
View user's profile Send private message
wlmosv
n00b
n00b


Joined: 19 Apr 2024
Posts: 38

PostPosted: Mon Apr 29, 2024 3:03 pm    Post subject: Reply with quote

logrusx wrote:
Here is the meaningful part of the error message:

Code:

 * '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.8.8-gentoo tree at that location has not been built.


You haven't built your kernel.

Post the output of

Code:
equery list sys-kernel/*


Best Regards,
Georgi

hi
Code:
wlmosv$ equery list sys-kernel/*
 * Searching for * in sys-kernel ...
[IP-] [  ] sys-kernel/dracut-101:0
[IP-] [  ] sys-kernel/genkernel-4.3.12:0
[IP-] [  ] sys-kernel/gentoo-kernel-bin-6.8.8:6.8.8
[IP-] [  ] sys-kernel/gentoo-sources-6.8.8:6.8.8
[IP-] [  ] sys-kernel/installkernel-37:0
[IP-] [  ] sys-kernel/linux-firmware-20240410:0
[IP-] [  ] sys-kernel/linux-headers-6.8-r1:0
[IP-] [  ] sys-kernel/zen-sources-6.7.9:6.7.9

At present, I have recompiled the kernel but I don’t know if it will work. I executed make and make modules_install
and make install
_________________
学习他,成为他,超越他:Embrace the journey of learning from him, becoming like him, and ultimately surpassing him.
Back to top
View user's profile Send private message
wlmosv
n00b
n00b


Joined: 19 Apr 2024
Posts: 38

PostPosted: Mon Apr 29, 2024 3:13 pm    Post subject: Reply with quote

logrusx wrote:
Here is the meaningful part of the error message:

Code:

 * '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.8.8-gentoo tree at that location has not been built.


You haven't built your kernel.

Post the output of

Code:
equery list sys-kernel/*


Best Regards,
Georgi

it is worked! thank you!
_________________
学习他,成为他,超越他:Embrace the journey of learning from him, becoming like him, and ultimately surpassing him.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2412

PostPosted: Mon Apr 29, 2024 3:22 pm    Post subject: Reply with quote

wlmosv wrote:
logrusx wrote:
Here is the meaningful part of the error message:

Code:

 * '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.8.8-gentoo tree at that location has not been built.


You haven't built your kernel.

Post the output of

Code:
equery list sys-kernel/*


Best Regards,
Georgi

it is worked! thank you!


Did you boot the kernel you compiled? What does
Code:
lsmod | grep nvidia

and
Code:
uanme -a

say?

Best Regards,
Georgi
Back to top
View user's profile Send private message
wlmosv
n00b
n00b


Joined: 19 Apr 2024
Posts: 38

PostPosted: Mon Apr 29, 2024 3:27 pm    Post subject: Reply with quote

logrusx wrote:
wlmosv wrote:
logrusx wrote:
Here is the meaningful part of the error message:

Code:

 * '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.8.8-gentoo tree at that location has not been built.


You haven't built your kernel.

Post the output of

Code:
equery list sys-kernel/*


Best Regards,
Georgi

it is worked! thank you!


Did you boot the kernel you compiled? What does
Code:
lsmod | grep nvidia
say?

Best Regards,
Georgi


yes
Code:

wlmosv$ lsmod | grep nvidia
nvidia_uvm           4714496  0
nvidia_drm            102400  23
nvidia_modeset       1552384  45 nvidia_drm
nvidia              59678720  814 nvidia_uvm,nvidia_modeset
video                  77824  3 ideapad_laptop,i915,nvidia_modeset
drm_kms_helper        270336  3 drm_display_helper,nvidia_drm,i915
drm                   774144  32 i2c_hid,drm_kms_helper,drm_display_helper,nvidia,drm_buddy,nvidia_drm,i915,ttm
i2c_core              135168  14 i2c_designware_platform,videodev,i2c_hid,i2c_designware_core,drm_kms_helper,i2c_algo_bit,drm_display_helper,ee1004,nvidia,i2c_smbus,i2c_i801,i2c_hid_acpi,i915,drm
backlight              28672  6 video,drm_display_helper,ideapad_laptop,i915,drm,nvidia_modeset
wlmosv$

look here
Code:
uname -r
6.8.8-gentoo-x86_64
wlmosv$ eselect kernel list
Available kernel symlink targets:
  [1]   linux-6.8.8-gentoo *
  [2]   linux-6.8.8-gentoo-dist
wlmosv$

But I still have a small problem, that is, my graphics card does not display power. I don’t know why, but it functions normally. like this
Code:
nvidia-smi
Mon Apr 29 23:26:24 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.78                 Driver Version: 550.78         CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1050        Off |   00000000:01:00.0 Off |                  N/A |
| N/A   44C    P5             N/A / ERR!  |     568MiB /   4096MiB |     12%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2517      G   /usr/bin/X                                    201MiB |
|    0   N/A  N/A      2901      G   /usr/lib64/libexec/kf5/klauncher                1MiB |
|    0   N/A  N/A      2931      G   ...ib64/libexec/xdg-desktop-portal-kde          1MiB |
|    0   N/A  N/A      2955      G   /usr/bin/kded5                                  1MiB |
|    0   N/A  N/A      2959      G   /usr/bin/kwin_x11                              37MiB |
|    0   N/A  N/A      3000      G   /usr/bin/ksmserver                              1MiB |
|    0   N/A  N/A      3014      G   /usr/bin/kaccess                                1MiB |
|    0   N/A  N/A      3021      G   /usr/bin/plasmashell                           19MiB |
|    0   N/A  N/A      3022      G   ...c/polkit-kde-authentication-agent-1          1MiB |
|    0   N/A  N/A      3066      G   /usr/lib64/libexec/DiscoverNotifier             1MiB |
|    0   N/A  N/A      3258      G   /usr/lib64/libexec/baloorunner                  1MiB |
|    0   N/A  N/A      3264      G   /usr/bin/konsole                                1MiB |
|    0   N/A  N/A      3747      G   ...rowser/plugins --ozone-platform=x11          1MiB |
|    0   N/A  N/A      3809      G   ...71,262144 --variations-seed-version         84MiB |
|    0   N/A  N/A      3963      G   /usr/lib64/firefox/firefox                    124MiB |
|    0   N/A  N/A      4218      G   ...bin/plasma-browser-integration-host          1MiB |
|    0   N/A  N/A      4445      G   ...erProcess --variations-seed-version         64MiB |
|    0   N/A  N/A      4693      G   /usr/bin/flameshot                              1MiB |
|    0   N/A  N/A      4711      G   /usr/bin/telegram-desktop                       1MiB |

_________________
学习他,成为他,超越他:Embrace the journey of learning from him, becoming like him, and ultimately surpassing him.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum