altendky / issues

0 stars 0 forks source link

Overall Ubuntu setup on ThinkPad Lenovo P1 Gen 2 #1

Open altendky opened 4 years ago

altendky commented 4 years ago

Previously I've both flailed a lot and found fixes for a couple issues (black screen on resume and brightness control) for running Kubuntu 19.10 on my ThinkPad Lenovo P1 Gen 2. The primary remaining user-apparent issue is the lack of HDMI output. While I did at one point get this working, I have been unable to recreate that scenario.

There is a lot of uncertainty in the present setup and lots of errors even in a Kubuntu 19.10 live boot journalctl log so I am attempting a 'fresh start'.

altendky commented 4 years ago

Resetting BIOS to OS optimized defaults.

image

It was suggested to use legacy boot but that is not selectable with secure boot enabled.

image

Disabling Secure Boot.

image

Legacy is still unselectable but now because of kernel DMA protection.

image

Disabling kernel DMA protection.

image

This additionally will change Thunderbolt security level to user authentication and disables Thunderbolt support in the pre boot environment.

image

Now switching to legacy only.

image

Switching to legacy only set CSM support to yes.

image

Before saving and exiting, checking BIOS versions. Lenovo lists 1.27 as the latest.

image

BIOS reports as 1.27.

image

Exiting and saving changes...

image

altendky commented 4 years ago
pretty generic install with reformatting of existing LVM partitions ![IMG_20191201_113454](https://user-images.githubusercontent.com/543719/69917077-56795780-1430-11ea-936b-96db515f9433.jpg) ![IMG_20191201_113532](https://user-images.githubusercontent.com/543719/69917072-55e0c100-1430-11ea-99a2-d2c2e02270a8.jpg) ![IMG_20191201_113551](https://user-images.githubusercontent.com/543719/69917079-56795780-1430-11ea-8034-6471e6cda3e0.jpg) ![IMG_20191201_113631](https://user-images.githubusercontent.com/543719/69917071-55482a80-1430-11ea-86e2-410fcc6aabe2.jpg) ![IMG_20191201_113830](https://user-images.githubusercontent.com/543719/69917073-55e0c100-1430-11ea-834a-eeaa66b7ec76.jpg) ![IMG_20191201_113850](https://user-images.githubusercontent.com/543719/69917081-5711ee00-1430-11ea-8c5c-3d89d3fa6655.jpg) ![IMG_20191201_113956](https://user-images.githubusercontent.com/543719/69917075-55e0c100-1430-11ea-9721-8f23563f50c2.jpg) ![IMG_20191201_114040](https://user-images.githubusercontent.com/543719/69917076-55e0c100-1430-11ea-81e5-4d09482a2c07.jpg)

IMG_20191201_114222 IMG_20191201_114243 IMG_20191201_114301 IMG_20191201_114325 IMG_20191201_114337

altendky commented 4 years ago

Since the GPT or NVME or... isn't directly supported in the (non-default) legacy BIOS mode I am going to switch back to UEFI for now. If the legacy path is to be explored more later there's not much overhead it getting back to those settings.

parted -l &| nc termbin.com (with I<enter>) showing GPT partition tables

click to expand ``` Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. Ignore/Cancel? I Model: SanDisk Extreme (scsi) Disk /dev/sda: 64.1GB Sector size (logical/physical): 2048B/512B Partition Table: mac Disk Flags: Number Start End Size File system Name Flags 1 2048B 6143B 4096B Apple 2 2042MB 2045MB 2523kB EFI Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/lvm_group-root: 32.8GB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 32.8GB 32.8GB ext4 Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/lvm_group-home: 2383GB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 2383GB 2383GB ext4 Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/lvm_group-tmp: 4094MB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 4094MB 4094MB ext4 Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/lvm_group-boot: 2147MB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 2147MB 2147MB ext4 Model: INTEL SSDPEKKF512G8L (nvme) Disk /dev/nvme0n1: 512GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 274MB 273MB fat32 EFI system partition boot, hidden, esp 2 274MB 290MB 16.8MB Microsoft reserved partition msftres 3 290MB 138GB 137GB ntfs Basic data partition msftdata 5 138GB 511GB 373GB lvm 4 511GB 512GB 1049MB ntfs Basic data partition hidden, diag Model: SAMSUNG MZVLB2T0HALB-000L7 (nvme) Disk /dev/nvme1n1: 2048GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 2048GB 2048GB lvm ```
altendky commented 4 years ago

IMG_20191201_131008 IMG_20191201_131020

altendky commented 4 years ago
pretty generic install with reformatting of existing LVM partitions ![IMG_20191201_131309](https://user-images.githubusercontent.com/543719/69918285-38b2ef00-143e-11ea-868a-619a2eb8edb7.jpg) ![IMG_20191201_131318](https://user-images.githubusercontent.com/543719/69918288-38b2ef00-143e-11ea-8d34-27cf38805ef9.jpg) ![IMG_20191201_131324](https://user-images.githubusercontent.com/543719/69918281-381a5880-143e-11ea-87e7-ac3993ce5ad8.jpg) ![IMG_20191201_131350](https://user-images.githubusercontent.com/543719/69918280-381a5880-143e-11ea-9d77-27234ccec534.jpg) ![IMG_20191201_131428](https://user-images.githubusercontent.com/543719/69918284-38b2ef00-143e-11ea-8a0b-4ad847144345.jpg) ![IMG_20191201_131604](https://user-images.githubusercontent.com/543719/69918279-381a5880-143e-11ea-9b12-b3200be34115.jpg) ![IMG_20191201_131618](https://user-images.githubusercontent.com/543719/69918286-38b2ef00-143e-11ea-97f5-8fefec4d369b.jpg) ![IMG_20191201_131630](https://user-images.githubusercontent.com/543719/69918287-38b2ef00-143e-11ea-850c-55e4364f08ed.jpg) ![IMG_20191201_131652](https://user-images.githubusercontent.com/543719/69918282-381a5880-143e-11ea-95df-8f5bed30fd56.jpg) ![IMG_20191201_132208](https://user-images.githubusercontent.com/543719/69918283-38b2ef00-143e-11ea-989f-d62776cad31e.jpg)
altendky commented 4 years ago
MOK/Secure Boot registration ![IMG_20191201_132313](https://user-images.githubusercontent.com/543719/69918292-45374780-143e-11ea-949b-c87a6d0b1c42.jpg) ![IMG_20191201_132320](https://user-images.githubusercontent.com/543719/69918293-45374780-143e-11ea-9c90-f054c92c3bf3.jpg) ![IMG_20191201_132302](https://user-images.githubusercontent.com/543719/69918295-45374780-143e-11ea-868f-d34ccd43bf9c.jpg) ![IMG_20191201_132307](https://user-images.githubusercontent.com/543719/69918296-45374780-143e-11ea-9da4-a455fc334323.jpg) ![IMG_20191201_132254](https://user-images.githubusercontent.com/543719/69918297-45cfde00-143e-11ea-8a44-0c5ecb398b37.jpg) ![IMG_20191201_132324](https://user-images.githubusercontent.com/543719/69918298-45cfde00-143e-11ea-8ee1-fe3c44636218.jpg)
altendky commented 4 years ago

sudo journalctl --boot | nc termbin.com 9999 https://gist.github.com/altendky/ca207def1c39ccaad1b4c359706e8cb4

sudo lspci | nc termbin.com 9999 https://gist.github.com/altendky/e88eff2f5e18e85f34888f3132338c11

sudo lshw -C video | nc termbin.com 9999 https://gist.github.com/altendky/e824ed8429dc4c4971b92296e50471b0

sudo lshw | nc termbin.com 9999 https://gist.github.com/altendky/8a21f256a6e1d5f9c292aed06a7df74f

sudo xrandr | nc termbin.com 9999 https://gist.github.com/altendky/cf58cba071505a7a36f154ae51e48164

ubuntu-drivers list | tee log && cat log | nc termbin.com 9999

nvidia-driver-435
nvidia-driver-430
altendky commented 4 years ago

sudo ubuntu-drivers install --gpgpu nvidia:435 | tee log && cat log | nc termbin.com 9999 https://gist.github.com/altendky/23aa41ffe09b9be873332e959b0e80c3

sudo lshw -C video | nc termbin.com 9999 https://gist.github.com/altendky/c12e95fd498fe8d4d606a8b1b8bb06dd

Nvidia card still shows unclaimed.

altendky commented 4 years ago

sudo apt update | tee log && cat log | nc termbin.com 9999 https://gist.github.com/altendky/0c43210ca6c11d31400552489fbce464

sudo apt upgrade --yes | tee log && cat log | nc termbin.com 9999 https://gist.github.com/altendky/c73f1162344e5f4cd81a40d7c95860db

Then powered down...

altendky commented 4 years ago

sudo lshw -C video | tee log && cat log | nc termbin.com 9999 https://gist.github.com/altendky/615aceafda6fdab51e36ec7c4faea3ac

Nvidia is still unclaimed.

sudo lspci -k | tee log && cat log | nc termbin.com 9999 https://gist.github.com/altendky/5e4df33fed8ae3526f62b5510e93e7fe

01:00.0 VGA compatible controller: NVIDIA Corporation Device 1fb8 (rev a1)
    Subsystem: Lenovo Device 22a8
    Kernel modules: nvidiafb, nouveau

apt search nouveau | tee log && cat log | nc termbin.com 9999 https://gist.github.com/altendky/6ed168d9debff2b826cdb15eae4cfece

ubuntu-drivers debug | nc termbin.com 9999 https://gist.github.com/altendky/f3f09ecedda4a68fa097cd587baea1df

nvidia-driver-435: installed: <none>   available: 435.21-0ubuntu0.18.04.2 (auto-install)  [distro]  non-free  modalias: pci:v000010DEd00001FB8sv000017AAsd000022A8bc03sc00i00  path: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0  vendor: NVIDIA Corporation 

Perhaps it didn't actually install?

altendky commented 4 years ago

sudo ubuntu-drivers install --gpgpu nvidia:435 https://gist.github.com/altendky/c6995e7228b74f8099561a1f25d03f0a

ubuntu-drivers debug | nc termbin.com 9999 https://gist.github.com/altendky/6705f9335a1f64493f374b67c7d7aaf8

Then a power down...

altendky commented 4 years ago

Boots ok and shows login screen. I enter the password and press enter to sign in. The screen goes black except the cursor for a moment then returns to the login screen.

ubuntu-drivers debug | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/9789d6fec3a16dd9ae45a9d131880bff

sudo journalctld --boot | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/a49b3c0283eae564d2e127171852ea6d

sudo lspci -k | tee log && cat log | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/1f8da152eab30ac6bac37b12d7ef9451

Don't we want to not have nouveau anymore?

01:00.0 VGA compatible controller: NVIDIA Corporation Device 1fb8 (rev a1)
    Subsystem: Lenovo Device 22a8
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

sudo lshw -C video | tee log && cat log | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/8b638dc3dd4f2b46685eeb11aadb921a

The nvidia card is no longer unclaimed.

sudo lshw | tee log && cat log | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/07c8fcb7c3585fdef8b251e8fc14f4e1

sudo cat /var/log/Xorg.0.log | tee log && cat log | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/b1eb563c783d7137196d0811546f52cd

[   512.187] (EE) Failed to load module "nvidia" (module does not exist, 0)

Perhaps this is saying it wants https://packages.ubuntu.com/bionic-updates/xserver-xorg-video-nvidia-435? Though if it does you would think it should have gotten it already. Maybe I misused ubuntu-drivers? https://packages.ubuntu.com/bionic-updates/nvidia-driver-435 depends on xserver-xorg-video-nvidia-435 so installing it directly with apt would have gotten the dep... Let's give ubuntu-drivers auto-install a try.

sudo journalctl --follow --lines 0 > log (in a virtual console) https://gist.github.com/altendky/1de2fa0a4bf3a8759c5d58fa62c9ec4a

Above is just the messages from switching back to the login screen, trying to login, and switching back to the virtual console.

Dec 01 14:54:09 p1 /usr/lib/gdm3/gdm-x-session[2236]: (EE) Failed to load module "nvidia" (module does not exist, 0)
altendky commented 4 years ago

apt search '.*xorg.*nvidia.*' | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/8eb4408b712bcbc1c4e48a90e88e9ef1

xserver-xorg-video-nvidia-435/bionic-updates 435.21-0ubuntu0.18.04.2 amd64

sudo ubuntu-drivers autoinstall |& nc termbin.com 9999 (in a virtual console) <ugh, I managed to lose the output>

sudo ubuntu-drivers autoinstall |& nc termbin.com 9999 (in a virtual console)

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

apt search '.*xorg.*nvidia.*' | nc termbin.com 9999 (in a virtual console) https://gist.github.com/altendky/9eb9a9b362abafc1d0878f96eb4a7413

xserver-xorg-video-nvidia-435/bionic-updates,now 435.21-0ubuntu0.18.04.2 amd64 [installed,automatic]

That looks better. Apparently how I called ubuntu-drivers above was a bad idea.

Let's shutdown and see.

altendky commented 4 years ago

Yep, login works again.

sudo journalctl --boot | nc termbin.com 9999 https://gist.github.com/altendky/edb6404835415fb28cc637e614524d39

xrandr | nc termbin.com 9999 https://gist.github.com/altendky/bcd10fbc4ad9ceef066c05b409377f11

DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 344mm x 194mm

And there's the HDMI... :] Brightness control does not have any effect other than the OSD. Black screen after suspend and resume. Plugging in the HDMI cable recovered the laptop display... long enough to type this then it went blank again. Unplug and replug had no effect. Short press power button has no apparent effect. Holding power button to force power off.

Started up again, logged in, just plugging in the HDMI cable extended the display and both the laptop and external monitor are active.