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: | |
Severity: | enhancement | ||
Priority: | high | CC: | andrew.conkling, erik.andren |
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
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
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. 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. *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. > aaron@Zyanya:~$ dellLcdBrightness -v 5
> An Error occurred. The Error message is:
> Could not instantiate SMBIOS table.
$ <-- That is not a root prompt...
You may also need to modprobe the dcdbas driver before running the utility. 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 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. 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. 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. 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. 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. 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. Aaron, can you provide the output of: "lshal | grep smbios" thanks. 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)
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! (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? > 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.
(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. (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! Either way, it would be good to have another tester for any solution that is developed :). 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. (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. :) 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 (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. 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. 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. (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. (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. (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. Created attachment 8295 [details]
lshal output with patch applied
I'm closing this bug as support now is merged into mainline hal. I have resolved Andrew Conklings problems via email. (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? |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.