Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] UEFI, nvidia - made simple(fb)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5801
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Thu Mar 19, 2015 10:28 pm    Post subject: [HOWTO] UEFI, nvidia - made simple(fb) Reply with quote

So you want to install nvidia-drivers on an UEFI PC ?


Oftentimes when attempting to do that - one gets to one conclusion:


"One does not simply install nvidia-drivers on an UEFI system"


Yeah, well - that was at least my experience and the one of several other wanderers along the path to the promised land of "The Way It's Meant to be Played ™"



Hi guys,


when you're transitioning from a BIOS based PC to a UEFI based one,

setting up the bootloader, adding an entry to UEFI and getting it to boot up at all can be quite a chore - it took me a week to understand how all works & to collect the information of the EFI boot partition

(what a noob ! - yeah yeah :lol: )

(see http://forums.gentoo.org/viewtopic-t-992002-view-next.html)


After the dust has settled of setting up your bootloader & once you're able to boot into your new shiny installation (or if you've made a stage4 tarball of your old system and transitioned e.g. from very-old Intel to Ubercool new Intel cpu),

the main action part of the fun (emerge world) firstly begins here :)


So you want to install the proprietary nvidia-drivers to savor some Triple A Steam games (like Metro 2033 Redux, Metro: Last Light Redux, Bioshock Infinite, ...) and cherish the power of Linux gaming ?

This can be quite troublesome since there are several ways to do it:

- uvesafb + nvidia-drivers
- efifb + nvidia-drivers
- simplefb + nvidia-drivers
- ...

and probably several more options I haven't considered


Well, if you don't have to insist on having shiny high-res boot-up graphics right from the start - let's just settle with the KISS (keep it simple, stupid) option and settle with simplefb for now


Provided of course that you can live with the following error message:

Quote:
[ 18.354144] NVRM: Your system is not currently configured to drive a VGA console
[ 18.354148] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[ 18.354150] NVRM: requires the use of a text-mode VGA console. Use of other console
[ 18.354151] NVRM: drivers including, but not limited to, vesafb, may result in
[ 18.354153] NVRM: corruption and stability problems, and is not supported.




Once you're finished with compiling through your system and fine-tuning it, you can get into the gory act of attempting to get uvesafb running :wink:

(uvesafb didn't always work for me - so it was quite a relief to have simplefb)



So what do we need to get this running ? (long version)


For short version: http://forums.gentoo.org/viewtopic-p-7719338.html#7719338




Kernel configuration:

zcat /proc/config.gz | grep -i CONFIG_FB wrote:
Framebuffer Devices


Code:

CONFIG_FB=y
CONFIG_FB_CMDLINE=y
# CONFIG_FB_DDC is not set
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_VESA is not set
# CONFIG_FB_EFI is not set
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I740 is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_INTEL is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_SMSCUFX is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
# CONFIG_FB_AUO_K190X is not set
CONFIG_FB_SIMPLE=y



zcat /proc/config.gz | grep -i CONFIG_DRM wrote:
DRM - Direct Rendering Manager (Opensource Acceleration

Code:

# CONFIG_DRM is not set


Kernel permissions:

Code:
chmod -R go+rX /usr/src/linux-3.19


Code:
chmod 755 /lib/modules/3.19/


otherwise it's possible that you'll get an error message that files in /usr/src/linux/include can't be read

or some other kernel version thingy



Mesa configuration:

Quote:
eselect opengl list
Available OpenGL implementations:
[1] nvidia *
[2] xorg-x11


if the nvidia mesa implementation is at 1

Code:
eselect opengl set 1



X-Server configuration:

http://wiki.gentoo.org/wiki/NVidia/nvidia-drivers#The_X_server

Code:
Section "Device"
   Identifier  "nvidia"
   Driver      "nvidia"
 EndSection



Sample xorg.conf wrote:
the one I'm currently using


(Since evdev several months before decided to stop playing fair - probably due to switching to eudev, udev and all this systemd-related mess; I'm using the kbd and mouse drivers)


Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 331.38  (buildmeister@swio-display-x64-rhel04-15)  Wed Jan  8 19:53:14 PST 2014

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"
        Option          "XkbRules"      "xorg"
        Option          "XbkModel"      "pc105"
        Option          "XkbLayout"     "de"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
##    Option      "GlyphCache"            "1"
##    Option      "InitialPixmapPlacement"   "2"
##    Option      "DamageEvents"             "1"
EndSection

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





Bootloader (aka kernel append option):


append the following to your kernel parameters:

Code:
console=tty1 nomodeset

_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r3
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D


Last edited by kernelOfTruth on Thu Mar 19, 2015 11:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5801
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Thu Mar 19, 2015 11:05 pm    Post subject: Reply with quote

Tl;dr (aka Checklist)

* Kernel configuration

Device Drivers -> Graphics support ->

Code:
< > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)


(de-selected)

Device Drivers -> Graphics support -> Frame buffer Devices ->

Code:
[*] Enable Video Mode Handling Helpers
[*] Enable Tile Blitting Support
[*] Simple framebuffer support


* Kernel permissions

* Mesa (eselect mesa)

* X-Server configuration (xorg.conf)

* Bootloader

Code:
console=tty1 nomodeset

_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r3
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
poncho
n00b
n00b


Joined: 06 Mar 2011
Posts: 69

PostPosted: Fri Mar 20, 2015 12:00 pm    Post subject: Reply with quote

It should be possible to enable CONFIG_DRM and skip the "X-Server configuration" part.

Code:
cat /usr/share/X11/xorg.conf.d/50-nvidia-drm-outputclass.conf
# This xorg.conf.d configuration snippet configures the X server to
# automatically load the nvidia driver when it detects a device driven by the
# nvidia.ko kernel module.  Please note that this only works on Linux kernels
# version 3.9 or higher with CONFIG_DRM enabled, and only if the nvidia.ko
# kernel module is loaded before the X server is started.

Section "OutputClass"
    Identifier     "nvidia"
    MatchDriver    "nvidia-drm"
    Driver         "nvidia"
EndSection
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5801
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Fri Mar 20, 2015 1:11 pm    Post subject: Reply with quote

Thanks for your input poncho !

good to know that it would work with that enabled

well, your approach is close to the way Ubuntu or Debian do it (nouveau, etc. kernel modules ARE compiled - the kernel is NOT changed during installation

and allows for a greater flexibility since you only need to blacklist the kernel modules).

It comes down what the user's preferred way of doing things is.



The gentoo wiki does show this same way or the way that was pointed out to me in the past,

and I'm following that since it has worked fine so far,

also there's less confusion and more clarity (you're only going for the one approach),

later on don't need to un-blacklist the kernel modules, etc.



https://wiki.gentoo.org/wiki/NVidia/nvidia-drivers#Direct_rendering_is_not_enabled wrote:
Direct rendering is not enabled
If direct rendering does not work, it may be because the kernel has Direct Rendering Manager enabled, which conflicts with the driver. See the direct rendering status by following instructions in the section Testing the card.

First, disable Direct Rendering Manager (CONFIG_DRM) in the kernel :



Code:
Disabling Direct Rendering Manager
Device drivers --->
    Graphics support --->
        < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.3.0-r3
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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