How to enter graphics mode?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
reload
Posts: 9
Joined: Sun Jul 12, 2015 10:15 am

How to enter graphics mode?

Post by reload »

Hello! How to enter graphics mode in protected mode without bios and grub? It will be cool if I can get 1920x1200 resolution. Thanks!
Update
Ok, I see I can't do this well without bios.
Last edited by reload on Tue Jul 14, 2015 3:22 am, edited 1 time in total.
....
seuti
Member
Member
Posts: 74
Joined: Tue Aug 19, 2014 1:20 pm

Re: How to enter graphics mode?

Post by seuti »

reload wrote:Hello! How to enter graphics mode in protected mode without bios and grub? It will be cool if I can get 1920x1200 resolution. Thanks!
If you want a resolution like 1920x1200 you will probably have to write your own graphics driver which is a massive task.
reload
Posts: 9
Joined: Sun Jul 12, 2015 10:15 am

Re: How to enter graphics mode?

Post by reload »

Yes, it won't be easy. But how can I setup graphics at all?
....
User avatar
BASICFreak
Member
Member
Posts: 284
Joined: Fri Jan 16, 2009 8:34 pm
Location: Louisiana, USA

Re: How to enter graphics mode?

Post by BASICFreak »

Short answer you cannot.

Long answer http://wiki.osdev.org/Category:Video

If you never plan on using real H/W Bochs provides a VBE that is easy to use in PMode. http://wiki.osdev.org/Bochs_VBE_Extensions
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
Sortie wrote:
  • Don't play the role of an operating systems developer, be one.
  • Be truly afraid of undefined [behavior].
  • Your operating system should be itself, not fight what it is.
reload
Posts: 9
Joined: Sun Jul 12, 2015 10:15 am

Re: How to enter graphics mode?

Post by reload »

you cannot.
Why? Linus Torvalds done this.
....
User avatar
BASICFreak
Member
Member
Posts: 284
Joined: Fri Jan 16, 2009 8:34 pm
Location: Louisiana, USA

Re: How to enter graphics mode?

Post by BASICFreak »

That's why it is the short answer.

It is possible but it will require either Real-Mode for SVGA or a driver for the card in question - which most have NO information available

You can also do VGA modes from PMode, 320x200x256, 640x480x16, etc. but not the high resolutions you are looking for.
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
Sortie wrote:
  • Don't play the role of an operating systems developer, be one.
  • Be truly afraid of undefined [behavior].
  • Your operating system should be itself, not fight what it is.
reload
Posts: 9
Joined: Sun Jul 12, 2015 10:15 am

Re: How to enter graphics mode?

Post by reload »

So I need to setup Video mode before seting up PM, right?
....
User avatar
BASICFreak
Member
Member
Posts: 284
Joined: Fri Jan 16, 2009 8:34 pm
Location: Louisiana, USA

Re: How to enter graphics mode?

Post by BASICFreak »

reload wrote:So I need to setup Video mode before seting up PM, right?
Or exit PM, or use V86.

But you may or may not be provided with the resolution you are looking for, you are limited to what the manufacturer placed in their video card bios
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
Sortie wrote:
  • Don't play the role of an operating systems developer, be one.
  • Be truly afraid of undefined [behavior].
  • Your operating system should be itself, not fight what it is.
User avatar
BASICFreak
Member
Member
Posts: 284
Joined: Fri Jan 16, 2009 8:34 pm
Location: Louisiana, USA

Re: How to enter graphics mode?

Post by BASICFreak »

BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
Sortie wrote:
  • Don't play the role of an operating systems developer, be one.
  • Be truly afraid of undefined [behavior].
  • Your operating system should be itself, not fight what it is.
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How to enter graphics mode?

Post by iansjack »

reload wrote:
you cannot.
Why? Linus Torvalds done this.
No, he didn't.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to enter graphics mode?

Post by Combuster »

BIOS and EFI are the only methods to set video modes that are oblivious to the exact video card used. If you refuse to use them, you'll have to pick every video card you want to support in turn and write a driver for it manually.

And no, Torvalds did not add video support at all. Long story short is that NVidia, ATI, Intel, Broadcom and the whole lot of graphics manufacturers write their own because Linux is too big not to support.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: How to enter graphics mode?

Post by Roman »

reload wrote:
you cannot.
Why? Linus Torvalds done this.
Nope, he just said "Nvidia, f*ck you".
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: How to enter graphics mode?

Post by Brendan »

Hi,
reload wrote:
you cannot.
Why? Linus Torvalds done this.
Originally Linus didn't bother with usable video card drivers at all and only supported text mode.

To fix that, people (Xorg, SVGAlib) built video drivers into user-space. Of course that sucked (when something crashed the kernel couldn't restore the video card's state or anything because the kernel has no usable video drivers). People put up with this retarded hackery for about 15 years.

To fix that, eventually people tried putting video mode setting into the kernel. There were a few attempts at doing this before it became "accepted practice". Of course that's only video mode setting and a video driver involves a lot more (hardware accelerated graphics, GPGPU, video card memory management, etc); so this was only a half-baked solution.

To fix that, a little later some of those other things (e.g. video card memory management) got shifted into the kernel too; but not part of a unified "video driver", but separately so that different parts of the same driver are in different parts of the kernel. It's very idiotic, but that's just how Linux is. That only left hardware accelerated graphics and GPGPU in user space; which (as far as I know) is where those parts of the "video driver" remain today.

Note that I doubt any of this was done by Linus himself - all the poorly designed hackery to work around Linus' original stupidity was done by other people; to produce the "glorious" pitiful mess that Linux has for video card drivers now.

Also don't forget that Linux is "monolithic-ish" and there's nothing to prevent potentially malicious kernel modules/drivers from doing anything they like. Because of this, when companies (ATI, NVidia) tried to support Linux (with proprietary drivers) developers thanked them by spitting in these company's faces - "encouraging" open source by refusing to provide a standard driver interface and constantly breaking existing (proprietary) video drivers (and blaming ATI and NVidia for the pointless breakage Linux developers and Xorg caused) just to hide the fact that the kernel has no security (or, relies on "open source" for the illusion of security). This means that even today, despite thousands of people (including large companies) working on the problem over 20+ years, end users are still struggling to get video (especially 3D acceleration) to work right on Linux.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
freecrac
Member
Member
Posts: 69
Joined: Thu Sep 20, 2012 5:11 am
Location: germany hamburg

Re: How to enter graphics mode?

Post by freecrac »

Hello
I like to fit the native resolution of 1920x1200 for my 28" LCD monitor from HANNSG.

Manufacturer Colorfull
Geforce GTX295
1920x1200
VBE Modenumber / Color
017C 8 Bit Color
017D 32 Bit Color

Manufacturer Sapphire
Radeon 7950
1920x1200
VBE Modenumber / Color
01D1 8 Bit Color
01D2 16 Bit Color
01D4 32 Bit Color

Dirk
User avatar
Muazzam
Member
Member
Posts: 543
Joined: Mon Jun 16, 2014 5:59 am
Location: Shahpur, Layyah, Pakistan

Re: How to enter graphics mode?

Post by Muazzam »

But, why don't you want to use BIOS?
Post Reply