You are not logged in.

#1 2023-05-07 23:37:54

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

[SOLVED] Laptop: Not display boot information in external monitor

Hi, everyone.

On my Laptop, after selecting the Kernel with which to start Linux, two things happen:

  1. If I boot Arch Linux in USB live mode, it mirrors the boot information on my laptop's monitor and the external one. I can log in, and enter commands.

  2. After installing Arch Linux on my hard drive, whenever I start Linux, it doesn't show anything on my external monitor, only the one on the laptop. It doesn't show any boot info, it doesn't show username and password, or the commands after it, that's until I run `xinit` or `systemctl start gdm.service`, it shows up the GUI on both monitors. If I finish Xorg or GDM, it comes back to the console mode. I can see on both monitors what I didn't see before, which is the login and the commands I entered.

I want to modify my installed Arch Linux so that it provides the same functionality of mirroring on both my laptop's built-in monitor and external monitor, the information of Linux startup, the log in action, and command input. Furthermore, I tried this for weeks, searching in Arch Linux Wiki, Stack Overflow posts, and I am not success.


Thanks in advance,
Israel Roldan.

Last edited by airv_zxf (2023-09-02 00:57:22)

Offline

#2 2023-05-08 05:15:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

Hybrid graphics, nvidia driver, external output attached to the latter?
Do you have "nvidia-drm.modeset=1" in your kernel commandline?

Offline

#3 2023-05-08 16:39:06

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

seth wrote:

Hybrid graphics, nvidia driver, external output attached to the latter?
Do you have "nvidia-drm.modeset=1" in your kernel commandline?

Note: The “nvidia-drm” is not used, right now is “nvidia_drm” as the documentation in DRM kernel mode setting

Note #2: But, again. In the same laptop with the same hardware, it shows the boot information when I am using the USB Live but not booting from my hard disk.


Yes:

# /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux video.use_native_backlight=1 nvidia_drm.modeset=1"
GRUB_CMDLINE_LINUX="kvm-intel.nested=1"

Then, I use the USB Live to run as a `chroot`.

grub-install --target=x86_64-efi  --bootloader-id=grub_uefi --recheck
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg

My laptop specs GT73VR 7RF Titan Pro.

❯ lspci -k | grep --color=always -A 2 -E "(VGA|3D)"
01:00.0 VGA compatible controller: NVIDIA Corporation GP104BM [GeForce GTX 1080 Mobile] (rev a1)
	Subsystem: Micro-Star International Co., Ltd. [MSI] GP104BM [GeForce GTX 1080 Mobile]
	Kernel driver in use: nvidia
                   -`
                  .o+`                 wolf@MSIGT73EVR7RF
                 `ooo/                 OS: Arch Linux
                `+oooo:                Kernel: x86_64 Linux 6.3.1-arch1-1
               `+oooooo:               Uptime: 3h 29m
               -+oooooo+:              Packages: 1877
             `/:-:++oooo+:             Shell: zsh 5.9
            `/++++/+++++++:            Resolution: 1920x1080
           `/++++++++++++++:           DE: GNOME 44.1
          `/+++ooooooooooooo/`         WM: Mutter
         ./ooosssso++osssssso+`        WM Theme:
        .oossssso-````/ossssss+`       GTK Theme: Adwaita [GTK2/3]
       -osssssso.      :ssssssso.      Icon Theme: Adwaita
      :osssssss/        osssso+++.     Font: Cantarell 16
     /ossssssss/        +ssssooo/-     Disk: 228G / 483G (50%)
   `/ossssso+/:-        -:/+osssso+-   CPU: Intel Core i7-7820HK @ 8x 3.9GHz [40.0°C]
  `+sso+:-`                 `.-/+oso:  GPU: NVIDIA GeForce GTX 1080
 `++:.                           `-/+/ RAM: 4901MiB / 64262MiB
 .`                                 `/

Last edited by airv_zxf (2023-05-08 18:15:52)

Offline

#4 2023-05-08 19:38:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

when I am using the USB Live

and therefore the nouveau driver.
Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General (I understand that this isn't about the GUI session, but X11 conveniently logs relevant data wink

Offline

#5 2023-05-09 02:16:57

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

I had an idea, check the journal of USB Live versus my laptop.

Note: All logs and `diff` command information are in this Google Drive directory, anyone has access to download the files.

The most considerable difference is the USB Live uses `nouveau` starting the booting, Arch Linux installed on my laptop never execute `nouveau`.

Journal for USB Live:

# The USB Live Journal
May 08 20:41:48 archiso kernel: microcode: microcode updated early to revision 0xf0, date = 2021-11-12
May 08 20:41:48 archiso kernel: Linux version 6.2.13-arch1-1 (linux@archlinux) (gcc (GCC) 12.2.1 20230201, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT_DYNAMIC Wed, 26 Apr 2023 20:50:14 +0000
May 08 20:41:48 archiso kernel: Command line: BOOT_IMAGE=/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisodevice=UUID=0255-8F7F
May 08 20:41:48 archiso kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
...
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: vgaarb: deactivate vga console
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: NVIDIA GP104 (134000a1)
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: bios: version 86.04.5b.00.45
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: pmu: firmware unavailable
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: fb: 8192 MiB GDDR5X
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: VRAM: 8192 MiB
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: GART: 536870912 MiB
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: BIT table 'A' not found
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: BIT table 'L' not found
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: TMDS table version 2.0
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB version 4.1
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB outp 00: 02800f76 04610020
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB outp 01: 02011f62 00020010
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB outp 02: 04022f96 04600020
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB outp 03: 04022f92 00020020
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB outp 04: 04033f86 04600010
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB outp 05: 04033f82 00020010
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB conn 00: 00020047
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB conn 01: 00010161
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB conn 02: 02000246
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: DCB conn 03: 01000346
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies
...
May 08 20:41:48 archiso kernel: [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 0
May 08 20:41:48 archiso kernel: fbcon: nouveaudrmfb (fb0) is primary device
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: [drm] fb0: nouveaudrmfb frame buffer device
May 08 20:41:48 archiso kernel: nouveau 0000:01:00.0: DRM: Disabling PCI power management to avoid bug
...
May 08 20:41:50 archiso kernel: snd_hda_intel 0000:01:00.1: bound 0000:01:00.0 (ops nv50_audio_component_bind_ops [nouveau])

Offline

#6 2023-05-09 02:32:35

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

seth wrote:
when I am using the USB Live

and therefore the nouveau driver.
Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General (I understand that this isn't about the GUI session, but X11 conveniently logs relevant data wink


Here the Xorg logs. I rebooted and took the logs starting from booting and finishing on the log in screen.

/var/log/Xorg.0.log

/var/log/Xorg.1.log

Offline

#7 2023-05-09 03:08:22

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

Now that we've outlined the heart of the matter, the questions are:

I can install `extra/xf86-video-nouveau 1.0.17-2 (xorg-drivers)` with `pacman`.

  • By doing this, will it automatically recognize the driver at boot time?

  • Do I have to add the start of `nouveau` in `systemctl`?

  • How can I enable `nouveau` at boot and then enable NVIDIA in my graphical session?

  • I will have problems if I run `nouveau` at boot, then when I start the graphics session with GDM, using Gnome or Openbox with my graphics card and NVidia drivers of Linux.

  • I want to use Wayland, could this affect module recognition?

So far, these are all the questions I can think of, but in fact there could be many more.

Offline

#8 2023-05-09 05:45:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

Please don't use the google drive, it's cumbersome (see the 1st link below)

The nouveau kernel module has nothing to do w/ the ddx driver and we *knew* before that you were running nouveau on the iso and nvidia on the installed system.
Fyi, there's also a complete garbage /etc/X11/xorg.conf - that's not relevant to the matter, but can you bite down the road.
It also turns the log into a mess.

xrandr -q

=> https://www.kernel.org/doc/Documentation/fb/modedb.rst

How can I enable `nouveau` at boot and then enable NVIDIA in my graphical session?

You can't. Forget everything in posts #5 & #7, it's based on a false premise.

Offline

#9 2023-05-09 17:16:27

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

seth wrote:

Please don't use the google drive, it's cumbersome (see the 1st link below)

What web platform or service is using commonly here in Arch Linux forums for “pastebin services”? I checked your link about How to upload text and it specifies that “pastebin.com” is not recommended because it uses JavaScript.


seth wrote:

The nouveau kernel module has nothing to do w/ the ddx driver and we *knew* before that you were running nouveau on the iso and nvidia on the installed system.

Ok, yes. It makes sense.


seth wrote:

Fyi, there's also a complete garbage /etc/X11/xorg.conf - that's not relevant to the matter, but can you bite down the road.
It also turns the log into a mess.

What do you suggest fixing this mess? I followed the tutorials from Arch Linux, first for Openbox, and actually for Wayland.


Here is the output of my screen:

Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
DP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 540mm x 300mm
   1920x1080    239.88*+
   1440x1080    239.87
   1400x1050    239.76
   1280x1024    239.78
   1280x960     239.80
   1152x864     239.87
   1024x768     239.74
   800x600      239.81
   640x480      239.72
   320x240      238.24
   1680x1050    239.73
   1440x900     239.80
   1280x800     239.70
   1152x720     239.91
   960x600      239.72
   928x580      239.78
   800x500      239.72
   768x480      239.72
   720x480      239.35
   640x400      239.49
   320x200      238.84
   1600x900     239.72
   1368x768     239.74
   1280x720     239.79
   1024x576     239.43
   864x486      239.60
   720x400      239.07
   640x350      239.59

When I set manually the monitors, usually I turn off the laptop screen and enable the external screen.

xrandr --output DP-0 --off
xrandr --output DP-3 --mode 1920x1080 --rate 240.00
seth wrote:

How can I enable `nouveau` at boot and then enable NVIDIA in my graphical session?

You can't. Forget everything in posts #5 & #7, it's based on a false premise.

Ok, let's keep learning Linux.

---

Coming back to the original achievement. How, I can start the booting of Linux, showing the information on my external monitor?

I saw these links, are these the solution? I am lost in your answers if there is a solution or not.

Offline

#10 2023-05-09 20:39:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

What web platform or service is using commonly here in Arch Linux forums for “pastebin services”?

0x0.st or ix.io (they're mentioned in the 1st link below)

What do you suggest fixing this mess?

Remove the xorg.conf file - X11 has decent autoconfiguration.
But again: not related to the issue at hand.

Here is the output of my screen:

Not the output "of my screen", but "xrandr -q". All of it.

xrandr --output DP-0 --off
xrandr --output DP-3 --mode 1920x1080 --rate 240.00

The xrandr segment you posted only has a DP-1 …

I saw these links, are these the solution?

The 4 links on the bottom are my signature, referencing common errors.

The relevant is (not in my signature and) https://www.kernel.org/doc/Documentation/fb/modedb.rst - it explains how to tell the kernel to de/activate outputs.
The output names match the xrandr ones, hence the question for its output.

Offline

#11 2023-05-11 04:23:59

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

seth wrote:

The xrandr segment you posted only has a DP-1 …

DP-0 is the integrate monitor, DP-3 is the external monitor.

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected (normal left inverted right x axis y axis)
   1920x1080    120.00 +
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 544mm x 303mm
   1920x1080     60.00 + 239.96*  144.00   119.98   119.88    99.93    59.94    50.00
   1680x1050     59.88
   1440x900      59.90
   1280x1024     75.02    60.02
   1280x720      59.94    50.00
   1024x768     119.99    99.97    75.03    70.07    60.00
   800x600      119.97    99.66    75.00    72.19    60.32    56.25
   720x576       50.00
   720x480       59.94
   640x480      119.52    99.77    75.00    72.81    59.94    59.93
DP-4 disconnected (normal left inverted right x axis y axis)

---

seth wrote:

The relevant is (not in my signature and) https://www.kernel.org/doc/Documentation/fb/modedb.rst - it explains how to tell the kernel to de/activate outputs.
The output names match the xrandr ones, hence the question for its output.

Let me read and check if I can config, but if you have the solution, for example: change these specific files with the `xrand` values, then add this to the grub. It will be helpful.

Offline

#12 2023-05-11 09:50:26

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

I read and researched, but I didn't get it.

First, I read the document that you sent me, and I played with GRUB in `/etc/default/grub` file, after every change I used the USB Live to build the EFI, mkinit, and grub. It didn't display in both monitors in the boot.

GRUB_DEFAULT=0
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="Arch"

#GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=Linux nvidia_drm.modeset=1"
#GRUB_CMDLINE_LINUX_DEFAULT="debug udev.log-priority=debug nvidia_drm.modeset=1"
GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modset=1 video=DP-0:d video=DP-3:1920x1080D"

GRUB_CMDLINE_LINUX="kvm-intel.nested=1"
#GRUB_CMDLINE_LINUX="kvm-intel.nested=1 video=DP-0:d video=DP-3:1920x1080D"

# -------------------------------------------------------------------------------
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to use basic console
#GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

GRUB_GFXMODE=auto
#GRUB_GFXMODE=1920x1080

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

Second, I looked again to the logs for `Xorg.0.log`. I noticed that Xorg starts and takes the configuration from `/usr/share/X11/xorg.conf.d/`. I created and added a new file to set up the monitor based on the NVIDIA. It recognizes in didn't apply the change. I understood that I not need to move something in Xorg, but I did to discard possible problems or solutions.

/usr/share/X11/xorg.conf.d/20-nvidia-xorg.conf

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 530.41.03

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Chimei innolux corp."
    HorizSync       135.8 - 135.8
    VertRefresh     120.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1080"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "metamodes" "DP-1: 1920x1080_120 +0+0 {ForceCompositionPipeline=On}, DP-3: 1920x1080_240 +0+0 {ForceCompositionPipeline=On}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

---

In summary: I understand that the workflow of the Linux boot is taken the GRUB, after this, it takes Xorg together with NVIDIA, then it finished. Is this correct? The question is, why it didn't detect my screen, if I added custom configuration for each step of the process.

Offline

#13 2023-05-11 10:53:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,237

Re: [SOLVED] Laptop: Not display boot information in external monitor

Your GRUB cmdline has a typo. It's nvidia_drm.modeset=1 note the missing e. But FWIW as far as I know, this behaviour is more or less expected since at least kernels 6.0. Isn't that the old issue of linux not allocating a terminal buffer for the nvidia card if it already finds a normal KMS one? Chances are you won't get this fixed without kernel patches - which seems overkill to me jus to have some boot messages mirrored. my brain was in a different thread, this might be workable in this case

Last edited by V1del (2023-05-11 13:45:32)

Offline

#14 2023-05-11 12:44:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

Afawk the OP has only one GPU

Remove the xorg.conf, again: this is unrelated and irrelevant and the config is garbage.
Next, fix the nvidia_drm.modeset=1 parameter (ftr, modprobe handles "-/_" but not a typo in the parameter), check "cat /proc/cmdline" and "systool -vm nvidia_drm" for whether the parameters are applied at all (I'm not sure what you mean by "used the USB Live to build the EFI" stuff)

Finally

'e' will force the display to be enabled, i.e. it will override the detection
if a display is connected. 'D' will force the display to be enabled and use
digital output. This is useful for outputs that have both analog and digital
signals (e.g. HDMI and DVI-I). For other outputs it behaves like 'e'. If 'd'
is specified the output is disabled.

video=DP-0:d video=DP-3:1920x1080D"
   1920x1080     60.00 + 239.96*  144.00   119.98   119.88    99.93    59.94    50.00

1. Do you want to disable DP-0
2. 1920x1080@60e
3. Make sure the output names don't change when enabling drm modesetting and check /sys/class/drm/card* to make sure those don't differ from the randr name
4. "GRUB_GFXPAYLOAD_LINUX=keep" - does grub show up on both outputs? At what resolution does grub run?

Offline

#15 2023-05-11 18:52:32

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

V1del wrote:

Your GRUB cmdline has a typo. It's nvidia_drm.modeset=1 note the missing e. But FWIW as far as I know, this behaviour is more or less expected since at least kernels 6.0. Isn't that the old issue of linux not allocating a terminal buffer for the nvidia card if it already finds a normal KMS one? Chances are you won't get this fixed without kernel patches - which seems overkill to me jus to have some boot messages mirrored. my brain was in a different thread, this might be workable in this case

Thanks for this catch. All my other tests were with the correct ModeSet word (nvidia_drm.modeset=1). I fixed, and I'll try it.

Offline

#16 2023-05-12 05:49:26

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

seth wrote:

Afawk the OP has only one GPU

Yes, I only have 1 NVIDIA GPU, and one Intel CPU. This CPU doesn't have a graphic processor.

---

seth wrote:

Remove the xorg.conf, again: this is unrelated and irrelevant and the config is garbage.

Ok, I won't insist with Xorg stuff because I believe you, and you demonstrated that you have solid knowledge. Removed the xorg.conf file.

---

seth wrote:

Next, fix the nvidia_drm.modeset=1 parameter (ftr, modprobe handles "-/_" but not a typo in the parameter), check "cat /proc/cmdline" and "systool -vm nvidia_drm" for whether the parameters are applied at all

cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a rw kvm-intel.nested=1 nvidia_drm.modeset=1 video=DP-0:d video=DP-3:1920x1080@60e

sudo systool -vm nvidia_drm

Module = "nvidia_drm"

  Attributes:
    coresize            = "94208"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "8"
    srcversion          = "55E7D25F76B27CE749E56F1"
    taint               = "POE"
    uevent              = <store method only>
    version             = "530.41.03"

  Parameters:
    modeset             = "Y"

  Sections:
    .altinstr_replacement= "0xffffffffc3f75279"
    .altinstructions    = "0xffffffffc3f76000"
    .bss                = "0xffffffffc3f7ee40"
    .call_sites         = "0xffffffffc3f78f50"
    .data.once          = "0xffffffffc3f7ea60"
    .data               = "0xffffffffc3f7e560"
    .exit.data          = "0xffffffffc3f7ea58"
    .exit.text          = "0xffffffffc3f75260"
    .gnu.linkonce.this_module= "0xffffffffc3f7ea80"
    .ibt_endbr_seal     = "0xffffffffc3f799c0"
    .init.data          = "0xffffffffc3f86000"
    .init.text          = "0xffffffffc3f85000"
    .note.Linux         = "0xffffffffc3f7c8c4"
    .note.gnu.build-id  = "0xffffffffc3f7c8a0"
    .note.gnu.property  = "0xffffffffc3f7c860"
    .orc_unwind         = "0xffffffffc3f79a3c"
    .orc_unwind_ip      = "0xffffffffc3f7b5ea"
    .printk_index       = "0xffffffffc3f7ea38"
    .retpoline_sites    = "0xffffffffc3f78c20"
    .return_sites       = "0xffffffffc3f78d30"
    .rodata             = "0xffffffffc3f76020"
    .rodata.cst2        = "0xffffffffc3f78bf4"
    .rodata.str1.1      = "0xffffffffc3f76a50"
    .rodata.str1.8      = "0xffffffffc3f76c80"
    .smp_locks          = "0xffffffffc3f78b78"
    .static_call_sites  = "0xffffffffc3f7ea61"
    .strtab             = "0xffffffffc3f8a3a8"
    .symtab             = "0xffffffffc3f87000"
    .text               = "0xffffffffc3f6d000"
    __bug_table         = "0xffffffffc3f7e000"
    __jump_table        = "0xffffffffc3f7d000"
    __mcount_loc        = "0xffffffffc3f78756"
    __param             = "0xffffffffc3f78bf8"
    __patchable_function_entries= "0xffffffffc3f7e120"

---

seth wrote:

(I'm not sure what you mean by "used the USB Live to build the EFI" stuff)

Every time, I make a change to `GRUB` or `mkinitcpio`, I follow these steps:

  1. Make the change in my laptop via `sudo vim /etc/default/grub` or `sudo vim /etc/mkinitcpio.conf`.

  2. Reboot Arch Linux.

  3. In the boot process, I press F11 to get the menu about what device I want to initialize, and I select the Arch Linux in a USB Live.

  4. Then, I execute the follow commands:

  5. `mount /dev/nvme0n1p3 /mnt`

  6. `mount --bind /dev /mnt/dev`

  7. `mount --bind /dev/pts /mnt/dev/pts`

  8. `mount --bind /proc /mnt/proc`

  9. `mount --bind /sys /mnt/sys`

  10. `chroot /mnt`

  11. `grub-install --target=x86_64-efi  --bootloader-id=grub_uefi --recheck`

  12. `mkinitcpio -p linux`

  13. `grub-mkconfig -o /boot/grub/grub.cfg`

  14. `exit`

  15. `reboot`

  16. Finally, I init the boot with my hard drive Arch Linux.

---

seth wrote:

Finally

'e' will force the display to be enabled, i.e. it will override the detection
if a display is connected. 'D' will force the display to be enabled and use
digital output. This is useful for outputs that have both analog and digital
signals (e.g. HDMI and DVI-I). For other outputs it behaves like 'e'. If 'd'
is specified the output is disabled.

video=DP-0:d video=DP-3:1920x1080D"
   1920x1080     60.00 + 239.96*  144.00   119.98   119.88    99.93    59.94    50.00

1. Do you want to disable DP-0
2. 1920x1080@60e

  1. Currently, for testing purposes, yes. If everything works fine, I'll decide if I want it to be both monitors or just one.

  2. Yes, in these new tests I added this `1920x1080@60e`.

---

seth wrote:

3. Make sure the output names don't change when enabling drm modesetting and check /sys/class/drm/card* to make sure those don't differ from the randr name

What command or what file I need to check the output names don't change when enabling drm modesetting?

This is the output for `/sys/class/drm/card*`. What do I need to look?

❯ ll /sys/class/drm/card*
/sys/class/drm/card0 ⇒ ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
❯ cat /sys/class/drm/card0/*

───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /sys/class/drm/card0/dev
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ 226:0
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[bat error]: '/sys/class/drm/card0/device' is a directory.
[bat error]: '/sys/class/drm/card0/power' is a directory.
[bat error]: '/sys/class/drm/card0/subsystem' is a directory.
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /sys/class/drm/card0/uevent
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ MAJOR=226
   2   │ MINOR=0
   3   │ DEVNAME=dri/card0
   4   │ DEVTYPE=drm_minor
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

---

seth wrote:

4. "GRUB_GFXPAYLOAD_LINUX=keep" - does grub show up on both outputs? At what resolution does grub run?

Does grub show up on both outputs? No, all the time for BIOS, GRUB, Booting, first login in console mode, it shows in the integrate display of my laptop.

At what resolution does grub run? I executed these commands to get this information in GRUB and I got `1024 x 768 x 32 (4096)`.

grub> videoinfo

List of supported video modes:
Legend: mask/position=red/green/blue/reserved
Adapter `Cirrus CLGD 5446 PCI Video Driver`:
  No info available
Adapter `Bochs PCI Video Driver`:
  No info available
Adapter `EFI GOP driver`:
  0x000  800 x  600 x 32 (3200)   Direct color, mask 8/8/8/8  pos: 16/8/0/24
* 0x001 1024 x  768 x 32 (4096)   Direct color, mask 8/8/8/8  pos: 16/8/0/24
  0x002 1920 x 1080 x 32 (7680)   Direct color, mask 8/8/8/8  pos: 16/8/0/24
  EDID version: 1.4
    Preferred mode: 1920x1080

Offline

#17 2023-05-12 06:21:45

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

The extra bonuses have arrived. I was playing with the GRUB commands, and it turns out that there is a command called `fix_video`. If I run it and start Arch Linux, it shows me on both monitors the screen just when it gets to log in (it asks username and password). Which is a great advance. The problem is that if I reboot and boot again, it doesn't work anymore, it only works if I go into GRUB and run the `fix_video` command.

Fun facts: Before executing the `fix_video` command, the `/sys/class/drm/card*` directory showed me only one result, now it shows me almost all the video outputs I have.

Before:

❯ ll /sys/class/drm/card*
/sys/class/drm/card0 ⇒ ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0

After:

❯ ll /sys/class/drm/card*
/sys/class/drm/card0 ⇒ ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
/sys/class/drm/card0-DP-1 ⇒ ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-DP-1
/sys/class/drm/card0-DP-2 ⇒ ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-DP-2
/sys/class/drm/card0-eDP-1 ⇒ ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-eDP-1
/sys/class/drm/card0-HDMI-A-1 ⇒ ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-HDMI-A-1

---

I did another test removing from `/etc/default/grub` the video parameters (GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1"). Then, I reboot, in grub execute `fix_video` and it works again, but only the first time, if I reboot, it lost the behavior of showing in both monitors the information. With this, I believe that the solution is in the GRUB as you told me Seth.

Is some way the GRUB and the booting are not recognizing the options in `/etc/default/grub`?

I restored the `/etc/default/grub` to: `GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1 video=DP-0:d video=DP-3:1920x1080@60e"`. And, I am ready for the next steps.

Offline

#18 2023-05-12 15:22:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

I believe you

That's great and stuff, but you should rather understand that everything X11 happens _after_ the boot.
Knowing > Believing.

Every time, I make a change to `GRUB` or `mkinitcpio`, I follow these steps:

That's ok, but really not required. grub-mkconfig will apply the config from /etc/defaults and you can do that from the running system.

DP-1, DP-2, eDP-1 & HDMI-A-1 are the relevant output names for the modedb parameters.
https://aur.archlinux.org/packages/edid-decode-git on /sys/class/drm/card0-*/edid can tell you which one is which.
Are you absolutely certain that their presence is linked to fix_video and not "nvidia_drm.modeset=1" ? (Keep the latter no matter what)

it only works if I go into GRUB and run the `fix_video` command

You can execute that from the grub.cfg, somewhere before the "linux   /vmlinuz-linux" line.

/boot/grb/grub.cfg is the authorative file, /etc/defaults/grub is just used by grub-mkconfig to write the former, but that is not a necessary approach. You can write /boot/grb/grub.cfg manually.

Offline

#19 2023-05-13 23:38:45

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

seth wrote:

DP-1, DP-2, eDP-1 & HDMI-A-1 are the relevant output names for the modedb parameters.
https://aur.archlinux.org/packages/edid-decode-git on /sys/class/drm/card0-*/edid can tell you which one is which.

# Internal monitor
edid-decode < /sys/class/drm/card0-DP-1/edid

# External monitor
edid-decode < /sys/class/drm/card0-DP-2/edid

Detailed Timing Descriptors:
    DTD 1:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz (544 mm x 303 mm)
                 Hfront   88 Hsync  44 Hback  148 Hpol P
                 Vfront    4 Vsync   5 Vback   36 Vpol P
    DTD 2:  1920x1080  239.964363 Hz  16:9    274.519 kHz    571.000000 MHz (544 mm x 303 mm)
                 Hfront   48 Hsync  64 Hback   48 Hpol P
                 Vfront    3 Vsync   5 Vback   56 Vpol P
    Display Product Name: 'AORUS KD25F'
    Display Range Limits:
      Monitor ranges (Bare Limits): 48-240 Hz V, 255-255 kHz H, max dotclock 600 MHz

Complete information of the external monitor

edid-decode (hex):

00 ff ff ff ff ff ff 00 1c 54 00 24 ce 02 00 00
18 1d 01 04 a5 36 1e 78 3b 90 55 a7 55 53 a0 28
13 50 54 bf ef 00 d1 c0 81 80 31 68 31 7c 45 68
45 7c 61 68 61 7c 02 3a 80 18 71 38 2d 40 58 2c
45 00 20 2f 21 00 00 1e 0c df 80 a0 70 38 40 40
30 40 35 00 20 2f 21 00 00 1e 00 00 00 fc 00 41
4f 52 55 53 20 4b 44 32 35 46 0a 20 00 00 00 fd
00 30 f0 ff ff 3c 01 0a 20 20 20 20 20 20 01 99

02 03 20 f1 4d 01 03 05 14 04 13 1f 12 02 11 90
3f 4c 23 09 07 07 83 01 00 00 65 03 0c 00 10 00
37 7f 80 88 70 38 14 40 18 20 35 00 20 2f 21 00
00 1e 86 6f 80 a0 70 38 40 40 30 20 35 00 20 2f
21 00 00 1e fe 5b 80 a0 70 38 35 40 30 20 35 00
20 2f 21 00 00 1e ab 22 a0 a0 50 84 1a 30 30 20
36 00 20 2f 21 00 00 1a 7c 2e 90 a0 60 1a 1e 40
30 20 36 00 20 2f 21 00 00 1a 00 00 00 00 00 1d

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.4
  Vendor & Product Identification:
    Manufacturer: GBT
    Model: 9216
    Serial Number: 718
    Made in: week 24 of 2019
  Basic Display Parameters & Features:
    Digital display
    Bits per primary color channel: 8
    DisplayPort interface
    Maximum image size: 54 cm x 30 cm
    Gamma: 2.20
    DPMS levels: Off
    Supported color formats: RGB 4:4:4, YCrCb 4:4:4, YCrCb 4:2:2
    First detailed timing includes the native pixel format and preferred refresh rate
    Display is continuous frequency
  Color Characteristics:
    Red  : 0.6542, 0.3330
    Green: 0.3242, 0.6250
    Blue : 0.1572, 0.0751
    White: 0.3134, 0.3291
  Established Timings I & II:
    IBM     :   720x400    70.081663 Hz   9:5     31.467 kHz     28.320000 MHz
    DMT 0x04:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
    Apple   :   640x480    66.666667 Hz   4:3     35.000 kHz     30.240000 MHz
    DMT 0x05:   640x480    72.808802 Hz   4:3     37.861 kHz     31.500000 MHz
    DMT 0x06:   640x480    75.000000 Hz   4:3     37.500 kHz     31.500000 MHz
    DMT 0x08:   800x600    56.250000 Hz   4:3     35.156 kHz     36.000000 MHz
    DMT 0x09:   800x600    60.316541 Hz   4:3     37.879 kHz     40.000000 MHz
    DMT 0x0a:   800x600    72.187572 Hz   4:3     48.077 kHz     50.000000 MHz
    DMT 0x0b:   800x600    75.000000 Hz   4:3     46.875 kHz     49.500000 MHz
    Apple   :   832x624    74.551266 Hz   4:3     49.726 kHz     57.284000 MHz
    DMT 0x10:  1024x768    60.003840 Hz   4:3     48.363 kHz     65.000000 MHz
    DMT 0x11:  1024x768    70.069359 Hz   4:3     56.476 kHz     75.000000 MHz
    DMT 0x12:  1024x768    75.028582 Hz   4:3     60.023 kHz     78.750000 MHz
    DMT 0x24:  1280x1024   75.024675 Hz   5:4     79.976 kHz    135.000000 MHz
  Standard Timings:
    DMT 0x52:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz
    DMT 0x23:  1280x1024   60.019740 Hz   5:4     63.981 kHz    108.000000 MHz
    GTF     :   640x480    99.999537 Hz   4:3     50.900 kHz     43.163000 MHz
    GTF     :   640x480   119.999084 Hz   4:3     61.800 kHz     52.406000 MHz
    GTF     :   800x600    99.999707 Hz   4:3     63.600 kHz     68.179000 MHz
    GTF     :   800x600   119.999886 Hz   4:3     77.160 kHz     83.950000 MHz
    GTF     :  1024x768   100.000177 Hz   4:3     81.400 kHz    113.309000 MHz
    GTF     :  1024x768   119.999931 Hz   4:3     98.760 kHz    139.054000 MHz
  Detailed Timing Descriptors:
    DTD 1:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz (544 mm x 303 mm)
                 Hfront   88 Hsync  44 Hback  148 Hpol P
                 Vfront    4 Vsync   5 Vback   36 Vpol P
    DTD 2:  1920x1080  239.964363 Hz  16:9    274.519 kHz    571.000000 MHz (544 mm x 303 mm)
                 Hfront   48 Hsync  64 Hback   48 Hpol P
                 Vfront    3 Vsync   5 Vback   56 Vpol P
    Display Product Name: 'AORUS KD25F'
    Display Range Limits:
      Monitor ranges (Bare Limits): 48-240 Hz V, 255-255 kHz H, max dotclock 600 MHz
  Extension blocks: 1
Checksum: 0x99

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Underscans IT Video Formats by default
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 1
  Video Data Block:
    VIC   1:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
    VIC   3:   720x480    59.940060 Hz  16:9     31.469 kHz     27.000000 MHz
    VIC   5:  1920x1080i  60.000000 Hz  16:9     33.750 kHz     74.250000 MHz
    VIC  20:  1920x1080i  50.000000 Hz  16:9     28.125 kHz     74.250000 MHz
    VIC   4:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz
    VIC  19:  1280x720    50.000000 Hz  16:9     37.500 kHz     74.250000 MHz
    VIC  31:  1920x1080   50.000000 Hz  16:9     56.250 kHz    148.500000 MHz
    VIC  18:   720x576    50.000000 Hz  16:9     31.250 kHz     27.000000 MHz
    VIC   2:   720x480    59.940060 Hz   4:3     31.469 kHz     27.000000 MHz
    VIC  17:   720x576    50.000000 Hz   4:3     31.250 kHz     27.000000 MHz
    VIC  16:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz (native)
    VIC  63:  1920x1080  120.000000 Hz  16:9    135.000 kHz    297.000000 MHz
    VIC  76:  1920x1080   60.000000 Hz  64:27    67.500 kHz    148.500000 MHz
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 48 44.1 32
      Supported sample sizes (bits): 24 20 16
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 1.0.0.0
  Detailed Timing Descriptors:
    DTD 3:  1920x1080  143.999823 Hz  16:9    158.400 kHz    325.670000 MHz (544 mm x 303 mm)
                 Hfront   24 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   5 Vback   12 Vpol P
    DTD 4:  1920x1080  119.982181 Hz  16:9    137.260 kHz    285.500000 MHz (544 mm x 303 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   5 Vback   56 Vpol P
    DTD 5:  1920x1080   99.930409 Hz  16:9    113.221 kHz    235.500000 MHz (544 mm x 303 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   5 Vback   45 Vpol P
    DTD 6:  1440x900    59.901458 Hz  16:10    55.469 kHz     88.750000 MHz (544 mm x 303 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   6 Vback   17 Vpol N
    DTD 7:  1680x1050   59.883253 Hz  16:10    64.674 kHz    119.000000 MHz (544 mm x 303 mm)
                 Hfront   48 Hsync  32 Hback   80 Hpol P
                 Vfront    3 Vsync   6 Vback   21 Vpol N
Checksum: 0x1d  Unused space in Extension Block: 5 bytes

Question: the names of the devices are very different from the `xrandr -q` command. Is this common, have different names in `/sys/class/drm/` and `xrand` linked to the monitors?

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected (normal left inverted right x axis y axis)
   1920x1080    120.00 +
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 544mm x 303mm
   1920x1080     60.00 + 239.96*  144.00   119.98   119.88    99.93    59.94    50.00
   ...
   ...
DP-4 disconnected (normal left inverted right x axis y axis)

---

seth wrote:

Are you absolutely certain that their presence is linked to fix_video and not "nvidia_drm.modeset=1" ? (Keep the latter no matter what)

it only works if I go into GRUB and run the `fix_video` command

You're right, looks like this parameter `nvidia_drm.modeset=1` is working in `/etc/default/grub`, regarding my testings.

---

seth wrote:

/boot/grb/grub.cfg is the authorative file, /etc/defaults/grub is just used by grub-mkconfig to write the former, but that is not a necessary approach. You can write /boot/grb/grub.cfg manually.

Let me do some tests/changes to the file `/boot/grb/grub.cfg`. I'll come back with my findings.

Offline

#20 2023-05-14 06:41:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

Is this common, have different names in `/sys/class/drm/` and `xrand` linked to the monitors?

Depends on the driver, but is for nvidia.

Complete information of the external monitor

This was really just to figure the relevant otput names.

Offline

#21 2023-05-14 16:54:00

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

Before to debug and change the `/boot/grb/grub.cfg`. I have other findings.

---

This post is regarding, the `/etc/default/grub` configuration using the video parameter.

First, looks like the command `fix_video` in grub, it did something well because sometimes is showing on the external and internal monitor the booting and login.

---

Premise: Is the Kernel detecting the `video=` parameter in GRUB under the `GRUB_CMDLINE_LINUX_DEFAULT=`?
Answer: No, I think, it should be taken these parameters, but I did some tests that showed that these parameters are ignoring in my laptot during the GRUB initialization and booting.

How did I confirm this?
Note: I checked in the GRUB menu that the changes are done before every test.

1. I tried to disable all the possible display's names, then I reconfigured GRUB and boot.

GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1 video=DP-0:d video=DP-1:d video=DP-2:d video=DP-3:d video=DP-4:d video=DP-5:d video=eDP-0:d video=eDP-1:d video=eDP-2:d video=eDP-3:d video=eDP-4:d video=eDP-5:d video=DFP-0:d video=DFP-1:d video=DFP-2:d video=DFP-3:d video=DFP-4:d video=DFP-5:d video=DPY-0:d video=DPY-1:d video=DPY-2:d video=DPY-3:d video=DPY-4:d video=DPY-5:d video=Connector-0:d video=Connector-1:d video=Connector-2:d video=Connector-3:d video=Connector-4:d video=Connector-5:d video=HDMI-0:d video=HDMI-A-1:d video=DPY-EDID-01896886-e6c8-b9a2-ad5b-a351e6e2ec6b:d video=DPY-EDID-89273157-05ee-52dc-1fb6-72102457f092:d"

The expected result was that all my monitors, including the internal monitor, were disabled after the GRUB menu and during the boot. Furthermore, it should be disabled during the console login prompt.

Result: Only my internal monitor was enabled and display the GRUB, the booting and the login prompt.


2. I tried to enable all the possible display's names, then I reconfigured GRUB and boot.

GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1 video=DP-0:1920x1080@60e video=DP-1:1920x1080@60e video=DP-2:1920x1080@60e video=DP-3:1920x1080@60e video=DP-4:1920x1080@60e video=DP-5:1920x1080@60e video=eDP-0:1920x1080@60e video=eDP-1:1920x1080@60e video=eDP-2:1920x1080@60e video=eDP-3:1920x1080@60e video=eDP-4:1920x1080@60e video=eDP-5:1920x1080@60e video=DFP-0:1920x1080@60e video=DFP-1:1920x1080@60e video=DFP-2:1920x1080@60e video=DFP-3:1920x1080@60e video=DFP-4:1920x1080@60e video=DFP-5:1920x1080@60e video=DPY-0:1920x1080@60e video=DPY-1:1920x1080@60e video=DPY-2:1920x1080@60e video=DPY-3:1920x1080@60e video=DPY-4:1920x1080@60e video=DPY-5:1920x1080@60e video=Connector-0:1920x1080@60e video=Connector-1:1920x1080@60e video=Connector-2:1920x1080@60e video=Connector-3:1920x1080@60e video=Connector-4:1920x1080@60e video=Connector-5:1920x1080@60e video=HDMI-0:1920x1080@60e video=HDMI-A-1:1920x1080@60e video=DPY-EDID-01896886-e6c8-b9a2-ad5b-a351e6e2ec6b:1920x1080@60e video=DPY-EDID-89273157-05ee-52dc-1fb6-72102457f092:1920x1080@60e

The expected result was that all my monitors, including the external monitor, were enabled after the GRUB menu and during the boot. Furthermore, it should be enabled during the console login prompt.

Result: Only my internal monitor was enabled and display the GRUB, the booting and the login prompt.


3. I tried to enable the displays provided by `edid-decode`, then I reconfigured GRUB and boot.

GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1 video=DP-1:d video=DP-2:1920x1080@60e"

The expected result was that the external and internal monitor, were enabled after the GRUB menu and during the boot. Furthermore, it should be enabled during the console login prompt.

Result: Only my internal monitor was enabled and display the GRUB, the booting and the login prompt.

Last edited by airv_zxf (2023-05-14 18:47:41)

Offline

#22 2023-05-14 17:45:37

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

Other findings on the fluctuation that sometimes shows on both monitors on boot and other times only on the internal monitor.

I repeat, apparently this was thanks to the `fix_video` command within GRUB, since it had never shown me both monitors in these 3 years of use. It could also have been some change suggested by Seth, although most have been more about logging and monitoring.

---

Premise: Is there a pattern to it sometimes showing boot on both monitors?
Answer: No, although usually, it is: one time it shows the boot on both monitors, the next time only on the internal one. There is a more frequent rate of times that it only shows on the internal monitor. In all the tests performed, there was never an occasion where two boots in a row displayed the information on both monitors.

# GRUB_CMDLINE_LINUX_DEFAULT=""
Start 0 | Recognize monitor: xx.xx | Login screen: 06.87
Start 0 | Recognize monitor: xx.xx | Login screen: 07.06
Start 0 | Recognize monitor: xx.xx | Login screen: 06.87
Start 0 | Recognize monitor: xx.xx | Login screen: 06.32
Start 0 | Recognize monitor: xx.xx | Login screen: 06.93
Start 0 | Recognize monitor: xx.xx | Login screen: 06.86
Start 0 | Recognize monitor: xx.xx | Login screen: 06.83
Start 0 | Recognize monitor: xx.xx | Login screen: 06.54
Start 0 | Recognize monitor: xx.xx | Login screen: 06.92
Start 0 | Recognize monitor: xx.xx | Login screen: 06.81
Start 0 | Recognize monitor: xx.xx | Login screen: 06.94
Start 0 | Recognize monitor: xx.xx | Login screen: 07.02

# GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1"
Start 0 | Recognize monitor: xx.xx | Login screen: 07.46
Start 0 | Recognize monitor: 06.08 | Login screen: 08.11
Start 0 | Recognize monitor: xx.xx | Login screen: 07.76
Start 0 | Recognize monitor: xx.xx | Login screen: 07.59
Start 0 | Recognize monitor: 05.17 | Login screen: 07.39
Start 0 | Recognize monitor: xx.xx | Login screen: 07.66
Start 0 | Recognize monitor: 05.31 | Login screen: 07.39
Start 0 | Recognize monitor: xx.xx | Login screen: 07.49
Start 0 | Recognize monitor: 05.11 | Login screen: 07.41

# GRUB_CMDLINE_LINUX_DEFAULT="debug udev.log-priority=debug nvidia_drm.modeset=1"
Start 0 | Recognize monitor: xx.xx | Login screen: 11.59
Start 0 | Recognize monitor: 05.84 | Login screen: 11.63
Start 0 | Recognize monitor: xx.xx | Login screen: 11.43
Start 0 | Recognize monitor: 05.83 | Login screen: 11.56
Start 0 | Recognize monitor: xx.xx | Login screen: 11.36
Start 0 | Recognize monitor: 05.73 | Login screen: 11.49
Start 0 | Recognize monitor: xx.xx | Login screen: 11.28
Start 0 | Recognize monitor: xx.xx | Login screen: 11.76
Start 0 | Recognize monitor: 05.56 | Login screen: 11.43

# GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1 video=DP-1:d video=DP-2:1920x1080@60e"
Start 0 | Recognize monitor: 05.38 | Login screen: 07.33
Start 0 | Recognize monitor: xx.xx | Login screen: 07.28
Start 0 | Recognize monitor: xx.xx | Login screen: 07.28
Start 0 | Recognize monitor: 05.09 | Login screen: 07.44
Start 0 | Recognize monitor: xx.xx | Login screen: 07.48
Start 0 | Recognize monitor: xx.xx | Login screen: 07.33
Start 0 | Recognize monitor: 05.29 | Login screen: 07.56

Description of the data.

  • I took time with a stopwatch on my cell phone.

  • All the boots start at zero, I tried this by entering GRUB and later pressing Ctrl+x to start the boot and at the same time start the stopwatch on my cell phone.

  • When the “recognize monitor” field has the value “xx:xx”, it means that on that occasion the external monitor did not turn on, nor did it show boot or login.

  • The login time is when it showed the last step, which is the screen where it asks for a username and password.


Relevant findings.

  • If the `nvidia_drm.modeset=1` parameter is not set to `GRUB_CMDLINE_LINUX_DEFAULT`. So, it never shows boot on external monitor. This means that `nvidia_drm` is a vital parameter and if it is being recognized by my laptop at boot.

  • Turn on the external monitor before the 6th second, this means that all efforts, such as log analysis, testing, changing configurations, must be on processes and configuration files that Linux uses during boot and before 6 seconds.

  • I don't know if it was a coincidence, but when the `video` parameter was set, the pattern changed to twice only showing the boot on the internal monitor, and once on both.

---

I haven't analyzed the logs yet, but I'm attaching them here in case anyone wants to review them.

# GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1" | Only boot in internal monitor
http://0x0.st/HN_z.txt

# GRUB_CMDLINE_LINUX_DEFAULT="nvidia_drm.modeset=1" | Boot in both monitors
http://0x0.st/HN_i.txt

# GRUB_CMDLINE_LINUX_DEFAULT="debug udev.log-priority=debug nvidia_drm.modeset=1" | Only boot in internal monitor
http://0x0.st/HNQe.txt

# GRUB_CMDLINE_LINUX_DEFAULT="debug udev.log-priority=debug nvidia_drm.modeset=1" | Boot in both monitors
http://0x0.st/HNQj.txt

Last edited by airv_zxf (2023-05-14 22:46:06)

Offline

#23 2023-05-15 14:10:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] Laptop: Not display boot information in external monitor

Premise: Is the Kernel detecting the `video=` parameter in GRUB under the `GRUB_CMDLINE_LINUX_DEFAULT=`?

Make sure they show up in

cat /proc/cmdline

The parameters are available to the kernel and userspace but not grub (by design - they're passed to the kernel by grub)
The BIOS/UEFI, Grub, initramfs and boot process are separate stages, w/ the latter being related, but the other two are completely separate.

… video=DP-1:d …

The expected result was that the external and internal monitor, were enabled

https://www.kernel.org/doc/Documentation/fb/modedb.rst wrote:

If 'd' is specified the output is disabled.

What if you add "sleep 10" before "fix_video" in your grub.cfg?
(Ie. we're giving the external output 10s to get its act together)

Offline

#24 2023-05-15 20:17:05

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

seth wrote:

Premise: Is the Kernel detecting the `video=` parameter in GRUB under the `GRUB_CMDLINE_LINUX_DEFAULT=`?

Make sure they show up in

cat /proc/cmdline

Yes, I checked every boot after login.

seth wrote:

The parameters are available to the kernel and userspace but not grub (by design - they're passed to the kernel by grub)
The BIOS/UEFI, Grub, initramfs and boot process are separate stages, w/ the latter being related, but the other two are completely separate.

Yes, it is something that I am starting to learn every time I analyze the `/boot/grub/` directory. Kudos to Seth and this problem, for the open window to this new knowldege.

It was some premise because in the logs that I provided, sometimes looks like the fork of the process and ques are not finishing correctly, but occasionally, they finished correctly and the external monitor still off.

seth wrote:
… video=DP-1:d …

The expected result was that the external and internal monitor, were enabled

https://www.kernel.org/doc/Documentation/fb/modedb.rst wrote:

If 'd' is specified the output is disabled.

I committed a mistake in my writing. I want to say if the option `:d` all should be disabled and the option `:e:` all should be enabled.

seth wrote:

What if you add "sleep 10" before "fix_video" in your grub.cfg?
(Ie. we're giving the external output 10s to get its act together)

I tried, but nothing because the `fix_video` command only enabled the fluctuation of both the monitors showing the boot sporadically. It is not fixing that every time I run the `fix_video`, it enables both monitors.

I tried in different part of the grub.cfg.  But, again, it is not working correctly. Sometimes shows on both monitors, others on the internal monitor.

› load_video
› set gfxpayload=keep
› echo 'Test fix video 01'
› sleep 10
› fix_video
› sleep 10
› insmod gzio
› insmod part_gpt
› insmod ext2
› search --no-floppy --fs-uuid --set=root e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a
› echo 'Test fix video 02'
› sleep 10
› fix_video
› sleep 10
› echo› 'Loading Linux linux ...'
› linux›/boot/vmlinuz-linux root=UUID=e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a rw kvm-intel.nested=1 nvidia_drm.modeset=1 video=DP-0:800x    600@60e video=DP-1:1024x768e video=DP-2:1920x1080e video=DP-3:800x600e video=DP-4:800x600e video=eDP-1:1920x1080e
› echo 'Test fix video 03'
› sleep 10
› fix_video
› sleep 10
› echo› 'Loading initial ramdisk ...'
› initrd› /boot/initramfs-linux.img
› echo 'Test fix video 04'
› sleep 10
› fix_video
› sleep 10

Furthermore, in this part of the code:

function load_video {
echo 'Test fix video 05'
sleep 10
fix_video
sleep 10
if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
echo 'Test fix video 06'
sleep 10
fix_video
sleep 10
}

---

NOTE:

I'll keep playing with the GRUB files. I extracted the `initramfs-linux.img` and I am checking some files, but it looks difficult because all of these are binaries. Furthermore, I need to go to GitHub or the official repo for Linux to check the source code.

Offline

#25 2023-05-15 20:48:34

airv_zxf
Member
From: Guadalajara City, Mexico
Registered: 2017-08-19
Posts: 54
Website

Re: [SOLVED] Laptop: Not display boot information in external monitor

Specific question for you Seth:

Would it be possible to display both monitors (internal and external) in the GRUB menu? Presently, it is only displaying the internal monitor.

I know that it depends on the BIOS and this stuff. That I really want to know is if Linux is loaded before and during the GRUB, and if this loaded kernel of Linux sets up the displays to show the GRUB.

Why am I asking this?
If the answer is yes, I assume that it is possible to work to load both monitors during the GRUB booting.
If the answer is no, the solution that I need to focus is only when the kernel parameters are set and when it loads the kernel image, which only occurs after the GRUB.

grub.cfg

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1920x1080x32
  load_video
  insmod gfxterm
fi
terminal_input gfxterm
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
play 480 440 1
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a rw kvm-intel.nested=1 nvidia_drm.modeset=1 video=DP-0:800x600@60e video=DP-1:1024x768e video=DP-2:1920x1080e video=DP-3:800x600e video=DP-4:800x600e video=eDP-1:1920x1080e
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a rw kvm-intel.nested=1 nvidia_drm.modeset=1 video=DP-0:800x600@60e video=DP-1:1024x768e video=DP-2:1920x1080e video=DP-3:800x600e video=DP-4:800x600e video=eDP-1:1920x1080e
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=e6fc0d0d-b8f8-446f-88b6-c68ff9228d6a rw kvm-intel.nested=1 nvidia_drm.modeset=1 video=DP-0:800x600@60e video=DP-1:1024x768e video=DP-2:1920x1080e video=DP-3:800x600e video=DP-4:800x600e video=eDP-1:1920x1080e
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

Offline

Board footer

Powered by FluxBB