Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pb accessing to framebuffer as non root
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
yfh2
Apprentice
Apprentice


Joined: 20 May 2004
Posts: 242

PostPosted: Sun May 15, 2005 2:48 pm    Post subject: Pb accessing to framebuffer as non root Reply with quote

Hello,

I have a problem accessing framebuffer as non root ...

For instance : as root 'mplayer -vo vesa' works fine, but as average user, it does not :

Code:

 Erreur à l'ouverture/initialisation de la sortie vidéo choisie (-vo).
 
 Désinitialisation audio: mp3lib
 vo: x11 uninit called but X11 not inited..
 


here is the result of ls -l /dev/fb* (as root)
Code:

 lr-xr-xr-x  1 root root 4 mai 15 15:09 /dev/fb0 -> fb/0
 lr-xr-xr-x  1 root root 4 mai 15 15:09 /dev/fb1 -> fb/1
 
 /dev/fb:
 total 0
 crw-rw-rw-  1 eb root 29, 0 jan  1  1970 0
 crw-rw-rw-  1 eb root 29, 1 jan  1  1970 1
 


However, I cannot list /dev/fb/* as user (permission denied)
I suspect this is the problem, but I fail to understand whay I can't get the permission, whatever the chmod.

So as to be comprehensive :
1) the user is in the 'video' group
2) 'mplayer -vo directfb' and 'mplayer -vo fbdev' give the ssame

What can be wrong ?
Back to top
View user's profile Send private message
remi2402
Retired Dev
Retired Dev


Joined: 28 Jun 2003
Posts: 111
Location: Paris, France

PostPosted: Sun May 15, 2005 6:33 pm    Post subject: Reply with quote

PAM should be blamed for your permission problems

PAM sets permissions when a user logs in and messes up all the permissions set by udev. If you want to try a simple solution, just comment this line in /etc/security/console.perms (it's along line 72)

Code:
<console>  0600 <diskonkey>  0660 root.disk
<console>  0600 <rem_ide>    0660 root.disk
#<console>  0600 <fb>         0600 root    <= this one :)
<console>  0600 <kbd>        0600 root
<console>  0600 <joystick>   0600 root
<console>  0600 <v4l>        0600 root.sys


Basically, that will tell PAM to forget about fb devices and not touch them. As far as I'm concerned, I emptied this file and it lets udev handle all the file permissions. Audio devices will remain in the audio group, and so on.

Hope that fixes it

Rémi
Back to top
View user's profile Send private message
yfh2
Apprentice
Apprentice


Joined: 20 May 2004
Posts: 242

PostPosted: Sun May 15, 2005 6:58 pm    Post subject: Reply with quote

no game :-(
Back to top
View user's profile Send private message
remi2402
Retired Dev
Retired Dev


Joined: 28 Jun 2003
Posts: 111
Location: Paris, France

PostPosted: Sun May 15, 2005 8:58 pm    Post subject: Reply with quote

did you reboot? PAM kicks in at reboot for that config file, but changes the perms on /dev whenever a user logs in or out.

Do you have udev or devfs?

Since the fb works as root, there is no (obvious) reason for it not to work as a user.

If you have devfs then you could write a script that's called by /etc/conf.d/local.start that resets the perms on all the files. I did this for a while for alsa related devices. However if your machine is used by different users, things will not work all the times. I had to put it on a crontab and even then, it felt more like a bandage trying to patch up the hole in the Titanic.

If you have udev, reboot your box, comment the line (you have already done this) and see if anything changes. Try upgrading to the latest udev-056. It's got better default for most devices.

Could you try this command ?

Code:
stratos root # ls -l /dev/ | grep fb
drwxr-xr-x  2 root root         0 May 15 11:24 fb
lrwxrwxrwx  1 root root         4 May 15 11:24 fb0 -> fb/0


Don't give up hope yet :)

Rémi
Back to top
View user's profile Send private message
Imago
Apprentice
Apprentice


Joined: 25 Nov 2004
Posts: 157
Location: Germany

PostPosted: Mon May 16, 2005 11:07 am    Post subject: Reply with quote

iirc you need to update your udev, as the framebuffer permissions were wrong set in udev up to version 054(?).
or you correct it yourself, just take a look at /etc/udev/rules.d/.

CU
Imago
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum