Bug 57527 - no usable X11 on P4M800 (or similar) Chip
Summary: no usable X11 on P4M800 (or similar) Chip
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/openchrome (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium blocker
Assignee: Openchrome development list
QA Contact:
URL:
Whiteboard:
Keywords:
: 58800 99351 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-25 18:30 UTC by Thomas
Modified: 2017-01-22 20:54 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.log when started with ModeSwitch="legacy" (15.67 KB, text/plain)
2012-11-26 23:09 UTC, Thomas
no flags Details
Xorg.log with some features switched off, cf. subsequent xorg.conf (25.07 KB, text/plain)
2012-11-26 23:14 UTC, Thomas
no flags Details
xorg.conf reproducing red and black stripes (719 bytes, text/plain)
2012-11-26 23:23 UTC, Thomas
no flags Details
Login screen (2.21 MB, image/jpeg)
2012-11-28 23:21 UTC, Thomas
no flags Details
Desktop (2.26 MB, image/jpeg)
2012-11-28 23:23 UTC, Thomas
no flags Details
Xorg.log when started without xorg.conf (33.14 KB, text/plain)
2012-11-28 23:36 UTC, Thomas
no flags Details
Fix line compare register programming. (488 bytes, patch)
2012-11-30 14:00 UTC, James Simmons
no flags Details | Splinter Review
not working git master (18.88 KB, text/plain)
2013-02-01 18:06 UTC, gg
no flags Details
"working" registers for 0.2.906 of Debian wheezy (18.89 KB, text/plain)
2013-02-01 18:12 UTC, gg
no flags Details
Xorg log for Ubuntu 13.0 (31.39 KB, text/plain)
2013-04-05 19:24 UTC, corvus.b.hax
no flags Details
Xorg0.log with git master (5.28 KB, text/plain)
2013-06-23 13:56 UTC, Timo
no flags Details
LVDS drm kernel fix. (479 bytes, patch)
2013-07-05 22:48 UTC, James Simmons
no flags Details | Splinter Review
Xorg0.log with drm-openchrome + LVDS drm kernel fix and git master (32.41 KB, text/plain)
2013-07-07 19:47 UTC, Timo
no flags Details

Description Thomas 2012-11-25 18:30:33 UTC
Since i have upraded to Ubuntu 12.10, i cannot get X11 into a usable state on an Amilo L7320.

Symptoms: a raw X11 starts up with 4 horizontal black and red stripes.  These stripes remain, whatever X client is started (lightdm login, xfxe4 desktop), although parts of what these clients draw is visible.  (So i can see the login panel, login, and get some parts of the desktop.

A screenshot does NOT show these stripes, however.

If the HW-mouse is not disabled, some artifacts can be seen around the mouse cursor.

I have tried to switch off more or less everything within reach (dri, glx, composition, acceleration, AGPDMA, Virtual Command Queue) and switched between XAA and EXA and different colour depths, but the results are always exactly the same.  (Except for the SW mouse cursor and differently colored artifacts with 15 bit color depth. ;-)

Trying to switch on VBE modes crashes either X11 or the whole of the machine.

Is there any configuration switch i can change that slipped my attention?  What kind of information is needed to track down the problem?

Any help appreciated

- Thomas
Comment 1 Xavier Bachelot 2012-11-26 14:10:24 UTC
Can you please provide the X log ?
Comment 2 Thomas 2012-11-26 23:09:31 UTC
Created attachment 70624 [details]
Xorg.log when started with ModeSwitch="legacy"

This is the Xorg.log when X is started with Option "ModeSwitchMethod" "legacy".  I am pretty sure the display resolution is in fact 1280 x 800.  There is a strange output line containing to modes, maybe this is a bug?  After this, the screen is black and X seems to be crashed.  There is no reaction to Ctrl-Alt-F1, but i can login via ssh and shutdown the notebook with the power button.
Comment 3 Thomas 2012-11-26 23:14:28 UTC
Created attachment 70626 [details]
Xorg.log with some features switched off, cf. subsequent xorg.conf
Comment 4 Thomas 2012-11-26 23:23:24 UTC
Created attachment 70628 [details]
xorg.conf reproducing red and black stripes

When looking closely, there are a few lines with red switched off completely, except for a few stray pixels, then a horizontal stripe (~ 200 px high) where red is switched on, then a dark stripe with red switched off, then again a red and then a black bar.  I could tage a photograph, if that helps.
Comment 5 Thomas 2012-11-26 23:32:18 UTC
The kernel in use is 3.5.7, the machine is started with acpi=noirq (otherwise the graphics had serious lags with the previous Ubuntu release), the stripes occur whether or not via_agp is blacklisted (and thus not loaded).
Comment 6 Bartosz Kosiorek 2012-11-28 22:10:10 UTC
Try to add "text" option to linux kernel. This line could be found during boot, by pressing "e" key, in grub.

Please provide also photo (by external camera) of your monitor screen.
Comment 7 Bartosz Kosiorek 2012-11-28 22:15:23 UTC
Try to provide /var/log/Xorg.0.log without xorg.conf configuration file (just move or delete it).
Comment 8 Thomas 2012-11-28 22:38:31 UTC
In Bug #53307 i saw some other information provided that i hope to be helpful:

root@amilo:/home/thomas# lspci -v -s 1:0
01:00.0 VGA compatible controller: VIA Technologies, Inc. CN700/P4M800 Pro/P4M800 CE/VN800 Graphics [S3 UniChrome Pro] (rev 01) (prog-if 00 [VGA controller])
	Subsystem: Fujitsu Technology Solutions Device 10cd
	Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
	Memory at f0000000 (32-bit, prefetchable) [size=64M]
	Memory at d1000000 (32-bit, non-prefetchable) [size=16M]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: [60] Power Management version 2
	Capabilities: [70] AGP version 2.0

root@amilo:~$ dmesg | grep -iE '(agp|drm)'
Linux agpgart interface v0.103
agpgart: Detected VIA VT3314 chipset
agpgart-via 0000:00:00.0: AGP aperture is 256M @ 0xe0000000
[drm] Initialized drm 1.1.0 20060810
[drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[drm] No driver support for vblank timestamp query.
[drm] Initialized via 2.11.1 20070202 for 0000:01:00.0 on minor 0
agpgart-via 0000:00:00.0: AGP 3.5 bridge
agpgart-via 0000:00:00.0: bridge is in legacy mode, falling back to 2.x
agpgart-via 0000:00:00.0: putting AGP V2 device into 4x mode
pci 0000:01:00.0: putting AGP V2 device into 4x mode

And this:

root@amilo:~$ grep '(EE)' /var/log/Xorg.0.log
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     9.999] (EE) AIGLX error: dlopen of /usr/lib/i386-linux-gnu/dri/unichrome_dri.so failed (/usr/lib/i386-linux-gnu/dri/unichrome_dri.so: cannot open shared object file: No such file or directory)
[     9.999] (EE) AIGLX: reverting to software rendering
root@amilo:~$ locate unichrome
/usr/lib/i386-linux-gnu/directfb-1.2-9/gfxdrivers/libdirectfb_unichrome.so

Should i use unichrome_dri?  (This would probably affect performance only, but not mere working or not, i guess.)  It doesn't seem to be offered by the ubuntu repository, anyway.
Comment 9 Thomas 2012-11-28 23:19:50 UTC
The "text" parameter leaves me with a text console after boot.  I have started X with startx, with no difference, however.  Starting X without xorg.conf shows no difference, either -- except for the mouse cursor being accompanied by a red square.
Comment 10 Thomas 2012-11-28 23:21:53 UTC
Created attachment 70762 [details]
Login screen
Comment 11 Thomas 2012-11-28 23:23:59 UTC
Created attachment 70763 [details]
Desktop
Comment 12 Thomas 2012-11-28 23:36:39 UTC
Created attachment 70764 [details]
Xorg.log when started without xorg.conf

BTW: i switched off VIA framebuffer in the kernel, should i enable it?
I switched off the whole of plymouth (the sugery boot screen hiding away anything important during bootup), at least i hope so.
I switched off the console font change, too.
Comment 13 James Simmons 2012-11-30 14:00:14 UTC
Created attachment 70835 [details] [review]
Fix line compare register programming.

This bug looks a lot like 53307. We seen a similar bug the DRM/KMS driver for the P4M800 chipset. Can you try the attached patch to see if that fixes your problem.
Comment 14 James Simmons 2012-11-30 15:12:10 UTC
Yes please turn off viafb.
Comment 15 Thomas 2012-12-04 23:49:49 UTC
Thanks a lot for your support.  Alas, as it seems, the patch did not have any effect at all.
This is what i did (i am not familiar with package management on debian-like platforms):

Install required build tools and lib headers:
# apt-get build-dep xserver-xorg-video-openchrome

Get and unpack the ubuntu source of the driver:
$ apt-get source xserver-xorg-video-openchrome

Patch it:
$ patch -p1 < (your patch, succeeded)

Build a deb package:
$ dpkg-buildpackage -us -uc -nc

Install it:
# dpkg -i ./xserver-xorg-video-openchrome_0.3.1-0ubuntu1_i386.deb 

(The md5sum of /usr/lib/xorg/modules/drivers/openchrome_drv.so has changed afterwards.)

Reboot (just in case).
No change. :-/

Where do i go next?
Comment 16 luktor1 2012-12-19 08:47:45 UTC
trying to connect up a external display and restarts
Comment 17 luktor1 2012-12-19 08:50:27 UTC
(In reply to comment #16)
> trying to connect up a external display and starts
Comment 18 fdm 2012-12-22 17:21:46 UTC
I had this problem as well, and plugging in an external monitor while starting X was the only thing I could do to workaround the issue. Additionally, enabling VBEModes would trigger a segfault.
Comment 19 James Simmons 2012-12-23 20:34:38 UTC
Working on getting some hardware to reproduce this bug on.
Comment 20 James Simmons 2012-12-31 19:10:28 UTC
Should be recieving some hardware the middle of January to work on this.
Comment 21 James Simmons 2013-01-15 16:05:19 UTC
I received the new hardware and could repeat the problem. I created a fix and have merged it into the master branch. Please do a checkout and try it.
Comment 22 Xavier Bachelot 2013-01-28 13:03:43 UTC
*** Bug 58800 has been marked as a duplicate of this bug. ***
Comment 23 Xavier Bachelot 2013-01-29 13:42:48 UTC
Plugging an external monitor is an interesting bit.
Could you please post a dump of the registers both when using only LVDS and when using LVDS and VGA. Comparing the 2 might give some insight on what's wrong.

Another thing to try would be to use Option "ModeSwitchMethod" "legacy" and see if that helps. Please provide the regs dump for this too.

In order to build the registers dumper tool, add --enable-viaregtool to the configure script. Then sudo /usr/sbin/via_regs_dump -dpm
Comment 24 Xavier Bachelot 2013-02-01 13:26:33 UTC
Yet more things to try :
- What about the 0.2.906 release ? Does it work better ? Please provide a regs dump too.
- As a last resort, please try with kernel mode setting. Does it work ? Again, regs dump. Here's some directions for KMS : http://www.freedesktop.org/wiki/Openchrome/TtmGemKms
Comment 25 gg 2013-02-01 18:06:25 UTC
Created attachment 74056 [details]
not working git master

These are registers for not working git master. latest xorg, latest 3.7.5 kernel
Comment 26 gg 2013-02-01 18:12:00 UTC
Created attachment 74057 [details]
"working" registers for 0.2.906 of Debian wheezy

I run Debian wheezy in chroot, xserver-xorg-video-openchrome-1:0.2.906-2 i386
Keyboard and mouse didn't work, but screen was ok.
Comment 27 gg 2013-02-01 18:18:41 UTC
I'm using fresh versions of packages, it is not easy to go back.
Compilation of 0.2.906 with latest xorg failed. xaalocal.h, etc.
Using CRT monitor also didn't succed, because there are problems with reading EDID. (VGA-1 disconnected).
Comment 28 gg 2013-02-10 15:43:55 UTC
I did some git checkouts and compilations on wheezy and:
commit 9d0a25466 was last OK.
commit f77321419 was BAD. The screen is visible, but there are wrong colours and other glitches. Between those commits there were segfaults.
That was tested on Amilo Pro 2030.
Comment 29 James Simmons 2013-03-20 22:00:17 UTC
Oh that is a old bug. This is just before the 0.2.905 release. Can you try that release to see igf it works for you.
Comment 30 gg 2013-03-21 08:22:54 UTC
0.2.906 is usable on Debian, but does not compile with latest xserver (1.14.0).
Comment 31 corvus.b.hax 2013-04-05 19:24:20 UTC
Created attachment 77497 [details]
Xorg log for Ubuntu 13.0
Comment 32 corvus.b.hax 2013-04-05 19:24:41 UTC
I'm having the same exact issue on my Gateway with Ubuntu 13.04 beta.

lspci:
01:00.0 VGA compatible controller: VIA Technologies, Inc. CN700/P4M800 Pro/P4M800 CE/VN800 Graphics [S3 UniChrome Pro] (rev 01)

Additionally, I don't see any hw cursor and (as it's using glx) whatever I see through the mess is update *extremely* slow.
Comment 33 fdm 2013-04-16 15:19:34 UTC
Sorry for the late reply. I have installed the latest version of Ubuntu 13.04 on a flash drive and tested again. I can happily say that this problem has been resolved for my hardware; tested with the package supplied from the Ubuntu main repo (0.3.1-0).

Gateway MX3230
01:00.0 VGA compatible controller: VIA Technologies, Inc. CN700/P4M800 Pro/P4M800 CE/VN800 Graphics [S3 UniChrome Pro] (rev 01)
Comment 34 Xavier Bachelot 2013-04-24 17:46:58 UTC
fdm, thanks for reporting back. Glad the issue is gone for you.

Thomas and other people, do you still have the issue ?
Comment 35 Thomas 2013-05-03 20:13:10 UTC
I just updated that notebook to 13.04.  I am not even sure, if the driver was updated at all, but the symptoms did not change.  I don't have that notebook within reach right now, but the version number seems to be unchanged.  Should i force a re-installation?  Or try 13.04 from scratch?
Comment 36 Timo 2013-06-23 13:54:47 UTC
With my Amilo L7320GW anything newer than 0.2.906 (including git) results in a black screen. The 0.2.906 gives me usable desktop but xv does not work and after suspend to disk I need to restart X.
Comment 37 Timo 2013-06-23 13:56:41 UTC
Created attachment 81268 [details]
Xorg0.log with git master
Comment 38 James Simmons 2013-07-05 22:48:34 UTC
Created attachment 82098 [details] [review]
LVDS drm kernel fix.

You xorg log seems to be cut off. I have a theory why your system doesn't work. It looks like similar problems with the Amilo 2030 which was solved recently. Can you try a drm-openchrome kernel.

http://www.freedesktop.org/wiki/Openchrome/TtmGemKms

and apply the patch I attached here. I have a feeling this will fix your problem. The patch is a test work around and not the final fix.
Comment 39 Timo 2013-07-07 19:47:26 UTC
Created attachment 82150 [details]
Xorg0.log with drm-openchrome + LVDS drm kernel fix and git master

With modeset=1 the screen got garbled and the system got unresponsive as soon as the via module was loaded. With modeset=0 the screen looks just like the original description and screenshots of this bug.
Comment 40 Kevin Brace 2017-01-22 20:07:26 UTC
I am closing this bug report.
If the problem persists with the latest version, please reopen the bug.
Comment 41 Gajdos Tamás 2017-01-22 20:54:30 UTC
*** Bug 99351 has been marked as a duplicate of this bug. ***


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.