You are not logged in.

#1 2025-03-18 01:34:55

munmap_me
Member
Registered: 2025-03-18
Posts: 6

[SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

Hi all, I hope your day or night is going well.

I would really appreciate some help with this issue I have been having with my vertical (portrait) monitor setup.

I'm looking for help rotating the text on my monitors 90° clockwise as early as possible into the boot process. My neck is starting to hurt from craning it every morning!

I've been struggling with this problem for a while now; maybe I just cant find the right search terms, but I haven't been able to find any way to rotate the text on my monitors in GRUB.

I would think it should be possible afterwards with a udev rule, but I don't know what I would even run with one. This early boot stuff gets confusing to me; I'm not sure what tool to use to modify text on the screen...

I am using Ly for my greeter. After I get past the login screen, my displays use the config I've set for them with my window manager.

I use Wayland, Hyprland, after I get past Ly.

If you've got any idea but need some more info, please let me know.

Last edited by munmap_me (2025-04-05 19:17:58)

Offline

#2 2025-03-18 07:38:53

seth
Member
Registered: 2012-09-03
Posts: 62,788

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

https://www.kernel.org/doc/Documentation/fb/modedb.rst
"video=rotate=90" or "video=rotate=270", depending on which side of your neck hurts more.

Alternatively
https://raw.githubusercontent.com/torva … /fbcon.rst
"fbcon=rotate:1" or "fbcon=rotate:3"

PSA: ly systematically breaks logind integration and pot. the session bus. Consider simply logging into a locked session if this is a defacto single-user system.

Offline

#3 2025-03-18 15:36:42

munmap_me
Member
Registered: 2025-03-18
Posts: 6

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

Hey, thanks for the help!

Thanks for the heads-up on Ly, but first things first right?

I've tried various options to GRUB_CMDLINE_LINUX_DEFAULT to change video mode stuff with no luck.

Either I'm not configuring it in the right place, or I have conflicting settings. I've tried debugging my grub config but I don't think I'm looking in the right places (journalctl) or i've just missed any warnings or errors.

If it helps, here is the line in question:

GRUB_CMDLINE_LINUX_DEFAULT="udev.log_priority=3 video=nvidia_drm:1920x1080,rotate=270 nvidia_drm.modeset=1 nvidia_drm.fbdev=0 loglevel=5"

where

video=nvidia_drm:1920x1080

is newly added and has no effect.
also, I have tried using a display output instead of a driver (e.g. DP-1 instead of nvidia_drm) to no avail.

P.S. I'm going to look into the formatting syntax for this forum and maybe edit this post tonight when I have time, sorry hmm

P.P.S. I don't know if I was unclear but just to clarify: I also am not getting the proper rotation on Ly.

Last edited by munmap_me (2025-03-20 04:59:04)

Offline

#4 2025-03-18 15:57:07

seth
Member
Registered: 2012-09-03
Posts: 62,788

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

Try just "video=rotate=270"
Also make sure the commandline is applied

cat /proc/cmdline

editing /etc/default/grub does nothing by itself, you'd have to grub-mkconfig as well

Offline

#5 2025-03-18 17:57:48

munmap_me
Member
Registered: 2025-03-18
Posts: 6

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

I did grub-mkconfig and confirmed the arguments were applied, I appreciate the tip though as a month ago I didn't know that grub-mkconfig has to be called to apply changes to GRUB config :')


I have had issues in the past with cmdline video arguments, I think maybe the fact that I have "nvidia_drm.modeset=1" in there overrides any changes to video mode.



That being said, I added "fbcon=rotate:3" which does fix the rotation issues (!!!) after I get past GRUB, which still has landscape orientation.

So the last issue is the video mode arguments not having any effect. I think I remember doing a good amount of searching regarding this issue only to find out that I can either have nvidia/noveau drivers loaded at boot, or make video mode arguments, but not both. I'll have to confirm this later as I should be working right now

Thank you so much for the framebuffer tip! You've given my spine a few extra years smile

Last edited by munmap_me (2025-03-18 17:59:02)

Offline

#6 2025-03-18 20:17:07

seth
Member
Registered: 2012-09-03
Posts: 62,788

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

I added "fbcon=rotate:3" which does fix the rotation issues (!!!) after I get past GRUB

This will never fix the pre-boot system (BIOS, Grub), nb. that that parameter "only" rotates the console, not the framebuffer itself (which may be entirely sufficient for your case, though)

maybe the fact that I have "nvidia_drm.modeset=1" in there overrides any changes to video mode

No. It maybe possible that the nvidia driver cannot do this (nvidia_drm.modeset=1 blocks the simpledrm device, so that won't get in the way) but in any event "video=nvidia_drm" is wrong and for "video=DP-1:…" you'd want to check /sys/class/drm/card*/edid for whether that's actually the proper output.

"video=rotate=270" should™ however rotate everything, in doubt you might want to check the nouveau behavior (though that's probably not a viable solution, it'll at least tell whether the problem rests w/ the nvidia driver)

Offline

#7 2025-03-20 05:08:34

munmap_me
Member
Registered: 2025-03-18
Posts: 6

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

that parameter "only" rotates the console, not the framebuffer itself (which may be entirely sufficient for your case, though)

Yeah I know haha, while it's definitely sufficient I still hope to configure GRUB too if possible!

but in any event "video=nvidia_drm" is wrong

I must have misunderstood the document you mentioned about modedb:

To specify a video mode at bootup, use the following boot options::

    video=<driver>:<xres>x<yres>[-<bpp>][@refresh]

"video=rotate=270" didn't work unfortunately, I'll look at the nouveau behavior next, I really appreciate all the help smile

Offline

#8 2025-03-20 08:32:52

seth
Member
Registered: 2012-09-03
Posts: 62,788

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

This approach will never apply to grub.
If you can't rotate the output in the preboot system (UEFI), there apparently was a patch suggested, https://lists.gnu.org/archive/html/grub … 00164.html
But afaict it wasn't applied - you could try to patch and build grub yourself this way :\

Offline

#9 2025-04-01 14:29:51

munmap_me
Member
Registered: 2025-03-18
Posts: 6

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

Sorry for going AWOL -- things got really busy all of a sudden. Still haven't looked into the nouveau behavior but it's on my to-do for this week. I just added the GRUB patch you mentioned to my to-do as well, thank you!

This approach will never apply to grub

Just to be 100% clear, are you saying that "video=rotate=270"  (or any arguments to video in cmdline) will not rotate GRUB?
Or are you saying that the "video=<driver>:<xres>x<yres>[-<bpp>][@refresh]" won't rotate GRUB?

Thank you again for the help!

Offline

#10 2025-04-01 15:13:17

seth
Member
Registered: 2012-09-03
Posts: 62,788

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

None of the "video" parameters will apply to grub, they affect the kernel they're passed to.
You'll have to rotate the display in the pre-boot system (UEFI) or using the bootloader (and for grub that likely means to apply the linked patch, no idea whether any other bootloader can do anything like this)

Offline

#11 2025-04-05 19:15:07

munmap_me
Member
Registered: 2025-03-18
Posts: 6

Re: [SOLVED] Vertical/Portrait Monitors, text orientation during boot, ...

Thats alright I might end up trying to apply that patch in the future when I have an abundance of free time, thank you for helping so much! I'll mark the post as solved

Offline

Board footer

Powered by FluxBB