PDA

View Full Version : hdparm enable cd/dvd DMA


steve941
2005-07-09, 08:56 PM CDT
I'm trying to use hdparm on my dvd writer (hdc) but I get: "/dev/hdc: Permission denied" I can use hdparm on my hard drives... Any suggestions?

fedoraphile
2005-07-09, 11:10 PM CDT
This may be an obvious point, but you need to be superuser to issue the hdparm command to enable or disable DMA; if not, you will get a permission denied message.

With Ubuntu at least, the hdparm.conf file only works with hard disks since (I think) the IDE cd modules are not loaded at the point the hdparm.conf file is run. Anyone know if this is the case with Fedora as well?

The workaround in Ubuntu is to place the hdparm command in /etc/init.d/bootmisc.sh. For FC4 there is no bootmisc.sh, but I think placing the hdparm command in /etc/rc.local would accomplish similar results.

steve941
2005-07-09, 11:21 PM CDT
I know, but it's not working, it's weird because I reinstalled FC4, but before I did I was able to run "hdparm /dev/hdc" without problems but I couldn't do "hdparm -d1 /dev/hdc" as I got "you are not permitted"

fedoraphile
2005-07-09, 11:29 PM CDT
There is a difference between the two commands.

hdparm /dev/hdc can be run as normal user. The command gives information only.

hdparm -d1 /dev/hdc is the command to enable DMA and must be run as superuser or you will get a permission denied.

steve941
2005-07-09, 11:40 PM CDT
I try "su -" in Fedora 4 ... then try hdparm /dev/hdc which say 'not permitted'... then I experiment-log out then start a Failsafe Terminal as ROOT and I can run hdparm /dev/hdc without problems BUT when I try hdparm -d1 /dev/hdc I get 'not permitted'....?

imdeemvp
2005-07-09, 11:42 PM CDT
I know, but it's not working, it's weird because I reinstalled FC4, but before I did I was able to run "hdparm /dev/hdc" without problems but I couldn't do "hdparm -d1 /dev/hdc" as I got "you are not permitted"
You probably did as ROOT and now you are trying to do it as regular user. When you are a regular user you must become root and add: /sbin/command_here

steve941
2005-07-09, 11:48 PM CDT
"[root@dhcp17634 etc]# /sbin/hdparm /dev/hdc
/dev/hdc: Permission denied"
as it is seen above, under root, I get permission denied

imdeemvp
2005-07-09, 11:51 PM CDT
Did you enable selinux? if so disable it. system-config-securitydevel

steve941
2005-07-10, 12:01 AM CDT
disabled SElinux, now able to run hdparm /dev/hdc but I have problem of enabling DMA:
"[Steve@dhcp17634 ~]$ su -
Password:
[root@dhcp17634 ~]# hdparm /dev/hdc

/dev/hdc:
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Invalid argument
[root@dhcp17634 ~]# hdparm -d1 /dev/hdc

/dev/hdc:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)"

imdeemvp
2005-07-10, 12:02 AM CDT
Log out and retry and it if fails reboot.....not that you need to but see if helps.

steve941
2005-07-10, 12:15 AM CDT
Nope... anything else I should try?.. I think I'll try messing with some config files like /etc/sysconfig/harddisks... I'll get it eventually even if it takes me a week or more. I'm loving Fedora 4 despite some of the problems, but I know they are all somehow solvable , the tough part is finding or creating the answer.

ksmith173
2005-07-18, 02:32 PM CDT
disabled SElinux, now able to run hdparm /dev/hdc but I have problem of enabling DMA:
"[Steve@dhcp17634 ~]$ su -
Password:
[root@dhcp17634 ~]# hdparm /dev/hdc

/dev/hdc:
IO_support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
readonly = 0 (off)
readahead = 256 (on)
HDIO_GETGEO failed: Invalid argument
[root@dhcp17634 ~]# hdparm -d1 /dev/hdc

/dev/hdc:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)"


I get the same exact error you are getting. Let me know if you figure out how to get it to work.

steve941
2005-07-18, 03:49 PM CDT
I read I need a kernel that supports my chipset or something, I filed a bug report w/redhat but don't know how long that will take. I found how to recompile the kernel with DMA support but read it might not be stable so I'm try wait on new kernels... I might try other kernels like from www.kernel.org, I'll let you know if it works.

daihard
2005-09-06, 02:00 AM CDT
I'm getting the exact same problem with FC4 and my NEC DVD burner. It is frustrating because I had no such problem with my previous Linux installation (not a Fedora Core). I don't feel like tinkering with the kernel to just get something like this to work. :(