https://wiki.archlinux.org/api.php?action=feedcontributions&user=Adam&feedformat=atomArchWiki - User contributions [en]2024-03-28T15:45:07ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Lenovo_IdeaPad_Yoga_2_Pro&diff=373329Lenovo IdeaPad Yoga 2 Pro2015-05-11T07:55:15Z<p>Adam: /* Graphics */</p>
<hr />
<div>{{Poor writing|Missing templates, poorly organized}}<br />
<br />
[[Category:Lenovo]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Graphics || style="color:green" | '''Working''' || xf86-video-intel<br />
|-<br />
| Wireless || style="color:green" | '''Working*''' || iwlwifi<br />
|-<br />
| Audio || style="color:green" | '''Working''' || snd_hda_intel<br />
|-<br />
| Touchscreen || style="color:green" | '''Working''' || usbtouchscreen<br />
|-<br />
| Accelerometer || style="color:red" | '''Not Working''' ||<br />
|-<br />
| Touchpad || style="color:green" | '''Working''' || xf86-input-synaptics<br />
|-<br />
| Camera || style="color:green" | '''Working''' ||<br />
|-<br />
| Card Reader || style="color:blue" | '''Unknown''' ||<br />
|-<br />
| Bluetooth || style="color:green" | '''Working''' ||<br />
|}<br />
<br />
==The ideapad_laptop module==<br />
<br />
Several problems come up if the ideapad_laptop module is in use. Namely, it blocks the network card and generates a massive stream of warning from the USB subsystem such as:<br />
<br />
Dec 5 08:40:44 localhost kernel: [ 290.632613] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred<br />
Dec 5 08:40:44 localhost kernel: [ 290.735110] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred<br />
Dec 5 08:40:44 localhost kernel: [ 290.837534] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred<br />
Dec 5 08:40:44 localhost kernel: [ 290.940070] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred<br />
Dec 5 08:40:44 localhost kernel: [ 291.042570] xhci_hcd 0000:00:14.0: ep 0x81 - asked for 15360 bytes, 15117 bytes untransferred<br />
<br />
You can silence these in the short run by running:<br />
<br />
# dmesg -D<br />
<br />
And you can unblock the wireless card by running:<br />
<br />
# rfkill unblock wlan<br />
<br />
However, in the long term, you will probably want to blacklist the {{ic|ideapad_laptop}} driver so that neither of these occur in the first place. I am yet to find a disadvantage to doing so.<br />
<br />
==Keyboard and other hardware keys==<br />
To access boot menu or BIOS settings, you must use the alternate power button, next to the standard one.<br />
<br />
No keypad available at all.<br />
<br />
===Keyboard special keys===<br />
{{note | A working keymap means that there is some output in {{ic|xev}} when the key combination is pressed OR that the functionality is built in and "just works". It does not means that the keymap is linked to the functionality. For that it is often necessary to add a keyboard shortcut [[Extra keyboard keys in Xorg|by the method of your choice]] or to use a desktop shell with built-in shortcut support for the keycode in question. For some of the keys the function operates on a BIOS level and no shortcut is needed.}}<br />
<br />
{{note| BIOS has a setting to flip the behavior of the FN key.}}<br />
<br />
{| class="wikitable"<br />
! Keys!! Function !! X sees<br />
|-<br />
| {{ic|Fn+F1}} || Audio mute/unmute || XF86AudioMute<br />
|-<br />
| {{ic|Fn+F2}} || Audio volume down || XF86AudioLowerVolume<br />
|-<br />
| {{ic|Fn+F3}} || Audio volume up || XF86AudioRaiseVolume<br />
|-<br />
| {{ic|Fn+F4}} || Close application || {{ic|Alt_L+F4}}<br />
|-<br />
| {{ic|Fn+F5}} || Refresh page || {{ic|F5}}<br />
|-<br />
| {{ic|Fn+F6}} || Disable Touchpad || ?<br />
|-<br />
| {{ic|Fn+F7}} || Airplane mode || ?<br />
|-<br />
| {{ic|Fn+F8}} || Unknown || {{ic|Alt_L+Tab}}<br />
|-<br />
| {{ic|Fn+F9}} || Turn off LCD || ?<br />
|-<br />
| {{ic|Fn+F10}} || Toggle display || {{ic|Super+p}}<br />
|-<br />
| {{ic|Fn+F11}} || Dim LCD backlight || XF86MonBrightnessDown<br />
|-<br />
| {{ic|Fn+F12}} || Brighten LCD backlight || XF86MonBrightnessUp<br />
|}<br />
<br />
===Hardware keys on right side===<br />
From hinge to front:<br />
XF86AudioRaiseVolume<br />
XF86AudioLowerVolume<br />
Super_L+o<br />
<br />
==Touchscreen==<br />
Touchscreen USB device seems to come and go if the {{ic|usbtouchscreen}} module is not loaded.<br />
<br />
===Multitouch gestures===<br />
You need to install {{aur|Touchegg}} from the [[AUR]] in order to enable multitouch gestures. Optionally, you can install {{aur|touchegg-gce-git}} as a graphical front-end. See more details in the [[Touchegg|dedicated wiki page]].<br />
{{Tip| If you use [[Gnome Shell]] you should start {{ic|touchegg}} before it, in order to avoid conflicts.}}<br />
<br />
===Touchscreen button===<br />
The touchscreen button with a Windows logo is mapped as {{ic|Super}}. However, {{ic|key_down}} and {{ic|key_up}} are generated simultaneously on touch release. The haptic feedback (vibration) when touching this button is currently not controllable via software.<br />
<br />
===Touchscreen stops working after suspension===<br />
Sometimes touchscreen stops working after resuming from suspension mode. You should be able to fix the problem reloading the {{ic|usbhid}} and {{ic|usbtouchscreen}} kernel modules:<br />
<br />
# modprobe -r usbhid usbtouchscreen<br />
<br />
==ACPI==<br />
I modified {{ic|/etc/acpi/default.sh}} to allow for some debugging and additional features (see below):<br />
#!/bin/sh<br />
set $*<br />
group=${1%%/*}<br />
device=$2<br />
id=$3<br />
value=$4<br />
log_unhandled() {<br />
logger "ACPI event unhandled: $*"<br />
}<br />
case "$group" in<br />
button)<br />
case "$action" in<br />
power)<br />
/etc/acpi/actions/powerbtn.sh<br />
;;<br />
lid)<br />
/etc/acpi/actions/lid.sh<br />
;;<br />
*) log_unhandled $* ;;<br />
esac<br />
;;<br />
ac_adapter)<br />
case "$value" in<br />
*) log_unhandled $* ;;<br />
esac<br />
;;<br />
*) echo $* > /dev/tty5<br />
log_unhandled $* ;;<br />
esac<br />
<br />
<br />
===Touchpad===<br />
The touchpad sends random input from time to time, especially when lid is closed. If you like your computer to keep running when the lid is closed, you may want to disable the touchpad with ACPI events:<br />
;/etc/acpi/actions/lid.sh<br />
#!/bin/bash<br />
export DISPLAY=:0<br />
if grep closed /proc/acpi/button/lid/LID0/state<br />
then<br />
synclient TouchpadOff=1 2>/dev/tty5 && echo "lid closed, disabling touchpad" >/dev/tty5<br />
else<br />
synclient TouchpadOff=0 2>/dev/tty5 && echo "lid open, eênabling touchpad" >/dev/tty5<br />
fi<br />
Of course, the echo statement is optional and for debug purposes.<br />
<br />
===Backlight===<br />
With newer kernels (I am currently using {{ic|3.17.6-1-ARCH}}) backlight works out-of-the-box.<br />
<br />
"old" (ref needed) kernels require boot argument<br />
acpi_backlight=vendor<br />
<br />
Screen backlight brightness can be manually set with<br />
echo $VAL > /sys/class/backlight/intel_backlight/brightnes<br />
with $VAL between 0 and 937<br />
<br />
===Battery===<br />
Battery info can be accessed with<br />
ls /sys/class/power_supply/BAT1/*<br />
Unfortunately, the values obtained there have no units (older Lenovo products had rates in mA, battery voltage, etc.)<br />
<br />
==Graphics==<br />
<br />
Steam crashes trying to run games complaining about missing i965 module. It seems some applications treat it as accelerated, and some do not.<br />
<br />
Resolution seems to be not so well supported by some desktop environments/window managers. Gnome-based DEs like Cinnamon and Mate, as well as XFCE and fvwm seem to work fine.<br />
<br />
Users may wish to boost font-sizes, as the HiDPI screen can be hard to read in some settings.<br />
<br />
<br />
<br />
If you have trouble detecting a display with the micro hdmi port, consider filing the plastic on the male hdmi plug back a bit (not on the laptop). See [https://forums.lenovo.com/t5/Lenovo-Edge-Yoga-Flex-Laptops/Yoga-2-Pro-micro-HDMi-issue-SOLVED/td-p/1297269 here]. The ruber case can prevent the plug from inserting fully.<br />
<br />
==Rotation/Conversion==<br />
<br />
You can easily rotate screen with xrandr, however it does not rotate touchscreen/touchpad input which makes it fairly awkward to use. There is a [https://github.com/wolneykien/xrandr-align project] attempting to address this. Keyboard hardware-disables in tablet mode, but touchpad is still active which needs to be addressed. No ACPI or keycode signals appear to be emitted for the various screen rotation states.<br />
<br />
==See also==<br />
* The LinLap site has some good information - see [http://www.linlap.com/lenovo_ideapad_yoga_2_pro];<br />
* a good Review of Arch Linux on a HiDPI Lenovo Yoga 2 Pro by KeithCU with useful comments [http://keithcu.com/wordpress/?p=3270 ];<br />
* an installation guide written by Ubuntu users: [http://askubuntu.com/questions/367963/ubuntu-on-lenovo-yoga-2-pro ].</div>Adamhttps://wiki.archlinux.org/index.php?title=HiDPI&diff=373328HiDPI2015-05-11T07:49:58Z<p>Adam: /* Chromium / Google Chrome */ Added another tested DE for Chrome HiDPI</p>
<hr />
<div>[[Category:Graphics]]<br />
[[ja:HiDPI]]<br />
HiDPI (High Dots Per Inch) displays, also known by Apple's "[[wikipedia:Retina Display|Retina Display]]" marketing name, are screens with a high resolution in a relatively small format. They are mostly found in Apple products or high-end "ultrabooks", as well as in 4K (Ultra HD) or even 5K monitors.<br />
<br />
Not all software behaves well in high-resolution mode yet. Here are listed most common tweaks which make work on a HiDPI screen more pleasant.<br />
<br />
== Desktop environments ==<br />
<br />
=== GNOME ===<br />
<br />
To enable HiDPI, use gsettings:<br />
<br />
gsettings set org.gnome.desktop.interface scaling-factor 2<br />
<br />
=== KDE ===<br />
<br />
{{Out of date|Needs to be updated for KDE 5.}}<br />
KDE still has its share of HiDPI [https://community.kde.org/KDE/High-dpi_issues issues] but HiDPI support can be improved by changing the below settings:<br />
<br />
# Increase font dpi (System Settings → Application Appearance → Fonts → Force font dpi, enter a number such as 125, 144 or 150 etc)<br />
# Increase icon sizes (System Settings → Application Appearance → Icons → Advanced, here choose a higher icon size for all icons, eg. just increase each icon type by one step) <br />
<br />
=== Xfce ===<br />
<br />
Go to Settings Editor (you can find it in Settings Manager), and change the DPI parameter in {{ic|xsettings}} → {{ic|Xft}}. The value of 180 seems to work well on Retina screens.<br />
<br />
To enlarge icons in system tray, right-click on it (aim for empty space / top pixels / bottom pixels, so that you will not activate icons themselves) → “Properties” → set “Maximum icon size” to 32, 48 or 64.<br />
<br />
=== Cinnamon ===<br />
<br />
Supports HiDPI since 2.2. Even without rebuilding GTK3, the support is pretty good (e.g. window borders are correctly sized, which is not the case under Xfce).<br />
<br />
=== Enlightenment ===<br />
<br />
For E18, go to the E Setting panel. In Look → Scaling, you can control the UI scaling ratios. A ratio of 1.2 seems to work well for the native resolution of the MBPr 15" screen.<br />
<br />
== X Server ==<br />
<br />
Some programs use the physical width to detect the DPI. Examples are i3 ([https://github.com/i3/i3/blob/next/libi3/dpi.c source]) and Chromium ([https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/widget/desktop_aura/desktop_screen_x11.cc source]).<br />
<br />
To verify that the X Server has properly detected the physical dimensions of your monitor, run:<br />
<br />
$ xdpyinfo | grep -B 2 resolution<br />
screen #0:<br />
dimensions: 3200x1800 pixels (423x238 millimeters)<br />
resolution: 192x192 dots per inch<br />
<br />
This examples uses inaccurate dimensions (423mm x 328mm, even though the Dell XPS 9530 has 346mm x 194mm) to have a clean multiple of 96 dpi, in this case 192 dpi. This tends to work better than using the correct DPI — Pango renders fonts crisper in i3 for example.<br />
<br />
If the DPI displayed by xdpyinfo is not correct, see [[Xorg#Display_size_and_DPI]] for how to fix it.<br />
<br />
== X Resources ==<br />
<br />
If you are not using a desktop environment such as GNOME, KDE, Xfce, or other that manipulates the X settings for you, you can set the desired Xft DPI setting manually in {{ic|~/.Xresources}}:<br />
<br />
{{hc|~/.Xresources|<nowiki><br />
Xft.dpi: 180<br />
Xft.autohint: 0<br />
Xft.lcdfilter: lcddefault<br />
Xft.hintstyle: hintfull<br />
Xft.hinting: 1<br />
Xft.antialias: 1<br />
Xft.rgba: rgb<br />
</nowiki>}}<br />
<br />
Make sure the settings are loaded properly when X starts, for instance in your {{ic|~/.xinitrc`}} with {{ic|xrdb -merge ~/.Xresources}} (see [[Xresources]] for more information).<br />
<br />
This will make the font render properly in most toolkits and applications, it will however not affect things such as icon size!<br />
<br />
== Browsers ==<br />
<br />
=== Firefox ===<br />
<br />
Open Firefox advanced preferences page ({{ic|about:config}}) and set parameter {{ic|layout.css.devPixelsPerPx}} to {{ic|2}} (or find the one that suits you better; {{ic|2}} is a good choice for Retina screens).<br />
<br />
If you use a HiDPI monitor such as Retina display together with another monitor, you can use [https://addons.mozilla.org/en-US/firefox/addon/autohidpi/ AutoHiDPI] add-on in order to automatically adjust {{ic|layout.css.devPixelsPerPx}} setting for the active screen.<br />
<br />
From Firefox version 38 onwards, your system (GTK+ 3.10) settings should be taken into account.[https://bugzilla.mozilla.org/show_bug.cgi?id=975919]<br />
<br />
=== Chromium / Google Chrome ===<br />
<br />
HiDPI support in Chromium is available through {{AUR|chromium-dev}} by setting {{ic|1=_use_hidpi=1}} in the [[PKGBUILD]]. [https://code.google.com/p/chromium/issues/detail?id=143619 HiDPI support] was only [https://chromium.googlesource.com/chromium/src.git/+/b19dc5bf24871e40e986f0f024946b1c281e77c4 recently added], so it will take some time to become available in {{Pkg|chromium}}. In the meantime try setting default page zoom level to 200% (although it is not the most elegant solution).<br />
<br />
Full HiDPI support in Chrome is available through {{AUR| google-chrome-dev}} as of version 43.0.2357.2-1 and works out of the box as tested with Gnome and Cinnamon. Additionally, using older Chrome packages from AUR, and possibly chromium packages as well (not tested) the browser can be launched with the command line flag {{ic|--force-device-scale-factor}} and a scaling value. This will scale all content and ui, including tab and font size. For example:<br />
<br />
{{bc|1=google-chrome --force-device-scale-factor=2}}<br />
<br />
Using this option, a scaling factor of 1 would be normal scaling. Floating point values can be used.<br />
<br />
=== Opera ===<br />
<br />
Since version 24 one can alter Opera's DPI by starting it with the {{ic|1=--alt-high-dpi-setting=X}} command line option, where X is the desired DPI. For example, with {{ic|1=--alt-high-dpi-setting=144}} Opera will assume that DPI is 144. Newer versions of opera will auto detect the DPI using the font DPI setting (in KDE: the force font DPI setting.)<br />
<br />
Generally speaking, Opera's HiDPI support is excellent. Since it is also built using Chrome's blink renderer, and has an extension which runs most Chrome extensions, it's a very viable alternative to Chrome with much better HiDPI support.<br />
<br />
== Mail clients ==<br />
<br />
=== Thunderbird ===<br />
<br />
See [[#Firefox]]. To access {{ic|about:config}}, go to Edit → Preferences → Advanced → Config editor.<br />
<br />
== Skype ==<br />
<br />
Skype is a Qt program, and needs to be configured separately. You cannot change the DPI setting for it, but at least you can change font size. Install {{Pkg|qt4}} and run {{ic|qtconfig-qt4}} to do it.<br />
<br />
== IntelliJ IDEA ==<br />
<br />
If HiDPI support does not work, you have to add {{ic|1=-Dhidpi=true}} to your vmoptions file.[https://youtrack.jetbrains.com/issue/IDEA-114944]<br />
/usr/share/intellij-idea-ultimate-edition/bin/idea.vmoptions<br />
/usr/share/intellij-idea-ultimate-edition/bin/idea64.vmoptions<br />
<br />
== NetBeans ==<br />
<br />
NetBeans allows the font size of its interface to be controlled using the {{ic|1=--fontsize}} parameter during startup. To make this change permanent edit the {{ic|1=/usr/share/netbeans/etc/netbeans.conf}} file and append the {{ic|1=--fontsize}} parameter to the {{ic|1=netbeans_default_options}} property.[http://wiki.netbeans.org/FaqFontSize]<br />
<br />
The editor fontsize can be controlled from Tools → Option → Fonts & Colors.<br />
<br />
The output window fontsize can be controlled from Tools → Options → Miscelaneous → Output<br />
<br />
== Gimp 2.8 ==<br />
<br />
Use a high DPI theme, or [http://gimpforums.com/thread-increase-all-icons-on-hidpi-screen?pid=39113#pid39113 adjust] {{ic|1=gtkrc}} of an existing theme. For example set {{ic|1=GimpToolPalette::tool-icon-size}} to {{ic|1=dialog}}.<br />
<br />
== VLC ==<br />
<br />
The git vit version {{AUR|vlc-git}} on the AUR seems to solve some of the problems.<br />
<br />
== Other / Older applications ==<br />
<br />
One approach is to run the application full screen and without decoration in its own VNC desktop. Then scale the viewer. With Vncdesk ({{AUR|vncdesk-git}} from the [[AUR]]) you can set up a desktop per application, then start server and client with a simple command such as {{ic|vncdesk 2}}.<br />
<br />
[[x11vnc]] has an experimental option {{ic|-appshare}}, which opens one viewer per application window. Perhaps something could be hacked up with that.<br />
<br />
== GUI Toolkits ==<br />
<br />
=== Qt 5 ===<br />
<br />
Qt5 applications can often be run at higher dpi by setting the QT_DEVICE_PIXEL_RATIO environment variable. Note that the variable has to be set to a whole integer, so setting it to 1.5 will not work.<br />
<br />
This can for instance be enabled by creating a file {{ic|/etc/profile.d/qt-hidpi.sh}}<br />
<br />
export QT_DEVICE_PIXEL_RATIO=2<br />
<br />
And set the executable bit on it.<br />
<br />
=== GDK 3 (GTK+ 3) ===<br />
<br />
To scale UI elements by a factor of two:<br />
<br />
export GDK_SCALE=2<br />
<br />
To undo scaling of text:<br />
<br />
export GDK_DPI_SCALE=0.5<br />
<br />
== External displays ==<br />
The HiDPI setting is desktop-wide so that non-HiDPI external displays show everything too large. One workaround is to using [[xrandr]]'s scale option. To have a non-HiDPI monitor (on DP1) right of an internal HiDPI display (eDP1), one could run:<br />
<br />
xrandr --output eDP1 --auto --output DP1 --auto --scale 2x2 --right-of eDP1<br />
<br />
When extending above the internal display, you may see part of the internal display on the external monitor. In that case, specify the position manually, e.g. using [https://gist.github.com/wvengen/178642bbc8236c1bdb67 this script].<br />
<br />
You may run into problems with your mouse not being able to reach the whole screen. That's a [https://bugs.freedesktop.org/show_bug.cgi?id=39949 known bug] with an xserver-org patch (or try the panning option, but that might cause other problems).<br />
<br />
An example of the panning syntax for a 4k laptop with an external 1920x1080 monitor to the right:<br />
<br />
xrandr --output eDP1 --auto --output HDMI1 --auto --panning 3840x2160+3840+0 --scale 2x2 --right-of eDP1<br />
<br />
Generically if your hidpi monitor is AxB pixels and your regular monitor is CxD and you are scaling by [ExF], the commandline for right-of is:<br />
<br />
xrandr --output eDP1 --auto --output HDMI1 --auto --panning [C*E]x[D*F]+[A]+0 --scale [E]x[F] --right-of eDP1<br />
<br />
== Console ==<br />
<br />
The default console font will be very small on hidpi displays, the largest font is {{ic|sun12x22}}, to enable it (temporarily):<br />
<br />
$ setfont sun12x22<br />
<br />
See [[Fonts#Console_fonts]] for more.<br />
<br />
== See also ==<br />
<br />
* [http://www.phoronix.com/scan.php?page=article&item=linux_uhd4k_gpus Ultra HD 4K Linux Graphics Card Testing] (Nov 2013)<br />
* [[Font_configuration]]</div>Adam