Mir

[xmir] Mir/unity-system-compositor fails to start: Error opening DRM device

Bug #1206633 reported by Michał Sawicz on 2013-07-30
116
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Mir
Medium
Unassigned
Unity System Compositor
Medium
Unassigned

Bug Description

mir doesn't start, reporting in unity-system-compositor.log:

ERROR: /build/buildd/mir-0.0.8+13.10.20130730bzr896saucy0/src/server/graphics/gbm/gbm_display_helpers.cpp(284): Throw in function int mir::graphics::gbm::helpers::DRMHelper::open_drm_device(const mir::graphics::gbm::helpers::UdevHelper&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Error opening DRM device
[boost::errinfo_errno_*] = -13, "Unknown error -13"

lspci -vv: http://paste.ubuntu.com/5929936/

Daniel van Vugt (vanvugt) wrote :

The error 13 is in fact EACCES (Permission denied). This is normal for non-root users trying to start Mir.

You need to have DRI device permissions, which should have been set for you indirectly via lightdm. If you didn't come in via lightdm then you either need to be root or...
    sudo chown $USER /dev/dri/*

Robert Ancell (robert-ancell) wrote :

Michał - were you running as root?

Changed in mir:
status: New → Incomplete
importance: Undecided → Medium
Michał Sawicz (saviq) wrote :

Yes, was running as root.

Changed in mir:
status: Incomplete → Triaged
Vladimir Scherbaev (zemik) wrote :

I have same issue with starting mir. But I don't have folder /dev/dri..

Vladimir Scherbaev (zemik) wrote :

ERROR: /build/buildd/mir-0.0.8+13.10.20130810/src/server/graphics/gbm/gbm_display_helpers.cpp(284): Throw in function int mir::graphics::gbm::hel
pers::DRMHelper::open_drm_device(const mir::graphics::gbm::helpers::UdevHelper&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Error opening DRM device
[boost::errinfo_errno_*] = 0, "Success"

Shaharil Ahmad (shaharil-ahmad) wrote :

Also happen to me after recent update. Running fine before.

ERROR: /build/buildd/mir-0.0.9+13.10.20130823.3/src/server/graphics/gbm/gbm_display_helpers.cpp(284): Throw in function int mir::graphics::gbm::helpers::DRMHelper::open_drm_device(const mir::graphics::gbm::helpers::UdevHelper&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Error opening DRM device
[boost::errinfo_errno_*] = 0, "Success"

Shaharil Ahmad (shaharil-ahmad) wrote :

Enable mir on latest build, bug still exist,

ERROR: /build/buildd/mir-0.0.10+13.10.20130827.1/src/server/graphics/gbm/gbm_display_helpers.cpp(284): Throw in function int mir::graphics::gbm::helpers::DRMHelper::open_drm_device(const mir::graphics::gbm::helpers::UdevHelper&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Error opening DRM device
[boost::errinfo_errno_*] = 0, "Success"

Maarten Lankhorst (mlankhorst) wrote :

EACCES can mean someone else has opened the device too. eg similar to the plymouth/lightdm/xorg-server race.

This can be plymouth or xorg-server. Plymouth should be completely dead before starting mir, or become a mir client so it doesn't need to open the device node. Xorg-server needs to be started AFTER mir has opened the drm_fd.

Daniel van Vugt (vanvugt) wrote :

Linked a branch which *might* help.

mir finally start with latest update but freeze after enter the login password

ERROR: /build/buildd/mir-0.0.10+13.10.20130829.2/src/server/graphics/gbm/gbm_display_helpers.cpp(284): Throw in function int mir::graphics::gbm::helpers::DRMHelper::open_drm_device(const mir::graphics::gbm::helpers::UdevHelper&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Error opening DRM device
[boost::errinfo_errno_*] = 0, "Success"

Daniel van Vugt (vanvugt) wrote :

Actually I'm getting the bug with intel too...

sudo restart lightdm
restart: Job failed to restart

cat /var/log/lightdm/unity-system-compositor.log
ERROR: /build/buildd/mir-0.0.10+13.10.20130829.2/src/server/graphics/gbm/gbm_display_helpers.cpp(284): Throw in function int mir::graphics::gbm::helpers::DRMHelper::open_drm_device(const mir::graphics::gbm::helpers::UdevHelper&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Error opening DRM device
[boost::errinfo_errno_*] = 13, "Permission denied"

summary: - mir doesn't start "Error opening DRM device" on nVidia
+ Mir/unity-system-compositor fails to start: Error opening DRM device
Changed in unity-system-compositor:
status: New → Confirmed
Changed in mir:
importance: Medium → Critical
Changed in unity-system-compositor:
importance: Undecided → Critical
Changed in mir:
assignee: nobody → Eleni Maria Stea (hikiko)
status: Triaged → In Progress

I get this bug using an Intel GPU but in one case only: when a program that is the drm master is running before I start the lightdm/unity system compositor (eg: xserver, another instance of mir, maybe plymouth...). A first idea is that we shouldn't call the drmSetInterfaceVersion before mir becomes the drm master - as we do atm. I will investigate though... :)

Eleni Maria Stea (hikiko) wrote :

When I build/install the linked branch + the unity system compositor I can run (after reboot or restart of all services):
# restart lightdm
and then start many other xserver instances (startx) at the same time without getting the crash anymore.
Could you please check if you still get it in your systems? (Please don't forget the restart!)
Thanks!

Kai Mast (kai-mast) wrote :

Is there a packet somewhere or do I have to build Mir/XMIr myself?

tags: added: make-xmir-default
description: updated
Eleni Maria Stea (hikiko) wrote :

@Kai Mast, thank you, it seems that I still get the error under certain circumstances...
So, I am still investigating :)

For the record, when I got the crash, I got this failsafe log as well:

131 [ 473.381] (==) Depth 24 pixmap format is 32 bpp
132 [ 474.356] (==) FBDEV(0): Backing store disabled
133 [ 474.358] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
134 [ 474.358] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
135 [ 474.358] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
136 [ 474.358] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
137 [ 474.358] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument

...

368 [ 474.363] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
369 [ 474.363] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
370 [ 474.363] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
371 [ 474.363] (EE) FBDEV(0): FBIOPUTCMAP: Invalid argument
372 [ 474.363] (==) FBDEV(0): DPMS enabled
373 [ 474.363] (==) RandR enabled
374 [ 474.370] (II) SELinux: Disabled on system
375 [ 474.371] (II) AIGLX: Screen 0 is not DRI2 capable
376 [ 474.371] (II) AIGLX: Screen 0 is not DRI capable
377 [ 474.500] (II) AIGLX: Loaded and initialized swrast
378 [ 474.500] (II) GLX: Initialized DRISWRAST GL provider for screen 0
379 [ 474.511] (II) XKB: reuse xkmfile /var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm

Eleni Maria Stea (hikiko) wrote :

There are 2 different bugs mentioned here the lightdm restart/stop issue has been solved https://code.launchpad.net/~hikiko/mir/mir.1226144/+merge/185875 but I cant reproduce anymore the DRM exception. Could you please check if you still get it?

Changed in mir:
status: In Progress → Incomplete
Changed in mir:
status: Incomplete → In Progress
Kai Mast (kai-mast) wrote :

This is resolved for me, however I now have a lot of flickers when using usc.

kevin gunn (kgunn72) on 2013-09-17
Changed in unity-system-compositor:
status: Confirmed → Fix Committed
Giuseppe Fierro (gspe) wrote :

I have the same bug, lightdm doesn't start

ERROR: /build/buildd/mir-0.0.12+13.10.20130926.1/src/server/graphics/gbm/gbm_display_helpers.cpp(284): Throw in function int mir::graphics::gbm::helpers::DRMHelper::open_drm_device(const mir::graphics::gbm::helpers::UdevHelper&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Error opening DRM device
[boost::errinfo_errno_*] = 13, "Permission denied"

Daniel van Vugt (vanvugt) wrote :

Fix committed to USC? What was that?

Changed in unity-system-compositor:
status: Fix Committed → Invalid
Eleni Maria Stea (hikiko) wrote :

I don't get the DRM exception anymore, Daniel do you still get it?

Daniel van Vugt (vanvugt) wrote :

No I can't reproduce the bug with "sudo restart lightdm" this week.

But that wasn't the only way. Many people saw it simply on startup.

Changed in mir:
assignee: Eleni Maria Stea (hikiko) → nobody
Eleni Maria Stea (hikiko) wrote :

This error only occurs when xserver or another program is the drm master at the time we start mir. As far as I know we dont get it at startup anymore because lightdm gets sure that plymouth -which is a drm master- has stopped when xmir starts (which means that xmir can "safely" become the drm master).

We only get the error in cases like this:

xserver is running along with xmir
then for some reason we stop and start xmir
before mir starts and unity desktop shows up, we switch to the xserver graphics tty (so xserver becomes the drm master)
we switch back to the xmir and we get the open drm device error because xmir failed to become the drm master..

I don't know what we could do in this case except of printing a more relevant error message. There can be one master only and if this master is xserver we wouldn't like to crash it for mir to become the master in his place. So, I don't know how to fix this and if we really need to fix it. (If xserver runs rootless at some point we won't have that problem anymore).

Any ideas?

PS: I think it's not a critical bug anymore...

Daniel van Vugt (vanvugt) wrote :

I agree; it seems to have been fixed or at least worked around by process management improvements in lightdm. And the latest report of anyone experiencing the bug is now over a month ago.

No longer Critical, at least.

Changed in mir:
status: In Progress → Triaged
importance: Critical → High
Changed in unity-system-compositor:
importance: Critical → High
Daniel van Vugt (vanvugt) wrote :

Possibly not even High any more. It's not a bug if the exception is a correct statement about not being able to gain DRM mastership.

Wait and see if anyone finds a way to accidentally hit the error. If not, then it's not even a bug any more.

tags: removed: make-xmir-default
younes (younesgrar0) wrote :

got the same error

xorg.0.log : http://pastebin.com/G5cqEhNp
lightdm.log: http://pastebin.com/aC1wc9nB
unity-system-compotisor.log:http://pastebin.com/kQYvVCuK
x-0.log: http://pastebin.com/w9KULEd8

after i get logged into unity i have an error that says :
"Could not switch the monitor configuration
could not set the configuration for CRTC 378"

the only thing that works is the luncher and the dash (while the other part of the screen stays black flickering form time to time when i click something)

kevin gunn (kgunn72) on 2014-02-20
Changed in mir:
importance: High → Medium
Changed in unity-system-compositor:
importance: High → Medium
tags: added: xmir
summary: - Mir/unity-system-compositor fails to start: Error opening DRM device
+ [xmir] Mir/unity-system-compositor fails to start: Error opening DRM
+ device
Daniel van Vugt (vanvugt) wrote :

XMir 1.0 (the old Xorg extension) is now deprecated and is not being maintained or fixed. It is replaced by the new 'Xmir' binary (package 'xmir') introduced in Ubuntu 15.10 wily.

Is there any way to reproduce this bug without the old Xmir?

Changed in mir:
status: Triaged → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for Mir because there has been no activity for 60 days.]

Changed in mir:
status: Incomplete → Expired
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu Package testing tracker.

A list of all reports related to this bug can be found here:
http://packages.qa.ubuntu.com/qatracker/reports/bugs/1206633

tags: added: package-qa-testing
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers