Khắc phục lỗi: failed to run redshift ubuntu 17.10

Khắc phục lỗi: failed to run redshift ubuntu 17.10
Khắc phục lỗi: failed to run redshift ubuntu 17.10

Redshift điều chỉnh nhiệt độ màu của màn hình theo môi trường xung quanh. Điều này có thể giúp mắt bạn tổn thương ít hơn nếu bạn đang làm việc ở phía trước màn hình vào ban đêm. Mặc định trên ubuntu  17.10 đã cài sẵn Redshift.

Bài viết này mình sẽ hướng dẫn các bạn khắc phục lỗi redshift thường gặp trên Ubuntu 17.10:

Failed to run redshift trên Ubuntu

  • failed to run redshift
  • Trying location provider `geoclue2’…
  • Unable to get location from provider.
  • Unable to connect to GeoClue

Cách 1

Các bước thực hiện rất đơn giản các bạn chỉ cần tạo 1 file với tên là redshift.conf
và sau đó copy dòng lệnh bên dưới vào đường dẫn sau ~/.config/redshift.conf

; Global settings for redshift[redshift]; Set the day and night screen temperaturestemp-day=5700temp-night=3500; Disable the smooth fade between temperatures when Redshift starts and stops.; 0 will cause an immediate change between screen temperatures.; 1 will gradually apply the new screen temperature over a couple of seconds.fade=1; Solar elevation thresholds.; By default, Redshift will use the current elevation of the sun to determine; whether it is daytime, night or in transition (dawn/dusk). When the sun is; above the degrees specified with elevation-high it is considered daytime and; below elevation-low it is considered night.;elevation-high=3;elevation-low=-6; Custom dawn/dusk intervals.; Instead of using the solar elevation, the time intervals of dawn and dusk; can be specified manually. The times must be specified as HH:MM in 24-hour; format.;dawn-time=6:00-7:45;dusk-time=18:35-20:15; Set the screen brightness. Default is 1.0.;brightness=0.9; It is also possible to use different settings for day and night; since version 1.8.;brightness-day=0.7;brightness-night=0.4; Set the screen gamma (for all colors, or each color channel; individually)gamma=0.8;gamma=0.8:0.7:0.8; This can also be set individually for day and night since; version 1.10.;gamma-day=0.8:0.7:0.8;gamma-night=0.6; Set the location-provider: 'geoclue2', 'manual'; type 'redshift -l list' to see possible values.; The location provider settings are in a different section.location-provider=manual; Set the adjustment-method: 'randr', 'vidmode'; type 'redshift -m list' to see all possible values.; 'randr' is the preferred method, 'vidmode' is an older API.; but works in some cases when 'randr' does not.; The adjustment method settings are in a different section.adjustment-method=randr; Configuration of the location-provider:; type 'redshift -l PROVIDER:help' to see the settings.; ex: 'redshift -l manual:help'; Keep in mind that longitudes west of Greenwich (e.g. the Americas); are negative numbers.[manual]lat=48.1lon=11.6; Configuration of the adjustment-method; type 'redshift -m METHOD:help' to see the settings.; ex: 'redshift -m randr:help'; In this example, randr is configured to adjust only screen 0.; Note that the numbering starts from 0, so this is actually the first screen.; If this option is not specified, Redshift will try to adjust _all_ screens.[randr]

Bước cuối cùng là khởi động lại máy tính là xong

Cách 2

Hoặc có thể cài geoclue2 để khắc phục lỗi trên (cách này mình tình cờ tìm thấy trên Github) , mở terminal lên gõ lệnh bên dưới

sudo apt install geoclue-2.0

Không cần khởi động lại. Chỉ cần tìm kiếm Redshift trong menu và khởi động nó. Bạn sẽ không thấy lỗi failed to run Redshift nữa

Lời kết

Bên trên mình đã hướng dẫn các bạn xử lý lỗi trên nếu trong quá trình thực hiện gặp lỗi hay thắc mắc gì thì để lại comment phía dưới bài này nhé .

Chiasefree

I am passionate about blogging and sharing good tips to readers, I like random web programming. Never back down.

Đăng nhận xét (0)
Mới hơn Cũ hơn