Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Nvidia display card issue,SOLVED by emerge -e nvidia-drivers
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Wed Dec 22, 2021 2:31 pm    Post subject: Nvidia display card issue,SOLVED by emerge -e nvidia-drivers Reply with quote

I followed the Gentoo KDE setup guide to install Plasma 5. It was using for around two months without issues.

Recently after I upgraded my kernel from 5.10.52 to 5.10.76, KDE Plasma does not start automatically. I was trying to find which part is going wrong. And I found that my display manager status is crashed. What else I can do to fix this?

Thanks a lot.

Code:
# /etc/init.d/display-manager status
 * status: crashed
# /etc/init.d/display-manager stop
 * Stopping sddm ...                                                      [ ok ]
# /etc/init.d/display-manager start
 * Setting up sddm ...                                                    [ ok ]
# /etc/init.d/display-manager status
 * status: crashed

# rc-update show
               binfmt | boot
             bootmisc | boot
              cgroups |                                 sysinit
               cronie |      default
                devfs |                                 sysinit
      display-manager |      default
                dmesg |                                 sysinit
              elogind | boot
                 fsck | boot
             hostname | boot
              hwclock | boot
              keymaps | boot
            killprocs |                        shutdown
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork
           localmount | boot
             loopback | boot
              modules | boot
             mount-ro |                        shutdown
                 mtab | boot
           net.enp3s0 |      default
             netmount |      default
               procfs | boot
                 root | boot
         save-keymaps | boot
    save-termencoding | boot
            savecache |                        shutdown
                 sshd |      default
        stmpfiles-dev |                                 sysinit
      stmpfiles-setup | boot
                 swap | boot
               sysctl | boot
                sysfs |                                 sysinit
             sysklogd |      default
         termencoding | boot
                 udev |                                 sysinit
         udev-trigger |                                 sysinit
              urandom | boot
                  xdm |      default

# emerge -pv x11-misc/sddm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-misc/sddm-0.18.1-r5::gentoo  USE="elogind pam -systemd -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

_________________
- midnite.


Last edited by midnite on Fri Dec 24, 2021 7:46 pm; edited 3 times in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Wed Dec 22, 2021 3:21 pm    Post subject: Reply with quote

Try
Code:

emerge -1av gui-libs/display-manager-init sddm
dispatch-conf


and make sure in
Code:

/etc/conf.d/display-manager

you have
Code:

DISPLAYMANAGER="sddm"

IMPORTANT:
Enable "dbus"
Code:

rc-update add dbus default

_________________
:)
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Wed Dec 22, 2021 3:58 pm    Post subject: Reply with quote

alamahant,

Thank you for reply and help.

I have just emerge -1av gui-libs/display-manager-init and sddm, then dispatch-conf. Yes in /etc/conf.d/display-manager I always have CHECKVT=7 and DISPLAYMANAGER="sddm".

I have just also add dbus to default rc. dbus is having the status started. But display-manager is still crashed even I restart it, or reboot the PC.
_________________
- midnite.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Wed Dec 22, 2021 4:08 pm    Post subject: Reply with quote

Can you try with lightdm?
Replacing sddm with lightdm in /etc/conf.d/display-manager
Also in /var/log do you see any sddm log.
For example in my case there is a /var/log/lightdm directory.
Plz look at your sddm log if any.
Can you use startx to start plasma?
https://wiki.gentoo.org/wiki/KDE#Starting_Plasma
_________________
:)
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Wed Dec 22, 2021 4:45 pm    Post subject: Reply with quote

alamahant,

I think it may be a problem of me using the Nvidia 1650 display card. I am looking into the Kernel Mode Setting thing, as some say it may fix the sddm : Failed to read display number from pipe problem. I think KMS is a good thing as it will allow me to switch to Ctrl+Alt+F2 and back to Ctrl+Alt+F7 smoothly.

It is strange that I was using the same Nvidia 1650 card without issues, until a upgraded the kernel and did a few times emerge world.

Code:
# cat /var/log/sddm.log

... last few lines, as they were just repeating ...

[00:02:08.083] (II) DAEMON: Initializing...
[00:02:08.092] (II) DAEMON: Starting...
[00:02:08.093] (II) DAEMON: Logind interface found
[00:02:08.095] (II) DAEMON: Adding new display on vt 7 ...
[00:02:08.095] (II) DAEMON: Loading theme configuration from ""
[00:02:08.095] (II) DAEMON: Display server starting...
[00:02:08.096] (II) DAEMON: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{ad0b069b-faff-4e77-82ae-595448824f35} -background none -noreset -displayfd 17 -seat seat0 vt7
[00:02:08.136] (EE) DAEMON: Failed to read display number from pipe
[00:02:08.136] (EE) DAEMON: Display server failed to start. Exiting


Code:
# startx
hostname: Unknown host


X.Org X Server 1.20.14
X Protocol Version 11, Revision 0
Build Operating System: Linux 5.10.76-gentoo-r1 x86_64 Gentoo
Current Operating System: Linux gentoo_bazic 5.10.76-gentoo-r1 #2 SMP Tue Dec 21 08:10:47 HKT 2021 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-5.10.76-gentoo-r1 root=UUID=4da04402-e1b7-4b37-8db2-c11edde73bf8 ro
Build Date: 21 December 2021  01:47:33AM

Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Dec 23 00:20:02 2021
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

_________________
- midnite.


Last edited by midnite on Wed Dec 22, 2021 7:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Wed Dec 22, 2021 5:03 pm    Post subject: Reply with quote

Do you have an
/etc/X11/xorg.conf
file?
You need it for nvidia..
_________________
:)
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Wed Dec 22, 2021 5:25 pm    Post subject: Reply with quote

Oops I don't. But previously in plasma, it recognised my Nvidia display card, at least it shows the name of it.

Code:
# ls -la /etc/X11/
total 20
drwxr-xr-x  4 root root 4096 Dec 22 23:31 .
drwxr-xr-x 78 root root 4096 Dec 22 23:51 ..
-rwxr-xr-x  1 root root 1192 Aug 26 22:21 chooser.sh
drwxr-xr-x  2 root root 4096 Aug 26 22:21 Sessions
lrwxrwxrwx  1 root root   16 Dec 22 23:31 startDM.sh -> /usr/bin/startDM
drwxr-xr-x  3 root root 4096 Aug 26 22:21 xinit

_________________
- midnite.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Wed Dec 22, 2021 5:29 pm    Post subject: Reply with quote

Please create one with
nvidia-xconfig
_________________
:)
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Wed Dec 22, 2021 5:39 pm    Post subject: Reply with quote

Created. Reboot. Still DM status crashed.

Code:
% cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 470.86

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    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"
EndSection

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

_________________
- midnite.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Wed Dec 22, 2021 5:46 pm    Post subject: Reply with quote

Did you rebuild nvidia after updating the kernel?
Code:

emerge @module-rebuild

_________________
:)
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Wed Dec 22, 2021 5:54 pm    Post subject: Reply with quote

Not sure why the NVIDIA driver is not enabled in the kernel. Just enabled and rebuilding. Fingers-crossed. Thanks for helping!

https://wiki.gentoo.org/wiki/Xorg/Guide#NVIDIA
_________________
- midnite.
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Wed Dec 22, 2021 7:13 pm    Post subject: Reply with quote

I am trying to use the nouveau driver instead of the proprietary Nvidia driver. See below, does it mean nouveau does not support GTX 1650?

The nouveau website says it supports by NV167. But why my PC says it is an unknown chipset?

Code:
# cat /var/log/Xorg.0.log

... skipped the front part ...

[  1156.691] (II) LoadModule: "nouveau"
[  1156.691] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so
[  1156.691] (II) Module nouveau: vendor="X.Org Foundation"
[  1156.691]    compiled for 1.20.14, module version = 1.0.17
[  1156.691]    Module class: X.Org Video Driver
[  1156.691]    ABI class: X.Org Video Driver, version 24.1
[  1156.691] (II) NOUVEAU driver
[  1156.691] (II) NOUVEAU driver for NVIDIA chipset families :
[  1156.691]    RIVA TNT            (NV04)
[  1156.691]    RIVA TNT2           (NV05)
[  1156.692]    GeForce 256         (NV10)
[  1156.692]    GeForce 2           (NV11, NV15)
[  1156.692]    GeForce 4MX         (NV17, NV18)
[  1156.692]    GeForce 3           (NV20)
[  1156.692]    GeForce 4Ti         (NV25, NV28)
[  1156.692]    GeForce FX          (NV3x)
[  1156.692]    GeForce 6           (NV4x)
[  1156.692]    GeForce 7           (G7x)
[  1156.692]    GeForce 8           (G8x)
[  1156.692]    GeForce 9           (G9x)
[  1156.692]    GeForce GTX 2xx/3xx (GT2xx)
[  1156.692]    GeForce GTX 4xx/5xx (GFxxx)
[  1156.692]    GeForce GTX 6xx/7xx (GKxxx)
[  1156.692]    GeForce GTX 9xx     (GMxxx)
[  1156.692]    GeForce GTX 10xx    (GPxxx)
[  1156.704] (II) [drm] nouveau interface version: 1.3.1
[  1156.705] (EE) Unknown chipset: NV167
[  1156.705] (II) [drm] nouveau interface version: 1.3.1
[  1156.705] (EE) Unknown chipset: NV167
[  1156.705] (II) [drm] nouveau interface version: 1.3.1
[  1156.705] (EE) Unknown chipset: NV167
[  1156.705] (II) [drm] nouveau interface version: 1.3.1
[  1156.705] (EE) Unknown chipset: NV167
[  1156.705] (EE) No devices detected.
[  1156.705] (EE)
Fatal server error:
[  1156.705] (EE) no screens found(EE)
[  1156.705] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[  1156.705] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  1156.705] (EE)
[  1156.729] (EE) Server terminated with error (1). Closing log file.

_________________
- midnite.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1652

PostPosted: Wed Dec 22, 2021 8:00 pm    Post subject: Reply with quote

midnite wrote:
I am trying to use the nouveau driver instead of the proprietary Nvidia driver. See below, does it mean nouveau does not support GTX 1650?

The nouveau website says it supports by NV167. But why my PC says it is an unknown chipset?


It may be the case that the kernel part is done. However the xorg DDX driver seems to be lagging behind with only Pascal based systems as their max and very few commits in the past 2 years.
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Thu Dec 23, 2021 9:32 am    Post subject: Reply with quote

Thanks grknight. It appears that nouveau does not support GTX 1650 (NV167) yet.

So I just followed the Gentoo Nvidia drivers guide to configure to use the proprietary Nvidia drivers. However I still cannot do startx.

Code:
# startx
# less /var/log/Xorg.0.log

... the last few error lines ...

[  3542.867] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[  3542.867] (EE) NVIDIA:     system's kernel log for additional error messages and
[  3542.867] (EE) NVIDIA:     consult the NVIDIA README for details.
[  3542.867] (EE) No devices detected.
[  3542.867] (EE)
Fatal server error:
[  3542.867] (EE) no screens found(EE)
[  3542.867] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[  3542.867] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  3542.867] (EE)
[  3542.878] (EE) Server terminated with error (1). Closing log file.


After I recompiled the kernel, genkernel initramfs, updated /etc/portage/make.conf to VIDEO_CARDS="nvidia", changed /etc/X11/xorg.conf to Driver "nvidia", then emerge pulled in the new video card configurations, while removing nouveau. And rebooted.

I found it is weird that I do not have the nvidia.ko module(s). Is it possible that the proprietary Nvidia driver not yet supports the gentoo kernel 5.10.76?

How to check which versions of kernel do the proprietary Nvidia driver support?

Code:
# find /lib/modules/5.10.52-gentoo/ -type f -iname '*.o' -or -iname '*.ko' | grep nvidia
/lib/modules/5.10.52-gentoo/video/nvidia-peermem.ko
/lib/modules/5.10.52-gentoo/video/nvidia-drm.ko
/lib/modules/5.10.52-gentoo/video/nvidia-modeset.ko
/lib/modules/5.10.52-gentoo/video/nvidia.ko
/lib/modules/5.10.52-gentoo/video/nvidia-uvm.ko

# find /lib/modules/5.10.76-gentoo-r1/ -type f -iname '*.o' -or -iname '*.ko' | grep nvidia
# (nothing found)

# modprobe nvidia
modprobe: ERROR: could not find module by name='nvidia'
modprobe: ERROR: could not insert 'nvidia': Unknown symbol in module, or unknown parameter (see dmesg)

# dmesg | grep nvidia
# (nothing found)


https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers wrote:
When a new, incompatible kernel version is released, it is probably best to stick with the newest supported kernel for a while. NVIDIA usually takes a few weeks to prepare a new proprietary release they think is fit for general use. Just be patient.


I do not mind using not the newest kernel. But I cannot get back the 5.10.52 source anymore.

FYI I have checked Nvidia driver version 470.86 supports my card GeForce GTX 1650.

Code:
# emerge --search nvidia-drivers
[ Results for search key : nvidia-drivers ]
Searching...

*  x11-drivers/nvidia-drivers
      Latest version available: 470.86-r2
      Latest version installed: 470.86-r2
      Size of files: 268,118 KiB
      Homepage:      https://www.nvidia.com/download/index.aspx
      Description:   NVIDIA Accelerated Graphics Driver
      License:       NVIDIA-r2 GPL-2 MIT ZLIB

[ Applications found : 1 ]


PS - display-manager is not crashed anymore.
Code:
# /etc/init.d/display-manager status
 * status: started


Big thanks again to all the helps!!
_________________
- midnite.
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Fri Dec 24, 2021 7:43 pm    Post subject: Reply with quote

Dear all who have been generously helping me,

The good news is, after I emerge -eva nvidia-drivers, I can get back into KDE Plasma now. Everything in Plasma is running normal. It recognises my Nvidia GeForce GTX 1650 as before. It is like a good Christmas present to me. Thank you very much!

The emerge -eva nvidia-drivers took literally 30+ hours. I am not sure how it fixed my issue. Nevertheless, I can continue my work in GUI (after Christmas).

PS - Nouveau should be supporting GTX 1650. I will try switching to nouveau later.

These issues took me a week. But I have learnt a lot along the way. Thanks again to all the amazing guys who have been with me. You are my HEROES!!

Merry Christmas & Best Regards,
_________________
- midnite.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Dec 24, 2021 8:52 pm    Post subject: Reply with quote

Oh brother ... All you had to do was to make up your mind whether to use nouveau or proprietary driver, then set VIDEO_CARDS="nvidia" and run world update. A matter of minutes, not hours.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Fri Dec 24, 2021 9:28 pm    Post subject: Reply with quote

Jaglover,

I did. But it did not work.

I guess it is because I was using nivdia-drivers when I was at the old kernel. (I do not remember it. But in the configures it seems so.) Then I lost the old kernel source by emerge --depclean. After upgrade to new kernel, I opt to use nouveau. Yes I have problem with this. But now I am sure nouveau supports my card, I will try it later. I prefer nouveau.

As I read somewhere, the nivdia-drivers is compiling against the kernel souce. I had times that old source is missing, dangling symlink, unbuilt new source. I guess these made me switching back from nouveau to proprietary fails again.

Anyway, now I am using slot to keep the old kernel source just in case.
_________________
- midnite.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Dec 24, 2021 10:03 pm    Post subject: Reply with quote

You can re-emerge kernel sources any time, your .config was not cleaned out by depclean. Regarding nouveau vs. blob I have to say it depends. With nouveau you cannot use video hardware encoding with CUDA, for instance.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Sat Dec 25, 2021 2:37 am    Post subject: Reply with quote

I was using 5.10.52 and unintentionally upgraded to 5.10.76-r1. Unfortunately 5.10.52 is no longer available through emerge.

Now I know 5.10.x are both the same kernel just with more security patches. Now I know the problem must be elsewhere. But I did not know about it and just wanted to roll back to a working stage.

Thanks for the remark about nouveau.
_________________
- midnite.
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Tue Dec 28, 2021 5:59 pm    Post subject: Reply with quote

For your information, I have just updated the kernel from 5.10.76-r1 to 5.10.88. There is absolutely no new options in the kernel config between these two subversions. However KDE Plasma refused to start after a reboot. startx did not work neither. The log message was like "nvidia cannot find my screens" or so *.

It was fixed after a emerge -av nvidia-drivers. I am not sure the reason but as the gentoo nvidia wiki says (the nvidia-drivers) will compile against the Linux kernel. I guess we have to re-compile the nvidia-drivers after a kernel upgrade/change.

* It seems it only keeps the latest log, so I cannot trace back the exact error happened a few boots ago.
* Yes I am using the proprietary nvidia-drives at the moment.
_________________
- midnite.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Dec 28, 2021 6:22 pm    Post subject: Reply with quote

The command to rebuild modules is 'emerge @module-rebuild'. You should not emerge nvidia-drivers as you did, now it is in your world file. In properly configured Gentoo system the drivers are pulled in automatically. VIDEO_CARDS="nvidia" - this is the variable which controls it. Polluted world file can and will lead to weird conflicts and updating problems.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Tue Dec 28, 2021 6:52 pm    Post subject: Reply with quote

Dear Jaglover,

Thank you for reply. I will use emerge @module-rebuild next time.

x11-drivers/nvidia-drivers is already in my world file after setup. Will it be a problem? Should I emerge --deselect nvidia-drivers?

Yes I have VIDEO_CARDS="nvidia" in /etc/portage/make.conf .

I am not sure if this is a problem that I cannot find the nvidia.ko file. But it seems working normally.

Oh yes I have over-read the important note in the gentoo nvidia wiki. Thanks Jaglover again.

https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers wrote:
Important
Every time a kernel is built, it is necessary to reinstall the NVIDIA kernel modules. An easy way to rebuild the modules installed by ebuilds (such as x11-drivers/nvidia-drivers) is to run emerge @module-rebuild.

_________________
- midnite.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Dec 28, 2021 7:34 pm    Post subject: Reply with quote

The world file should contain only packages you have directly installed. Dependencies do not belong there. You could back up your world file and then use a text editor do delete all lines which do not belong there. Followed by 'emerge -ac'.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
midnite
Guru
Guru


Joined: 09 Apr 2006
Posts: 435
Location: Hong Kong

PostPosted: Tue Dec 28, 2021 7:52 pm    Post subject: Reply with quote

But I do need nvidia-drivers. So it is no harm to have it in the world file, is it?
_________________
- midnite.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2717

PostPosted: Tue Dec 28, 2021 8:08 pm    Post subject: Reply with quote

midnite wrote:
It was fixed after a emerge -av nvidia-drivers. I am not sure the reason but as the gentoo nvidia wiki says (the nvidia-drivers) will compile against the Linux kernel. I guess we have to re-compile the nvidia-drivers after a kernel upgrade/change.
On a side-note, given this is a recurring issue (even though it's not specific to nvidia-drivers, but any out-of-tree modules), I decided to add this that will be displayed the first time install nvidia-drivers from now on (and later available in /usr/share/doc/nvidia-drivers*/README.gentoo*):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3742a22fe46420b694bb5b550341956ccfdd93aa

As it mentions, an alternate route to re-emering manually is using distribution kernels that give you a built kernel rather than just sources (also mentioned in the handbook), and then adding dist-kernel to your make.conf's global USE. This will cause nvidia-drivers to be automatically rebuilt when upgrading the kernel. This is a newer way to do things, so it tend not to get used as much or be well known.

Quote:
But I do need nvidia-drivers. So it is no harm to have it in the world file, is it?
It's fine, although still generally good practice to not have "dependencies" in your world file and rather only applications you use directly (e.g. a web browser rather than all the libraries/drivers it uses).

In this case VIDEO_CARDS=nvidia tells xorg-drivers package to keep nvidia-drivers installed already (and will remove it if you change that to another card). And if for example a brand new shiny nvidia-better-drivers package was added it may give confusing errors and may have to update your world file.. not that it's happening but well :)
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
Goto page 1, 2  Next
Page 1 of 2

 
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