Bug 89405

Summary: radeon: *ERROR* invalid ioctl running weston-launch while X is running
Product: DRI Reporter: fosero
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
weston-launch -u as root
none
boot into gdm on wayland connected through VGA
none
boot gdm on wayland connected through HDMI none

Description fosero 2015-03-03 08:56:42 UTC
Created attachment 113938 [details]
weston-launch -u as root

If I try to start a weston instance by using weston-launch, while gdm on X is running I get the following kernel message :

[di mrt  3 09:39:01 2015] [drm:radeon_cp_getparam_kms] *ERROR* invalid ioctl with kms radeon_cp_getparam_kms
[di mrt  3 09:39:01 2015] [drm:radeon_engine_reset_kms] *ERROR* invalid ioctl with kms radeon_engine_reset_kms

weston-launch refuses to run, attached a log of its debug output.

kernel - 3.19.0
libdrm - 2.4.59

RS780

weston/wayland 1.7
Comment 1 fosero 2015-05-04 16:59:48 UTC
Maybe unrelated, but there seems to be issue initializing given gfx chip when running anything non X.

On a fresh boot trying to run any wayland session (weston directly or current stable gdm) results in just a black screen. No obvious error in the logs. Booting with plymouth enabled also just results in a black screen.

However when X is started first any subsequent wayland session shows just fine.
Comment 2 Pekka Paalanen 2015-05-05 06:04:10 UTC
Have you tried weston-launch the right way?

That is, have weston-launch setuid root, then in a text mode VT, running 'weston-launch' without any arguments as a normal user?

Though, given your other problems, I don't expect that to help.

Also, sounds like you build weston with ./configure --with-cairo=gl or glesv2. As GL clients do not work (weston-desktop-shell crashing - that's probably yet another bug as the fallback fails), this causes the desktop (panel, wallpaper) to never come up, so you are left with a black screen also for that reason. Using the default --with-cairo=image would remove one "moving part" from the equation.

I'd expect people to ask for a full kernel log from boot up to and including the problem.
Comment 3 fosero 2015-05-05 12:44:07 UTC
Cairo with image backend makes no difference. I actually have no text console either, but I'm pretty sure I run weston the right way. Weston and gdm (wayland) run just fine, but just don't show up on the screen.

I actually think it's a general problem with initializing, since I have no text console as well or plymouth splash if enabled. The machine is usually connected trough HDMI to a nobrand HD720 TV. When I connect the same setup through VGA it does give an image (however the image is positioned wrong). I explicitly disable the VGA output when using HDMI trough the kernel command line :
 video=HDMI-A-1:1280x720@60 video=VGA-1:d radeon.audio=1 radeon.modeset=1 radeon.dpm=1 .

The weird thing is that if I start X it does show up and subsequent runs of weston or gdm on wayland are just fine, so it just happens after a fresh boot.

Attached 2 more logs with drm.debug=0xe, one for a boot with HDMI and one for boot with VGA into gdm on wayland.

By the way, the invalid ioctl message in #1 disappeared since switching to the 4.0 kernel.
Comment 4 fosero 2015-05-05 12:45:12 UTC
Created attachment 115544 [details]
boot into gdm on wayland connected through VGA
Comment 5 fosero 2015-05-05 12:45:52 UTC
Created attachment 115545 [details]
boot gdm on wayland connected through HDMI
Comment 6 Martin Peres 2019-11-19 09:02:02 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/589.

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.