Adjusting Monitor Resolution

Status
Not open for further replies.

feleven

Dabbler
Joined
Feb 17, 2014
Messages
39
I think this might be a DQOTD, but I can't seem to dope it out on my own:

When FreeNAS boots up, the text scrolling down the server monitor is quite large and extends below the bottom of the screen. The connection between motherboard and monitor is an old PCIe video board with VGA and DVI connectors, and I chose the VGA connection just cause I figured it being ancient and probably fully debugged by now, it would not present any hardware problems. Right. :)

I know I can adjust the horizontal and vertical size of the image on the monitor itself (well, actually it won't let me for some reason, but whatever), but how do I set the VGA resolution from FreeNAS? Its not a BIOS setting (I looked), which makes sense as the card is external to the mobo.

Right now the monitor comes up in 720 x 400, and I always get an on-screen reminder that I should set the monitor resolution to "native" 1920 x 1080. The manual says nothing about that, so I assume they expect the OS to do that. Just in case it made a difference, I tried plugging into the video card's DVI connector - but its dead, so I assume again that the OS has to activate it first.

So - I assume there is a FreeNAS or FreeBSD function that controls video output parameters. I'm searching for such an animal, but if anyone here can nudge me in the right direction, I'd sure appreciate it.

FreeNAS does such a great job during boot-up finding all the hardware and communicating with it without bothering me for drivers or anything, so I have to believe this is a simple setting somewhere in the OS.

Rod
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Is it off slightly or alot?Have you gone through the monitor's settings?
 

feleven

Dabbler
Joined
Feb 17, 2014
Messages
39
I miss almost an entire line at the bottom of the screen - all I see are the top tips of full-hieght characters sticking up from the bezel. The monitor's scaling adjustment is greyed out, so I suspect the monitor is just showing what the video card has been instructed to provide by the OS. I went through all the monitor settings (all are OSD), and the few related to screen dimensions and resolution seem unable to be changed.

As usual, no sooner had I posted my question here than I hit upon the right Google search terms, and found several candidate procedures. One involved recompiling the kernel, which is outside my experience so I ignored it.

Other procedures were less involved. One stated that FreeBSD comes up in essentially 80x25 character mode by default, but can be adjusted to any size supported by the graphics chip and monitor (although one search link warned that making your resolution TOO high would dramatically slow down scrolling - if you want super high-rez, they suggested using X11 and creating a high-rez terminal screen with all kinds of adjustability).

So, if you want something other than 80x25, you have to determine what "modes" are supported by your hardware, set a new mode, then if you want it persistent you have to modify "/etc/rc/conf", along the following lines:

1. determine available modes by loading the VESA module and querying it:
Code:
# kldload vesa
# vidcontrol -i mode < /dev/console



The output of the above tells you what modes are supported by graphics chip and monitor. The article I got this from suggested that not only the resolution but the geometry of the character set could be adjusted based on the modes supported. The author of the article said the output from the above came out in the following format for each supported mode:

Code:
280 (0x118) 0x0000001f G 1024x768x32 D 8x16 0xa0000 64k 64k 0xf3000000 3072k


meaning: mode=280, resolution=1024 x 768, 32-bit colour, font=8x16 geometry

To carry on his example, he said he preferred 1024x768 resolution with 132x60 geometry (instead of 80x25), so he did a one-time trial to see how it looked:

2. trial-select a preferred mode as root user:
Code:
# vidcontrol -g 132x60 MODE_280 < /dev/console


3. if the new mode is acceptable, make it a permanent part of the boot process by adding it to /etc/rc.conf :
Code:
# allscreens_flags="-g 132x60 MODE_280"


4. finally, in case it isn't already being done, load VESA driver on boot by adding it to /boot/loader.conf:
Code:
# vesa_load="YES"


I haven't tried all this yet, so I'm just reporting what I've found. As long as I don't have to recompile anything, I'm willing to give it a try.

One thing: when the author is editing the rc.conf and loader.conf files, where are these located? On the SD card that FreeNAS boots from, or on the hard drives, or in memory? I assume on the SD card, but I don't know.

Rod
 

feleven

Dabbler
Joined
Feb 17, 2014
Messages
39
Interesting. It appears FreeNAS pre-loads VESA, as when I entered the vidcontrol command to query the modes, I got a listing. The list was VERY short, and included only modes 24, 30, 32, and 34. When I tried to change the mode to 30 and 34, it replied "invalid". But it would let me change to mode_32, which gave me an 80x50 screen - a little better. Perhaps the VGA cable is limiting?

So I figured I'd just try the DVI cable. Shut down. Disconnected VGA cable. Connected DVI cable. Rebooted. Hmm, sure enough FreeNAS recognized the DVI connection and the monitor came up with DVI active. Listing the vidcontrol modes gave me the same four choices, with the same "invalid" for mode_30 and mode_34.

When I entered "# vidcontrol -i adapter" with the VGA cable, the report showed VGA mode. Makes sense. But I got the same thing after switching to the DVI cable. I noticed a line that said something like "BIOS Mode 3" that was common to both cables, so now I wonder if there IS something in BIOS that sets the video card up into a default state.

At least for now, I can adjust the monitor a little.
Rod
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
As for editing rc.conf and loader.conf, well that is probably not going to happen since I believe they are still expanded from a compressed file during bootup. You may be able to do it some other way, maybe a script after boot.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not to be a total jerk(but I'm sure I'll sound this way)... but why care? I mean, it's a message that is correct, but it's for a text mode. You shouldn't really have to look at the system regularly either. So it's a very very minor inconvenience that will take considerable time(hours of research and testing?) for something that you won't care about if you ignore it. In my opinion there's far more important fish to fry in the world of servers and things you are probably doing wrong with FreeNAS than to worry about your screen resolution. :P
 

feleven

Dabbler
Joined
Feb 17, 2014
Messages
39
joeschmuck: yah, I found out that editing those two files wasn't going to get me very far. Perhaps a script might be the way to go. UM - where do scripts go to live on the hard drive? I suspect it doesn't matter, but where do unix users who like to keep their house tidy put their scripts, under /var? May as well learn to do it right up front, than have to unlearn a bad habit later.

After having read some of the responses you've provided to DQ'sOTD, I think I got away pretty easy, cyberjock. I'll consider myself lucky my eyebrows didn't get singed. :) You raise a fair question, though.

I was thinking the same way originally. But my cheapie PSU died on me a couple days ago, which prompted me to get a little more serious with my hardware before I start committing anything I really want to keep to the server (one HDD and one PSU death within two weeks of running the 4 new WD Reds put the handwriting on the wall for me - after reading all the warnings in these forums, I wasn't surprised).

I picked up two case fans, a new ASUS mb and CPU that support ECC memory and a big honking (WAY oversized) PSU with lots of SATA power leads. While I was putting this stuff together into the case over the weekend, I had an opportunity to reboot a few times, and just decided I couldn't stand the mess on the screen anymore, even if I only had to see it once a week or less. So that's what started this quest. Because the new ASUS mb didn't come with an on-board GPU like the old Gigabyte did, I had to toss in a REALLY old video card I had laying around, having just happened to strip it out of a 10-year old DELL 9200 desktop before recycling it two years ago. Not being that familiar with FreeBSD yet, I hadn't run across the vidcontrol command so I thought my problem may be the video card itself - so I posted the question here ... just before getting a few hits from my Google search (as usual).

Now that I understand how this works (more or less), I'll probably just leave it as is with the DVI cable and the slightly improved console display at 1024x768 resolution and 8x50 geometry. If I write the script joeschmuck suggested, I'll do it more to learn how they're written and executed, than because it matters.

While I have the attention of you two gentlemen, I have another brief DQOTD: does today's drive technology care if the drive sits flat horizontally, or upright vertically (connectors still at back or front, not top or bottom)? I'm pretty sure some server cases have drive slots that are vertical, but I might be confused. If I put my case over on its side to maximize airflow through the drive array, and ensure HDD/CPU/GPU heat rises upwards to vents/fans instead of to the underside of other components, am I asking for new trouble? Don't need anymore trouble for a while, at least until my credit card stops smokin'.

Thanks for all the help, guys!!
Rod
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The orientation of the drive doesn't really matter. What is recommended is that you install and use the drive in the same orientation as much as possible. Alternativing horizontal and vertical as bi-weekly backups in 2 system would be a bad idea. But in any x or y axis its fine as long as they aren't moved around alot.
 

feleven

Dabbler
Joined
Feb 17, 2014
Messages
39
I guess I better learn how to setup SSH into the server, which (if I understand what I've read correctly) would allow me to run without monitor and keyboard - headless, I think its called? Then it becomes a matter of the SSH terminal which should be controlled by the client machine. I've just started reading about SSH, so that might take a while to sort out. Meanwhile, I think I'll flip the case sideways or see if there's a place to put another fan near the drives. During a test long SMART test last night, I saw one drive dancing just under 35*C.:eek:
 

feleven

Dabbler
Joined
Feb 17, 2014
Messages
39
Dunno - are you thinking of the System -> Add Init/Shutdown Scripts? or System -> Add Sysctls? or System -> Add Tunable?

If one of these tweaks the loader.conf in a persistent manner, then that would be the right way to go. I'm not entirely confident I understand what goes into each of the last two, so I haven't futzed with either yet. The first one is obviously a startup and shutdown script repository. If you could briefly advise me on this aspect, I promise not to let this thread go any further OT than it already is. :)
 
Status
Not open for further replies.
Top