LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 06-01-2013, 01:10 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,902

Rep: Reputation: 45
Optimizing video resolution.


Motherboard: Gigabyte GA-H61M-S1
Display adapter: onboard
Display monitor (CRT): Philips 107 E51
Operating system: Slackware 14.0 x86_64

Hi:
The motherboard is a brand new product (not an old computer). The monitor manual says:

Horizontal: 30-70 kHz
Vertical: 50-160 Hz
Video dot rate: 120 MHz
Max.resolution: 1280x1024
Recom. resolution: 1024x 768

The BIOS allows, through its menu, setting the internal graphics memory size up to 1024 MB (1GB). The /etc/X11/xorg.conf.d/ files:
Code:
Section "Monitor"
  HorizSync       31.5 - 50
  VertRefresh     40 - 90

That is, well inside the monitor limits.

Section "Device"
  Identifier      "VESA Framebuffer"
  Driver          "vesa"
  #VideoRam       4096
  #Insert clock lines here if apropriate

Section "Screen"
  Identifier      "Screen 1"
  Device          "VESA Framebuffer"
  Monitor         "My monitor"
  DefaultDepth    16
    
  Subsection "Display"
    Depth    16
    Modes    "1024x768" "800x600" "640x480"
With the video memory size set to 256MB (BIOS menu) and the Xorg configuration files set as above, when I start X the following happens: I can only switch between 800x600 and 640x480. Why doesn't X cycle through 1024x768 too?

Now, not touching the Xorg conf files, I go to the BIOS and set the video memory size at 1024 MB, which is the maximum. I start X, and the result is that the screen is a mess of scan lines. From the point of view of a user, no video.

So, two questions here: (1) Why does X not cycle through the 1024x768 resolution too, besides the other two? (2) What can possibly be the effect of setting the video memory size to its maximum (1024 MB)? The horizontal and vertical scan frequencies won't change and neither will the video dot clock. But somehow it seems the onboard video card (controller) gets confused.

NOTE: I set the video memory size at its maximum to have a good margin to play with the resolution. As on the other hand the maximum resolution specified by the display monitor manufacturer is 1280x1024, I think that, with a color depth equal to 16 bits something like the "tried" 256MB video size would be more than enough. How ever, I do not know how to compute the memory size for a given color depth and resolution. [Perhaps (1280 / 8) * 1024 * 2?]

EDIT: In regard to question (1) Why does X not cycle through the 1024x768 resolution too, besides the other two?: this happened when running Xfce (the Cholesterol Free Desktop Environment). I now ran KDE instead, and could freely cycle through the three resolutions, that is, by striking Ctrl-Alt-+ I could set the screen at 1024x768. What can be the difference between Xfce and KDE? In both cases /etc/X11/xorg.conf.d/* had the three resolutions set. KDE behaves as expected. Xfce does not!

Last edited by stf92; 06-01-2013 at 02:41 PM.
 
Old 06-02-2013, 04:15 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,865
Blog Entries: 2

Rep: Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798
I don't know why it doesn't work for you, but to give you some information about the memory usage:
Using a display resolution of 1024x768 at 32 bit (=4 byte) color depth (nobody uses 16 bit color depth nowadays) you get a memory usage of
Code:
1024 * 768 *4 = 3,145,728 bytes
              = 3072 kilobytes
              = 3 megabytes
You see that even with setting the size of the VRAM to 256MB you have plenty of room to play with resolutions. KDE with compositing enabled will use significantly more, but still not enough that you will hit any limits with 256MB.

Anyways, is there any reason why you use the vesa driver instead of the intel driver, which will give you more resolutions (and higher refresh rates), 2D-/3D- and video-acceleration and possibly fixes your video-problems?

Last edited by TobiSGD; 06-02-2013 at 04:17 PM.
 
1 members found this post helpful.
Old 06-02-2013, 06:20 PM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 3,975

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Quote:
Originally Posted by stf92 View Post
(1) Why does X not cycle through the 1024x768 resolution too, besides the other two?
You should check /var/log/Xorg.0.log for the messages concerning resolution choice. The VGA chip is only able to generate a discrete and limited number of resolutions/refresh rates.

For example if the VGA chip insists on generating 1024x768 at 70 Hz and not lower, you would need a 55 kHz horizontal clock, which is beyond the monitor specs as you specify them.

Without looking into Xorg.0.log I'd suggest to copy the horizontal and vertical rates correctly into xorg.conf. That might solve the problem right away. Also the chip might not be able to use 16 bits on 1024x768. There is no reason no to set the depth to 24 bits.

jlinkels
 
1 members found this post helpful.
Old 06-03-2013, 02:53 AM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,902

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by TobiSGD View Post
I don't know why it doesn't work for you, but to give you some information about the memory usage:
Using a display resolution of 1024x768 at 32 bit (=4 byte) color depth (nobody uses 16 bit color depth nowadays) you get a memory usage of
Code:
1024 * 768 *4 = 3,145,728 bytes
              = 3072 kilobytes
              = 3 megabytes
You see that even with setting the size of the VRAM to 256MB you have plenty of room to play with resolutions. KDE with compositing enabled will use significantly more, but still not enough that you will hit any limits with 256MB.

Anyways, is there any reason why you use the vesa driver instead of the intel driver, which will give you more resolutions (and higher refresh rates), 2D-/3D- and video-acceleration and possibly fixes your video-problems?
First of all, thank you TobiSGD and jlinkels. Secondly, about Xfce not cycling trough all three resolutions defined in /etc/X11/xorg.conf.d/, I found that, from the control paneal (Settings>Display) the resolution _can_ be set at the highest one of the three (1024x768). In fact, no matter what the resolutions specified in the configuration file Screen section, Xfce offers the three choices (640x480, 800x600, 1024x768).

I do not understand your video memory size computation as a function of resolution and color depth. With 1024x768, there are 768 scan lines. If I allot 1024/8 bytes per scan line, then I have 8 dots (aka pixels) per byte, which is how I think the controller works. Why allot a whole byte to only one dot? Perhaps it is necessary for shades (the grays if the color were black and white). Shades = intensity. So to every dot there corresponds 256 shades. I thought the shade or intensity was already contained in the color depth parameter.

The vesa driver: in other machines, consulting [with] linuxquestions, I have always been able to put the correct driver name in the Device section. For one of them, 'Driver "sis"', another: 'Driver "nvidia". For this Gigabyte H61, my latest machine, I do not even know if linux (slackware) has the appropriate drivers. I always assumed it has, as it has so, so many drivers, but I know neither its name nor the name that must be put in the Device section, Driver line.

Also, I have the DVD that came with the machine, where there is a directory named linux. But I never understood the meaning of files in that directory nor is there documentation in the DVD explaining the linux aspect. As the machine is from these last years, perhapas slackware 14.0 does not have these drivers.
 
Old 06-03-2013, 07:01 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,865
Blog Entries: 2

Rep: Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798Reputation: 3798
Quote:
Originally Posted by stf92 View Post
I do not understand your video memory size computation as a function of resolution and color depth. With 1024x768, there are 768 scan lines. If I allot 1024/8 bytes per scan line, then I have 8 dots (aka pixels) per byte, which is how I think the controller works. Why allot a whole byte to only one dot? Perhaps it is necessary for shades (the grays if the color were black and white). Shades = intensity. So to every dot there corresponds 256 shades. I thought the shade or intensity was already contained in the color depth parameter.
Using Truecolor+Alpha channel (32 bit color depth) you need 4 bytes per pixel, named ARGB (Alpha, Red, Green, Blue). If you only have one bit per pixel all you get would be a pure black/white display. For example, a value of #FF000000 will denote a solid black pixel, a value of #FFFF0000 will denote a solid Red pixel, with a value of #7FFF0000 you will get a half transparent red pixel. More info here: http://en.wikipedia.org/wiki/Color_depth

Quote:
The vesa driver: in other machines, consulting [with] linuxquestions, I have always been able to put the correct driver name in the Device section. For one of them, 'Driver "sis"', another: 'Driver "nvidia". For this Gigabyte H61, my latest machine, I do not even know if linux (slackware) has the appropriate drivers. I always assumed it has, as it has so, so many drivers, but I know neither its name nor the name that must be put in the Device section, Driver line.
The correct driver name is intel. Usually, with Slackware and those chips you don't need a xorg.conf at all, X will automatically choose the correct driver and will ask the monitor for supported resolutions.

Quote:
Also, I have the DVD that came with the machine, where there is a directory named linux. But I never understood the meaning of files in that directory nor is there documentation in the DVD explaining the linux aspect. As the machine is from these last years, perhapas slackware 14.0 does not have these drivers.
Those drivers are usually meant for older (read: real old) versions of Linux. Slackware 14 should support all your hardware out of the box.

Last edited by TobiSGD; 06-03-2013 at 07:02 AM.
 
Old 06-03-2013, 07:52 AM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,902

Original Poster
Rep: Reputation: 45
You are right with the video memory size computation. I was making a mistake. I put 'Driver "intel"' in the configuration file. Just replaced 'vesa' with 'intel'. Did not touch anything else. 'But X produced (EE) No devices detected'. I shall remove the config file to see what X does.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
optimizing for hd video playback? fiver22 Linux - Newbie 0 12-07-2011 09:54 PM
AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Others jchance Linux - Desktop 16 05-16-2011 11:23 AM
Have a Dell Inspiron 1100 with slow video or 640x480 video resolution? Solution here! beatupbilly Fedora 3 05-11-2007 10:44 AM
Optimizing the performance of a Via S3 ProSavage8 Video Card Adrohak Linux - Hardware 0 11-02-2004 06:08 PM
video resolution LeBurg Linux - General 1 03-05-2004 09:32 AM


All times are GMT -5. The time now is 04:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration