Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm: support fbcon #342

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YusufKhan-gamedev
Copy link

@YusufKhan-gamedev YusufKhan-gamedev commented Aug 2, 2022

Untested because I cant test. ---Should fix [341] and [nope]--- should allow tty modesetting.

@aritger
Copy link
Collaborator

aritger commented Aug 2, 2022

@YusufKhan-gamedev: thanks for the suggestion. However, it is kind of hard to consider patches if they are untested.

And, yes, I think it is straightforward to register with fbcon. The concern is what impact this has for users who want to unload the kernel module and install a new driver. Does this change make it more difficult to rmmod nvidia-drm.ko?

@YusufKhan-gamedev
Copy link
Author

@aritger: Ill work on a solution to this dilemma now that I got ogk running on my desktop.

Signed-off-by: Yusuf Khan <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Aug 9, 2022

CLA assistant check
All committers have signed the CLA.

@YusufKhan-gamedev
Copy link
Author

I just added the NvDrmEnableFbcon parameter since !341 isnt solved by this.

@sl1pkn07
Copy link

any update about this? this PR, plus #356 , the console log freeze late than before with my 1070ti, 525.53 kernel 6.0.x and uefi machine

@YusufKhan-gamedev
Copy link
Author

YusufKhan-gamedev commented Nov 19, 2022

any update about this? this PR, plus #356 , the console log freeze late than before with my 1070ti, 525.53 kernel 6.0.x and uefi machine

As in the console froze here but not in main? Or the other way around? Do you have a specific issue alleviated by this?

@sl1pkn07
Copy link

sl1pkn07 commented Nov 19, 2022

my issue is this:

IMG20221117183836

and with this PR and with #356:

IMG20221119193053

in both cases. the screen is freeze, but the machine still works doing things in background. and also i can enter to wayland session by blind typping. xorg refuses to load

ALL with privative drivers with DKMS (open modules not work with my GPU) . only i applied the .c/.h changes. the conftest.sh changes i leave intact due a incompatiblility

greetings

@YusufKhan-gamedev
Copy link
Author

This MR probably solves your initial problem, but im not setting something properly and so you get an identical problem on your machine.

xorg refuses to load

Do we have a log for that?

@sl1pkn07
Copy link

sl1pkn07 commented Nov 19, 2022

sorry, no

because when i do that blind typping, i cant see in what state is when hit the enter.

@YusufKhan-gamedev
Copy link
Author

sorry, no

Its fine, ill create a script to handle loading X when I have the time to

@sl1pkn07
Copy link

sl1pkn07 commented Nov 19, 2022

Xorg "log" ( runing: startx &> somelog)



X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
Current Operating System: Linux sL1pKn07 6.0.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 16 Nov 2022 17:01:17 +0000 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=3ef60ebc-17d4-40a1-8710-2750e58f16e0 rw init=/usr/lib/systemd/systemd pcie_aspm=off intremap=no_x2apic_optout intel_iommu=on iommu=pt ibt=off
 
Current version of pixman: 0.42.2
	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: Sat Nov 19 21:06:03 2022
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"

the screens turns black after hit enter

edit:

nov 19 21:08:40 archlinux kernel: efifb: probing for efifb
nov 19 21:08:40 archlinux kernel: pmd_set_huge: Cannot satisfy [mem 0xb0000000-0xb0200000] with a huge-page mapping due to MTRR override.
nov 19 21:08:40 archlinux kernel: efifb: No BGRT, not showing boot graphics
nov 19 21:08:40 archlinux kernel: efifb: framebuffer at 0xb0000000, using 34560k, total 34560k
nov 19 21:08:40 archlinux kernel: efifb: mode is 3840x2160x32, linelength=16384, pages=1
nov 19 21:08:40 archlinux kernel: efifb: scrolling: redraw
nov 19 21:08:40 archlinux kernel: efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
nov 19 21:08:40 archlinux kernel: Console: switching to colour frame buffer device 240x67
nov 19 21:08:40 archlinux kernel: fb0: EFI VGA frame buffer device

@YusufKhan-gamedev
Copy link
Author

nov 19 21:08:40 archlinux kernel: fb0: EFI VGA frame buffer device

Your straight up running the EFI framebuffer, maybe try using the video=vesafb kernel paramater? Or maybe if your adventurous video=nvidia-drm?

@sl1pkn07
Copy link

sl1pkn07 commented Nov 19, 2022

i'm here for play the game xd

let me check

EDIT:

with video=nvidia-drm the console frezees in the same point. but i'm not able to load my user or the session (i have see that because i have activated the numbloq key. after boot, always on-off-on (the led in the keyboard) when the system is enterely booted. this time is on, then off and remain off

i cant see (after restore the kernel parameters) something wrong in journalctl log

nov 19 22:23:50 archlinux kernel: efifb: probing for efifb
nov 19 22:23:50 archlinux kernel: pmd_set_huge: Cannot satisfy [mem 0xb0000000-0xb0200000] with a huge-page mapping due to MTRR override.
nov 19 22:23:50 archlinux kernel: efifb: No BGRT, not showing boot graphics
nov 19 22:23:50 archlinux kernel: efifb: framebuffer at 0xb0000000, using 34560k, total 34560k
nov 19 22:23:50 archlinux kernel: efifb: mode is 3840x2160x32, linelength=16384, pages=1
nov 19 22:23:50 archlinux kernel: efifb: scrolling: redraw
nov 19 22:23:50 archlinux kernel: efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
nov 19 22:23:50 archlinux kernel: Console: switching to colour frame buffer device 240x67
nov 19 22:23:50 archlinux kernel: fb0: EFI VGA frame buffer device
---
nov 19 22:23:55 sL1pKn07 kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:03:00.0 on minor 0
nov 19 22:23:55 sL1pKn07 kernel: Console: switching to colour dummy device 80x25
nov 19 22:23:55 sL1pKn07 kernel: nvidia 0000:03:00.0: vgaarb: deactivate vga console
nov 19 22:23:55 sL1pKn07 kernel: [drm] [nvidia-drm] [GPU ID 0x00008200] Loading driver

with video=vesafb is like i set nothing. same output like without set it

greetings

for note, in my grub conf:

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=auto
GRUB_GFXMODE=3840x2160x16

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

@YusufKhan-gamedev
Copy link
Author

Maybe you could lower GRUB_GFXMODE to 1920x1080x16? I cant really tell after this, you might have better luck with nouveau after GSP support and NVK become merged in later kernel and mesa releases.

@sl1pkn07
Copy link

the problem is cuda :/

@@ -122,6 +122,7 @@ test_headers() {
FILES="$FILES drm/drm_ioctl.h"
FILES="$FILES drm/drm_device.h"
FILES="$FILES drm/drm_mode_config.h"
FILES="$FILES drm/drm_fb_helper.h"
FILES="$FILES dt-bindings/interconnect/tegra_icc_id.h"
FILES="$FILES generated/autoconf.h"
FILES="$FILES generated/compile.h"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Section has been moved to kernel-open/Kbuild with 515.76.

@aaronp24
Copy link
Member

Thanks for getting this idea started, @YusufKhan-gamedev . Unfortunately getting it to work isn't quite this simple. I took a stab at wiring it up properly, but it's going to take some work.

I pushed my work-in-progress patches to my fork. This is enough to get drm_fbdev_generic to initialize, and it works alright with drm-kms clients such as typical Wayland compositors. Unfortunately, more work will be needed to make it interoperate correctly with native nvidia-modeset clients such as the NVIDIA X driver or Vulkan direct-to-display. I'm going to keep working on that part of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants