Bug 109178 - Keyboard backlight on Samsung Np900X5N not working due to not loading samsung-laptop.ko module
Summary: Keyboard backlight on Samsung Np900X5N not working due to not loading samsung...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: General (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-30 00:06 UTC by Jan
Modified: 2019-01-07 23:14 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan 2018-12-30 00:06:38 UTC
Hi I installed Linux on a set of Samsung NP900X5N laptops and have noticed 3 bugs. 2 of them are already found in Bugzilla and replied on them (i915 and Nouveau issues).

On other bug I haven't found so therefore a new one.

My samsung-laptop.ko driver isn't loading. If I try to load it manually it complains about 'no such device".

I am not sure what it means. My best guess is that the driver is not suitable for the new hardware. 

Do you know where I can find more information or contact the developers of the module?

If I posted in a wrong 'group'/product/component please let me know. I will move to the correct one.

Regards, Jan
Comment 1 Jan 2018-12-30 12:07:42 UTC
Never mind. Already found the maintainers on GIThub.
Comment 2 Jan 2018-12-30 16:55:25 UTC
The samsung-laptop.ko module is enabling the use of the keyboard backlight keys. I haved looked into the code and it seems that the BIOS is directly poked. The BIOS is put into CSM mode. 

The module is still not loaded. Therefor the backlight control is not working.

Now digging into the linux source to understand what determines loading as discover does not recognize the Samsung machine anyway.
Comment 3 Jan 2018-12-30 21:53:46 UTC
As it is weekend I did some more reading and debugging of the module. To my understanding the module checks the model and type of the laptop. The known models and types are stored in the struct:

static struct dmi_system_id __initdata samsung_dmi_table[]

I currently finding out whether the NP900X5N notebook is included in this list. 

With dmidecode -t chassis it shows:
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
        Manufacturer: SAMSUNG ELECTRONICS CO., LTD.
        Type: Notebook
        Lock: Not Present
        Version: N/A
        Serial Number: 0F4C91CJ900346
        Asset Tag: No Asset Tag
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Other
        Security Status: None
        OEM Information: 0x00000000
        Height: Unspecified
        Number Of Power Cords: 1
        Contained Elements: 0
        SKU Number: Chassis

I think this should not be the problem as the struct includes:

		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR,
					"SAMSUNG ELECTRONICS CO., LTD."),
			DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
		},
Comment 4 Jani Nikula 2019-01-02 09:07:23 UTC
(In reply to Jan from comment #2)
> The samsung-laptop.ko module is enabling the use of the keyboard backlight
> keys.

This bugzilla is about display and graphics, not about keyboard. Try these people and lists instead (or bugzilla.kernel.org, but there's a risk nobody notices:

$ get_maintainer.pl -f ./drivers/platform/x86/samsung-laptop.c
Corentin Chary <corentin.chary@gmail.com> (maintainer:SAMSUNG LAPTOP DRIVER)
Darren Hart <dvhart@infradead.org> (maintainer:X86 PLATFORM DRIVERS)
Andy Shevchenko <andy@infradead.org> (maintainer:X86 PLATFORM DRIVERS)
platform-driver-x86@vger.kernel.org (open list:SAMSUNG LAPTOP DRIVER)
linux-kernel@vger.kernel.org (open list)

> The BIOS is put into CSM mode.

For i915 we don't really support the CSM mode. Please use UEFI instead.
Comment 5 Jani Nikula 2019-01-02 09:07:43 UTC
NOTOURBUG
Comment 6 Jan 2019-01-02 09:17:40 UTC
Ok apologies :-) I understand now. Sorry for bothering you guys in the wrong group. I am still learning my way to the right people.

I contacted them directly via get_maint....

Warm regards!
Comment 7 Jan 2019-01-02 19:27:40 UTC
Indeed nobody notices :-) Is there another way to reach the maintainers?

ps: only reopened it for notification purpuses. As soon there is an answer I will close it again.
Comment 8 Jan 2019-01-03 09:01:27 UTC
Maintainers contacted me. I do not have the authority to close it. Therefor put it on RESOLVED with NOTOURBUG label.
Comment 9 Jani Nikula 2019-01-03 11:23:13 UTC
(In reply to Jan from comment #7)
> Indeed nobody notices :-) Is there another way to reach the maintainers?

Considering the time of the year, I think you're getting plenty of attention. ;)

> ps: only reopened it for notification purpuses. As soon there is an answer I
> will close it again.

I think notifications and everything work just fine regardless of open/close status.

(In reply to Jan from comment #8)
> Maintainers contacted me. I do not have the authority to close it. Therefor
> put it on RESOLVED with NOTOURBUG label.

If it's on a public list or another bugzilla, please reference here for the benefit of others. Thanks.
Comment 10 Jan 2019-01-03 16:00:40 UTC
Ok I will Jani. 

And I express herewith my deepest respect for the whole Linux community. Also from a sociological view a true wonder how the cross-company eco-systems operates. Fascinating and very very impressive. I feel privileged to be part of it :-)

Also please bear in mind that are bought NP900X5N laptops are currently not much more than an interesting hobby project, while we bought them as a replacement for the NP900X4D laptops that are getting end of life.

Our only solution is currently getting support from the community and spending a tremendous amount of time in getting them properly running.

Warm regards Jan
Comment 11 Jan 2019-01-07 23:14:32 UTC
Just for the sake of record I found the solution:

The (UEFI based) kernel creates /sys/firmware/efi/efivars with the variable:
KBDBacklitLvl-5af56f53-985c-47d5-920c-f1c531d06852

The set immutable flag can be disabled with:
chattr -i /sys/firmware/efi/efivars/KBDBacklitLvl-5af56f53-985c-47d5-920c-f1c531d06852

After that the variable can be altered from 00 - 03:
echo 0700000002 | xxd -p -r > /sys/firmware/efi/efivars/KBDBacklitLvl-5af56f53-985c-47d5-920c-f1c531d06852 (GUID dependent on the manufacturer)

00 - Backlight off (always)
01 - Backlight on DIM level (by low ambient light; detected by light sensor)
02 - Backlight on NORM level (by low ambient light)
03 - Backlight on FULL level (by low ambient light)

Inspired by: 
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1203592


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.