Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Use nouveau for framebuffer, unload, use nvidia for X - ????
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Thu Jul 26, 2018 1:47 am    Post subject: Use nouveau for framebuffer, unload, use nvidia for X - ???? Reply with quote

I have searched, and cannot find any information to allow me to use the nouveau module to load my framebuffer (since the nvidia driver does not do this) an then unload nouveau when I start X.

How do I initiate the nouveau module right away in the boot process then kill it when I launch X?
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 537
Location: Romania

PostPosted: Thu Jul 26, 2018 2:24 am    Post subject: Reply with quote

let's start with the basics. kernel version. board version. etc.
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Thu Jul 26, 2018 2:36 am    Post subject: Reply with quote

4.17.8-gentoo

I am using an nVidia GTX 1080 card. EFIFB gives me a framebuffer at a max of 1280x1024. When I build nouveau into the kernel, I can get a framebuffer at 4k but no nvidia-driver love for X.

I currently have nouveau selected as a module, but blacklisted at boot so I can use X. I am guessing there is a way to load the nouveau module early enough to get the console resolution at 4k and then unload nouveau and then load nvidia-driver if/when I want to start X?
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 537
Location: Romania

PostPosted: Thu Jul 26, 2018 2:49 am    Post subject: Reply with quote

modprobe.blacklist=nouveau modprobe.blacklist=nvidia.

you can set those in the bootloader as kernel parameters. and use best of both systems. as long as it works and you remember to switch eselect opengl/cl.
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Thu Jul 26, 2018 3:09 am    Post subject: Reply with quote

But I want nouveau to load to get the high res framebuffer, right?

For some reason, when I blacklist nvidia and not nouveau, my boot hangs. Are there any other options for a high res console with nvidia and EFI?
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 537
Location: Romania

PostPosted: Thu Jul 26, 2018 3:25 am    Post subject: Reply with quote

returnof Snekiepete wrote:
But I want nouveau to load to get the high res framebuffer, right?

For some reason, when I blacklist nvidia and not nouveau, my boot hangs. Are there any other options for a high res console with nvidia and EFI?


https://bugzilla.kernel.org/show_bug.cgi?id=199853

try kernels bellow 4.12.10. not sure it's gonna help...
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Thu Jul 26, 2018 4:51 am    Post subject: Re: Use nouveau for framebuffer, unload, use nvidia for X - Reply with quote

returnof Snekiepete wrote:
I have searched, and cannot find any information to allow me to use the nouveau module to load my framebuffer (since the nvidia driver does not do this) an then unload nouveau when I start X.

How do I initiate the nouveau module right away in the boot process then kill it when I launch X?


There are a couple of kludgy ways to do it using module switching and scripts, but I avoided all that by using fb_efi and then launching my kernel in graphical mode using rEFInd. Not sure how you would do this using Grub, or whatever launching methodology you have chosen. I use rEFI to set the fb to 1920 x 1080.

My kernel has only dri, generic fb and fb_efi. I set my fb to 1080p using rEFInd, then it launches my efistub kernels in graphical mode. I suppose you could do the same thing using Grub. This has worked for kernels from 4.9 up to my current 4.17.6
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Fri Jul 27, 2018 2:32 am    Post subject: Reply with quote

I am just not smart enough to figure out rEFInd... It looks pretty cool - but moving from grub to it isn't working for me. I can't fathom that in 2018 this is such a difficult task to get a working framebuffer on such a fancy graphics card
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Fri Jul 27, 2018 3:39 am    Post subject: Reply with quote

returnof Snekiepete wrote:
I am just not smart enough to figure out rEFInd... It looks pretty cool - but moving from grub to it isn't working for me. I can't fathom that in 2018 this is such a difficult task to get a working framebuffer on such a fancy graphics card


Give rEFInd a try and post in this thread when you get stuck, or pass the graphical boot option to your kernel via Grub. I spent quite a bit of time seeking what you are, hi res console and nvidia-drivers for X. Should be do-able. Don't give up. Struggling is how you learn these things.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 152

PostPosted: Sun Jul 29, 2018 8:24 am    Post subject: Reply with quote

bammbamm808 wrote:
[...] pass the graphical boot option to your kernel via Grub. I spent quite a bit of time seeking what you are, hi res console and nvidia-drivers for X. Should be do-able.

Wait, returnof Snekiepete, is getting your FB to be at a higher resolution all you're trying to do? Loading nouveau and nvidia-driver for FB and X respectively seems a bit much for the task. I have EFI FB as my only framebuffer compiled in kernel and I use GRUB2 as my bootloader, all I need to do to get a 1920x1080 resolution for the console is to set the desired resolution in /etc/defaults/grub on the GRUB_GFXMODE line, i.e.
Code:
GRUB_GFXMODE=1920x1080x32,640x480x32,auto
(640x480 and auto were the defaults, I left them there as a fallback)

Try that before getting yourself into a world of headache with loading different display drivers at runtime; my first guess would be starting at .xinit with unloading nouveau and loading nvidia-drivers.
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

===
I refuse to move on from GTK+2.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Sun Jul 29, 2018 8:44 am    Post subject: Reply with quote

Marcih wrote:
bammbamm808 wrote:
[...] pass the graphical boot option to your kernel via Grub. I spent quite a bit of time seeking what you are, hi res console and nvidia-drivers for X. Should be do-able.

Wait, returnof Snekiepete, is getting your FB to be at a higher resolution all you're trying to do? Loading nouveau and nvidia-driver for FB and X respectively seems a bit much for the task. I have EFI FB as my only framebuffer compiled in kernel and I use GRUB2 as my bootloader, all I need to do to get a 1920x1080 resolution for the console is to set the desired resolution in /etc/defaults/grub on the GRUB_GFXMODE line, i.e.
Code:
GRUB_GFXMODE=1920x1080x32,640x480x32,auto
(640x480 and auto were the defaults, I left them there as a fallback)

Try that before getting yourself into a world of headache with loading different display drivers at runtime; my first guess would be starting at .xinit with unloading nouveau and loading nvidia-drivers.


Even better. I was unable to use higher resolutions in my board's efifb without 'use_graphics_for linux' in my refind.conf. Is that down to each board's UEFI firmware?
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Wed Aug 01, 2018 1:55 am    Post subject: Reply with quote

I did try the Grub method described above, unfortunately, the highest I can get from that is 1280x1024. I am going to give the rEFInd option another shot this weekend.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Wed Aug 01, 2018 3:43 am    Post subject: Reply with quote

returnof Snekiepete wrote:
I did try the Grub method described above, unfortunately, the highest I can get from that is 1280x1024. I am going to give the rEFInd option another shot this weekend.


I dont know how to configure grub since I moved to rEFInd once I had UEFI hardware, but compile efistub support into your kernels and copy them to /boot. Emerge rEFInd or install manually. With luck, you will only have to edit /boot/refind_linux.conf to point to your rootfs, and if needed, pass 'nomodeset' to your kernel. If this gets you booting, albeit at a lower resolution, adding 'use_graphics_for linux' to /boot/efi/EFI/refind.conf, and setting your desired resolution, will hopefully get you what you're after. Your exact efi partition structure might be a bit different, but rEFInd more or less searches /boot and subdirectories, at a minimum, anyway.

Get back to us with your progress.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Sun Aug 26, 2018 2:33 pm    Post subject: Reply with quote

I finally had a chance to get rEFInd up and running. I am still only getting 1280x1024 throughout the boot process. When rEFInd starts, it yells at me only allowing resolution up the the 1280x1024. I have the 'use_graphics_for linux' set and the only options I have selected in the kernel are efifb.

Maybe the 1280 res is the best I will be able to get? When I use Nouveau I can get the 4k console, but as known, no nvidia blob for X.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sun Aug 26, 2018 3:44 pm    Post subject: Reply with quote

I have currently no nVidia hardware, but last time I used the blob I remember it had its own KMS module. If it still exists you may need to force its loading.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Sun Aug 26, 2018 3:56 pm    Post subject: Reply with quote

I am halfway there with my original path. If I enable the nouveau module in the kernel and blacklist the nvidia modules I get the nice console resolution. Then I can

Code:
rmmod nouveau -f & modprobe nvidia & rc-service xdm start


And I get to my lightdm login. So I am thinking this will be simple to automate on the front end. However, getting back out of X has proven challenging.

I have tried

Code:
killall X & rmmod nvidia_modeset nvidia_drm nvidia -f & modprobe nouveau


BUt, it's not working for logout/reboot.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Sun Aug 26, 2018 9:33 pm    Post subject: Reply with quote

What prebuilt/motherboard do you have?
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Sun Aug 26, 2018 9:41 pm    Post subject: Reply with quote

MSI Z370 SLI Plus
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Mon Aug 27, 2018 4:48 pm    Post subject: Reply with quote

I set this all up a while ago. I will go through my .config and my rEFInd config files to see if there is anything else that might help.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Mon Aug 27, 2018 9:57 pm    Post subject: Reply with quote

Thanks bammbamm! I reviewed your config files in another post, but couldn't get this figured out. Is it a limitation of the motherboard?
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Mon Aug 27, 2018 11:37 pm    Post subject: Reply with quote

returnof Snekiepete wrote:
Thanks bammbamm! I reviewed your config files in another post, but couldn't get this figured out. Is it a limitation of the motherboard?


Im thinking it might be. Perhaps that is all your UEFI implementation allows. I'll post back after I've reviewed all the pertinent configuration on my system.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Tue Aug 28, 2018 7:35 am    Post subject: Reply with quote

(Self-replied so that OP would be notified of new post)



Kernel version is 4.17.6-gentoo with experimenal use flag set. In my kernel, I have:

<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->

[*] Enable legacy fbdev support for your modesetting driver


#under framebuffer devices:

[*] EFI-based Framebuffer Support



In /boot/efi/EFI/refind/refind.conf, I have threse

resoolution 1920 1080
use_graphics_for linux


I'm also starting with 'nomodeset" because without it, I get no display as the kernel initializes. This is passed via /boot/refind_linux.conf

Your efi tree might vary. Adjust as needed.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
returnof Snekiepete
n00b
n00b


Joined: 22 Dec 2016
Posts: 29

PostPosted: Wed Aug 29, 2018 12:44 am    Post subject: Reply with quote

I feel silly, but I have this figured out. I set the BIOS to UEFI mode only (selecting in the OS section Windows 10 WHQL support. My bios even looks much cooler now as well! Thanks for all the help!
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Wed Aug 29, 2018 2:41 am    Post subject: Reply with quote

returnof Snekiepete wrote:
I feel silly, but I have this figured out. I set the BIOS to UEFI mode only (selecting in the OS section Windows 10 WHQL support. My bios even looks much cooler now as well! Thanks for all the help!


And only now I remember that the 'compatibility' mode limits efi fb resolution. Glad you sorted it though.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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