Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Screen resolution prior of running X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 289

PostPosted: Sat May 18, 2019 6:02 pm    Post subject: [Solved] Screen resolution prior of running X Reply with quote

My goal is to have similar to Arch behavior in tty session prior of startx, where it renders the native resolution on the biggest monitor, and my second monitor stays in the sleep state, until I login with startx.
I want to do that using the proprietary nvidia driver. I have two screens (connected through) 2560x1440(DVI) and 1920x1200(HDMI).
When I use proprietary driver exclusively in the kernel (https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers#Kernel), screen resolution isn't adjusted at all in tty, I think it stays in the default 800x600 mode. I tried to change it in grub config like so GRUB_CMDLINE_LINUX_DEFAULT="gfxmode=2560x1440 gfxpayload=keep", but it only affects the GRUB menu, screen resolution resets back during kernel loading.


Last edited by etnull on Mon May 20, 2019 12:38 am; edited 1 time in total
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 501
Location: Hawaii

PostPosted: Sat May 18, 2019 6:59 pm    Post subject: Re: Screen resolution prior of running X Reply with quote

etnull wrote:
My goal is to have similar to Arch behavior in tty session prior of startx, where it renders the native resolution on the biggest monitor, and my second monitor stays in the sleep state, until I login with startx.
I want to do that using the proprietary nvidia driver. I have two screens (connected through) 2560x1440(DVI) and 1920x1200(HDMI).
When I use proprietary driver exclusively in the kernel (https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers#Kernel), screen resolution isn't adjusted at all in tty, I think it stays in the default 800x600 mode. I tried to change it in grub config like so GRUB_CMDLINE_LINUX_DEFAULT="gfxmode=2560x1440 gfxpayload=keep", but it only affects the GRUB menu, screen resolution resets back during kernel loading.


I don't use grub, rather rEFInd, but managed to get native 1920 x 1080 in framebuffer by:
1. using the kernel's efi framebuffer, and nothing else prior to nvidia-driver.
2. passing the desired resolution to the fb via rEFInd.

Pretty sure you can do the same thing with Grub. Your current fb might not support the resolution you want to use.
_________________
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
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44959
Location: 56N 3W

PostPosted: Sat May 18, 2019 7:29 pm    Post subject: Reply with quote

etnull,

There is no nvidia console driver. The kernel configuration you refer to is to ensure that the kernel will support the nvidia kernel module.
nVidia says that horrible things happen when you use anything other that a text console.
It is in part true. You must choose a framebuffer driver that makes no attempt to configure the GPU.

UEFI users can choose from Simple Framebuffer, VESA Framebuffer and EFI Framebuffer.
BIOS users only have Simple Framebuffer or VESA Framebuffer.

Simple Framebuffer has no setup in the kernel. It takes over an existing framebuffer and draws on it. e.g. from Grub.
VESA Framebuffer needs the vesa mode specified on the kernel command line.

I don't have an UEFI capable hardware so I've not looked into EFI Framebuffer.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 289

PostPosted: Sat May 18, 2019 7:53 pm    Post subject: Reply with quote

I don't have EFI/UEFI. Any specific examples/suggestions? sorry I don't have profound knowledge of the kernel or boot process.. Can I combine free and non free driver to get what I want, it works on Arch on the same machine, so there should be a way..
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44959
Location: 56N 3W

PostPosted: Sat May 18, 2019 8:25 pm    Post subject: Reply with quote

etnull,

If you use vesafb, your need somethinglike
Code:
video=vesafb:1024x768-32,mtrr:3,ywrap
on the end of the kernel command line.
Its been a while since I've done this.

1024x768-32 means 1024x768 with 32 bits per pixel. You put your resolution there.
Not all resolutions are supported. It needs to be a vesa standard resolution.

I'm still a grub1 user, so I don't know how you add that to grub2 permanetly.
For testing, you can select the menu entry you want then press 'e' to edit the kernel line before it boots.

Your kernel needs vesafb support.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 289

PostPosted: Sat May 18, 2019 10:54 pm    Post subject: Reply with quote

I can't install sys-apps/v86d https://packages.gentoo.org/packages/sys-apps/v86d package not found? Doing by this guide https://wiki.gentoo.org/wiki/Uvesafb
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44959
Location: 56N 3W

PostPosted: Sat May 18, 2019 11:06 pm    Post subject: Reply with quote

etnull,

vesafb, not uvesafb. The former does not need sys-apps/v86d.

vesafb is a kernel option.
Code:
<*> Userspace VESA VGA graphics support
is gone from the kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 289

PostPosted: Sun May 19, 2019 6:01 pm    Post subject: Reply with quote

I tried the suggested. GRUB loads in native resolution, but the screen freezes on Loading kernel ... , I can still hear alsa being initialized, and can type the password and go to X, not seeing what I'm doing, after X loads the screen updates and I can see everything, but if I go to any tty in hangs without any way to go back to X.
Code:
GRUB_CMDLINE_LINUX_DEFAULT="video=vesafb:1024x768-32,mtrr:3,ywrap"
GRUB_GFXMODE=auto
GRUB_GFXPAYLOAD_LINUX=keep

Code:

-*- Support for frame buffer devices  --->                                    │ │
  │ │        [ ] Framebuffer foreign endianness support  ----                              │ │
  │ │        -*- Enable Video Mode Handling Helpers                                        │ │
  │ │        [*] Enable Tile Blitting Support                                              │ │
  │ │            *** Frame buffer hardware drivers ***                                     │ │
  │ │        < > Cirrus Logic support                                                      │ │
  │ │        < > Permedia2 support                                                         │ │
  │ │        < > CyberPro 2000/2010/5000 support                                           │ │
  │ │        < > Arc Monochrome LCD board support                                          │ │
  │ │        [ ] Asiliant (Chips) 69000 display support                                    │ │
  │ │        [ ] IMS Twin Turbo display support                                            │ │
  │ │        < > VGA 16-color graphics support                                             │ │
  │ │        <*> Userspace VESA VGA graphics support                                       │ │
  │ │        [ ] VESA VGA graphics support                                                 │ │
  │ │        [*] EFI-based Framebuffer Support                                             │ │
  │ │        < > N411 Apollo/Hecuba devkit support                                         │ │
  │ │        < > Hercules mono graphics support                                            │ │
  │ │        < > OpenCores VGA/LCD core 2.0 framebuffer support                            │ │
  │ │        < > Epson S1D13XXX framebuffer support                                        │ │
  │ │        < > nVidia Framebuffer Support                                                │ │
  │ │        < > nVidia Riva support                                                       │ │
  │ │        < > Intel740 support                                                          │ │
  │ │        < > Intel LE80578 (Vermilion) support                                         │ │
  │ │        < > Matrox acceleration                                                       │ │
  │ │        < > ATI Radeon display support                                                │ │
  │ │        < > ATI Rage128 display support                                               │ │
  │ │        < > ATI Mach64 display support                                                │ │
  │ │        < > S3 Trio/Virge support                                                     │ │
  │ │        < > S3 Savage support                                                         │ │
  │ │        < > SiS/XGI display support                                                   │ │
  │ │        < > NeoMagic display support                                                  │ │
  │ │        < > IMG Kyro support                                                          │ │
  │ │        < > 3Dfx Banshee/Voodoo3/Voodoo5 display support                              │ │
  │ │        < > 3Dfx Voodoo Graphics (sst1) support                                       │ │
  │ │        < > VIA VT8623 support                                                        │ │
  │ │        < > Trident/CyberXXX/CyberBlade support                                       │ │
  │ │        < > ARK 2000PV support                                                        │ │
  │ │        < > Permedia3 support                                                         │ │
  │ │        < > Fujitsu carmine frame buffer support                                      │ │
  │ │        < > SMSC UFX6000/7000 USB Framebuffer support                                 │ │
  │ │        < > Displaylink USB Framebuffer support                                       │ │
  │ │        < > Framebuffer support for IBM GXT4000P/4500P/6000P/6500P adaptors           │ │
  │ │        < > Virtual Frame Buffer support (ONLY FOR TESTING!)                          │ │
  │ │        < > E-Ink Metronome/8track controller support                                 │ │
  │ │        < > Fujitsu MB862xx GDC support                                               │ │
  │ │        < > E-Ink Broadsheet/Epson S1D13521 controller support                        │ │
  │ │        [ ] Simple framebuffer support                                                │ │
  │ │        < > Silicon Motion SM712 framebuffer support                                  │ │
  │ │                                                               


<*> /dev/agpgart (AGP Support)  --->                                          │ │
  │ │        -*- VGA Arbitration                                                           │ │
  │ │        (16)  Maximum number of GPUs                                                  │ │
  │ │        [ ] Laptop Hybrid Graphics - GPU switching support                            │ │
  │ │        <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->     │ │
  │ │        [ ] Enable DisplayPort CEC-Tunneling-over-AUX HDMI support                    │ │
  │ │            I2C encoder or helper chips  --->                                         │ │
  │ │        < > ATI Radeon                                                                │ │
  │ │        < > AMD GPU                                                                   │ │
  │ │            ACP (Audio CoProcessor) Configuration  ----                               │ │
  │ │            AMD Library routines  ----                                                │ │
  │ │        < > Nouveau (NVIDIA) cards                                                    │ │
  │ │        < > Intel 8xx/9xx/G3x/G4x/HD Graphics                                         │ │
  │ │        < > Virtual GEM provider                                                      │ │
  │ │        < > Virtual KMS (EXPERIMENTAL)                                                │ │
  │ │        < > DRM driver for VMware Virtual GPU                                         │ │
  │ │        < > Intel GMA5/600 KMS Framebuffer                                            │ │
  │ │        < > DisplayLink                                                               │ │
  │ │        < > AST server chips                                                          │ │
  │ │        < > Kernel modesetting driver for MGA G200 server engines                     │ │
  │ │        < > Cirrus driver for QEMU emulated device                                    │ │
  │ │        < > QXL virtual GPU                                                           │ │
  │ │        < > DRM Support for bochs dispi vga interface (qemu stdvga)                   │ │
  │ │            Display Panels  ----                                                      │ │
  │ │            Display Interface Bridges  --->                                           │ │
  │ │        < > DRM Support for Hisilicon Hibmc                                           │ │
  │ │        < > Support for simple displays  ----                                         │ │
  │ │        [ ] Enable legacy drivers (DANGEROUS)  ----                                   │ │
  │ │            Frame buffer Devices  --->                                                │ │
  │ │        [ ] Backlight & LCD device support  ----                                      │ │
  │ │            Console display driver support  --->                                      │ │
  │ │        [*] Bootup logo  --->                                                         │ │

│        --- Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)           │ │
  │ │        [ ]   DRM DP AUX Interface                                                    │ │
  │ │        [ ]   Insert extra checks and debug info into the DRM range managers          │ │
  │ │        < >   kselftests for DRM                                                      │ │
  │ │        [*]   Enable legacy fbdev support for your modesetting driver                 │ │
  │ │        (100)   Overallocation of the fbdev buffer                                    │ │
  │ │        [ ]   Allow to specify an EDID data set instead of probing for it


Is there like a canonical way of doing it? I have no idea what am I doing...
---
If I don't use GRUB_GFXPAYLOAD_LINUX=keep it just ignores anything in GRUB_CMDLINE_LINUX_DEFAULT, if I do use it, the screen freezes.
Back to top
View user's profile Send private message
joanandk
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2017
Posts: 92

PostPosted: Sun May 19, 2019 8:12 pm    Post subject: Reply with quote

Quote:
│ │ [ ] Simple framebuffer support │ │


You should try activating this too.

BR
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44959
Location: 56N 3W

PostPosted: Sun May 19, 2019 8:36 pm    Post subject: Reply with quote

etnull,

Code:
  │ │        <*> Userspace VESA VGA graphics support   
  │ │        [ ] VESA VGA graphics support 


I was sure that Userspace VESA VGA graphics support had been removed. Its broken anyway.
Choose VESA VGA graphics support .

That's what you are setting up with
Code:
GRUB_CMDLINE_LINUX_DEFAULT="video=vesafb:1024x768-32,mtrr:3,ywrap"

It says video=vesafb there but its not in your kernel.

-- edit --

The 1024x768 will be wrong but you can fiddle with that later.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 289

PostPosted: Mon May 20, 2019 12:37 am    Post subject: Reply with quote

NeddySeagoon, joanandk, Thank you guys, it works now! I was very depressed today, because I thought it wouldn't work, but now I'm happy again.

My final settings:
Code:
Device Drivers  --->
   Graphics support  --->
       <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->
       < > Nouveau (NVIDIA) cards
   Frame buffer Devices  --->
       -*- Support for frame buffer devices  --->
       < > Userspace VESA VGA graphics support                                     
       [*] VESA VGA graphics support
       [*] Simple framebuffer support   

/etc/default/grub
# 8bit mode can greatly increase the booting speed, I didn't notice any difference in colors on a small color pallet
GRUB_CMDLINE_LINUX_DEFAULT="video=vesafb:2560x1440-8,mtrr:3,ywrap"
GRUB_GFXMODE="2560x1440x8"
GRUB_GFXPAYLOAD_LINUX=keep
# Make sure this is commented out, otherwise it will ruin your resolution setting
# GRUB_TERMINAL=console

I also put mini guide here: https://forums.gentoo.org/viewtopic-p-8336186.html#8336186 because I found that thread in search engine, and it's basically the topic of most importance considering this issue. We should definitely update the wiki page.


Last edited by etnull on Wed Feb 05, 2020 10:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44959
Location: 56N 3W

PostPosted: Mon May 20, 2019 12:50 am    Post subject: Reply with quote

etnull,

The wiki is a public resource. Feel free to either fix it or write your own page.
The handbook is read only but you can contribute using the talk pages.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
etnull
Apprentice
Apprentice


Joined: 26 Mar 2019
Posts: 289

PostPosted: Mon May 20, 2019 1:10 am    Post subject: Reply with quote

NeddySeagoon wrote:
etnull,

The wiki is a public resource. Feel free to either fix it or write your own page.
The handbook is read only but you can contribute using the talk pages.

I'm not a native speaker, I write with many grammatical and syntactical errors, so anything I write would have to be rewritten anyway..
I will try to contribute here, on forums.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44959
Location: 56N 3W

PostPosted: Mon May 20, 2019 9:49 am    Post subject: Reply with quote

etnull,

You are setting too high a standard for yourself.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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