cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
altendky
Fanfold Paper
Posts: 18
Registered: ‎11-13-2019
Location: US
Views: 735
Message 1 of 6

Linux on a P1 Gen 2 - fixed black screen after resume and brightness control

I have been working on getting Ubuntu Linux working on my new P1 Gen 2 20QT with the OLED display.  I had a few issues with the default linux-image-5.3.0-23-generic kernel.

 

* Screen remained black after resuming from suspend

* Brightness control doesn't actually affect brightness

* HDMI doesn't detect external displays

 

I've fixed the first two, can't test the HDMI right at the moment.  The linux-oem 4.15.0-1059 kernel addresses the first two issues but I haven't been able to get the wifi working on that one.  backports-iwlwifi-dkms won't load with `modprobe: ERROR: could not insert 'iwlwifi': Exec format error`.  Not sure why but I'd rather work forward than backward.

 

I've filed issues:

 

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1854177

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1854413

https://bugzilla.kernel.org/show_bug.cgi?id=205699

 

Moving in the direction we want...  Mainline 5.3.12 fixes the black screen after resuming (Ubuntu provides .deb for mainline kernels).  I am not aware of the brightness adjustment anywhere but the oem kernel so I ported that up to latest git (4.5.0+).

 

UBUNTU: SAUCE: i915: intel_dp_aux_backlight: Fix max backlight calculations
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-oem/+git/eoan/commit/?h=oem&id=ff39...

 

UBUNTU: SAUCE: drm/i915: customize DPCD brightness control for specific panel
https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-oem/+git/eoan/commit/?h=oem&id=cf72...

 

https://github.com/altendky/linux/commit/395eb4b85f6a0f85061c0598247727de0d9316f6
https://github.com/altendky/linux/commit/c2dc38e6aadf3d979bea83e382a1b119574df7af

 

Built with:

 

git clean -fdx && cp /boot/config-5.3.0-23-generic .config && yes '' | make oldconfig && make clean && make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-altendky-backlight

 

If you are having trouble with these things do consider indicating it on the linked issues so the devs know if this is a big deal or not.

 

I won't call them out but thanks to several people on IRC that helped me work through this.

 

Cheers,

-kyle

 

altendky
Fanfold Paper
Posts: 18
Registered: ‎11-13-2019
Location: US
Views: 632
Message 2 of 6

Re: Linux on a P1 Gen 2 - fixed black screen after resume and brightness control

My HDMI is now working on a clean install of Kubuntu with updates and third party software enabled during install.  The resume fix is in master-next so I'm going to build that and test and then add in the brightness patches.

altendky
Fanfold Paper
Posts: 18
Registered: ‎11-13-2019
Location: US
Views: 578
Message 3 of 6

Re: Linux on a P1 Gen 2 - fixed black screen after resume and brightness control

I got a different patch from https://gitlab.freedesktop.org/drm/intel/issues/510 and with some tweaks applied it to Ubuntu 19.10's -generic master-next.  All is working now.

 

In case anyone dare's to run a random kernel... http://fstab.net/tmp/p1/5.3.13-altendky-iss510/

Lenovo Employee MarkRHPearson
Lenovo Employee
Posts: 85
Registered: ‎07-22-2019
Location: CA
Views: 561
Message 4 of 6

Re: Linux on a P1 Gen 2 - fixed black screen after resume and brightness control

I've been meaning to reply to this one for a few days and didn't get to it.

 

For the black screen after resume issue - the kernel patch you want is in 5.4-rc8 or later:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f216a8507153578efc309...

 

I'm working on getting this into the distro's.

 

For the OLED brightness patch - I have a pair of kernel patches but I don't believe they're upstream ready. I really need to look at them again and find out what the status is. I'll do that and report back, though it sounds like the other approaches are working there.

 

Mark

altendky
Fanfold Paper
Posts: 18
Registered: ‎11-13-2019
Location: US
Views: 555
Message 5 of 6

Re: Linux on a P1 Gen 2 - fixed black screen after resume and brightness control

There may be more code to change but the commits released in 5.3.12 address the black screen after resume and the above linked freedesktop.org bug with patch addresses the brightness control.

 

If there is something missing from the freedesktop patch a review might be in order.

 

Cheers,

-kyle

altendky
Fanfold Paper
Posts: 18
Registered: ‎11-13-2019
Location: US
Views: 507
Message 6 of 6

Re: Linux on a P1 Gen 2 - fixed black screen after resume and brightness control

I just tried to use the SD card reader and it is having issues.  A USB reader with the same card works fine.  This is an admittedly incomplete log but...

 

https://gist.github.com/altendky/5c2c8f7ebdaff5685f9cf12fa1dea3b3

 

seems maybe like https://bugzilla.kernel.org/show_bug.cgi?id=204161.

 

Additionally, it seems that for HDMI output you may have to have PRIME set to performance (such as via `nvidia-settings`).

 

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-435/+bug/1849214

 

I have not personally put much time into either of these yet.

 

 

And we're back...

Move delayed but still coming

Learn More

Check out current deals!


Shop current deals

Top Kudoed Authors