|Summary:||SMBIOS "glue" needed for Dell Laptops to talk to HAL about brightness correctly|
|Product:||hal||Reporter:||Aaron Whitehouse <lists>|
|Component:||libhal||Assignee:||Richard Hughes <richard>|
|Status:||RESOLVED FIXED||QA Contact:|
|i915 platform:||i915 features:|
My full lshal output
Patch against current git that implements an hal addon
lshal output with patch applied
Description Aaron Whitehouse 2006-06-14 05:55:02 UTC
https://launchpad.net/distros/ubuntu/+source/hal/+bug/43572 Dell laptops are able to change the brightness settings in the Bios but this does not talk properly to HAL. Some code needs to be written to do this - there's no ACPI method to do it, but it can be done via an SMBios call from userspace, all we need is a bit of HAL glue for the smbios stuff. It means that the system does not currently know, and cannot change, the brightness of the monitor. Some links for anyone interested: http://www.ussg.iu.edu/hypermail/linux/kernel/0602.0/2221.html http://lists.us.dell.com/pipermail/libsmbios-devel/2006-February/thread.html#177 http://linux.dell.com/libsmbios/main/
Comment 1 Aaron Whitehouse 2006-06-14 06:04:02 UTC
I don't think that it is that important but I am using a fully updated copy of Ubuntu Dapper Drake. My HAL version is 0.5.7. I am using a Dell Inspiron 510m.
Comment 2 Richard Hughes 2006-06-14 06:49:31 UTC
Aaron, can you install the libsmbios tools, and find if the command dellLcdBrightness works? I think it's going to be a lot like the sonipi stuff.
Comment 3 Aaron Whitehouse 2006-06-14 21:35:40 UTC
*Sigh* - why is nothing ever as easy as it sounds? I need a recent version to do the brightness stuff (more recent than is in Ubuntu or any Debian repos) and they only have rpms available. I downloaded those and "alien"ed them and I get: aaron@Zyanya:~$ dellLcdBrightness -h Usage: dellLcdBrightness [options] --help, -h Displays this information --value, -v <args> set new value --battery, -b read battery setting --ac, -a read ac setting --password, -p <args> BIOS setup password --rawpassword Do not auto-convert password to scancodes --version Display libsmbios version information aaron@Zyanya:~$ dellLcdBrightness -v 5 An Error occurred. The Error message is: Could not instantiate SMBIOS table. aaron@Zyanya:~$ dellLcdBrightness --battery An Error occurred. The Error message is: Could not instantiate SMBIOS table. So I don't know if it was the install or the program. I tried to compile the source but I don't really know what I am doing. I got it to compile but couldn't execute the binary because I don't know how to set the path to the required library. Sorry.
Comment 4 Michael Brown 2006-06-15 04:36:13 UTC
> aaron@Zyanya:~$ dellLcdBrightness -v 5 > An Error occurred. The Error message is: > Could not instantiate SMBIOS table. $ <-- That is not a root prompt...
Comment 5 Michael Brown 2006-06-15 04:38:05 UTC
You may also need to modprobe the dcdbas driver before running the utility.
Comment 6 Aaron Whitehouse 2006-06-15 05:26:10 UTC
Stunning - thanks for your help, Michael! You were correct, that wasn't a root prompt and I needed to use modprobe. Doing both of those it was reading perfectly (Battery with -b and AC with -a) but I couldn't change the settings. I got a BIOS password error. I usually have a primary and admin password on my BIOS and I couldn't get libsmbios to play nice with it. I was using -p '[PASSWORD]' as a parameter and it seemed to work ("Using [Password] as password if needed") but it just didn't work. By removing both my Primary and Admin Passwords (just removing primary didn't work) it is all working perfectly: aaron@Zyanya:~$ sudo dellLcdBrightness -a -v 4 Read AC Mode Setting current: 7 min: 0 max: 7 Write AC Mode Setting current: 4 min: 0 max: 7 aaron@Zyanya:~$ sudo dellLcdBrightness -b -v 4 Read AC Mode Setting current: 4 min: 0 max: 7 Write AC Mode Setting current: 4 min: 0 max: 7
Comment 7 Aaron Whitehouse 2006-06-15 05:33:22 UTC
Oh, that's interesting. It seems (and you may have noticed from my post) that using: -a reads/sets AC brightness; not specifying reads/sets Battery brightness; but -b or --battery reads/sets _AC_ brightness But it seems to be working.
Comment 8 Michael Brown 2006-06-15 21:44:09 UTC
two missing break statements in a switch, from the last refactoring... :( Will be fixed in 0.11.7. Not sure the exact release date, in the next couple of weeks. Will have a beta posted soon. Should also fix the password problem.
Comment 9 Richard Hughes 2006-06-18 15:38:43 UTC
David, how about merging the properties manually via an fdi file that checks smbios vendor dell and formfactor laptop (and then we just need to patch the two scripts). Aaron, does *every* dell laptop use this odd way of changing the brightness or is it just newer ones? i.e. do we have to whitelist by model.
Comment 10 Aaron Whitehouse 2006-06-18 23:51:20 UTC
Sorry Richard, I wouldn't have a clue. According to http://docs.us.dell.com/support/edocs/software/smcliins/cli60/en/ug/intro.htm "Computers with an SMBIOS have the SMBIOS Supported attribute set to True in the Dell Configuration Group." but I am likely taking that completely out of context. I also found http://www.diefer.de/i8kfan/ in my searches. It isn't on point but could be interesting if someone wanted to add other Dell features to HAL. It also has a list of "supported models" which *may* be of assistance to answer your question. Basically, my quick search couldn't answer the question. Perhaps Michael would be a good authority on this.
Comment 11 Michael Brown 2006-06-19 14:44:31 UTC
I could not tell you an exact list, but the binary should exit with an error for unsupported laptops. It should be safe to run on any machine, and if there are other ways of doing this, I can probably find out and add support for them.
Comment 12 Michael Brown 2006-06-19 14:46:00 UTC
Sorry, to be a bit more clear... it works on all laptops that I have tried it on. It should work on all laptops from the past two-three years or so. I dont have any older ones to test with atm.
Comment 13 Richard Hughes 2006-06-19 15:16:21 UTC
Aaron, can you provide the output of: "lshal | grep smbios" thanks.
Comment 14 Aaron Whitehouse 2006-06-20 03:39:52 UTC
Created attachment 5989 [details] My full lshal output I have attached the full output of lshal. The specific command that you asked for gives: smbios.chassis.type = 'Portable' (string) smbios.chassis.manufacturer = 'Dell Inc.' (string) smbios.system.uuid = '44454C4C-4C00-104B-8043-C3C04F443153' (string) smbios.system.serial = 'CLKCD1S' (string) smbios.system.version = 'Not Specified' (string) smbios.system.product = 'Inspiron 510m' (string) smbios.system.manufacturer = 'Dell Inc.' (string) smbios.bios.release_date = '09/09/2004' (string) smbios.bios.version = 'A07' (string) smbios.bios.vendor = 'Dell Inc.' (string)
Comment 15 Aaron Whitehouse 2006-07-15 01:46:11 UTC
I have just tested the 0.12 series of the Dell SMBios binaries. The dellLcdBrightness command now works exactly as expected; the -b setting and the password. There is a delay of about a second each time the setting is changed if there is a password. Thanks to Michael for getting this sorted!
Comment 16 Andrew Conkling 2006-10-14 14:16:38 UTC
(In reply to comment #15) > I have just tested the 0.12 series of the Dell SMBios binaries. The > dellLcdBrightness command now works exactly as expected; the -b setting and the > password. This sounds like this is complete, unless more needs to be done to get HAL to work with these binaries?
Comment 17 Aaron Whitehouse 2006-10-14 14:28:41 UTC
> This sounds like this is complete, unless more needs to be done to get HAL to > work with these binaries? The SMBIOS binary works (or did last time I tested it) but *this* bug isn't fixed at all. Now that SMBIOS seems to work, gluing it to Dell's brightness keys may result in working solution, but that glue hasn't yet been written. Apologies if I misinterpreted you.
Comment 18 Andrew Conkling 2006-10-14 14:32:58 UTC
(In reply to comment #17) > The SMBIOS binary works (or did last time I tested it) but *this* bug isn't > fixed at all. Now that SMBIOS seems to work, gluing it to Dell's brightness keys > may result in working solution, but that glue hasn't yet been written. > > Apologies if I misinterpreted you. Nope, it was I. That makes sense now. :) I'm really not sure what this "glue" would look like (I'm only really interested in the gnome-power-manager sexiness that can come from this), but is there anything I can do to help? FWIW, I'm using a Dell Inspiron 6000.
Comment 19 Aaron Whitehouse 2006-10-14 23:20:53 UTC
(In reply to comment #18) > Nope, it was I. That makes sense now. :) I'm really not sure what this "glue" > would look like (I'm only really interested in the gnome-power-manager sexiness > that can come from this), but is there anything I can do to help? The general idea is that GPM talks to HAL to change the brightness. The very point of HAL is to provide a means of talking to hardware that is independent of the eccentricities of individual pieces of hardware. This makes HAL the logical place to put the 'glue' to the libraries specific to Dell machines. In HAL, there is a function to change the brightness of the display. On Dell machines this does not work. On machines that properly handle ACPI (or are otherwise supported), this function changes the brightness up and down and is used by GPM for the dimming. The aim of this request is to create a Dell version of this function so that when applications call the brightness functions of HAL, it actually does something for us. If you are a programmer and are keen to attempt this, it would be a matter of integrating the work of libSMBIOS into HAL. If, like me, you don't have these skills, you will need to wait until somebody that does have the skills has a go!
Comment 20 Aaron Whitehouse 2006-10-14 23:21:39 UTC
Either way, it would be good to have another tester for any solution that is developed :).
Comment 21 Erik Andren 2006-12-05 02:21:27 UTC
I've played around a bit with the patch suggested by Richard Hughes in the following mail: http://lists.freedesktop.org/archives/hal/2006-June/005511.html Apart from that I needed to change the smbios.system.manufacturer key to "Dell Computer Corporation" it works ok. The result is a bit crude though, changing the brightness one step takes ~0.5 s. Which makes a change from low-to-high or high-to-low quite painful. It is in no way as elegant as for instance, the Apple notebooks. I've tried to speed up the dellLcdBrightness program by removing the cout calls, but the results were limited. What is nice though, is that I'm now able to set different brightness levels from g-p-m, something that wasn't possible before. An improvement is perhaps to implement the libsmbios calls directly into hal, avoiding the spawning of a dellLcdBrightness process for each brightness level. If you're interested I can make a video clip of the brightness change.
Comment 22 Andrew Conkling 2006-12-05 05:27:05 UTC
(In reply to comment #21) > What is nice though, is that I'm now able to set different brightness levels > from g-p-m, something that wasn't possible before. > > If you're interested I can make a video clip of the brightness change. Definitely interested. It'd, um, be good for posterity on this bug. Yeah. :)
Comment 23 Erik Andren 2006-12-05 07:58:13 UTC
The videos didn't come out that good. Perhaps it's the camera that compensates for the contrast changes. http://www.youtube.com/watch?v=uZT3CxGgHVc http://www.youtube.com/watch?v=B5G6IylZdiY
Comment 24 Andrew Conkling 2006-12-05 08:17:24 UTC
(In reply to comment #23) > The videos didn't come out that good. Perhaps it's the camera that compensates > for the contrast changes. Depending on your camera, you should be able to set the contrast so it won't adjust automatically. I guess it doesn't matter much, but yeah.
Comment 25 Erik Andren 2007-01-03 23:55:35 UTC
Created attachment 8290 [details] [review] Patch against current git that implements an hal addon This patch implements an addon to hal that controls the backlight on Dell Machines.
Comment 26 Erik Andren 2007-01-04 00:02:14 UTC
I have backported my patch and built some ubuntu deb packages which you can try out if you are feeling brave: http://home.student.uu.se/e/eran8655/filer/hald/ You need to be running Feisty, libsmbios >=0.12 installed and have the dcdbas kernel module loaded.
Comment 27 Andrew Conkling 2007-01-04 12:47:13 UTC
(In reply to comment #26) > I have backported my patch and built some ubuntu deb packages which you can try > out if you are feeling brave: > http://home.student.uu.se/e/eran8655/filer/hald/ > > You need to be running Feisty, libsmbios >=0.12 installed and have the dcdbas > kernel module loaded. Thanks for your packages. I tried using dellLcdBrightness (as mentioned in comment #2), but hal said, "I'm sorry. I cannot do that, Dave." Well... in so many words, anyway: "Could not instantiate SMBIOS table." I'm running the current packages (I installed 3 over my existing installed packages), I installed libsmbios[1,-bin,xml1], version 0.12.1-3, and made sure lsmod showed dcdbas as running. I'm assuming this isn't related, but I could find very little online about this. Anyway, let me know if I can test this awesomeness in any other way.
Comment 28 Erik Andren 2007-01-04 13:28:38 UTC
(In reply to comment #27) > (In reply to comment #26) > > I have backported my patch and built some ubuntu deb packages which you can try > > out if you are feeling brave: > > http://home.student.uu.se/e/eran8655/filer/hald/ > > > > You need to be running Feisty, libsmbios >=0.12 installed and have the dcdbas > > kernel module loaded. > > Thanks for your packages. I tried using dellLcdBrightness (as mentioned in > comment #2), but hal said, "I'm sorry. I cannot do that, Dave." Well... in so > many words, anyway: > > "Could not instantiate SMBIOS table." > > I'm running the current packages (I installed 3 over my existing installed > packages), I installed libsmbios[1,-bin,xml1], version 0.12.1-3, and made sure > lsmod showed dcdbas as running. > > I'm assuming this isn't related, but I could find very little online about this. > Anyway, let me know if I can test this awesomeness in any other way. Could you please attach an output of lshal on your machine when my packages are installed and dcdbas i loaded? dellLcdBrightness needs to be executed as root to work.
Comment 29 Andrew Conkling 2007-01-04 13:35:46 UTC
(In reply to comment #28) > Could you please attach an output of lshal on your machine when my packages are > installed and dcdbas i loaded? > > dellLcdBrightness needs to be executed as root to work. Duh! OK, dellLcdBrightness does work, sorta. I can use -a to get my current AC level, and it does update, but -v doesn't work to change the value. I'll attach my lshal.
Comment 30 Andrew Conkling 2007-01-04 13:36:23 UTC
Created attachment 8295 [details] lshal output with patch applied
Comment 31 Erik Andren 2007-01-24 13:46:27 UTC
I'm closing this bug as support now is merged into mainline hal. I have resolved Andrew Conklings problems via email.
Comment 32 Andrew Conkling 2007-01-24 14:01:04 UTC
(In reply to comment #31) > I'm closing this bug as support now is merged into mainline hal. > I have resolved Andrew Conklings problems via email. Erik, thanks for your help. Any more info about hal--which version, any bugs, etc.--that I could provide to Ubuntu's bugtracker to make sure the developers know about this? And now that it's in mainline hal, once I've upgraded to that version, is there any next step to take full advantage of it?