You are not logged in.

#1 2014-02-04 03:29:30

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Three independent issues here, all of them arcane enough that google-fu turns up nothing on any of them. These all started happening after installing a discrete amd gpu - the filesystem issues were just from a bad shutdown when I couldn't get any video out from the device and ssh wasn't working (couldn't really debug it remotely at that point). Respectively, my xorg server segfaults in glamoregl when X autostarts through kdm at boot, leaving the system in an inoperable state (a non-blinking cursor with no ability to vt switch), specifying an Intel driver section in my xorg confs prevents the radoen driver from ever being loaded even when explicitly specified, and my btrfs partition has unresolved refs on some files from my firefox profile - attempting to remove these files kills the filesystem, they are just invalid inodes though.

First, xorg segfaults with kdm autostarting, but not when I manually do systemctl start kdm. It probably has to do with kms taking effect late - I get the vesa terminal for a good second after kernel handoff from EFI. If I move the Intel driver into the initramfs, though, I still get the same problem, so I don't think they are related.

Here is the log of a failed autostart.

It seems to happen in glamoregl, but I have no idea why it would segfault at boot and not after the fact.

While I'm at it, the radeon cards displays are listed as HDMI-1-3, DisplayPort-1-3, etc - they don't show up in xrandr at all, even when not using PRIME. Attached screens are always black, so I'd like to know where those displayouts went.

Next, the issue with prime - and with moving Intel into the initramfs - if I specify a "Driver" section, such as this:

Section "Device"
  Identifier "integrated"
  Driver "intel"
  BusID "PCI:0:2:0"
  Option "TearFree" "true"
EndSection

Section "Device"
  Identifier "discrete"
  Driver "radeon"
  BusID "PCI:1:0:0"
EndSection

Radeon is never loaded, it doesn't even show up at all (or ati) in the xorg log. Regardless of the presence of the tearfree setting, or if I leave out the pci ids. I'd really like Intel with TearFree enabled because without it the desktop is a ripping mess. It boots fine with it set, it is just the radeon card isn't started, even when explicitly specified. Here is one of the logs that is just outright missing radeon.

Lastly, here is the autogen xorg.conf from a boot where I manually start kdm and don't have explicit devices sections, just to show a "good" run (it has some regular events and screen resizes to make sure everything works fine and dandy).

Principally I just want to be able to enable tearfree on my IGPU, and reenable autostart kdm so I can just boot back to the desktop again. The latter is an inconvenience, the former a real disaster - the tearing is so bad!

The last issue is the invalid contents of two sql database lock files from firefox:

checking extents
checking free space cache
checking fs roots
root 261 inode 673 errors 200, dir isize wrong
root 261 inode 743 errors 200, dir isize wrong
root 261 inode 763 errors 2000, link count wrong
    unresolved ref dir 1063 index 669679 namelen 18 name cookies.sqlite-wal filetype 1 error 4, no inode ref
root 261 inode 812 errors 410, odd dir item, nbytes wrong
root 261 inode 7052 errors 2001, no inode item, link count wrong
    unresolved ref dir 1063 index 669684 namelen 23 name webappsstore.sqlite-shm filetype 1 error 4, no inode ref
root 264 inode 1164 errors 1800, odd csum item, some csum missing
root 264 inode 1168 errors 1800, odd csum item, some csum missing
Checking filesystem on /dev/sdb2
UUID: c9b5ed7d-c495-43fa-b1d8-12b20889d693
found 2654984262 bytes used err is 1
total csum bytes: 202310600
total tree bytes: 1061457920
total fs tree bytes: 751808512
total extent tree bytes: 83931136
btree space waste bytes: 210685482
file data blocks allocated: 787035975680
 referenced 255712468992
Btrfs v3.12

I've found other people reporting the same bug - broken inode references - here and here, but nobody seems to have a solution how to get rid of them. #btrfs hasn't been really helpful here, either. Anyone have an idea how to get rid of these files? If all else fails, I can probably create a snapshot (I imagine it wouldn't contain the bad inodes) and immediately revert to it, or I could copy everything else off that subvolume, delete it, and recreate it.

Last edited by zanny (2014-02-04 03:42:05)

Offline

#2 2014-02-04 03:32:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

zanny, please edit your post.
When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Offline

#3 2014-02-04 15:19:50

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,989

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

zanny, you shouldn't put 3 problems in 1 thread, especially if they're not related  and i do think they are separate problems.

I suggest you make 1 thread for the BTRFS problem, 1 for the radeon / intel problem.
The kdm problem can be dealt with later.

For the graphic problem, start with posting lspci .
then boot to CLI (check arch systemd wiki page on how to disable kdm or boot directly to console) .
login to console, and run startx without any X configuration files.
Post the dmesg output and Xorg.0.log from that boot.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2014-02-04 18:35:25

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Post the dmesg output and Xorg.0.log from that boot.

Here are the X log and dmesg from a run without anything in xorg.conf.d, using a raw startx (with no payload). Radeon starts just fine with autoconfig, just like a real boot without any conf files specifying drivers. Problem isn't getting the card working, it is enabling tearfree on Intel while the card still loads when having explicit device sections for both doesn't work.

Last edited by zanny (2014-02-04 18:36:19)

Offline

#5 2014-02-05 13:06:09

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,989

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

[    20.808] (II) intel(0): SNA initialized with Haswell (gen7.5, gt2) backend

Ok, so without any xorg config everything works, but you get bad tearing ?

try a minimal config file , like this :

/etc/xorg/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
      Option "TearFree" "true"
EndSection

If you use startx with just the above, what does and doesn't work ?

The problem might also be in the acceleration method, which is SNA by default.

You could also try Option      "AccelMethod"  "uxa" or Option      "AccelMethod"  "glamor"


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2014-02-06 01:58:24

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Same things happen as before with both uxa and glamor. Xorg log here, Dmesg here. Regardless of combination of options (or lack thereof) having any conf files specifying an intel driver means radeon never loads, even when explicitly specified. Also worth noting dmesg always prints successful kernel space activation of radeon, to the point where I can on the live system just move in or out the 20-intel.conf file (and / or 20-radeon.conf to specify that as well) and restart x and either have the radeon gpu recognized or not.

Last edited by zanny (2014-02-06 01:59:53)

Offline

#7 2014-02-06 12:30:02

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,989

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Ok, problem is getting clearer now.

1 more thing to try :

Are both cards detected if you use the files below ?
They are intended to have X detect radeon card BEFORE the intel card

20-radeon.conf

Section "Device"
  Identifier "discrete"
  Driver "radeon"
EndSection

21-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
EndSection

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2014-02-06 13:55:44

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Well that narrows it down. If radeon comes first Intel never starts either.

So what would cause that, where it can autoconfig init both gpus and load them fine, but if I try to specify the device for either it never loads the other?

Offline

#9 2014-02-06 14:13:22

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,989

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

don't know enough about X inner workings, , but i'm beginning to think you found a bug in xorg configuration mechanism.
these bugs can be very machine-specific though and hard to troubleshoot.

Ok, 1 option that may help (it's  a longshot) : put BOTH intel and radeon in mkinitcpio.conf modules section, so they are loaded as early as possible.

then some hw / machine related questions :
are you running the latest version of bios/uefi ?

Are there settings to choose which card is used as primary ?

brand & model of your system ?
Desktop / laptop ?
What motherboard and cpu ?

the output of lspci would also be useful.

Last edited by Lone_Wolf (2014-02-06 14:16:55)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2014-02-06 21:29:24

quiqueck
Member
Registered: 2013-04-15
Posts: 70

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

I am having the same problems but unsure if it is the same reason: Sometimes the radeon card isn't recognized and kdm did not start. I have this after Clonig an Arch installation. After solving that issue, it seems to be all ok for one day with several boots. But today i have this trouble again.

lspci -k  | grep -A3 VGA

02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series]
        Subsystem: ASUSTeK Computer Inc. Device 03ca
        Kernel driver in use: radeon
        Kernel modules: radeon

The failure begins with: Boot -> Grub -> Kernelmessages -> Monitor turns off (Monitormessage: No Signal)

Then i could switch to vt2, Monitor turns on and i could login. There a startx bring up the Desktop but the hole system is very slow. So i have to restart with sudo shutdown -r now. At some time or another the reboot succeed.

Don't know if it is the same bug(?) so i show xorg.0.log of a failed X-Server:

[   718.857] (WW) xf86CloseConsole: KDSETMODE failed: Input/output error
[   718.857] (WW) xf86CloseConsole: VT_GETMODE failed: Input/output error
[   718.857] (EE) 
Fatal server error:
[   718.857] (EE) xf86CloseConsole: VT_ACTIVATE failed: Input/output error
[   718.857] (EE) 
[   718.857] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. 
[   718.857] (EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
[   718.857] (EE) 
[   718.857] (EE) 
[   718.857] (EE) Backtrace:
[   718.857] (EE) 0: /usr/bin/X (xorg_backtrace+0x48) [0x584ae8]
[   718.857] (EE) 1: /usr/bin/X (0x400000+0x1887c9) [0x5887c9]
[   718.857] (EE) 2: /usr/lib/libpthread.so.0 (0x7fad83f07000+0xf870) [0x7fad83f16870]
[   718.857] (EE) 
[   718.857] (EE) Segmentation fault at address 0x0
[   718.857] (EE) 
FatalError re-entered, aborting
[   718.857] (EE) Caught signal 11 (Segmentation fault). Server aborting
[   718.857] (EE) 

Some erros from /var/log/kdm.log:
1:

xf86: found device 1
removing GPU device /sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/drm/card0/card0-HDMI-A-1 (null)
removing GPU device /sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/drm/card0/card0-DVI-I-1 (null)
removing GPU device /sys/devices/pci0000:00/0000:00:09.0/0000:02:00.0/drm/card0/card0-VGA-1 (null)
KCrash: Application 'kdmgreet' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi directly
(EE) Server terminated successfully (0). Closing log file.
drkonqi: cannot connect to X server :0

2:

Initializing built-in extension DRI2
Loading extension GLX
(II) [KMS] drm report modesetting isn't supported.
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 

Activating OpenGL as compositing type in KDE-Systemsetting do not work allways too. Sometimes it works automatically, sometimes i could change it afterwards, often not.

Offline

#11 2014-02-07 01:33:24

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Lone_Wolf wrote:

put BOTH intel and radeon in mkinitcpio.conf modules section, so they are loaded as early as possible.

Here is the dmesg from doing so. So major discernable difference, but my kxrandr configuration mucked up the desktop and using the KCM display module will break the video output if I load i915 in the initrd, but I can manually configure screens via xrandr just fine.

Are there settings to choose which card is used as primary ?

There is a bios setting to switch primary device between igpu and pci, but it seems to only apply to the firmware, the gpus don't show up in a different order if I set pcie to primary. If i set the radeon card as the primary display, though, it forces the CSM on to vga boot it since the firmware of my board (z87i-deluxe) apparently doesn't include a radeon efi driver. It also requires me to attach one of my displays to the discrete card since it then no longer outputs early boot displays to the integrated.

There is also an "empower the integrated graphics with a discrete gpu" option, which is just for virtu mvp in Windows, and if I do a diff between a normal boot dmesg and with it enabled nothing changes, so I'm not sure if that setting does anything. It might change an EFI var, I didn't check that, but it doesn't impact the xorg conf loading issue at all.

are you running the latest version of bios/uefi ?
brand & model of your system ?
Desktop / laptop ?
What motherboard and cpu ?

4770k, Asus z87i-deluxe (z87 chipset, with an asmedia usb3 hub) firmware is up to date with a version from Jan 16th, and I just checked, nothing newer is out. The GPU is a 7870 ghz edition Pitcarin card.

The only peculiar things to this motherboard are a 12 phase power riser card, which is digital and independent of both the kernel and the chipset, and the presence of 3 fully functional digital display outs on the motherboard - on purpose, I run triple monitors (one I'm using with my notebook atm, so it isn't in any of these xorg logs). I don't even have much of an OC on the cpu, I just wanted the board for the 6 sata ports and 3 display outs.

the output of lspci would also be useful.

https://gist.github.com/Korvox/77014db16bfab855234c

There a startx bring up the Desktop but the hole system is very slow.

Are you booting with nomodeset or any other modifications to KMS in your boot? It looks like something is going wrong there, and that shouldn't be happening. What does glxinfo say? If your desktop errors out with the opengl Kwin backend it is most likely because it is using llvmpipe as a software renderer for it. Make sure that there is no blacklist on radeon in /etc/modprobe.d as well.

(II) [KMS] drm report modesetting isn't supported.

Are you sure your xf86-video-ati and ati-dri are up to date? This still seems like the driver isn't loading properly. What doe a full kernel log ook like?

Last edited by zanny (2014-02-07 01:40:22)

Offline

#12 2014-02-07 11:49:55

quiqueck
Member
Registered: 2013-04-15
Posts: 70

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

After this morning kdm shows up after three fails, now it seems to not work anytimes. Made sudo shutdown -r now for about five  times...

There is only the cloned arch-installation on a new SSD-HDD which makes this trouble. Now i am writing this from the arch-installation from normal HDD, which has no troubles at all. Both systems are up to date.

"Normally" the fails endet up in xorg.0.log with:

[    18.240] (EE) FBDEV(0): FBIOPUT_VSCREENINFO: No such device

The Videodriver is loaded at all, but in case the Monitor switches off, there is no Screen found. I guess that this is the reason for this failure in xorg.0.log. At last boot i get strange errors from systemd which i had never before today:

Feb 07 11:35:43 kaputtnik-arch kernel: EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
                                        Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
                                        (Note that use of the override may cause unknown side effects.)

and:

Feb 07 11:35:49 kaputtnik-arch kernel: [drm:uvd_v1_0_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
Feb 07 11:35:50 kaputtnik-arch kernel: [drm:uvd_v1_0_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
Feb 07 11:35:51 kaputtnik-arch kernel: [drm:uvd_v1_0_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
Feb 07 11:35:52 kaputtnik-arch kernel: [drm:uvd_v1_0_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
Feb 07 11:35:53 kaputtnik-arch kernel: [drm:uvd_v1_0_start] *ERROR* UVD not responding, trying to reset the VCPU!!!
Feb 07 11:35:53 kaputtnik-arch kernel: [drm:uvd_v1_0_start] *ERROR* UVD not responding, giving up!!!
Feb 07 11:35:53 kaputtnik-arch kernel: [drm:evergreen_startup] *ERROR* radeon: error initializing UVD (-1).

dmesg of a fail boot
xorg.0.log of a failed boot

Anyway, for me it seems to be that either the SSD make problems or the SSD-cable is not ok. I think of this, because since i install the ssd, i have trouble with grub-mkconfig and os-prober: some fat-partitions have suddenly errors and the os-prober script takes a long time to execute. This behavior happens regardless, in which System (SSD or normal HD) i try to update grub.cfg. This is all curios and hard to debug, because sometimes its all ok, and sometimes not sad Therefor i think its a a Hardwareproblem in my case.

Now i will try another SSD-cable...

Offline

#13 2014-02-07 13:01:34

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,989

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

quiqueck, your error messages suggest you got a different problem then zanny, best to start another thread about it.

Zanny, i'm beginning to think you got 2 separate graphics issues that are not related :

when using xorg autodetect config, SNA acceralation gives bad tearing . this is likely a problem in the intel driver.

- when using config files with device sections, xorg only uses the first device section and ignores the 2nd.

I THINK this has to do with how X interfaces with your uefi based system.

Both errors can only be solved by upstream, but we do know that using the option tearfree solves that behaviour, it's just that the 2nd bug blocks you from using that option.

Personally i'd say the autodetect / device section problem is the important one and you should register a bug for it at https://bugs.freedesktop.org/ , choose product xorg .

Last edited by Lone_Wolf (2014-02-07 13:02:07)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2014-02-07 14:12:16

quiqueck
Member
Registered: 2013-04-15
Posts: 70

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Lone_Wolf wrote:

quiqueck, your error messages suggest you got a different problem then zanny,

Yes, i think that too. Sorry for confusing.

I bought a new SATA-Cable and the first boot with this succeed. Sometimes there are little things which causes heavy failures on other devices...

best to start another thread about it.

Yes, if the Problem furthermore exist...

Thanks, and good luck to zanny

Offline

#15 2014-02-12 00:00:03

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

Just for posterity, if anyone comes upon this thread with similar issues, the resultant bug report on the xorg bugtracker is here: https://bugs.freedesktop.org/show_bug.cgi?id=74864

If it gets resolved, I'll add the fix here as well.

Offline

#16 2014-02-12 10:01:16

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,989

Re: Xorg segfault, radeon driver doesn't load, btrfs unresolved refs

You described the problem well in that bugreport, zanny.
I've added myself to the CC list, as this problem interests me.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB