On login, display rotates to wrong orientation [HP Pavilion]

Bug #1726160 reported by Nevet Dnulho on 2017-10-22
64
This bug affects 9 people
Affects Status Importance Assigned to Milestone
IIO Sensor Proxy
Fix Released
Unknown
systemd
New
Unknown
iio-sensor-proxy (Ubuntu)
High
Unassigned
linux (Ubuntu)
Undecided
Unassigned
systemd (Ubuntu)
High
Unassigned

Bug Description

I'm using a laptop, and on 17.04 the display always showed correctly, but after upgrading to 17.10, when I log in the display rotates to the right (portrait), and I have to open a terminal and run 'xrandr -o 1' to get it back to the correct (landscape) orientation. In previous versions 'xrandr -o 0' was landscape, and '1' was portrait the other way.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: xorg 1:7.7+19ubuntu3
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
.proc.driver.nvidia.gpus.0000.01.00.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:01:00.0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.104 Thu Sep 14 17:13:13 PDT 2017
 GCC version: gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
.tmp.unity_support_test.0:

ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Sun Oct 22 15:15:08 2017
DistUpgraded: 2017-10-22 14:17:00,381 DEBUG icon theme changed, re-reading
DistroCodename: artful
DistroVariant: ubuntu
DkmsStatus:
 bbswitch, 0.8, 4.10.0-37-generic, x86_64: installed
 bbswitch, 0.8, 4.13.0-16-generic, x86_64: installed
 nvidia-340, 340.104, 4.10.0-37-generic, x86_64: installed
 nvidia-340, 340.104, 4.13.0-16-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 NVIDIA Corporation GT216M [GeForce GT 230M] [10de:0a28] (rev a2) (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company GT216M [GeForce GT 230M] [103c:363c]
InstallationDate: Installed on 2017-01-11 (284 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
LightdmDisplayLog: (II) Server terminated successfully (0). Closing log file.
MachineType: Hewlett-Packard HP Pavilion dv7 Notebook PC
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.13.0-16-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash
SourcePackage: xorg
Symptom: display
UpgradeStatus: Upgraded to artful on 2017-10-22 (0 days ago)
dmi.bios.date: 10/05/2010
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: F.1D
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 363C
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 32.25
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnHewlett-Packard:bvrF.1D:bd10/05/2010:svnHewlett-Packard:pnHPPaviliondv7NotebookPC:pvr039D200002241210000020000:rvnHewlett-Packard:rn363C:rvr32.25:cvnHewlett-Packard:ct10:cvrN/A:
dmi.product.family: 103C_5335KV
dmi.product.name: HP Pavilion dv7 Notebook PC
dmi.product.version: 039D200002241210000020000
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz 1:0.9.13.1+17.10.20170901-0ubuntu1
version.libdrm2: libdrm2 2.4.83-1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.2.2-0ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 17.2.2-0ubuntu1
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.19.5-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.5-1ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20170309-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

Nevet Dnulho (dnulho1) wrote :
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

affects: xorg (Ubuntu) → gnome-shell (Ubuntu)
Changed in gnome-shell (Ubuntu):
importance: Undecided → Low
summary: - On login, display rotates to wrong orientation.
+ On login, display rotates to wrong orientation [HP Pavilion]
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in gnome-shell (Ubuntu):
importance: Low → Undecided
importance: Undecided → High
tags: added: nvidia
Nevet Dnulho (dnulho1) wrote :

In continuing to determine issue, it seems that when waking from suspend, or logging in from power up, the orientation rotates clockwise 90*. I have had 'xrandr -o 0' orient to the right, the bottom, and the left and back to the top of the screen after closing the lid, letting it suspend itself, then reopening the lid.

Download full text (4.5 KiB)

Everytime I reboot, it rotates anticlockwise 90 and sometimes randomly it
switches to inverted screen. I tried using xandr to correct the rotation,
but nothing worked.

On Oct 24, 2017 9:50 AM, "Nevet Dnulho" <email address hidden> wrote:

In continuing to determine issue, it seems that when waking from
suspend, or logging in from power up, the orientation rotates clockwise
90*. I have had 'xrandr -o 0' orient to the right, the bottom, and the
left and back to the top of the screen after closing the lid, letting it
suspend itself, then reopening the lid.

--
You received this bug notification because you are subscribed to a
duplicate bug report (1726509).
https://bugs.launchpad.net/bugs/1726160

Title:
  On login, display rotates to wrong orientation [HP Pavilion]

Status in gnome-shell package in Ubuntu:
  Confirmed

Bug description:
  I'm using a laptop, and on 17.04 the display always showed correctly,
  but after upgrading to 17.10, when I log in the display rotates to
  the right (portrait), and I have to open a terminal and run 'xrandr -o
  1' to get it back to the correct (landscape) orientation. In previous
  versions 'xrandr -o 0' was landscape, and '1' was portrait the other
  way.

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: xorg 1:7.7+19ubuntu3
  ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
  Uname: Linux 4.13.0-16-generic x86_64
  NonfreeKernelModules: nvidia_uvm nvidia
  .proc.driver.nvidia.gpus.0000.01.00.0: Error: [Errno 21] Is a directory:
'/proc/driver/nvidia/gpus/0000:01:00.0'
  .proc.driver.nvidia.registry: Binary: ""
  .proc.driver.nvidia.version:
   NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.104 Thu Sep 14
17:13:13 PDT 2017
   GCC version: gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3)
  .tmp.unity_support_test.0:

  ApportVersion: 2.20.7-0ubuntu3
  Architecture: amd64
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Sun Oct 22 15:15:08 2017
  DistUpgraded: 2017-10-22 14:17:00,381 DEBUG icon theme changed, re-reading
  DistroCodename: artful
  DistroVariant: ubuntu
  DkmsStatus:
   bbswitch, 0.8, 4.10.0-37-generic, x86_64: installed
   bbswitch, 0.8, 4.13.0-16-generic, x86_64: installed
   nvidia-340, 340.104, 4.10.0-37-generic, x86_64: installed
   nvidia-340, 340.104, 4.13.0-16-generic, x86_64: installed
  ExtraDebuggingInterest: Yes
  GraphicsCard:
   NVIDIA Corporation GT216M [GeForce GT 230M] [10de:0a28] (rev a2)
(prog-if 00 [VGA controller])
     Subsystem: Hewlett-Packard Company GT216M [GeForce GT 230M] [103c:363c]
  InstallationDate: Installed on 2017-01-11 (284 days ago)
  InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
  LightdmDisplayLog: (II) Server terminated successfully (0). Closing log
file.
  MachineType: Hewlett-Packard HP Pavilion dv7 Notebook PC
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.13.0-16-generic
root=/dev/mapper/ubuntu--vg-root ro quiet splash
  SourcePackage: xorg
  Symptom: display
  UpgradeStatus: Upgraded to artful on 2017-10-22 (0 days ago)
  dmi.bios.date: 10/05/2010
  dmi.bios....

Read more...

Unsure if same bug. two displays - built in and external on hp laptop; 17.10. Built in display rotates after a few mins being logged in - by 180 degrees.

Jeremy Bicha (jbicha) wrote :

I am reassigning this bug to the kernel since that's usually who the iio-sensor-proxy developer blames for issues like this.

You can try filing an issue with iio-sensor-proxy though.
https://github.com/hadess/iio-sensor-proxy/

If you open the system status menu in the far right of the top bar, you can click the icon at the bottom of the menu that looks like a rotated rectangle to lock or unlock screen auto-rotation. That might be a good workaround.

affects: gnome-shell (Ubuntu) → linux (Ubuntu)
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.14 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14-rc6

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Nevet Dnulho (dnulho1) wrote :

Tried to boot using new latest kernel (4.14.0-041400rc6), and couldn't boot at all, it hung at '[Started] Disk Manager' during every attempt to boot. Had to remove all of the 4.14...-generic and the 4.14...-lowlatency kernal packages from my pc by using ctrl+alt+f2, before it would run again on the 4.13 kernel that came in the ubuntu 17.10 release.

Not sure if it is a driver issue (I do use nvidia proprietary drivers), an incorrect installation issue, or something deeper; but I was unable to get to the point that I could test this bug with the latest upstream kernel.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Sebastien Bacher (seb128) wrote :

@Nevel, did you try Jeremy's workaround? Does uninstalling iio-sensor-proxy makes a difference?

Sebastien Bacher (seb128) wrote :

could you also use that command to tell if
gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy

returns anything?

Nevet Dnulho (dnulho1) wrote :

Before removing iio-sensor-proxy I get this:

:~$ gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
node /net/hadess/SensorProxy {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in s interface_name,
          in s property_name,
          out v value);
      GetAll(in s interface_name,
             out a{sv} properties);
      Set(in s interface_name,
          in s property_name,
          in v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface net.hadess.SensorProxy {
    methods:
      ClaimAccelerometer();
      ReleaseAccelerometer();
      ClaimLight();
      ReleaseLight();
    signals:
    properties:
      readonly b HasAccelerometer = true;
      readonly s AccelerometerOrientation = 'right-up';
      readonly b HasAmbientLight = false;
      readonly s LightLevelUnit = 'lux';
      readonly d LightLevel = 0.0;
  };
  node Compass {
  };
};

I'll post again after removing iio-sensor-proxy and rebooting.

Nevet Dnulho (dnulho1) wrote :

Removed iio-sensor-proxy and I now get:

:~$ gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy
Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name net.hadess.SensorProxy was not provided by any .service files

Also did some testing, and the orientation doesn't seem to be rotating any more. More testing to confirm.

Nevet Dnulho (dnulho1) wrote :

This bug has not occurred since removing the iio-sensor-proxy package. Opening a bug report at https://github.com/hadess/iio-sensor-proxy/.

affects: linux (Ubuntu) → iio-sensor-proxy (Ubuntu)
Changed in iio-sensor-proxy (Ubuntu):
status: Confirmed → In Progress
Daniel van Vugt (vanvugt) wrote :

Rejected upstream: https://github.com/hadess/iio-sensor-proxy/issues/198

Now assigned to systemd?...

Changed in iio-sensor-proxy:
status: Unknown → Fix Released
Changed in iio-sensor-proxy (Ubuntu):
status: In Progress → Invalid
Changed in systemd (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in systemd:
status: Unknown → New
Matej Kovacic (matej-kovacic) wrote :

I have Lenovo Yoga 2 Pro laptop and had the same problem. After reboot (when there was login screen), screen was flickering and endless changing rotation randomly. I managed to stop this by enabling external screen (inserted miniHDMI-to-VGA cable into laptop).

However when I removed miniHDMI-to-VGA cable, flickering immediately begins and laptop was not possible to use.

So I went to Settings - Devices - Screens, and found out I can change default rotation of external screen, but cannot change default rotation of laptop's screen!

Then I found "orientation lock" icon in system tray and screen stopped rotating and flickering randomly. However, this was working only when I has been logged in my account. Login screen was still rotating and flickering randomly!

Fortunately, I was able to lock orientation in login screen also, and now it works fine. Well, I must admit it did not just start to work when I clicked "orientation lock" icon on login screen and as a loggined user, I need to restart laptop SEVERAL TIMES.

However, I have a couple of questions.

First, why there is no option to disable screen rotation completely.

Second, why there is no option to set default screen rotation for internal screen?

Third, does Ubuntu have a group of special UX people who are wondering all day how to f**k their users??? I mean, this bug is a total blocker! And a complete shame. When you are introducing new features - please do it slow and with possibility to disable them.

Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 17.10 (artful) reached end-of-life on July 19, 2018.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in and change the bug status to Confirmed.

Changed in systemd (Ubuntu):
status: Confirmed → Won't Fix
Daniel van Vugt (vanvugt) wrote :

Confirmed by duplicate bug 1768967.

Changed in systemd (Ubuntu):
status: Won't Fix → Confirmed
Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.