Summary: | LVDS-0 has wrapped screen with Randr1.2 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Carl van Tonder <carl> | ||||||||||||||||
Component: | Driver/nouveau | Assignee: | Nouveau Project <nouveau> | ||||||||||||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||||||||||
Severity: | normal | ||||||||||||||||||
Priority: | medium | CC: | joel.stan | ||||||||||||||||
Version: | git | ||||||||||||||||||
Hardware: | x86 (IA32) | ||||||||||||||||||
OS: | Linux (All) | ||||||||||||||||||
Whiteboard: | |||||||||||||||||||
i915 platform: | i915 features: | ||||||||||||||||||
Attachments: |
|
Created attachment 16563 [details]
Top-left corner of LVDS-0
Created attachment 16564 [details]
Top-right corner of LVDS-0
Created attachment 16565 [details]
xog.conf
Does the problem happen when not using nvidiafb? Is this effect still visible when starting X (from a good initial state) without the VGA head plugged? Do different modes affect it (it seems to be starting in a 1024x768 mode below; is it setting 1280x800 that breaks it)? >> Does the problem happen when not using nvidiafb? AFAIK I'm not using it. It doesn't show up in lsmod, at any rate >> Is this effect still visible when starting X (from a good initial state) without the VGA head plugged? If I set the laptop to a resolution at which the screen wraps, then reboot it with no external monitor plugged in, the problem persists. >> Do different modes affect it (it seems to be starting in a 1024x768 mode below; is it setting 1280x800 that breaks it)? 12800x800 is the only ode I've been able to find that actually fills the screen --- it's a 16:10 and resolutions like 1024x786 show up in the centre with vertical letterboxing. I see this too on a HP Pavilion tx1000 - the screen is wraps ~10 pixels from the right side over to the left. This is with the LDVS panel, I haven't tested VGA. Using nouveau git from 20080801, and xserver 1.4.99.906 on Ubuntu Intrepid. Logs can be found at http://verbal.mithis.com/~shenki/nouveau/ This bug has persisted since first report despite: * Changing distro (Ubuntu -> Fedora) * Updating nouveau drm and x module to git head on a weekly basis * Changing kernel (whatever Ubuntu was on to 2.6.25.11-97.fc9.i686 hence it does seem to be a genuine bug with nouveau. For me the wrapping is now confirmed as exactly 15px. Just to be sure, can you confirm that once the wrapping has occurred, either returning to VT or starting X with randr12 disabled still displays the wrapping? Please also make register dumps while in X -- one with randr12 disabled (and no wrapping present), and one with the wrapping present -- as follows: git clone git://people.freedesktop.org/~airlied/radeontool git checkout origin/nvidia make (if there's problems with the asm/page.h include, comment it out) ./radeontool regs > logfile (In reply to comment #8) > Just to be sure, can you confirm that once the wrapping has occurred, either > returning to VT or starting X with randr12 disabled still displays the > wrapping? If the wrapping is present, I can switch to a vt (where wrapping is not present), but switching back to X still shows wrapping. I then modified xorg.conf to disable randr12, re-started X, there is no wrapping. > Please also make register dumps while in X -- one with randr12 disabled (and no > wrapping present), and one with the wrapping present -- as follows: > > git clone git://people.freedesktop.org/~airlied/radeontool > git checkout origin/nvidia > make (if there's problems with the asm/page.h include, comment it out) > ./radeontool regs > logfile This is all I get (amd64, ubuntu intrepid): $ sudo ./radeontool regs 00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2) Subsystem: Hewlett-Packard Company Device 30bf Flags: bus master, 66MHz, fast devsel, latency 0 Capabilities: [44] HyperTransport: Slave or Primary Interface Capabilities: [e0] HyperTransport: MSI Mapping Enable+ Fixed- Radeon control memory not found. (In reply to comment #9) > If the wrapping is present, I can switch to a vt (where wrapping is not > present), but switching back to X still shows wrapping. > > I then modified xorg.conf to disable randr12, re-started X, there is no > wrapping. Without a reboot in between, right? > > git clone git://people.freedesktop.org/~airlied/radeontool > > git checkout origin/nvidia > > make (if there's problems with the asm/page.h include, comment it out) > > ./radeontool regs > logfile > > This is all I get (amd64, ubuntu intrepid): > > $ sudo ./radeontool regs > 00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2) > Subsystem: Hewlett-Packard Company Device 30bf > Flags: bus master, 66MHz, fast devsel, latency 0 > Capabilities: [44] HyperTransport: Slave or Primary Interface > Capabilities: [e0] HyperTransport: MSI Mapping Enable+ Fixed- > Radeon control memory not found. Bah, nvidia chipset :) Try changing line ~478, replacing "nVidia" with "VGA compatible controller": @@ -475,7 +475,7 @@ We need to look through it to find the smaller region base address f8fffc00. if(fgets(line,sizeof(line),fp) == NULL) { /* if end of file */ fatal("Radeon hardware not found in lspci output.\n"); } - if(strstr(line,"nVidia") || strstr(line,"nVidia Corp")) { /* if line contains a "radeon" string */ + if(strstr(line,"VGA compatible controller") || strstr(line,"nVidia Corp")) { /* if line contains a "radeon" if(skip-- < 1) { break; } then re-run make and try again (In reply to comment #10) > > I then modified xorg.conf to disable randr12, re-started X, there is no > > wrapping. > > Without a reboot in between, right? Correct. > Try changing line ~478, replacing "nVidia" with "VGA compatible controller": > > @@ -475,7 +475,7 @@ We need to look through it to find the smaller region base > address f8fffc00. > if(fgets(line,sizeof(line),fp) == NULL) { /* if end of file */ > fatal("Radeon hardware not found in lspci output.\n"); > } > - if(strstr(line,"nVidia") || strstr(line,"nVidia Corp")) { /* if line > contains a "radeon" string */ > + if(strstr(line,"VGA compatible controller") || strstr(line,"nVidia > Corp")) { /* if line contains a "radeon" > if(skip-- < 1) { > break; > } For those who read this later: I had to remove the strstr(line, "nVidia Corp") from the if too, or else it would incorrectly match on that. Attachments of the register dumps follow. Created attachment 18260 [details]
radeontool register dump, randr12 enabled, cold boot
Created attachment 18261 [details] radeontool register dump, randr12 disabled No reboot between this dump and attachment 18260 [details], only an X server restart. Three things to try (try them individually first, then if no success, try them together), then add to the bug which one or which combination works (if any). 1) use a different 1280x800 mode at runtime: xrandr --newmode "1280x800R" 71.00 1280 1328 1360 1440 800 803 809 823 xrandr --addmode LVDS-0 1280x800R xrandr --output LVDS-0 --mode 1280x800R 2) hard code panel size in nv_crtc.c (then re-run make install etc): @@ -945,7 +945,7 @@ nv_crtc_mode_set_fp_regs(xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr a regp->fp_horiz_regs[REG_DISP_END] = adjusted_mode->HDisplay - 1; regp->fp_horiz_regs[REG_DISP_TOTAL] = adjusted_mode->HTotal - 1; - regp->fp_horiz_regs[REG_DISP_CRTC] = adjusted_mode->HSyncStart - 75 - 1; + regp->fp_horiz_regs[REG_DISP_CRTC] = 0x500; regp->fp_horiz_regs[REG_DISP_SYNC_START] = adjusted_mode->HSyncStart - 1; regp->fp_horiz_regs[REG_DISP_SYNC_END] = adjusted_mode->HSyncEnd - 1; regp->fp_horiz_regs[REG_DISP_VALID_START] = adjusted_mode->HSkew; @@ -953,7 +953,7 @@ nv_crtc_mode_set_fp_regs(xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr a regp->fp_vert_regs[REG_DISP_END] = adjusted_mode->VDisplay - 1; regp->fp_vert_regs[REG_DISP_TOTAL] = adjusted_mode->VTotal - 1; - regp->fp_vert_regs[REG_DISP_CRTC] = adjusted_mode->VTotal - 5 - 1; + regp->fp_vert_regs[REG_DISP_CRTC] = 0x320; regp->fp_vert_regs[REG_DISP_SYNC_START] = adjusted_mode->VSyncStart - 1; regp->fp_vert_regs[REG_DISP_SYNC_END] = adjusted_mode->VSyncEnd - 1; regp->fp_vert_regs[REG_DISP_VALID_START] = 0; 3) change a flag register in nv_crtc.c (then re-run make install etc): @@ -1018,7 +1018,7 @@ nv_crtc_mode_set_fp_regs(xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr a regp->fp_control |= (8 << 28); /* Use the generic value, and enable x-scaling, y-scaling, and the TMDS enable bit */ - regp->debug_0 = 0x01101191; + regp->debug_0 = 0x01141191; /* We want automatic scaling */ regp->debug_1 = 0; /* This can override HTOTAL and VTOTAL */ (In reply to comment #14) > 1) use a different 1280x800 mode at runtime Didn't work. > 2) hard code panel size in nv_crtc.c Worked! In case it's useful, here's what the driver had calculated for the offending values: adjusted_mode->HSyncStart - 75 -1 = 0x578 adjusted_mode->VTotal - 5 - 1 = 0x326 > 3) change a flag register in nv_crtc.c Err, wrong button :) That one produced an artistic combination of black alternating vertical lines and a vertically stretched image (we could only see the top 1/3 of the screen on the panel). Created attachment 18310 [details] [review] Probable fix Could you both test this please? (In reply to comment #16) > Created an attachment (id=18310) [details] > Probable fix Works for me. Thanks! (In reply to comment #16) > Created an attachment (id=18310) [details] > Probable fix > > Could you both test this please? > Fixed my instance of the problem too. Thanks a lot! Patch applied |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 16562 [details] Xorg log with external monitor plugged in Problem: Left-most 10px of my laptop's screen are offset right 10px, right-most 10px are displayed on the left of that screen. VGA-0 has no problems. Steps to re-produce: xrandr --output VGA-0 --mode 640x480 # to eleminate my previous Virtual line as a source of the problem xrandr --output VGA-0 --left-of LVDS-0 xrandr --output LVDS-0 --mode 1280x800 Expected result: The laptop and the external monitor form one large desktop, with all pixels in their correct spots! Actual result: See attached images Work-around: This problem persists even if the external monitor is removed and the computer re-booted. The only way to restore the correct display of LVDS-0 is to disable Randr1.2 in xorg.conf and re-boot (zapping X doesn't help in this case). ------------------------------------------------------------------------- [root@castlereagh ~]# lspci -vv -d10de:0244 00:05.0 VGA compatible controller: nVidia Corporation C51 [Geforce 6150 Go] (rev a2) (prog-if 00 [VGA controller]) Subsystem: Hewlett-Packard Company Unknown device 30bf Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 17 Region 0: Memory at b2000000 (32-bit, non-prefetchable) [size=16M] Region 1: Memory at c0000000 (64-bit, prefetchable) [size=256M] Region 3: Memory at b1000000 (64-bit, non-prefetchable) [size=16M] Capabilities: [48] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Address: 0000000000000000 Data: 0000 Kernel modules: nvidiafb ------------------------------------------------------------------------- carl@castlereagh:~$ lshal [snip] udi = '/org/freedesktop/Hal/devices/pci_10de_244' info.parent = '/org/freedesktop/Hal/devices/computer' (string) info.product = 'C51 [Geforce 6150 Go]' (string) info.subsystem = 'pci' (string) info.udi = '/org/freedesktop/Hal/devices/pci_10de_244' (string) info.vendor = 'nVidia Corporation' (string) linux.hotplug_type = 2 (0x2) (int) linux.subsystem = 'pci' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:05.0' (string) pci.device_class = 3 (0x3) (int) pci.device_protocol = 0 (0x0) (int) pci.device_subclass = 0 (0x0) (int) pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:05.0' (string) pci.product = 'C51 [Geforce 6150 Go]' (string) pci.product_id = 580 (0x244) (int) pci.subsys_product_id = 12479 (0x30bf) (int) pci.subsys_vendor = 'Hewlett-Packard Company' (string) pci.subsys_vendor_id = 4156 (0x103c) (int) pci.vendor = 'nVidia Corporation' (string) pci.vendor_id = 4318 (0x10de) (int) [snip]