LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Nvidia driver + KMS for native boot resolution? (https://www.linuxquestions.org/questions/slackware-14/nvidia-driver-kms-for-native-boot-resolution-4175608486/)

coralfang 06-23-2017 02:50 PM

Nvidia driver + KMS for native boot resolution?
 
Nvidia's own driver has supported KMS for a while now i believe, and i've tried reading up on a few other Distro's wiki (particularly Arch and Gentoo's), and came to the conclusion that i should add these modules to my initrd:


Quote:

nvidia
nvidia_modeset
nvidia_uvm
nvidia_drm
I commented out the VGA setting in my /etc/lilo.conf which was previously set to VGA=792 (not native resolution).

Then rebuilt my initrd using this:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh  -m nvidia:nvidia_modeset:nvidia_uvm:nvidia_drm
Running the suggested from the helper adds a bunch of fbdev/nvidia modules:
Code:

OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/xhci-pci.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/ohci-hcd.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/ohci-pci.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/ehci-pci.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/uhci-hcd.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/usbhid/usbhid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/i2c/i2c-core.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/i2c-hid/i2c-hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-generic.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-cherry.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-logitech.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-logitech-dj.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-logitech-hidpp.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-lenovo.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-microsoft.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/hid/hid-multitouch.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/fs/mbcache.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/fs/mbcache.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/fs/ext4/ext4.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/i2c/i2c-core.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/i2c/i2c-core.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia-modeset.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/i2c/i2c-core.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia-uvm.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/i2c/i2c-core.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/fbdev/core/sysimgblt.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/fbdev/core/sysfillrect.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/fbdev/core/syscopyarea.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/fbdev/core/fb_sys_fops.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/char/agp/agpgart.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/gpu/drm/drm.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/gpu/drm/drm_kms_helper.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia-modeset.ko added.
OK: /lib/modules/4.12.0-rc5/kernel/drivers/video/nvidia-drm.ko added.

Then i reran /sbin/lilo and rebooted, but the resolution is low (large text). What am i missing to get this working?

For instance, when using the nouveau driver, the boot process will have smaller text on a 1920x1080 display for example, quite early in the boot process. I am trying to use the KMS within Nvidia's own driver for the same effect.

Does anyone know how to solve this?

chris.willing 06-24-2017 02:03 AM

Quote:

Originally Posted by coralfang (Post 5726295)
Nvidia's own driver has supported KMS for a while now i believe, and i've tried reading up on a few other Distro's wiki (particularly Arch and Gentoo's), and came to the conclusion that i should add these modules to my initrd:

I commented out the VGA setting in my /etc/lilo.conf which was previously set to VGA=792 (not native resolution).

Did you set a new, higher resolution code to replace it?

To find a suitable VESA code that your hardware supports, first enter some bogus setting e.g. vga = 123 (and run lilo). When you reboot you'll be told that that is an unsupported code and invite you to (amongst other options) hit the ENTER key to see a list of valid codes. Enter (and remember) the code you want and when bootup finishes, enter the new code into lilo.conf and don't forget to run lilo afterward to ensure the new setting takes effect.

chris

chris.willing 06-24-2017 02:12 AM

And here's a quicker way to find the supported modes (as root):
Code:

/usr/sbin/hwinfo --framebuffer
chris

v8dave 06-24-2017 04:58 AM

Which Slackware package contains this hwinfo of which you speak ?

phenixia2003 06-24-2017 05:11 AM

Hello,

hwinfo can be found here.

--
SeB

chris.willing 06-24-2017 05:21 AM

Yes I forgot - as phenixia2003 says, it's from the SBo hwinfo package. Sorry about that.

chris

phenixia2003 06-24-2017 05:56 AM

Hello,

According to this post and this note, it seems that nvidia kms does not support fbdev :

Quote:

Note: The NVIDIA driver does not provide an fbdev driver for the high-resolution console for the kernel compiled-in vesafb module. However, the kernel compiled-in efifb module supports high-resolution nvidia console on EFI systems.[1] Another option to get high-resolution consoles is to use GRUB, see NVIDIA/Tips and tricks#Fixing terminal resolution and [2].
--
SeB

coralfang 06-24-2017 02:53 PM

Quote:

Originally Posted by phenixia2003 (Post 5726549)
Hello,

According to this post and this note, it seems that nvidia kms does not support fbdev :



--
SeB

Ah, so it still isn't really supported then. Looking through that thread i see some things i've also tried like nvidia-drm.modeset=1 with no luck, so i guess it still lacks fbdev support.

As for choosing VGA setting. I'd gotten VGA=792 from years ago using something like hwinfo, and always found that value to be the best approximate fit for a 1920x1080 display.

Suppose we still have to wait for nvidia to add proper support. Thanks though.

coralfang 06-24-2017 03:31 PM

Alright, my output on hwinfo contains this:
Code:

# /usr/sbin/hwinfo --framebuffer
02: None 00.0: 11001 VESA Framebuffer                         
  [Created at bios.459]
  Unique ID: rdCR.KwpZt39d_L2
  Hardware Class: framebuffer
  Model: "NVIDIA GK106 Board - 20100015"
  Vendor: "NVIDIA Corporation"
  Device: "GK106 Board - 20100015"
  SubVendor: "NVIDIA"
  SubDevice:
  Revision: "Chip Rev"
  Memory Size: 14 MB
  Memory Range: 0x01000000-0x01dfffff (rw)
  Mode 0x0300: 640x400 (+640), 8 bits
  Mode 0x0301: 640x480 (+640), 8 bits
  Mode 0x0303: 800x600 (+800), 8 bits
  Mode 0x0305: 1024x768 (+1024), 8 bits
  Mode 0x0307: 1280x1024 (+1280), 8 bits
  Mode 0x030e: 320x200 (+640), 16 bits
  Mode 0x030f: 320x200 (+1280), 24 bits
  Mode 0x0311: 640x480 (+1280), 16 bits
  Mode 0x0312: 640x480 (+2560), 24 bits
  Mode 0x0314: 800x600 (+1600), 16 bits
  Mode 0x0315: 800x600 (+3200), 24 bits
  Mode 0x0317: 1024x768 (+2048), 16 bits
  Mode 0x0318: 1024x768 (+4096), 24 bits
  Mode 0x031a: 1280x1024 (+2560), 16 bits
  Mode 0x031b: 1280x1024 (+5120), 24 bits
  Mode 0x0330: 320x200 (+320), 8 bits
  Mode 0x0331: 320x400 (+320), 8 bits
  Mode 0x0332: 320x400 (+640), 16 bits
  Mode 0x0333: 320x400 (+1280), 24 bits
  Mode 0x0334: 320x240 (+320), 8 bits
  Mode 0x0335: 320x240 (+640), 16 bits
  Mode 0x0336: 320x240 (+1280), 24 bits
  Mode 0x033d: 640x400 (+1280), 16 bits
  Mode 0x033e: 640x400 (+2560), 24 bits
  Mode 0x0345: 1600x1200 (+1600), 8 bits
  Mode 0x0346: 1600x1200 (+3200), 16 bits
  Mode 0x034a: 1600x1200 (+6400), 24 bits
  Mode 0x034b: 1920x1080 (+1920), 8 bits
  Mode 0x034c: 1920x1080 (+3840), 16 bits
  Mode 0x034d: 1920x1080 (+7680), 24 bits
  Mode 0x0360: 1280x800 (+1280), 8 bits
  Mode 0x0361: 1280x800 (+5120), 24 bits
  Config Status: cfg=new, avail=yes, need=no, active=unknown

How do i use these values?

For instance:
Code:

  Mode 0x034d: 1920x1080 (+7680), 24 bits
Would that be:
Code:

VGA=0x034d
Or do i need to convert that value to something like VGA=792 ?

chris.willing 06-24-2017 05:42 PM

Quote:

Originally Posted by coralfang (Post 5726720)
For instance:
Code:

  Mode 0x034d: 1920x1080 (+7680), 24 bits
Would that be:
Code:

VGA=0x034d
Or do i need to convert that value to something like VGA=792 ?

I use the hex format for machines using lilo, since that's how they're referred to in /etc/lilo.conf_example.

BTW, I think decimal for 0x034d would be 845 (not 792, which would be 0x318 i.e. 1024x768x24)

chris

coralfang 06-24-2017 08:30 PM

Thanks, either way works. For some reason though, when booting, the framebuffer has a black border of about an inch or two.

As soon as i "startx" and then switch to a tty, the resolution has changed and my shell prompt now appears at the actual edge of the screen. Not sure why that happens, but it's nicer having a higher resolution however.

enorbet 06-25-2017 09:36 PM

I'm curious as to what advantage you think you get by using anything more complex than nVidia's own installer outside of X in CLI?

chris.willing 06-25-2017 09:58 PM

Quote:

Originally Posted by enorbet (Post 5727143)
I'm curious as to what advantage you think you get by using anything more complex than nVidia's own installer outside of X in CLI?

I can't speak for OP but one reason I have looked into this previously myself was a situation where the normal boot time information on screen (before X runs) disappeared. As it was a novel design (at the time) with 14 screens across 4 graphics cards in a previously untried mobo, as well as it being my first exposure to UEFI, I was pretty keen to see all the boot time output I could. It was OK if X came up but if it didn't there wasn't much I could do without seeing what errors had occurred - not to mention invisible console.

A more common need/desire is for a higher resolution fame buffer than the default while booting (like nouveau driver provides).

chris

coralfang 06-26-2017 01:45 AM

Along with the resolution being set correctly, the console output is very sluggish using VGA settings higher than the default, and there's alot of flicker when watching videos with mplayer for example. I would assume that behaviour would go away if you could get the same behaviour as what the nouveau driver does on the console.

Daedra 06-26-2017 02:11 AM

Quote:

Originally Posted by coralfang (Post 5727186)
Along with the resolution being set correctly, the console output is very sluggish using VGA settings higher than the default, and there's alot of flicker when watching videos with mplayer for example. I would assume that behaviour would go away if you could get the same behaviour as what the nouveau driver does on the console.

When you say sluggish are referring to it being very slow to respond, for instance scrolling or when you're compiling a program on console?


All times are GMT -5. The time now is 11:29 PM.