Results 1 to 5 of 5

Thread: selecting a video mode on startup

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Posts
    3

    Default selecting a video mode on startup

    Hi all,

    I need to setup a few systems with a HD4670 card. I'm using catalyst 9.6, custom kernel. All works well except that I only can't seem to get the resolution/refresh rate I want from xorg.conf.

    Manually selecting the resolution I want (1280x1024@85Hz) using xrandr
    works when I do this:
    Code:
    xrandr --newmode "1280x1024_85.00"  159.36  1280 1376 1512 1744  1024 1025 1028 1075  -HSync +Vsync
    xrandr --addmode CRT2 "1280x1024_85.00"
    xrandr --output CRT2 --mode "1280x1024_85.00"
    And xrandr does show me the modelines I specify in xorg.conf. What I don't understand is how to make a particular modeline active for some output. In other words how do I do the equivalent of the above xrandr commands in xorg.conf? Or is this not possible with the catalyst 9.6?

    Here's my xorg.conf:

    Code:
    Section "ServerFlags"
    	Option		"DefaultServerLayout"	"Single"
    EndSection
    
    Section "Module"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Keyboard 0"
    	Driver		"keyboard"
    	Option		"CoreKeyboard"
    	Option		"XkbRules"		"xorg"
            Option          "XkbModel"		"pc104"
            Option          "XkbLayout"		"us"
            Option          "XkbVariant"		"altgr-intl"
            Option          "XkbOptions"		"lv3:ralt_switch,compose:menu"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Mouse 0"
    	Driver		"mouse"
    	Option		"CorePointer"
    	Option		"Device"		"/dev/input/mice"
    	Option		"Protocol"		"ImPS/2"
    	Option		"ZAxisMapping"		"4 5"
    EndSection
    
    Section "DRI"
    	Mode		0666
    EndSection
    
    Section "Monitor"
    	Identifier	"Monitor 0"
    	DisplaySize	360 270
    	Modeline 	"1280x1024_85.00"  159.36  1280 1376 1512 1744  1024 1025 1028 1075  -HSync +Vsync
    	Option		"PreferredMode"	"1280x1024_85.00"
    EndSection
    
    Section "Device"
    	Identifier	"Device 0"
    	VendorName	"Sapphire"
    	BoardName	"ATI Radeon HD4670"
    	Driver		"fglrx"
    	BusID		"PCI:1:0:0"
    	Screen		0
    #	Option		"Monitor-CRT2" "Monitor 0"
    EndSection
    
    Section "Screen"
    	Identifier	"Screen 0"
    	Monitor		"Monitor 0"
    	Device		"Device 0"
    	DefaultDepth	24
    	SubSection "Display"
    		Depth		24
    		Modes		"1280x1024_85.00"
    	EndSubSection
    EndSection
    
    Section "ServerLayout"
    	Identifier	"Single"
    	Screen		"Screen 0"
    	InputDevice	"Keyboard 0"
    	InputDevice	"Mouse 0"
    EndSection
    I'm probably missing something, but what?

  2. #2
    Join Date
    Jan 2008
    Posts
    294

    Default

    I haven't used fglrx for a while so don't have a clue where it is with xrandr.

    If you were using OSS drivers then you would need to uncomment the

    Option "Monitor-CRT2" "Monitor 0"

    but I guess you have already tried that.

    I have got fglrx to work with modelines in the past, using the old xorg.conf way, but with more recent fglrx they didn't work straight away (and fglrx never gave me the exact gtf frequencies I asked for, which was rather irritating).

    To get them to be used at startup I needed to start with the xorg.conf containing the mode, and then run amdcccle, where usually(!) the new mode would be available in the menu. After selecting the mode from there, in future fglrx would start with it.

  3. #3
    Join Date
    Jul 2009
    Posts
    3

    Default

    Quote Originally Posted by legume View Post
    I have got fglrx to work with modelines in the past, using the old xorg.conf way, but with more recent fglrx they didn't work straight away (and fglrx never gave me the exact gtf frequencies I asked for, which was rather irritating).
    Indeed. When I ask 1280x1024@85Hz it gives me 1600x1200@85Hz with an active 1280x1024 area in the center, how weird is that! @ 75Hz it works OK. Who could be responsible for this, fglrx or xrandr?

    Quote Originally Posted by legume View Post
    To get them to be used at startup I needed to start with the xorg.conf containing the mode, and then run amdcccle, where usually(!) the new mode would be available in the menu. After selecting the mode from there, in future fglrx would start with it.
    I'm setting some machines for a psycholinguistics research lab and I don't want the user to have any control over screen resolution and refresh rate. I like to control resolution and refresh rate from config files, on all our systems for all users. Maybe I could copy amdcccle's output settings file (which one?) to the target machines.

    I tried kernel 2.6.30 to see if the radeon driver there would support this HD4670 card but it didn't. Does the latest radeon driver support the HD4670? I only need resonably fast 2D, 3D support is not important to us.

  4. #4
    Join Date
    Jan 2008
    Posts
    294

    Default

    Quote Originally Posted by theov View Post
    Indeed. When I ask 1280x1024@85Hz it gives me 1600x1200@85Hz with an active 1280x1024 area in the center, how weird is that! @ 75Hz it works OK. Who could be responsible for this, fglrx or xrandr?
    I'd blame fglrx, I've seen that when changing with amdcccle alone, I think that once I had got it to start with my spceified res it didn't happen anymore. If that isn't the case for you then you may be able to fix it by specifying a virtual size in the screen section of your xorg.conf.

    Virtual 1280 1024

    That isn't quite what I meant by not getting what I asked for though. With fglrx and gtf modelines for my CRT monitor, I noticed that the same lines would result in slightly different timings compared to OSS driver(s).

    eg. a line specified 50Hz Vrefresh with fglrx would result in my monitors' OSD showing 49.9 (& testing confirmed this), but the same line gave 50HZ with the OSS drivers.

    I'm setting some machines for a psycholinguistics research lab and I don't want the user to have any control over screen resolution and refresh rate. I like to control resolution and refresh rate from config files, on all our systems for all users. Maybe I could copy amdcccle's output settings file (which one?) to the target machines.
    I would be wary of doing that unless the monitors are identical as you could be out of range for some.

    fglrx keeps settings in /etc/ati/amdpcsdb

    I hope the monitors in question are CRTs. If they are LCDs then even if they advertise and accept say 75Hz it's possible they will just drop frames and use 60Hz anyway.

    I tried kernel 2.6.30 to see if the radeon driver there would support this HD4670 card but it didn't. Does the latest radeon driver support the HD4670? I only need resonably fast 2D, 3D support is not important to us.
    The radeon.ko and drm.ko modules are not the drivers. As it happens for your card 2.6.30 is the first kernel where these modules will allow you to have accelerated 2D and xv.

    The latest radeon driver is part of Xorg (xf86-video-ati), so it's possible that your distro is using a version that is too old for a 4670. It should be supported with recent versions, so maybe there is a "distro way" for you to update that.

    To get radeon/ati to work you need to totally uninstall fglrx you can't just change the driver name in the device section.

    If you get radeon working you will need to change your xorg.conf as the connector names are different eg Monitor-CRT2 would become Monitor-DVI-0 or whatever xrandr shows the name for the output is.

  5. #5
    Join Date
    Jul 2009
    Posts
    3

    Default

    Quote Originally Posted by legume View Post
    ... you may be able to fix it by specifying a virtual size in the screen section of your xorg.conf.

    Virtual 1280 1024
    Too bad but that didn't make any difference.

    Quote Originally Posted by legume View Post
    I would be wary of doing that unless the monitors are identical as you could be out of range for some.

    fglrx keeps settings in /etc/ati/amdpcsdb

    I hope the monitors in question are CRTs. If they are LCDs then even if they advertise and accept say 75Hz it's possible they will just drop frames and use 60Hz anyway.
    I can make each client pick up its own version of it. But this /etc/ati/amdpcsdb file is full of undocumented unintelligible crap so I don't know if it actually contains info on connected monitors, which it shouldn't for my purpose. I suppose I just have to try.

    Quote Originally Posted by legume View Post
    The radeon.ko and drm.ko modules are not the drivers. As it happens for your card 2.6.30 is the first kernel where these modules will allow you to have accelerated 2D and xv.

    The latest radeon driver is part of Xorg (xf86-video-ati), so it's possible that your distro is using a version that is too old for a 4670. It should be supported with recent versions, so maybe there is a "distro way" for you to update that.
    Of course, your right (after a week of banging my head against the wall I can't think anymore). Anyway I've built the xorg radeon driver and installed it (wiped all fglrx stuff). But it just gave me a white screen. Virtual consoles didn't work either. The machine was still accessible via ssh and I couldn't detect any serious problem in Xorg.0.log. It detected the card and monitor nicely. Then I found out I was running kernel 2.6.28 again. Tried again with 2.6.30 and now it works as I want it. To my surprise log-in time went from 8 seconds with the fglrx driver to 1 second with the radeon driver.

    That's bye bye Catalyst for me. I'll try to use it again when it just works as any other xorg module, not requiring additional config management stuff. To the AMD people on this list, my experiences with the nVidia configuration tools made me chose for ATI Radeon video cards in the hope that would be better. It turns out (for our systems anyway) to be an even worse nightmare. I think it would be an improvement if the fglrx driver wouldn't keep persistent settings in amdpcsdb (it gets in the way). The system settings should go in xorg.conf and xrandr/user settings should be managed/stored by gnome or what have you. Thanks anyway for providing catalyst for linux.

    Legume, many thanks you for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •