You are not logged in.

#1 2012-12-22 23:46:40

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

mplayer cannot access /dev/sr0

Hi,

after installing sudo I can no longer play dvds with mplayer. I always get the message:

 Couldn't open dvd device: Permission denied.

The sudo wiki page doesn't mention this problem and I could only spot an old post in the forums where someone had a similar problem and I do not really think, that this is related. What would be the most appropriate way to overcome this problem?

edit: Maybe it is not sudo related; I just interpreted it as such.

Thanks,

Benjamin

Last edited by Lord Bo (2012-12-23 03:24:08)

Offline

#2 2012-12-23 00:28:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: mplayer cannot access /dev/sr0

Did you also happen to have a kernel upgrade that you haven't rebooted into?

If unsure or to narrow down the issue, what does `ls /dev/sr0` return?

Last edited by Trilby (2012-12-23 00:28:46)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-12-23 00:39:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: mplayer cannot access /dev/sr0

As far as I know, sudo should not have anything to do with it.

Are you using systemd?
What is the output of ls -l /dev/sr0
what is the output of loginctl seat-status seat0
what is the output of groups


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2012-12-23 01:25:46

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

Re: mplayer cannot access /dev/sr0

Thank you (both of you) for your answers.

Trilby wrote:

Did you also happen to have a kernel upgrade that you haven't rebooted into?
If unsure or to narrow down the issue, what does `ls /dev/sr0` return?

No, I don't think, that I had a kernel upgrade. I rebooted and the problem still persists.

# ls -l /dev/sr0
brw-rw----+ 1 root optical 11, 0 23. Dez 03:37 /dev/sr0 
ewaller wrote:

As far as I know, sudo should not have anything to do with it.
Are you using systemd?

Yes, you are probably right, sudo may not have anything to do with it, it was just the last I can remember me to have done, before the error occeured. I shouldn't jump at conclusions, sorry.

ewaller wrote:

what is the output of loginctl seat-status seat0

# loginctl seat-status seat0
seat0
  Sessions: *2
   Devices:
      ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input5
      │ (input:input5) "Power Button"
      ├─/sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input4
      │ (input:input4) "Power Button"
      ├─/sys/device...000:00/0000:00:01.0/0000:01:00.0/graphics/fb0
      │ (graphics:fb0) "Via"
      ├─/sys/device...0f.1/ata3/host2/target2:0:0/2:0:0:0/block/sr0
      │ (block:sr0)
      ├─/sys/devices/pci0000:00/0000:00:10.0/usb2
      │ (usb:usb2)
      │
      └─/sys/device.../0000:00:10.0/usb2/2-1/2-1:1.0/input/input0
      │   (input:input0) "Logitech USB-PS/2 Optical Mouse"
      ├─/sys/devices/pci0000:00/0000:00:10.1/usb3
      │ (usb:usb3)
      ├─/sys/devices/pci0000:00/0000:00:10.2/usb4
      │ (usb:usb4)
      ├─/sys/devices/pci0000:00/0000:00:10.3/usb5
      │ (usb:usb5)
      │
      ├─/sys/device.../0000:00:10.3/usb5/5-1/5-1:1.0/input/input1
      │ │ (input:input1) "Chicony USB Wireless HID Receiver"
      │
      ├─/sys/device.../0000:00:10.3/usb5/5-1/5-1:1.1/input/input2
      │ │ (input:input2) "Chicony USB Wireless HID Receiver"
      │
      └─/sys/device.../0000:00:10.3/usb5/5-1/5-1:1.2/input/input3
      │   (input:input3) "Chicony USB Wireless HID Receiver"
      ├─/sys/devices/pci0000:00/0000:00:10.4/usb1
      │ (usb:usb1)
      ├─/sys/devices/pci0000:00/0000:00:11.5/sound/card0
      │ (sound:card0) "V8237"
      ├─/sys/devices/platform/pcspkr/input/input6
      │ (input:input6) "PC Speaker"
      └─/sys/devices/virtual/misc/kvm
        (misc:kvm)
ewaller wrote:

what is the output of groups

# groups
users

After the error occeured, I indeed tried to add the user to optical and audio (which is broken, too) and it indeed helped. I removed the user from these groups afterwards. So I guess, that somehow systemd broke. But I can not yet determine how. I think I enabled a service for systemd today, but I cannot remember what it was. I'll tell you, as soon, as I do remember.

edit1: I now do remember: I enabled auto login for virtual console (see here). I will deactivate it again, to see, if it had any influences. ...
edit2: ... No, it didn't.

Last edited by Lord Bo (2012-12-23 01:44:09)

Offline

#5 2012-12-23 02:09:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: mplayer cannot access /dev/sr0

Well, my user is a member of optical, but I think that is supposed to be deprecated.  I am still figuring out this systemd stuff, but I think it is supposed to authorize the use of /dev/sr0. 

As an experiment, try adding yourself to optical, log out and log back in. 
And/or, verify that the output of loginctl -a session-status 1 shows that the status is active.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#6 2012-12-23 02:40:18

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

Re: mplayer cannot access /dev/sr0

ewaller wrote:

And/or, verify that the output of loginctl -a session-status 1 shows that the status is active.

Indeed, it showed status closing, that gave me the right clue, I think. It seems, as if I did something really stupid and somehow disabled the multi-user.target . After reenabling it:

systemctl enable multi-user.target

and a restart, everything worked again. Yet I don't know, what was wrong and I don't understand, why I had to enable it explicitly, since graphical.target was enabled. Again, I must have somehow broken it, though I cannot remember how I did that... Maybe it had something to do with enabling auto login for virtual console. My best guess is, that I understood something wrong there. So I'm sorry for wasting your time (and mine).

Offline

#7 2012-12-23 02:43:22

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: mplayer cannot access /dev/sr0

@ewaller, you can see what is handled by logind by viewing the contents of /usr/lib/udev/rules.d/70-uaccess.rules.  These lines should grant access to any optical drives (adding the uaccess tag):

# optical drives
SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG+="uaccess"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", TAG+="uaccess"

So I think being a local user in the optical group is now deprecated indeed.

Offline

#8 2012-12-23 03:21:34

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

Re: mplayer cannot access /dev/sr0

Ok, I tried to enable autologin for virtual console again. I am now pretty sure, that this is the thing, which causes the problem. So I will remove the solved flag. Does anyone know how I can properly enable autologin for virtual console? (And another question: Should I open a new thread for this question???)
And again, I have to correct myself. It was not the autologin, that was causing the problem, but cdm, see here. I uninstalled that and now everything works fine.

Last edited by Lord Bo (2012-12-23 03:42:03)

Offline

Board footer

Powered by FluxBB