Bugzilla – Bug 105511
X fails - bad refresh rate
Last modified: 2005-08-25 13:22:08 UTC
On this machine, NLD and 9.3 installed without problems. 10.0 beta 1 and beta 2 fail to configure X, giving only a monitor with the error message "cannot display this video mode" or "refresh rate out of range". The monitor (Dell E771d) is correctly identified with correct refresh rates, and so is the graphics card. The default proposed by yast/sax is 1280x1024@16, and I've tried 1024x768@16 and even 800x600@16, but no video mode succeeds. I'm attaching the hwinfo from --gfxcard and --monitor
Created attachment 46499 [details] X config file and logs
Hmm ... nothing obviously wrong here. (--) R128(0): Virtual size is 1280x1024 (pitch 1280) (**) R128(0): *Mode "1280x1024": 105.2 MHz, 61.4 kHz, 58.0 Hz
Created attachment 46637 [details] working config and log from 9.3
I installed 9.3 on this machine and X worked. I copied the xorg.conf to 10.0 and it failed. Attached was the xorg.conf and the X log from 9.3 on this machine
Could you also attach X log from 10.0 with xorg.conf of 9.3?
Created attachment 46647 [details] X log 10 using 9.3 config here you are
I can't see any relevant differences in the logfile of 9.3 and 10.0 when using xorg.conf of 9.3. The only difference in the r128 driver I can see since 9.3 is DPMS related. Explicitely disable DPMS power states during close screen. Fix macro that takes a value and a mask of bits to modify to be behave evquvalently if the bits that should remain unchanged are set or unset in the value (Bugzilla #3369). --> https://bugs.freedesktop.org/show_bug.cgi?id=3369 --- xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h 19 Dec 2004 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h 23 May 2005 1.5 @@ -68,7 +68,7 @@ do { \ CARD32 tmp = INREG(addr); \ tmp &= (mask); \ - tmp |= (val); \ + tmp |= ((val) & ~(mask)); \ OUTREG(addr, tmp); \ } while (0) @@ -84,7 +84,7 @@ do { \ CARD32 tmp = INPLL(pScrn, addr); \ tmp &= (mask); \ - tmp |= (val); \ + tmp |= ((val) & ~(mask)); \ OUTPLL(addr, tmp); \ } while (0) Could you please copy the r128 driver of 9.3 to your 10.0 installation, so we can see whether it's a driver problem or a general Xserver problem? Thanks.
I copied /usr/X11R6/lib/modules/drivers/r128_drv.o from a default 9.3 installation to the 10.0 installation, and restarted X. With this old driver, it worked perfectly
Oops. I'll revert this patch and attach a new driver for testing.
Created attachment 46668 [details] New driver with DPMS patch reverted Please give it a try.
Tested, and it works, both with the X config from 9.3, the default X config from 10.0 and running sax2. Everything I tested with the new driver appears to work fine
Ok. We need to consider to disable this patch. We might do this for radeon as well. The same patch ist applied for radeon.
For now I will revert the patch only for r128.
done (fixed for Beta3). I let this open until we decide what do with the radeon driver.
Egbert, could you please comment on this? I reverted the hunk you can see in comment #7.
The patch is valid and required for other things. It may have uncovered another bug elsewhere.
Ok. I have a R128 board for testing available. Not sure I'll be able to reproduce this problem though. Should we investigate this issue?
I've got some r128 boards, too, however I may not be able to reproduce this either. I've reviewed the code and cannot immediately find a problem. There are some more likely candidates however I'd need to be able to verify which one is to blame. Since the display does not sync I assume the OUTPLLP() macro is the one that's causing trouble. For starters you may want to apply the patch only to the other macro. I will try to reproduce this problem later on.
Ok.Thanks.
Created attachment 47193 [details] New r128 driver with first hunk (OUTREG) applied Please test again, so we can if it's related to the OUTPLL hunk.
Tested, and it seems to work well
Thanks.
Is it really the OUTREG part that's applied?
Yes. Here it is: --- xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h 19 Dec 2004 19:4 9:33 -0000 1.4 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/r128_reg.h 23 May 2005 09:5 0:20 -0000 1.5 @@ -68,7 +68,7 @@ do { \ CARD32 tmp = INREG(addr); \ tmp &= (mask); \ - tmp |= (val); \ + tmp |= ((val) & ~(mask)); \ OUTREG(addr, tmp); \ } while (0)
Wow! I can reproduce this problem on my Rage 128 RF (1002:5246) and it went away when only applying the OUTREG hunk and not the OUTPLL hunk. I took the reporter's config file for testing this. (non working) monitor told me: 38 kHz, 36 Hz (working) monitor tells me: 61 kHz, 60 Hz
BTW, there has been another change before related to this: --- r128_reg.h 16 Jun 2004 09:43:58 -0000 1.3 +++ r128_reg.h 10 Nov 2004 08:05:38 -0000 @@ -76,7 +76,7 @@ #define OUTPLL(addr, val) \ do { \ - OUTREG8(R128_CLOCK_CNTL_INDEX, ((addr) & 0x1f) | R128_PLL_WR_EN); \ + OUTREG8(R128_CLOCK_CNTL_INDEX, ((addr) & 0x3f) | R128_PLL_WR_EN); \ OUTREG(R128_CLOCK_CNTL_DATA, val); \ } while (0)
Unfortunately adding this new hunk above didn't help. :-(
Created attachment 47509 [details] New r128 patch by Egbert, which fixes this issue. I'll provide a driver for testing ASAP.
Created attachment 47546 [details] fixed r128 driver
fixed for Beta4.