You are not logged in.

#1 2013-03-11 10:42:01

Joekickass
Member
Registered: 2012-10-04
Posts: 25

Debugging Xorg and drivers

Hello,

I'm running Arch Linux on a Macbook Pro Retina (MacBookPro9,1) and since support for this hardware is "in-progress", I'm using packages from testing. This makes my setup break from time to time, which I think is ok. Because of this, I've spent some time "debugging" both drivers and Xorg, but since I'm quite unexperienced in the the X/DRI architecture, I'm mostly fumbling in the dark. That's why am asking you guys to give som pointers AND short description (and maybe a reference or two) on commands/techniques that are nice to know when trying to find out why Xorg refuses to start with e.g. "AddScreen/ScreenInit failed" or "No screens found". I'll start with what I usually use...

collecting logs
First of all, it is important to know what information to present to the forums if you need help. See https://bbs.archlinux.org/viewtopic.php?id=57855 for more info.

Offline

#2 2013-03-11 10:42:32

Joekickass
Member
Registered: 2012-10-04
Posts: 25

Re: Debugging Xorg and drivers

lspci
Display PCI buses and connected devices, including your graphic card(s).

lspci -v
...
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0162] (rev 09) (prog-if 00 [VGA controller])
Subsystem: ASRock Incorporation Device [1849:0162]
Flags: bus master, fast devsel, latency 0, IRQ 45
Memory at f7800000 (64-bit, non-prefetchable) [size=4M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
I/O ports at f000 [size=64]
Expansion ROM at [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [a4] PCI Advanced Features
Kernel driver in use: i915
Kernel modules: i915
...

When used with the -v flag, you can for example see what driver your graphic card is using as well as what bus id it is using. This is useful when looking in the Xorg logs.

In the example above, the bus id is 00:02.0 and driver in use is i915.

References:

Last edited by Joekickass (2013-03-11 16:39:24)

Offline

#3 2013-03-11 10:43:16

Joekickass
Member
Registered: 2012-10-04
Posts: 25

Re: Debugging Xorg and drivers

lsmod
Show status of kernel modules

lsmod

Here you should find the kernel module for your graphic card. If it is missing, your problem is at the driver level.

References:

Offline

#4 2013-03-11 10:57:51

Joekickass
Member
Registered: 2012-10-04
Posts: 25

Re: Debugging Xorg and drivers

/var/log/Xorg.log
The Xorg log is where you can find information on what went wrong when starting X. There might be several logs, so check the timestamp to make sure you look at the correct log.

Pointers:

References:

Offline

#5 2013-03-13 08:47:24

Joekickass
Member
Registered: 2012-10-04
Posts: 25

Re: Debugging Xorg and drivers

Set verbosity in /var/log/Xorg.log
You can try to set a higher verbosity level for the x-server if the information in /var/log/Xorg.log gives too little information.

For example, if X refuses to start at all, you can try the following code to see if more information is printed to the logs:

# Stop gdm (or whatever login manager you are using. Don't really know if it is necessary, but most examples I've found does this)
systemctl stop gdm.service
# Start x and specify verbosity
startx -- -verbose 6 -logverbose 6 &> ˜/x.log

You can try different values to see if they have any effect. E.g. try to set verbose and logverbose to 0 to verify that the log now contains much less information than before.

References:

Offline

#6 2013-03-13 08:49:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Debugging Xorg and drivers

This should be added to the wiki, not here...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-03-13 09:34:32

Joekickass
Member
Registered: 2012-10-04
Posts: 25

Re: Debugging Xorg and drivers

I can move it to a suitable wiki-page if you have any suggestions. Maybe https://wiki.archlinux.org/index.php/Xo … leshooting?

Offline

#8 2013-03-13 10:25:16

mutlu_inek
Member
From: all over the place
Registered: 2006-11-18
Posts: 683

Re: Debugging Xorg and drivers

Joekickass wrote:

I can move it to a suitable wiki-page if you have any suggestions. Maybe https://wiki.archlinux.org/index.php/Xo … leshooting?

I'm not the one you're responding to, but this sounds like the right place to me. I'd say go ahead.

Offline

Board footer

Powered by FluxBB