-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't do anything relate to calibration LG C1 OLED #44
Comments
The error originates from here:
onGetExternalPqData: function(request) {
var self = this;
var payload = request.payload();
return request.chainCall('luna://com.webos.service.pqcontroller/getExternalPqData', payload)
.then(function(success) {
var pqData;
if (success.path) {
try {
var buf = fs.readFileSync(success.path);
} catch(e) {
logger.error('READ_EXTERNALPQ_FAILED', 'failed to read externalPQ', e);
return {returnValue: false, errorText: e};
}
} else {
return {returnValue: false, errorText: 'no file path from tvservice'};
}
// Encode base64
pqData = new Buffer(buf).toString('base64');
// Remove temporary file made by tvservice
try {
if(fs.existsSync(success.path)) {
fs.unlinkSync(success.path);
}
} catch (e) {
logger.error('REMOVE_EXTERNALPQ_DATA_FAILED', 'failed to remove externalPQ data from tvservice', e);
return _.extend(success, {exception: e});
}
// RE-generate payload
delete success.path;
return _.extend(success, {data: pqData});
}, function(error) {
return _.extend(error);
});
}, |
I believe I've found the problem is that I don't know what is the data used in function start_calibration And I have no idea how to know that numpy array of size 9 for my specific TV. I really wish somebody could help me figure out a way or where to look. |
For previous models as far as I can tell that data doesn't actually do anything (and you can provide different values with no effect.) But it could indeed be that something has changed with the C1 |
This endpoint doesn't work on 2018 models either, only setExternalPqData.
Yep, I haven't found anything in firmware either. The only way to know how to use these calibration commands with newer sets is to sniff the traffic of other working software solutions :)
But if you only want to change picture settings/presets then you can do that already without calibration endpoint: with scripting (using @bendavid , take a look at my fork (there are not so many commits), I implemented everything that I wanted. If you like the changes then just migrate them into yours and you can close the affected PRs (and I'll put a Depricated note into my readme :) ) |
(I may have more time to look at this later in December/January ) |
No worries, take your time and thanks for all the work you've done so far! |
I have a LG 48C1 firmware 03.20.80 and I'm trying to enter calibration mode but I'm getting this error:
My code:
|
Sorry for late response, I just have time to test it thoroughly async def _set_oled_light(ip_address: str, oled_backlight_value: int):
try:
client = await WebOsClient.create(ip_address)
await client.disconnect()
await client.connect()
test = await client.get_picture_settings()
_LOGGER.debug('_set_oled_light -> before')
_LOGGER.debug(test)
# setting_value = f"""{{"contrast": 70, "backlight": {oled_backlight_value}, "brightness": 40, "color": "55"}}""" # , "contrast": 70
setting_value = "{\"backlight\": 0, \"contrast\": 70}"
_LOGGER.debug(f"setting_value\n{setting_value}")
result = await client.set_current_picture_settings(setting_value)
_LOGGER.debug('set_current_picture_settings -> result')
_LOGGER.debug(result)
test = await client.get_picture_settings()
_LOGGER.debug('_set_oled_light -> after')
_LOGGER.debug(test)
await client.disconnect()
except Exception as err:
_LOGGER.error("An error occour during setting oled light\n")
_LOGGER.error(err)
raise err And this is the log 2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"id": 12, "type": "request", "uri": "ssap://settings/getSystemSettings", "payload": {"category": "picture", "keys": ["contrast", "backlight", "brightness", "color"]}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<173 bytes>)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"type":"response","id":12,"payload":{"returnValue":true,"subscribed":false,"category":"picture","settings":{"contrast":70,"backlight":40,"brightness":40,"color":"55"}}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [custom_components.webostv_advance] _set_oled_light -> before
2021-12-06 21:30:48 DEBUG (MainThread) [custom_components.webostv_advance] {'contrast': 70, 'backlight': 40, 'brightness': 40, 'color': '55'}
2021-12-06 21:30:48 DEBUG (MainThread) [custom_components.webostv_advance] setting_value
{"backlight": 0, "contrast": 70}
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"id": 13, "type": "request", "uri": "ssap://system.notifications/createAlert", "payload": {"message": " ", "buttons": [{"label": "", "onClick": "luna://com.webos.settingsservice/setSystemSettings", "params": {"category": "picture", "settings": "{\\"backlight\\": 0, \\"contrast\\": 70}"}}], "onclose": {"uri": "luna://com.webos.settingsservice/setSystemSettings", "params": {"category": "picture", "settings": "{\\"backlight\\": 0, \\"contrast\\": 70}"}}, "onfail": {"uri": "luna://com.webos.settingsservice/setSystemSettings", "params": {"category": "picture", "settings": "{\\"backlight\\": 0, \\"contrast\\": 70}"}}}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<115 bytes>)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"type":"response","id":13,"payload":{"returnValue":true,"alertId":"com.webos.service.apiadapter-1638801047295"}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"id": 14, "type": "request", "uri": "ssap://system.notifications/closeAlert", "payload": {"alertId": "com.webos.service.apiadapter-1638801047295"}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<60 bytes>)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"type":"response","id":14,"payload":{"returnValue":true}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [custom_components.webostv_advance] set_current_picture_settings -> result
2021-12-06 21:30:48 DEBUG (MainThread) [custom_components.webostv_advance] {'returnValue': True}
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client > Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"id": 15, "type": "request", "uri": "ssap://settings/getSystemSettings", "payload": {"category": "picture", "keys": ["contrast", "backlight", "brightness", "color"]}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client - event = data_received(<173 bytes>)
2021-12-06 21:30:48 DEBUG (MainThread) [websockets.protocol] client < Frame(fin=True, opcode=<Opcode.TEXT: 1>, data=b'{"type":"response","id":15,"payload":{"returnValue":true,"subscribed":false,"category":"picture","settings":{"contrast":70,"backlight":40,"brightness":40,"color":"55"}}}', rsv1=False, rsv2=False, rsv3=False)
2021-12-06 21:30:48 DEBUG (MainThread) [custom_components.webostv_advance] _set_oled_light -> after
2021-12-06 21:30:48 DEBUG (MainThread) [custom_components.webostv_advance] {'contrast': 70, 'backlight': 40, 'brightness': 40, 'color': '55'} Looks like C1 really has some change compared to the previous model. |
Maybe they removed it, but you set a string for client = await WebOsClient.create(ip_address)
await client.connect()
setting_value = {"backlight": "0"}
await client.set_current_picture_settings(setting_value)
await client.disconnect() That command line tool auto converts JSON strings into dictionaries, hence the escaping there. |
Thanks, just tested. I can confirm that this hack still works. HERE IS THE FINAL CODE async def _set_oled_light(ip_address: str, oled_backlight_value: int):
try:
client = await WebOsClient.create(ip_address)
await client.disconnect()
await client.connect()
setting_value = {"backlight": oled_backlight_value}
await client.set_current_picture_settings(setting_value)
await client.disconnect()
except Exception as err:
raise err
finally:
try:
await client.disconnect()
except Exception as err:
pass I've achieved my goal, but the issue with calibration still remains open. |
Nice to hear that at least the hack works :) |
I only get this error when a preset name is misspelled, eg hdrCinema instead of hdr_cinema. |
since it may not be clear to some LG C1 users, you have to manually merge the "fixed parsing model names" patch for calibration to work with C1 and higher(?) models, the patch is also missing on chros73's fork. |
Yes, but it's in progress :) |
@chros73 this is a bit off topic, i wasnt able to find a final conclusion to the c8 thread on sdr calibration. Is using factory 1d lut + 100 contrast still the recommended way to calibrate SDR? In particular this message by ben sounds like unity 1d lut should be used.
and when using factory 1d lut, what is the correct option in terms of these:
|
I'm not sure either :) Everyone out there (maybe apart from Calman users) use the factory 1dlut and create a 3dlut on top of it outside of calibration mode (after ddc_reset (I'll call it bypass_modes) is set without unity 1dlut). |
New bscpylgtv v0.4.0 is out, it's mostly about calibration changes, lot of new stuff has been added. |
very nice! is the ITPG functions useful for calibration at this time? |
Which model do you have? Eg it's almost completely unusable with 2022 models. |
very interesting. i have the 2021 model. I have SDR down, trying to do HDR and DV correctly. |
Good question :) If it works fine there then it can be used for even manual measurements for those 2 modes, since only couple of measurements need to be taken. |
@chros73 do you have any insights on the correct input/output encoding setting when generating 3d lut for SDR? I've been using 8bit full(0-255) hdmi output for calibration and full(0-255) input/output encoding for 3dlut. Recently i switched to limited (16-235) encoding for 3dlut and ycbcr 4:4:4 for calibration, the two result looks very different, the limited looks more "correct" to me. |
Which TPG do you use? Other guys stated, who use their set in normal mode (non-PC) and limited range, that internal luts operate on: If you found out something worthy, you can do a PR to the readme, e.g. Tips and tricks? :) |
Currently i use displaycal/argylltpg, i will try madtpg next.
very interesting. I will do more testing. I am trying to achieve this result from BenDavid in the LG C8 lut thread https://hub.displaycal.net/forums/topic/lg-c8-lut/page/10/#post-21726 |
@chros73 over the holidays i had some time to attempt HDR calibration with madTPG and displaycal. I got poor results using 1d factory lut + custom 3D lut following some of the tips provided in the LG C8 thread. Some of the things i tried: i have not tested synthetic profiles.
this is about where bendavid left off in the c8 thread. was there any new progress with HDR calibration? There was also the issue of nvidia driver outputting tone mapping that couldnt be turned off that bendavid mentioned, I wasnt able to find any new info on that. I also looked in the DWM lut thread and it looks like people gave up on HDR calibration there. another issue i came across, C1 hdmi diagnostics shows 8bit when set to ycbcr422 10 bit in NVCP. Oddly enough, diagnostics shows it will accept ycbcr444 12bit signals. I cant seem to put C1 into 10bit no matter what encoding/output combination i choose in NVCP. from the nvidia documentation i see this, dont know if it affects accuracy
something interesting i came across in the C1 edid, the last block has dolby primaries(native gamut primaries(?)) and target max PQ both appear to be factory measurements unique to the panel. im assuming these are the values in the factory dolby config.
|
About DV config in Edid: that's for LLDV external devices, the internal one may or may not be the same (they can update it via firmware update). About nvidia driver: I use Full range, RGB, 12 bit output, and that what appears on the Diag screen as well. About HDR10 calibration: I haven't heard anyone who successfully profiled a Woled and created an acceptable 3dlut from it in HDR. Even Calman only measures WRGB and generates a matrix 3dlut from.it, hencr the talk about synthetic luts in that thread. |
argyllcms supports using an external command line tool to set the patches IIRC, so this might already be possible with the right command line options |
woow, welcome back @bendavid ! :) |
the xy coordinates in step 5 can be used for dolbyvision config I think this is close to what calman is doing for hdr |
When using externalpq/getExternalPqData
I got this error:
"
no file path from tvservice
"When using externalpq/setExternalPqData
I got this error:
"
20 "Driver error while executing the command"
"I just want to change OLED brightness.
I try writing the function separately, but the error will occur as soon as I start calibration.
I can't seem to figure it out.
BTW: for anyone who wants to use send command, the payload itself require a few more thing to complete for example
and perhaps
But I still think that there's more to it.
The text was updated successfully, but these errors were encountered: