Normal user not permitted for pci scan

Hi,
when I tried to use the xvidix driver for mplayer, I get "Error occurred during pci scan: Operation not permitted" error for normal user, but root is ok.
How can I fix it?
PS. my groups:
groups=4(adm),5(tty),6(disk),8(mail),9(news),10(uucp),20(dialout),21(fax),22(voice),24(cdrom),25(floppy),26(tape),27(sudo),29(audio),30(dip),33(www-data),60(games),100(users),110(scanner),118(plugdev),120(camera),135(fuse),143(nvram),65534(nogroup)
PPS. Working log:
$ gmplayer -dr -vo xvidix "$mfilm" No vidix driver name provided, probing available ones (-v option for details)! [mga] Error occurred during pci scan: Operation not permitted [mach64] Error occurred during pci scan: Operation not permitted [rage128] Error occurred during pci scan: Operation not permitted [SiS] Error occurred during pci scan: Operation not permitted [mga] Error occurred during pci scan: Operation not permitted [savage_vid] Error occurred during pci scan: Operation not permitted [pm3] Error occurred during pci scan: Operation not permitted [unichrome] Error occurred during pci scan: Operation not permitted [radeon] Error occurred during pci scan: Operation not permitted [nvidia_vid] Error occurred during pci scan: Operation not permitted [cyberblade] Error occurred during pci scan: Operation not permitted [VO_SUB_VIDIX] Couldn't find working VIDIX driver. Error opening/initializing the selected video_out (-vo) device.
Adding the -v option didn't get me much details:
[mga] probe [mga] Error occurred during pci scan: Operation not permitted vidixlib: PROBING: /usr/lib/mplayer/vidix/mach64_vid.so [mach64] Error occurred during pci scan: Operation not permitted [...]
$ ls -l /usr/lib/mplayer/vidix/mach64_vid.so -rw-r--r-- 1 root root 14360 08-02 11:44 /usr/lib/mplayer/vidix/mach64_vid.so
Here is the result when the above command is ran with root:
No vidix driver name provided, probing available ones (-v option for details)! [radeon] Found chip: RV280 [Radeon 9200 SE] [radeon] ATI FireGl driver detected libdha: DHA kernelhelper failed: No such file or directory libdha: DHA kernelhelper failed: No such file or directory [radeon] Video memory = 128Mb [radeon] Set write-combining type of video memory [radeon] Saved overlay colorkey settings [VO_SUB_VIDIX] Description: BES driver for Radeon cards. [VO_SUB_VIDIX] Author: Nick Kurshev.
thanks

* T mlist4suntong@yahoo.com [20061007 23:10]:
when I tried to use the xvidix driver for mplayer, I get "Error occurred during pci scan: Operation not permitted" error for normal user, but root is ok.
How can I fix it?
PS. my groups:
groups=4(adm),5(tty),6(disk),8(mail),9(news),10(uucp),20(dialout),21(fax),22(voice),24(cdrom),25(floppy),26(tape),27(sudo),29(audio),30(dip),33(www-data),60(games),100(users),110(scanner),118(plugdev),120(camera),135(fuse),143(nvram),65534(nogroup)
Hm, you are not member of the 'video' group. Try adding yourself to the video-group.
Assuming that this does *not* fix your problem:
PPS. Working log:
$ gmplayer -dr -vo xvidix "$mfilm" No vidix driver name provided, probing available ones (-v option for details)!
[...]
[nvidia_vid] Error occurred during pci scan: Operation not permitted [cyberblade] Error occurred during pci scan: Operation not permitted [VO_SUB_VIDIX] Couldn't find working VIDIX driver. Error opening/initializing the selected video_out (-vo) device.
Adding the -v option didn't get me much details:
[mga] probe [mga] Error occurred during pci scan: Operation not permitted vidixlib: PROBING: /usr/lib/mplayer/vidix/mach64_vid.so [mach64] Error occurred during pci scan: Operation not permitted [...]
What happens with multiple -vvvv?
And the file /tmp/mplayer when running 'strace -f -eopen -o /tmp/mplayer mplayer -dr -vo xvidix ...' would be interesting as well.
regards, -mika-

On Sun, 08 Oct 2006 01:56:26 +0200, Michael Prokop wrote:
when I tried to use the xvidix driver for mplayer, I get "Error occurred during pci scan: Operation not permitted" error for normal user, but root is ok....
Hm, you are not member of the 'video' group. Try adding yourself to the video-group.
Assuming that this does *not* fix your problem:
That's very considerate of you. thanks a lot.
No, adding myself to the 'video' group doesn't help.
$ id uid=...(tong) gid=44(video) groups=4(adm),5(tty),6(disk),8(mail),9(news),10(uucp),20(dialout),21(fax),22(voice),24(cdrom),25(floppy),26(tape),27(sudo),29(audio),30(dip),33(www-data),44(video),60(games)...
And here is the compiled info to your questions:
Yes, using multiple -v produced more debug info, but no, still not enough for our situation:
CommandLine: '-v' '-v' '-v' '-v' '-dr' '-vo' 'xvidix' ... [...] No vidix driver name provided, probing available ones (-v option for details)! vosub_vidix: vidix_preinit((null)) was called vidixlib: PROBING: /usr/lib/mplayer/vidix/mga_vid.so [mga] probe [mga] Error occurred during pci scan: Operation not permitted vidixlib: PROBING: /usr/lib/mplayer/vidix/mach64_vid.so [mach64] Error occurred during pci scan: Operation not permitted vidixlib: PROBING: /usr/lib/mplayer/vidix/rage128_vid.so [rage128] Error occurred during pci scan: Operation not permitted [...]
Using 'strace -f -eopen -o /tmp/mplayer mplayer -dr -vo xvidix ...' wouldn't reveal much more than that:
[...] 10538 open("test.mpg", O_RDONLY|O_LARGEFILE) = 3 10538 open("./", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4 10538 open("/home/tong/.mplayer/sub/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory) 10538 open("/home/tong/.Xauthority", O_RDONLY) = 5 10538 open("/usr/lib/mplayer/vidix/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 5 10538 open("/usr/lib/mplayer/vidix/mga_vid.so", O_RDONLY) = 6 10538 open("/etc/ld.so.cache", O_RDONLY) = 6 10538 open("/usr/lib/libdha.so.1.0", O_RDONLY) = 6 10538 open("/dev/dhahelper", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory) 10538 open("/usr/lib/mplayer/vidix/mach64_vid.so", O_RDONLY) = 6 10538 open("/etc/ld.so.cache", O_RDONLY) = 6 [...]
Using 'strace -f -o /tmp/mplayer mplayer -dr -vo xvidix ...' didn't seem to have told me much more than that either, until I compare the result with what was logged while playing in root. Then I found:
[...] 10541 open("/usr/lib/mplayer/vidix/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 5 10541 fstat64(5, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 10541 fcntl64(5, F_SETFD, FD_CLOEXEC) = 0 10541 getdents64(5, /* 13 entries */, 4096) = 464 10541 futex(0xb77a9070, FUTEX_WAKE, 2147483647) = 0 10541 open("/usr/lib/mplayer/vidix/mga_vid.so", O_RDONLY) = 6 ^^^^^^^^^^ 10541 read(6, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\7\0"..., 512) = 512 10541 fstat64(6, {st_mode=S_IFREG|0644, st_size=10500, ...}) = 0 10541 mmap2(NULL, 13836, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0xb5fcb000 10541 mmap2(0xb5fce000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x2) = 0xb5fce000 10541 close(6) = 0 10541 open("/etc/ld.so.cache", O_RDONLY) = 6 ^^^^^^^^^^^ 10541 fstat64(6, {st_mode=S_IFREG|0644, st_size=67617, ...}) = 0 10541 mmap2(NULL, 67617, PROT_READ, MAP_PRIVATE, 6, 0) = 0xb5fba000 10541 close(6) = 0 10541 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) 10541 open("/usr/lib/libdha.so.1.0", O_RDONLY) = 6 ^^^^^^^^^^^ 10541 read(6, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\324"..., 512) = 512 10541 fstat64(6, {st_mode=S_IFREG|0644, st_size=224000, ...}) = 0 10541 mmap2(NULL, 222872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0xb5f83000 10541 mmap2(0xb5fad000, 53248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x2a) = 0xb5fad000 10541 close(6) = 0 10541 munmap(0xb5fba000, 67617) = 0 10541 open("/dev/dhahelper", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory) ^^^^^^^^^^^ 10541 iopl(0x3) = -1 EPERM (Operation not permitted) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There !!! 10541 write(1, "[mga] Error occurred during pci "..., 62) = 62 10541 munmap(0xb5fcb000, 13836) = 0 10541 munmap(0xb5f83000, 222872) = 0 10541 open("/usr/lib/mplayer/vidix/mach64_vid.so", O_RDONLY) = 6 [...] 10541 open("/dev/dhahelper", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory) 10541 iopl(0x3) = -1 EPERM (Operation not permitted) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There !!! 10541 write(1, "[radeon] Error occurred during p"..., 65) = 65 10541 munmap(0xb7fb2000, 27900) = 0 10541 munmap(0xb5f87000, 222872) = 0 [...]
Compare with what root get:
[...] 10751 iopl(0x3) = 0 10751 iopl(0) = 0 10751 write(1, "[radeon] Found chip: RV280 [Rade"..., 44) = 44 10751 uname({sys="Linux", node="cxmr.dyndns.org", ...}) = 0 10751 socket(PF_FILE, SOCK_STREAM, 0) = 6 [...]
So, what's about the "iopl(0x3)"?
thanks

* T mlist4suntong@yahoo.com [20061008 17:15]:
On Sun, 08 Oct 2006 01:56:26 +0200, Michael Prokop wrote:
when I tried to use the xvidix driver for mplayer, I get "Error occurred during pci scan: Operation not permitted" error for normal user, but root is ok....
[...]
Yes, using multiple -v produced more debug info, but no, still not enough for our situation:
CommandLine: '-v' '-v' '-v' '-v' '-dr' '-vo' 'xvidix' ... [...] No vidix driver name provided, probing available ones (-v option for details)! vosub_vidix: vidix_preinit((null)) was called vidixlib: PROBING: /usr/lib/mplayer/vidix/mga_vid.so [mga] probe [mga] Error occurred during pci scan: Operation not permitted vidixlib: PROBING: /usr/lib/mplayer/vidix/mach64_vid.so
[...]
10541 open("/dev/dhahelper", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory) ^^^^^^^^^^^ 10541 iopl(0x3) = -1 EPERM (Operation not permitted) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There !!!
Compare with what root get:
[...] 10751 iopl(0x3) = 0 10751 iopl(0) = 0 10751 write(1, "[radeon] Found chip: RV280 [Rade"..., 44) = 44 10751 uname({sys="Linux", node="cxmr.dyndns.org", ...}) = 0 10751 socket(PF_FILE, SOCK_STREAM, 0) = 6 [...]
So, what's about the "iopl(0x3)"?
Ok, so AFAICS vidix is userspace working with IO which requires root privileges (see http://www.die.net/doc/linux/man/man2/iopl.2.html regarding syscall iopl).
So try to deactivate the pci scan via specifying the driver manually (IIRC it's radeon on your box): "mplayer -vo xvidix:radeon ..." If that does not work too it seems you have to install mplayer with suid set or run mplayer as root when using the xvidix stuff.
regards, -mika-

On Sun, 08 Oct 2006 23:15:48 +0200, Michael Prokop wrote:
when I tried to use the xvidix driver for mplayer, I get "Error occurred during pci scan: Operation not permitted" error for normal user, but root is ok....
You proposed solution didn't work, but thank you mika to help me track down this problem. I brought up the issue in mplayer mlist and this is the feedback that I got:
Nico Sabbi <nsabbi@...it> said:
you need dhahelper (it's a kernel module in vidix)
I looked up the trace log, right before the iopl call, mplayer tried to open /dev/dhahelper. I tried to install the dhahelper kernel module myself but failed:
10541 open("/dev/dhahelper", O_RDWR|O_LARGEFILE) = -1 ENOENT (No such file or directory) 10541 iopl(0x3) = -1 EPERM (Operation not permitted)
% insmod dhahelper insmod: can't read 'dhahelper': No such file or directory
Do you know about the dhahelper kernel module? Do you think that might be the reason? Ok, I guess so:
From http://72.14.203.104/linux?q=cache:YIP5lKF3HjsJ:sourceforge.net/mailarchive/...
,----- | > video_out_vidix: Couldn"t find working VIDIX driver | > load_plugins: failed to load video output plugin <vidix> | > main: video driver <vidix> failed | > | > Xine didn"t particularly like it, and failed to load. I can only seem | > to get xine to load with the xv drivers. Does anyone know what I might | > do to get vidix working? | | There are two ways of overcoming this: | 1) run xine suid root | 2) install the dhahelper kernel module (add the options --enable-dha-kmod | --with-linux-path=/path/to/kernel/source to configure) `-----
Could you compile a kernel that have the dhahelper module, since the issue affect both mplayer and xine, please?
So try to deactivate the pci scan via specifying the driver manually (IIRC it's radeon on your box): "mplayer -vo xvidix:radeon ..." If that does not work too it seems you have to install mplayer with suid set or run mplayer as root when using the xvidix stuff.
FYI, here is what I tried:
I tred to deactivate the pci scan via specifying the driver manually, but that failed too:
$ mplayer -v -v -v -v -dr -vo xvidix:radeon_vid.so -fixed-vo ... vosub_vidix: vidix_preinit(radeon_vid.so) was called [radeon] Error occurred during pci scan: Operation not permitted [VO_SUB_VIDIX] Couldn't find working VIDIX driver. Error opening/initializing the selected video_out (-vo) device.
Failing this, I tried to chmod mplayer with suid set, but that won't work either:
$ ls -l /usr/bin/mplayer -rwsr-x--- 1 root video 3943448 08-02 11:44 /usr/bin/mplayer
$ strace -f -eopen,iopl -o /tmp/mplayer mplayer -dr -vo xvidix test.mpg $ grep iopl /tmp/mplayer 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted) 3929 iopl(0x3) = -1 EPERM (Operation not permitted)

On Thu, 12 Oct 2006 16:59:02 -0400, T wrote:
Could you compile a kernel that have the dhahelper module, since the issue affect both mplayer and xine, please?
or maybe pack a kernel-dhahelper package?

* T mlist4suntong@yahoo.com [20061013 03:15]:
On Thu, 12 Oct 2006 16:59:02 -0400, T wrote:
Could you compile a kernel that have the dhahelper module, since the issue affect both mplayer and xine, please?
dhahelper isn't part of linux kernel.
or maybe pack a kernel-dhahelper package?
I can find sources for a module named dhahelper only in sources of mplayer (mplayer-1.0-pre8cvs20061002/libdha/kernelhelper). But as I don't use it myself, it does not seem to compile out-of-the-box and my time is limited I'm not really interested in working on another package. Of course, if someone wants to contribute a package feel free to submit it.
regards, -mika-
Teilnehmer (2)
-
Michael Prokop
-
T