<> Kernel support

​ Because of testing a specific project , Use in advance synaptic Installed 5.0.0-23 Version of kernel, Only these four files were installed at the beginning ,
After entering the system, the resolution is only 0 800x600, The highest resolution is only 1176x885, Try to use it later xrandr The following error was encountered when the command was used to adjust the resolution :

xrandr: Failed to get size of gamma for output default

​ The guess is that the kernel lacks hardware related components , Therefore, the remaining three packages are added , After entering the system, the resolution can be adjusted

​ Before that , For auto loading 5.0.0-23 Version kernel , modify /etc/default/grub as follows :
# 1 Refers to the power on button "shift" Advanced startup options in the later entry interface , 4 Refer to follow 5.0.0-23 Version of the kernel boot , Please refer to grub Advanced startup options for #
Execute after modification sudo update-grub GRUB_DEFAULT="1>4"
<> Auto adjust resolution

​ So far, it has been guaranteed to use xrandr The command can be recognized normally 4k monitor , But the maximum resolution that can be adjusted here is only 10 2K(2560x1600), Still looking uncomfortable ,
The command needed here is as follows :
# xrandr --newmode The following parameters are executable cvt 3840 2160 obtain xrandr --newmode "3840x2160_60.00"
712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync xrandr --addmode
​ These two commands are used to create and add 4K display mode , I put it directly on the table /etc/profile in , It can be loaded automatically every time it is started

<> Auto scaling

​ My computer is 15 Inch screen , stay 4K The font and icon are very small at resolution , At this time, there is no option to adjust the scale in the system settings

​ There are two steps to solve this problem , Run first :
# Set the scale to 2 times gsettings set org.gnome.desktop.interface scaling-factor 2 # Magic command ,
Not sure if it has to be carried out gsettings set org.gnome.mutter experimental-features
​ It should be all right by now , Just do it :
xrandr --output Virtual1 --mode 3840x2160_60.00
​ It should work , But now you have to execute this command every time you restart , It's very troublesome

​ To realize the automatic start-up is 4K resolving power +2 Here's a trick to zoom : Write one first .sh Script in /usr/local/bin ( Personal habits , You can put it anywhere ),
After that, add the boot entry :

​ The name here is also arbitrary , The script is as follows :
#!/bin/bash # Just go into one mode xrandr --output Virtual1 --mode 800x600 # Reset to 4K pattern
xrandr --output Virtual1 --mode 3840x2160_60.00
​ thus , be accomplished , get into Ubuntu18.04 Automatically when 5.0.0-23 Version kernel +4K resolving power +2 Multiple scaling