Skip to contentSkip to conversation

New: [radeon] loading corrupts lspci entry + unloading crashes kernel

Bug 80901 [email protected] 1 participant 15 messages Jul 22, 2014

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=80901

            Bug ID: 80901
           Summary: [radeon] loading corrupts lspci entry + unloading
                    crashes kernel
           Product: Drivers
           Version: 2.5
    Kernel Version: 3.16.0
          Hardware: IA-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Video(DRI - non Intel)
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 143901
--> https://bugzilla.kernel.org/attachment.cgi?id=143901&action=edit
lspci w/ radeon

Hi all. I've been searching the internet for quite a while now, but couldn't find any solution to my problem. I currently am on a laptop Dell Inspiron 15R SE, with a i7 3632QM cpu ( which embeds a i915 intel card ) and a discrete AMD/ATI Radeon HD 773M.

I know this kind of hybrid graphics setup's support is getting better more recently, but I still am facing some problems with the open source driver.

The main problem is that, I don't really know if ( with PRIME ) my card is working at all. This is because when I tried the tool radeontop, it couldn't find my card. This is due, I suspect, to the fact that whenever I load my "radeon" module, I think it messes up the device. This seems confirmed by the fact that I get a clean lspci -vvv when the module is unloaded, and a "unknown header type 7f" when the module is loaded. See attachments please.

Also, it takes a few seconds to load the module itself, and when I unload it ( modprobe -r radeon ) it crashes my machine, right after a few seconds. The system log shows a dereference problem, but "live" I can only see the stack trace the kernel outputs and nothing more.

Steps to Reproduce:
modprobe radeon
modprobe -r radeon

Actual Results:
Radeon's LSPCI entry is messed up and card is not recognized by tools. On unloading, crashes.

Expected Results:
Radeon's LSPCI entry is ok, radeon card is recognized and on unloading, nothing.

Build Date & Hardware:
Laptop Dell Inspiron 15R SE
Intel i7 3632QM
AMD Radeon HD 7730M Cape Verde

Software:
Arch Linux
Custom Kernel 3.16.0-rc6
Xorg-server 1.16.0-2
xf86-video-intel 2.99.912-4
xf86-video-ati 1:7.4.0-3

Additional Builds and Platforms:
Problem encountered also with stock kernel config and with kernel version 3.13.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #1 from Andrea Paternò <[email protected]> --- Created attachment 143911
--> https://bugzilla.kernel.org/attachment.cgi?id=143911&action=edit
System Journal log

System log on failure

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #2 from Andrea Paternò <[email protected]> --- Created attachment 143921
--> https://bugzilla.kernel.org/attachment.cgi?id=143921&action=edit
Kernel config

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

Andrea Paternò <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #143901|application/octet-stream    |text/plain
          mime type|                            |
Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

Andrea Paternò <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #143911|application/octet-stream    |text/plain
          mime type|                            |
Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

Andrea Paternò <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #143921|application/octet-stream    |text/plain
          mime type|                            |
Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

Alex Deucher <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #3 from Alex Deucher <[email protected]> --- Does rendering with PRIME work? E.g., DRM_PRIME=1 glxinfo

I'm not sure if radeontop supports all cards or not.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#7 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #4 from Andrea Paternò <[email protected]> --- It does.

gandalf@the_shire ~ » LIBGL_DEBUG=1 DRI_PRIME=1 glxinfo | grep "renderer string"
libGL: Can't open configuration file /home/gandalf/.drirc: No such file or directory.
libGL: Can't open configuration file /home/gandalf/.drirc: No such file or directory.
OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE

Also, I just noticed that everytime I lauch anithing with PRIME, it takes a few seconds before returning the output. If you check the dmesg output I just attached, you'll see that it shows several driver-related outputs. Basically It prints them out everytime I lauch the program with PRIME

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #5 from Andrea Paternò <[email protected]> --- Created attachment 143931
--> https://bugzilla.kernel.org/attachment.cgi?id=143931&action=edit
dmesg

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #6 from Alex Deucher <[email protected]> --- (In reply to Andrea Paternò from comment #4)

Quoted 10 lines

It does.

gandalf@the_shire ~ » LIBGL_DEBUG=1 DRI_PRIME=1 glxinfo | grep "renderer string"
libGL: Can't open configuration file /home/gandalf/.drirc: No such file or directory.
libGL: Can't open configuration file /home/gandalf/.drirc: No such file or directory.
OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE

Quoted 4 lines

Also, I just noticed that everytime I lauch anithing with PRIME, it takes a few seconds before returning the output. If you check the dmesg output I just attached, you'll see that it shows several driver-related outputs. Basically It prints them out everytime I lauch the program with PRIME

Everything appears to be working fine. The delay and messages are due to the card being powered down by default to save power and then powered back up when you use it.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#10 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #7 from Andrea Paternò <[email protected]> --- Created attachment 143941
--> https://bugzilla.kernel.org/attachment.cgi?id=143941&action=edit
System Journal log after module unloading

Makes sense! Nonetheless, the "unknown header type 7f" problem remains, as well as the unloading problem. I managed to capture the journal log of the system just before the crash, which is attached.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#11 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #8 from Alex Deucher <[email protected]> --- (In reply to Andrea Paternò from comment #7)

Quoted 3 lines

Makes sense! Nonetheless, the "unknown header type 7f" problem remains, as well as the unloading problem. I managed to capture the journal log of the system just before the crash, which is attached.

The lspci -vvv problem is that lspci doesn't power up the GPU so it just reads back garbage since the GPU is powered down. It should work if you run lspci when the GPU is powered up (e.g., when rendering with DRM_PRIME=1 or if you disable runtime power management (boot with radeon.runpm=0 on the kernel command line in grub). The crash is a bug in vgaswitcheroo I think rather than the radeon driver.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#12 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

--- Comment #9 from Andrea Paternò <[email protected]> --- That is.. well. I feel quite dumb, because it totally makes sense. It totally works when the card is powered up: both lspci and radeontop work like a charm!

Now I only have to figure out what may cause the vgaswitcheroo problem

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#13 lore raw

[Bug 80901] [radeon] loading corrupts lspci entry + unloading crashes kernel

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=80901

Andrea Paternò <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #10 from Andrea Paternò <[email protected]> --- It turns out that the vgaswitcheroo crash may be avoided by integrating the radeon module directly into the kernel. Of course, this prevents the user from unloading it, but, with the power management features on, I see no reason why should I want to unload it.

I had to compile the radeon extra firmware in the kernel as well, but as of now, I am not facing any issue, even after suspending/resuming.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel